SlideShare a Scribd company logo
Data Access Layers
Convenience vs. Control and
Performance?
Daniel Fisher(lennybacon)
Software Architect
Objectives
 You know what Data is
 You know what a database is (not)
 You know what OOP is
 You know what N-Tier means
Background
 Most Applications out there need a data store
 My Opinion ;-)
 Databases are intended to serve data in
multithreaded and multi client access
scenarios
 XML is just File IO
 Access is NOT a database
Database vs. Memory
 Different data store
 Behavior
 Persistence
 Transactions
 Data (types)
 Database Automation Types vs.
 Development platform Type System
Moving to Memory
 Raw Data from SQL Server
 Result Set
 (Raw) Data
 Untyped
 Tabular Data
 DataSet/DataTable
 Business Objects
 Domain Model
(Raw) Data
 Command & Connection
 DataReader & Scalar execution
(Raw) Objects
 Code it all on your own
 Forget Strong Types
 Forget OOP
 Forget Calculations
 ... And so on
 NOT an option for complex data!
Tabular Data
 DataSet and DataTable
 Adapter in the middle
Tabular Data
 Great IDE Support
 Easy to use
 Internally uses a DataReader
 Stores data as:
 DOM
 DiffGram
 NOOOP
 Violates N-Tier architecture priciples
2006 DDD4: Data access layers - Convenience vs. Control and Performance?
I‘m Sorry
 I wanted to show a console application that fills a
DataTable with 100000 rows of the customer
database and profile it‘s memory...
 I killed dotTrace 2.0 process after 2 hours
 My box is a 2 Ghz dual core with 2 Gigs RAM
 Wow!
Business Objects
 Some mapping mechanism
Mapping mechanisms
 Declarative Attributes
 Mapping Configuration
 Code
Mapping conflicts
 DesignTime vs. RunTime
 Performance vs. Convinience
 Hmmmm?
N-Tier: Top Down vs. Star
Motivations of the code
 Nice OOP
 Simply work with „natural“ objects
 Clean N-Tier
 Never use „System.Data“ in your logical code
 No SQL?
 Reduce code duplicates
 Data access methods
 Codewalk
 DataAccess
 Object Model
 Client code
Topographical Tiers
 What if you need to spread your application
across multiple boxes
 Architectural requirements
 Scalability requirements
 Infrastructural requirements
Adding a Tier
Client Server
Manager code
- Forwards calls service
- Converts messages to types
Manager code
- Access database
- Converts data to types
Summary
 Write less code
 Use the left lines to build reusable modules and
increase developer expirience
 Autonomy
 Write code that is independent to prevent scale
out issues
 Disconneced
 Connect only if you need data (get/set)
 Define concurrency strategies
Call to action
 It‘s not hard to write such things on your own
 Controled performance
 Controled memory usage
 The developer expirience you want
 Add-in
 Custom tool
 MsBuild Task
 ...
2006 DDD4: Data access layers - Convenience vs. Control and Performance?

More Related Content

PPT
Object Relational Mapping In Real World Applications
PPTX
Databases in .NET
PPTX
Object-Relational Mapping and Dependency Injection
PPTX
Teri Grossheim - Amazon Presentation
PDF
Scalable database, Scalable language @ JDC 2013
PPTX
13 - Panorama Necto 14 building models - visualization & data discovery solu...
PDF
Object- Relational Persistence in Smalltalk
PPTX
Entity framework introduction sesion-1
Object Relational Mapping In Real World Applications
Databases in .NET
Object-Relational Mapping and Dependency Injection
Teri Grossheim - Amazon Presentation
Scalable database, Scalable language @ JDC 2013
13 - Panorama Necto 14 building models - visualization & data discovery solu...
Object- Relational Persistence in Smalltalk
Entity framework introduction sesion-1

Viewers also liked (20)

