Domain-Driven Design using the ADO.NET Entity Framework Tim McCarthy Principal Engineer, InterKnowlogy

Slides:



Advertisements
Similar presentations
January 30, 2014 Copyright Jim Farley Beyond JDBC: Java Object- Relational Mappings Jim Farley e-Commerce Program Manager GE Research and Development
Advertisements

Test Automation: Coded UI Test
Why am I here Development techniques are headed down the wrong path! Our world should be getting simpler – it is not The solutions that will solve the.
Introduction to.NET Technology Marcello Benati Software Engineer.NET Architect.
Craig Berntson
UNIT-e Research & Development Microsoft Technology Day Stephen Cain (System Architect)
Enterprise Smart Clients Architecture, Patterns, Design, Best Practices Keith Elder Manager, Sr. Software Engineer Quicken Loans Blog:
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Ganesh Subramanian 22/12/2010
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Architectural Design Principles. Outline  Architectural level of design The design of the system in terms of components and connectors and their arrangements.
Shailen Sukul Senior Solutions Architect EMC BSc | Mct | Mcpd (.Net 2/3.5) | Mcts (Sharepoint (MOSS/WSS), Biztalk, Web, Win, Dist Apps) | Mcsd.NET | Mcsd.
TrackDayTimeTitle ProjectTuesday12:30pm-1:45pm Managing tasks and projects with SharePoint Online and Project Pro for Office 365 ProjectWednesday9:00am-10:15amManaging.
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Mobile CRM and beyond Martin Booth Partner Technical Specialist.
Enterprise Business Information Model Enterprise Data Services.
Corporate Efficiency Meeting Improving Your Business Processes Using SharePoint and Beyond.
Building Offline/Cache Mode Web Apps Using Sync Framework Mike Clark Group Manager Cloud Data Services Team
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
1 Developing Rules Driven Workflows in Windows Workflow Foundation Jurgen Willis COM318 Program Manager Microsoft Corporation.
DYNAMICS CRM AS AN xRM DEVELOPMENT PLATFORM Jim Novak Solution Architect Celedon Partners, LLC
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Presenter - Donn Felker.  Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise.
Entity Framework, a quickstart Florin−Tudor Cristea, Microsoft Student Partner.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
1 Keith Vicens, Managing Consultant CRM Housing Solution Extending Your Case Management Capabilities.
Microsoft.NET Platform Adam Seligman Strategy Advisor and.NET Agitator
Creating Page Layouts using SharePoint Designer or Visual Studio Becky Bertram MVP SharePoint Server, MCSD, MCAD
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Framework Universal & Infinite Software Solution.
Todd Kitta  Covenant Technology Partners  Professional Windows Workflow Foundation.
Domain-Driven Design Tim McCarthy Principal Engineer, InterKnowlogy
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
POSTSHARP TECHNOLOGIES Better software through simpler code.
What You Need before You Deploy Master Data Management Presented by Malcolm Chisholm Ph.D. Telephone – Fax
ICINETIC Experts in.NET technologies and architectures.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
Composite User Interface Application Block Peter Provost Development Lead – patterns & practices
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
Applying Domain-Driven Design Jimmy Nilsson Webcast with UML China
1.NET and XML Web Services A Primer for Network Administrators John Robbins Version 1.0 Copyright © 2002 Wintellect.
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
Microsoft Australia Security Summit Design for Operations Nigel Watson, Microsoft Australia David Lemphers, TeamForce Nigel Watson, Microsoft Australia.
ICINETIC Experts in.NET technologies and architectures.
Consultant Effective Patterns and Practices in J2EE George de la Torre.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
EBIZ302 Jupiter Business Process Automation and Web Services David Fong Program Manager.
ARCH-5: Service Interfaces in Practice Christian Stiller Technical Architect.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
Aggregate In DDD. What makes an ENTITY AGGREGATE root Has global identity. Expected to be directly accessed in typical business scenarios. If it has other.
DOMAIN DRIVEN DESIGN Dave 12 May WHAT IS DDD? Set of principles to aid in building complex systems Enables us to focus on core problem domain NOT.
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
Building Enterprise Applications Using Visual Studio®
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Did your feature got in, out or planned?
ADO.NET Entity Framework Marcus Tillett
ADO.NET Entity Framework
Module 1: Getting Started
Visual Studio 2005 “Personalized productivity”
Architectural Roadmap
DAT381 Team Development with SQL Server 2005
Jochen Seemann Program Manager Enterprise Tools Microsoft Corporation
Entity Framework Core for Enterprise Applications
Microsoft Office System UK Developers Conference
Software Design Lecture 5.
SO-Architectural Roadmap
Introduction to ASP.NET Parts 1 & 2
Presentation transcript:

Domain-Driven Design using the ADO.NET Entity Framework Tim McCarthy Principal Engineer, InterKnowlogy

