5. Why is this important? Separation of concerns Reuse of data access methods across different business rule implementations Centralized management of connection pools, data caching possibilities, etc.
6. Common patterns and anti-patterns of Business Logic How business logic is strewn across your application
7. Business Logic (and data access) in the UI layer User Interface/Data Access/Business Logic Business Logic and data access in click events, UI Data Providers, etc. Big Ball of Mud Relational Database
8. Business Logic in the Data Layer User Interface May or may not be present Data Access Layer Relational Database Business Logic in stored procedures
9. Business logic separate from data and UI User Interface Business Logic Layer Entity Framework, Nhibernate, LINQ to SQL, ADO, etc. Data Access Layer Relational Database
10. Business logic in the cloud HTTP Hosting/HTTP Listener Data Services Runtime Business Logic Layer Data Access Layer Relational Database
11. Which ORM do I use? If there’s very little difference between ORM’s anyway…
12. Considerations Database First: Generate model from existing database Model First: Create your model and generate your database Code First: In-memory mapping (EF only)
14. Towards a better designed application Why bother going down this path
15. Why should I bother? Single Responsibility Principle Change in once place fix everywhere Extensibility Testability
16. What do I do now? No need to change existing setup – unless you’ve decided to rewrite everything Baby steps For new features, code new layers in a “thin vertical slice” Expand only as needed