PPTX
2015 DWX - Komponenten und Konsequenzen
PPTX
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
PPTX
2009 - NRW Conf: (ASP).NET Membership
PPTX
2009 - Microsoft Springbreak: IIS, PHP & WCF
PPTX
2009 Dotnet Information Day: More effective c#
PPTX
.NET Developer Days 2015, PL: Defensive programming, resilience patterns & an...
PPTX
2015 - Basta! 2015, DE: JavaScript und build
PDF
A Distributed Architecture for Sharing Ecological Data Sets with Access and U...
PPTX
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...
PPT
2005 - NRW Conf: Design, Entwicklung und Tests
PPTX
2011 - DNC: REST Wars
PPTX
2008 - TechDays PT: Modeling and Composition for Software today and tomorrow
PPTX
2008 - Basta!: DAL DIY
PPTX
2009 - DNC: Silverlight ohne UI - Nur als Cache
PPTX
2011 - Dotnet Information Day: NUGET
PPTX
2007 - Basta!: Nach soa kommt soc
PPTX
2008 - TechDays PT: Building Software + Services with Volta
PPTX
2010 - Basta!: REST mit ASP.NET MVC
PPT
2006 - Basta!: Advanced server controls
PDF
2015 - Network 2015, UA: Defensive programming, resilience patterns & antifra...
2015 DWX - Komponenten und Konsequenzen
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2009 - NRW Conf: (ASP).NET Membership
2009 - Microsoft Springbreak: IIS, PHP & WCF
2009 Dotnet Information Day: More effective c#
.NET Developer Days 2015, PL: Defensive programming, resilience patterns & an...
2015 - Basta! 2015, DE: JavaScript und build
A Distributed Architecture for Sharing Ecological Data Sets with Access and U...
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...
2005 - NRW Conf: Design, Entwicklung und Tests
2011 - DNC: REST Wars
2008 - TechDays PT: Modeling and Composition for Software today and tomorrow
2008 - Basta!: DAL DIY
2009 - DNC: Silverlight ohne UI - Nur als Cache
2011 - Dotnet Information Day: NUGET
2007 - Basta!: Nach soa kommt soc
2008 - TechDays PT: Building Software + Services with Volta
2010 - Basta!: REST mit ASP.NET MVC
2006 - Basta!: Advanced server controls
2015 - Network 2015, UA: Defensive programming, resilience patterns & antifra...
Ad

Similar to 2006 DDD4: Data access layers - Convenience vs. Control and Performance? (20)

PPTX
L08 Data Source Layer
PPT
W-JAX Performance Workshop - Database Performance
PPTX
Optimizing Application Performance - 2022.pptx
PPT
Ling to SQL and Entity Framework performance analysis
DOC
10265 developing data access solutions with microsoft visual studio 2010
PPT
PDF
Foundations of programming
DOCX
Framework 4
PPTX
PATTERNS07 - Data Representation in C#
PPTX
.NET Architecture for Enterprises
PPT
Ado.net & data persistence frameworks
PDF
Mvc acchitecture
DOCX
SetFocus Portfolio
PDF
L17 Data Source Layer
DOCX
Uma SunilKumar Resume
PPTX
A miało być tak... bez wycieków
PPTX
Pragmatic Architecture in .NET
PDF
C# .NET Developer Portfolio
PPT
Introduction To .Net Compact Framework and SQL Server CE Development
DOCX
L08 Data Source Layer
W-JAX Performance Workshop - Database Performance
Optimizing Application Performance - 2022.pptx
Ling to SQL and Entity Framework performance analysis
10265 developing data access solutions with microsoft visual studio 2010
Foundations of programming
Framework 4
PATTERNS07 - Data Representation in C#
.NET Architecture for Enterprises
Ado.net & data persistence frameworks
Mvc acchitecture
SetFocus Portfolio
L17 Data Source Layer
Uma SunilKumar Resume
A miało być tak... bez wycieków
Pragmatic Architecture in .NET
C# .NET Developer Portfolio
Introduction To .Net Compact Framework and SQL Server CE Development
Ad

More from Daniel Fisher (15)

PPTX
MD DevdDays 2016: Defensive programming, resilience patterns & antifragility
PPTX
NRWConf, DE: Defensive programming, resilience patterns & antifragility
PPTX
2015 - Basta! 2015, DE: Defensive programming, resilience patterns & antifrag...
PPTX
2011 - DotNetFranken: ASP.NET MVC Localization
PPTX
2011 NetUG HH: ASP.NET MVC & HTML 5
PPTX
2010 - Basta!: REST mit WCF 4, Silverlight und AJAX
PPTX
2010 - Basta!: IPhone Apps mit C#
PPTX
2010 - Basta: ASP.NET Controls für Web Forms und MVC
PPTX
2010 Basta!: Massendaten mit ADO.NET
PPTX
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
PPTX
2009 - Basta!: Agiles requirements engineering
PPT
2008 - Basta!: Massendaten auf dem Client
PPTX
2008 - Afterlaunch: 10 Tipps für WCF
PPS
2006 - NRW Conf: Asynchronous asp.net
PPTX
2006 - DDD4: Decoupling service oriented backend systems
MD DevdDays 2016: Defensive programming, resilience patterns & antifragility
NRWConf, DE: Defensive programming, resilience patterns & antifragility
2015 - Basta! 2015, DE: Defensive programming, resilience patterns & antifrag...
2011 - DotNetFranken: ASP.NET MVC Localization
2011 NetUG HH: ASP.NET MVC & HTML 5
2010 - Basta!: REST mit WCF 4, Silverlight und AJAX
2010 - Basta!: IPhone Apps mit C#
2010 - Basta: ASP.NET Controls für Web Forms und MVC
2010 Basta!: Massendaten mit ADO.NET
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
2009 - Basta!: Agiles requirements engineering
2008 - Basta!: Massendaten auf dem Client
2008 - Afterlaunch: 10 Tipps für WCF
2006 - NRW Conf: Asynchronous asp.net
2006 - DDD4: Decoupling service oriented backend systems