About… InterKnowlogy ( Tim McCarthy, Principal Engineer Custom App Dev / Consulting / Software Engineering Firm headquartered in Carlsbad, CA Microsoft Gold Partner managed in SoCal and Redmond Design, Architect, Build and Deploy enterprise class applications Industry Experts: 90% of the company is published Microsoft ®.NET Application development for 5+ years! Microsoft ®.NET Smart Client pioneers / industry leaders Information Worker Solutions Integration / Messaging, B2B / B2C, Wireless / Mobility Microsoft ® SharePoint, Microsoft ® BizTalk ® Web Services, Microsoft ® Active Directory ®, Security, SSO, Authorization, Authentication Solutions on the emerging Microsoft servers Largest Client: Microsoft

Agenda Organizing Domain Logic What is DDD? Why Domain-Driven Design (DDD)? DDD Definitions/Patterns ADO.NET Entity Framework When is DDD appropriate?

Organizing Domain Logic Transaction Script Domain Model Table Module

Choosing the Right Approach

Demo: Organizing Domain Logic

What is DDD?

Why Domain-Driven Design (DDD)? Most development time is still spent writing plumbing code instead of business logic Typically, the UI will change a LOT more than the business logic The model is a great tool for communication between developers and users.NET has good support for it!

Ubiquitous Language Common terms between business experts and development team Use the language in your code Namespaces Class, property, method, variable names

Communicating the Language Create whiteboard drawings Favor whiteboarding over Visio Use digital camera to capture, then paste into Word Use Visual Studio class diagrams for core parts of the domain Code and diagram are kept in sync No wasted time diagramming, your diagram is the code

Definition: Entities An object defined primarily by its identity Not its attributes Could be a person, a customer, an order, etc. Not all objects have meaningful identities… In some systems, a class may be an ENTITY, in others maybe not

Definition: Value Objects Represent an aspect of the domain with NO conceptual identity Use when you care about what something is, not who they are Same thing as a DTO [Fowler PoEAA] Simple, immutable objects

Definition: Aggregates A cluster of associated objects treated as a unit for the purpose of data changes They have a root and a boundary Boundary = what is inside the AGGREGATE Root = single ENTITY inside the AGGREGATE Most important concept to understand in modelling!

Aggregate Rules The root ENTITY has global identity ENTITIES inside the boundary have local identity Nothing outside the AGGREGATE boundary can hold a reference to anything inside, except to the root ENTITY Objects in the AGGREGATE can hold references to other AGGREGATE roots …a few more

Definition: Services An operation offered as an interface that stands alone in the model Does not fit into any of the objects in the model Stateless To be used judiciously (do not turn your app into a Transaction Script) Use when an operation is an important domain concept

Pattern: Layered Supertype [Fowler 475] Type that acts as the supertype for all types in its layer, i.e. a base class! Factors out common features, such as handling the identity of ENTITIES Example: a common Id property Helps eliminate duplicate code

Pattern: Repository Provide access to AGGREGATE roots Represents all objects of a certain type as a conceptual set (usually emulated) Behaves like a collection, e.g. Add(), Remove(), FindBy(id), etc. Persistence Ignorance!

Pattern: Layered Architecture

Infrastructure Persistence Strategies Remember, Domain Model is Persistent Ignorant! Approaches Custom Manual Code Code Generation Metadata Mapping (O/R Mapping)

ADO.NET Entity Framework: Goals Raise abstraction Level for Data Programming Get Rid of the Plumbing

ADO.NET Entity Framework Provides Mapping from relational data to.NET classes Auto-generation of both mapping and entities Uses a New Data Provider The EntityClient Provider Supports Querying over entities Relationship navigation Entity Inheritance

ADO.NET Entity Framework: Metadata Structure

Demo: Entity Framework

Entity Framework: Impressions Great Hope for the future, but Pain for the present EDM designer not there yet (after Orcas) Does not currently support Persistence Ignorance, but the team is working on it Rich change-tracking support

DDD Revisited…

When is DDD Appropriate “If an unsophisticated team with a simple project decides to try a model-driven design with layered architecture, it will face a difficult learning curve.... The overhead of managing infrastructure and layers makes very simple tasks take longer. Simple projects come with short time lines and modest expectations.” Domain-Driven Design by Eric Evans, p76

Resources [Evans]: Domain-Driven Design: Tackling Complexity in the Heart of Software, Evans, Addison-Wesley (2003) [Fowler]: Patterns of Enterprise Application Architecture, Fowler, Addison-Wesley (2003) [Nilsson]: Applying Domain Driven Design and Patterns: using.NET

Tim McCarthy, InterKnowlogy Get the Demos & PPT at: Blogs.InterKnowlogy.com/TimMcCarthy More info on InterKnowlogy: Contact me: Tim McCarthy Phone: x205 About Tim McCarthy.NET Architect/Dev Lead/Trainer Author / Speaker MCSD, MCSD.NET, MCDBA, MCT, IEEE CSDP