SlideShare a Scribd company logo
Business LogicFrom btn_Click to business layersJon LimjapSenior Developer for ITRSMVP for C#
AgendaWhere we left offCommon patterns and anti-patterns of business logicWhich ORM do I use?Towards a better designed application
Where we left offEntity Framework and other ORMs
Entity Framework (and other ORMs, really)
Why is this important?Separation of concernsReuse of data access methods across different business rule implementationsCentralized management of connection pools, data caching possibilities, etc.
Common patterns and anti-patterns of Business LogicHow business logic is strewn across your application
Business Logic (and data access) in the UI layerUser Interface/Data Access/Business LogicBusiness Logic and data access in click events, UI Data Providers, etc.Big Ball of MudRelational Database
Business Logic in the Data LayerUser InterfaceMay or may not be presentData Access LayerRelational DatabaseBusiness Logic in stored procedures
Business logic separate from data and UIUser InterfaceBusiness Logic LayerEntity Framework, Nhibernate, LINQ to SQL, ADO, etc.Data Access LayerRelational Database
Business logic in the cloudHTTPHosting/HTTP ListenerData Services RuntimeBusiness Logic LayerData Access LayerRelational Database
Which ORM do I use?If there’s very little difference between ORM’s anyway…
ConsiderationsDatabase First: Generate model from existing databaseModel First: Create your model and generate your databaseCode First:  In-memory mapping (EF only)
Summary
Towards a better designed applicationWhy bother going down this path
Why should I bother?Single Responsibility Principle Change in once place fix everywhereExtensibilityTestability
What do I do now?No need to change existing setup – unless you’ve decided to rewrite everythingBaby stepsFor new features, code new layers in a “thin vertical slice”Expand only as needed
Further Reading

More Related Content

PPT
Zachman Tutorial
ODP
Free Accounting Software UK
PPT
Zachman Framework
PDF
Data Entry Standards: Keeping CRM Consistent
PPTX
UBS Tech Talk:Info Path
PPTX
Business Architecture Light
PPTX
Power features (busy 12)
Zachman Tutorial
Free Accounting Software UK
Zachman Framework
Data Entry Standards: Keeping CRM Consistent
UBS Tech Talk:Info Path
Business Architecture Light
Power features (busy 12)

Viewers also liked (10)

PDF
The courage to business logic – Business Driven Architecture
PDF
A Business Logic of Services
PPTX
Bizlogic Infosystems Presentation
PDF
Service Objects in Rails apps
ODP
Joomla Day India 2009 Business Logic With The Mvc
PDF
Mind Your Business. And Its Logic
PDF
[Nuxeo World 2013] Workshop - Implement your Business Logic
PDF
The Importance of Logic in Business
PDF
4 m3 p
PPTX
Critical Thinking & Logic in Ethics
The courage to business logic – Business Driven Architecture
A Business Logic of Services
Bizlogic Infosystems Presentation
Service Objects in Rails apps
Joomla Day India 2009 Business Logic With The Mvc
Mind Your Business. And Its Logic
[Nuxeo World 2013] Workshop - Implement your Business Logic
The Importance of Logic in Business
4 m3 p
Critical Thinking & Logic in Ethics
Ad

Similar to MSDN Ramp-Up Part 3: Business logic (20)

PPTX
L07 Oranizing Domain Logic
PDF
L15 Organising Domain Layer
PPTX
L13 Oranizing Domain Logic
PPTX
.NET RIA Services Architecture Overview
PDF
L19 Application Architecture
PPTX
.NET Architecture for Enterprises
PPTX
L19 Application Architecture
PPTX
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
PDF
Asp net-mvc-3 tier
PPT
3 Tier Architecture
PPTX
Layered Software Architecture
PPTX
Web apps architecture
PDF
3-Tier Architecture Step By Step Exercises
PPT
Architecting and Designing Enterprise Applications
PPT
The tier application
PDF
An Introduction to Multilayered Software Architecture
PPTX
3 tier architecture in Asp.Net
PPT
J2 ee archi
L07 Oranizing Domain Logic
L15 Organising Domain Layer
L13 Oranizing Domain Logic
.NET RIA Services Architecture Overview
L19 Application Architecture
.NET Architecture for Enterprises
L19 Application Architecture
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Asp net-mvc-3 tier
3 Tier Architecture
Layered Software Architecture
Web apps architecture
3-Tier Architecture Step By Step Exercises
Architecting and Designing Enterprise Applications
The tier application
An Introduction to Multilayered Software Architecture
3 tier architecture in Asp.Net
J2 ee archi
Ad

More from Jacinto Limjap (11)

PPTX
Maintainable UI Tests with Selenium and C#
PPTX
Refactoring to Microservices
PPTX
Donetconf2016: The Future of C#
ODP
C# and the Evolution of a Programming Language
PPTX
SQL vs NoSQL
PPTX
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
PPTX
N-tier and oop - moving across technologies
PPT
Developing windows phone 7 applications
PPT
Automated Unit Testing in Silverlight for Windows Phone 7
PPTX
Dynamics & Object Runtime Composition with C# 4.0
PPTX
Three Developer Abilities They Dont Teach In College
Maintainable UI Tests with Selenium and C#
Refactoring to Microservices
Donetconf2016: The Future of C#
C# and the Evolution of a Programming Language
SQL vs NoSQL
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
N-tier and oop - moving across technologies
Developing windows phone 7 applications
Automated Unit Testing in Silverlight for Windows Phone 7
Dynamics & Object Runtime Composition with C# 4.0
Three Developer Abilities They Dont Teach In College

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Modernizing your data center with Dell and AMD
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
20250228 LYD VKU AI Blended-Learning.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Monthly Chronicles - July 2025
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Modernizing your data center with Dell and AMD
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

MSDN Ramp-Up Part 3: Business logic

  • 1. Business LogicFrom btn_Click to business layersJon LimjapSenior Developer for ITRSMVP for C#
  • 2. AgendaWhere we left offCommon patterns and anti-patterns of business logicWhich ORM do I use?Towards a better designed application
  • 3. Where we left offEntity Framework and other ORMs
  • 4. Entity Framework (and other ORMs, really)
  • 5. Why is this important?Separation of concernsReuse of data access methods across different business rule implementationsCentralized management of connection pools, data caching possibilities, etc.
  • 6. Common patterns and anti-patterns of Business LogicHow business logic is strewn across your application
  • 7. Business Logic (and data access) in the UI layerUser Interface/Data Access/Business LogicBusiness Logic and data access in click events, UI Data Providers, etc.Big Ball of MudRelational Database
  • 8. Business Logic in the Data LayerUser InterfaceMay or may not be presentData Access LayerRelational DatabaseBusiness Logic in stored procedures
  • 9. Business logic separate from data and UIUser InterfaceBusiness Logic LayerEntity Framework, Nhibernate, LINQ to SQL, ADO, etc.Data Access LayerRelational Database
  • 10. Business logic in the cloudHTTPHosting/HTTP ListenerData Services RuntimeBusiness Logic LayerData Access LayerRelational Database
  • 11. Which ORM do I use?If there’s very little difference between ORM’s anyway…
  • 12. ConsiderationsDatabase First: Generate model from existing databaseModel First: Create your model and generate your databaseCode First: In-memory mapping (EF only)
  • 14. Towards a better designed applicationWhy bother going down this path
  • 15. Why should I bother?Single Responsibility Principle Change in once place fix everywhereExtensibilityTestability
  • 16. What do I do now?No need to change existing setup – unless you’ve decided to rewrite everythingBaby stepsFor new features, code new layers in a “thin vertical slice”Expand only as needed