Understanding HB Code - Line of business application for WPF - Part I
HB Code - Line of business application for [WPF] (Note: The original article is no longer available online)
This project is made available as open-source and hosted freely on www.codeplex.com.
Prerequisites
- [Object-oriented programming] (Note: The original article is no longer available online) using C#.NET and [LINQ] (Note: The original article is no longer available online).
- Nuget package usage.
- Basic knowledge of WPF application building such as input controls, container controls, triggers, styles, templates.
- [Entity Framework] (Note: The original article is no longer available online), currently knowing any of versions of Entity Framework will work to check the working sample.
- Sql Server 2005 database configuration and [Sql queries] (Note: The original article is no longer available online).
Built
Technologies: .NET 4.0, WPF, Entity Framework 4.3 Code First,
Control toolkits: Avalon Dock, Avalon Dock [MVVM] (Note: The original article is no longer available online), WPF Toolkit, WPF Extended toolkit, Microsoft Ribbon for WPF
Tools: Visual Studio Professional 2010, Sql Server 2005 Express, Entity Framework Power tools extension, Nuget Package Manager.
Please note: Current implementation is kept intentionally strongly typed to keep it easy to understand and reduce development time at initial stage.
Solution Projects Overview
- HBCode Application (View)
This is the main entry point of the application. In this part, we have all the WPF and [UI] (Note: The original article is no longer available online) specific code implementations. It basically contains the WPF resources, WPF converters, Extended User Controls, Images, Application and Database Configurations, and Views (UserControls) used in the application.
- HBCode Business Logic (Model)
This project contains all the business modules, business logic validation, and database connectivity, property change notifications implementations. Currently it uses Entity Framework 4.3 Code First with migrations to connect with the database. The Entity Framework 4.3 building blocks such as Database Context, Models, and Migration classes exist in this project.
- HBCode Presentation (ViewModel)
This project contains the middle-tier ViewModel classes. [View Model] (Note: The original article is no longer available online) contains Collection of models, single models and sometimes aggregate properties for display purposes. The UserControls aka View are Databound to ViewModels containing model instances. ViewModels are built considering the UI layout and requirements. Such as if we consider a Sales billing UI will be containing Item list in grid and there will be one ComboBox column to display items to select from, so to Databound the [Combobox] (Note: The original article is no longer available online) we could either List<ItemModel> property in ViewModel at top-level or we can implement List<ItemModel> per row instance in List<ItemSaleModel> which would be bound to grid.
This project is made available as open-source and hosted freely on www.codeplex.com. You can download the source from [www.hbcode.codeplex.com] (Note: The original article is no longer available online).
Related articles
- Quick Update on "WPF With The MVVM and Entity Framework"
- WPF - Is it coming to an End ?
- Microsoft Open Sources their Entity Framework ORM