Recently uploaded (20)

PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
medical staffing services at VALiNTRY
PDF
Digital Strategies for Manufacturing Companies
PPTX
Transform Your Business with a Software ERP System
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
top salesforce developer skills in 2025.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
L1 - Introduction to python Backend.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How Creative Agencies Leverage Project Management Software.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
CHAPTER 2 - PM Management and IT Context
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Reimagine Home Health with the Power of Agentic AI​
Upgrade and Innovation Strategies for SAP ERP Customers
medical staffing services at VALiNTRY
Digital Strategies for Manufacturing Companies
Transform Your Business with a Software ERP System
Which alternative to Crystal Reports is best for small or large businesses.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Odoo POS Development Services by CandidRoot Solutions
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
top salesforce developer skills in 2025.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
L1 - Introduction to python Backend.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

2006 DDD4: Data access layers - Convenience vs. Control and Performance?

  • 1. Data Access Layers Convenience vs. Control and Performance? Daniel Fisher(lennybacon) Software Architect
  • 2. Objectives  You know what Data is  You know what a database is (not)  You know what OOP is  You know what N-Tier means
  • 3. Background  Most Applications out there need a data store  My Opinion ;-)  Databases are intended to serve data in multithreaded and multi client access scenarios  XML is just File IO  Access is NOT a database
  • 4. Database vs. Memory  Different data store  Behavior  Persistence  Transactions  Data (types)  Database Automation Types vs.  Development platform Type System
  • 5. Moving to Memory  Raw Data from SQL Server  Result Set  (Raw) Data  Untyped  Tabular Data  DataSet/DataTable  Business Objects  Domain Model
  • 6. (Raw) Data  Command & Connection  DataReader & Scalar execution
  • 7. (Raw) Objects  Code it all on your own  Forget Strong Types  Forget OOP  Forget Calculations  ... And so on  NOT an option for complex data!
  • 8. Tabular Data  DataSet and DataTable  Adapter in the middle
  • 9. Tabular Data  Great IDE Support  Easy to use  Internally uses a DataReader  Stores data as:  DOM  DiffGram  NOOOP  Violates N-Tier architecture priciples
  • 11. I‘m Sorry  I wanted to show a console application that fills a DataTable with 100000 rows of the customer database and profile it‘s memory...  I killed dotTrace 2.0 process after 2 hours  My box is a 2 Ghz dual core with 2 Gigs RAM  Wow!
  • 12. Business Objects  Some mapping mechanism
  • 13. Mapping mechanisms  Declarative Attributes  Mapping Configuration  Code
  • 14. Mapping conflicts  DesignTime vs. RunTime  Performance vs. Convinience  Hmmmm?
  • 15. N-Tier: Top Down vs. Star
  • 16. Motivations of the code  Nice OOP  Simply work with „natural“ objects  Clean N-Tier  Never use „System.Data“ in your logical code  No SQL?  Reduce code duplicates  Data access methods
  • 17.  Codewalk  DataAccess  Object Model  Client code
  • 18. Topographical Tiers  What if you need to spread your application across multiple boxes  Architectural requirements  Scalability requirements  Infrastructural requirements
  • 19. Adding a Tier Client Server Manager code - Forwards calls service - Converts messages to types Manager code - Access database - Converts data to types
  • 20. Summary  Write less code  Use the left lines to build reusable modules and increase developer expirience  Autonomy  Write code that is independent to prevent scale out issues  Disconneced  Connect only if you need data (get/set)  Define concurrency strategies
  • 21. Call to action  It‘s not hard to write such things on your own  Controled performance  Controled memory usage  The developer expirience you want  Add-in  Custom tool  MsBuild Task  ...