Language preference:

Phase 1 / Overview: Create classes for your business logic

When you use Peter’s Business Logic Driven UI (“BLD”) , you are agreeing to use a popular pattern in software development, involving layers for user interface (officially called “presentation layer” in this pattern), business logic, data access, and the data storage system. This multilayered approach ensures business logic contains no user interface code, allowing business logic code to be much more testable, debuggable, maintainable, and resuable. BLD provides an architecture for creating these classes.

Note: The above diagram includes more than BLD supports, such as MVC, Windows, Silverlight, nHibernate, LLBGenPro. Yet its business logic code can be used with all of them. It’s just a matter of writing the classes for user interface and/or Data Access Layer.

In Phase 1, we'll start in the Business Logic Layer and Data Access Layer. Both require some skills in programming. (No design mode when it comes to writing classes!)

We will learn about classes found in both layers and how to create them using tools built into Visual Studio.

Since this application is actually a Web Forms application with BLD's assemblies and support files installed, we'll see how it takes just a couple of lines to connect your Business Logic Layer to the Web Forms user interface.

When Phase 1 is complete, a very simple BLD-based web application is active. There is much more to go to realize the final application.

Tours for Phase 1
  1. Introducing Entity classes and DataFields - Describing your tables as a class.
  2. Introducing DataAnnotation attributes and the Entity Metadata class - How and where business rules are defined.
  3. Introducing Data Access Objects - How your Business Logic performs CRUD operations.
  4. Introducing DataContexts - A look at the class representing the database
  5. Generating the classes of the Data Access Layer - Using Visual Studio Item Templates to create these files.
  6. Generating the classes of the Business Logic Layer - Using Visual Studio Item Templates to create these files.
  7. Customizing the Data Access Objects classes - A look at the classes that handle CRUD ("Create, Read, Update, Delete") actions on those tables.
  8. EntityFilter classes - A powerful collection of filter classes used to create queries.
  9. Descriptor classes - How BLD captures the structure and business rules of your database.
  10. Connect the business logic classes to BLD - This is the first point where the user interface gets involved.
  11. Play with the BLD Database Explorer Application - Run an application that utilizes the business logic files.