SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
Intentions & Interfaces
Making patterns concrete


Udi Dahan – The Software Simplist
.NET Development Expert & SOA Specialist

www.UdiDahan.com
email@UdiDahan.com
Books, and books, and books, and books…
Flexibility brings many benefits
Preventing rigidity from creeping in
Existing solutions

                     Strategy Pattern




 Visitor Pattern
Visitor pattern




            Requires a method for
            each ConcreteElement
Strategy pattern




                   Requires all classes to
                   contain a strategy
Application Code
May cause a collapse of
application structure
                               Infrastructure Code




              at          Co
                   ion          de
       lic

 App         Infrastructure Code
Doing too
much can hurt

 ou
  ren„t
  onna
  eed
 t
“Prediction is very
 difficult, especially if
 it's about the future.”



-- Niels Bohr
   Physics Nobel prize 1922
Bolt on flexibility where you need it
Sometimes called “hooks”


          Application Code



         Infrastructure Code




                          New
             New
                          Code
             Code
Flexibility you seek?

Hmm?

Made your roles
explicit, have you?

No?

That is why you fail.
Make
 Roles
  Explicit
Some well known interfaces

        ISerializable          IFather

                             IHusband
 Java   Serializable
                           IGoToWork

                          IComeHome

                        IWashTheDishes
Custom entity validation before persistence
The old “object-oriented” way
                          bool IsValidating;
.Validate();

      Customer         .Validate();
           *              Address

           .Validate();

       Order
                     But what if we start here?

       Persistence
It looks like our
objects have
too many roles
to play
Make roles explicit
Add a marker interface here,
and an interface there….
  IEntity
               where T : IEntity




                IValidator<T>
        ValidationError Validate(T entity);
The first part is trivial:
                                 IEntity




                      Customer


                        Order
The second part is more interesting
               IValidator<T>
      ValidationError Validate(T entity);




 Customer



  CustomerValidator:      IValidator<Customer>
   ValidationError Validate(Customer entity);
Add a dash of
Inversion of Control

Service-Locator style
The extensible way
 .Persist(Customer)
                          Persistence

 Service Locator   Get<IValidator<Customer>>
   new
                          Validate(Customer)

             Customer Validator
But that’s not
Object Oriented

Is it?
Extensible and Object Oriented
 .Persist(Customer)
                          Persistence

 Service Locator   Get<IValidator<Customer>>
   new                    Validate(Customer)
             Customer Validator

                         .Validate();

                           Customer
And application code stays simple
           Application Code


                     .Persist(Customer)


          Infrastructure Code
Loading objects from the DB
 public class Customer
 {
   public void MakePreferred()
   {
     foreach(Order o in this.UnshippedOrders)
       foreach(Orderline ol in o.OrderLines)
         ol.Discount(10.Percent);
   }
 }




 Lazy Loading
Dangers of Lazy Loading
 public void MakePreferred()
 {
   foreach(Order o in this.UnshippedOrders)
     foreach(Orderline ol in o.OrderLines)
       ol.Discount(10.Percent);
 }




                                  DB
Loading objects from the DB

 Making a customer
                        Adding an Order
    “preferred”

                          Customer
    Customer




                Order


OrderLine
Need Different “Fetching Strategies”
 public class ServiceLayer
 {
   public void MakePreferred(Id customerId)
   {
     Customer c = ORM.Get<Customer>(customerId);
     c.MakePreferred();
   }

  public void AddOrder(Id customerId, OrderInfo o)
   {
     Customer c = ORM.Get<Customer>(customerId);
     c.AddOrder(o);
   }
 }
Make
 Roles
  Explicit
Use interfaces to differentiate roles
 IMakeCustomerPreferred              IAddOrdersToCustomer
  void MakePreferred();               void AddOrder(Order o);




                          Customer
Application code specifies role
 public class ServiceLayer
 {
   public void MakePreferred(Id customerId)
   {
     IMakeCustomerPreferred c = ORM
        .Get< IMakeCustomerPreferred>(customerId);
     c.MakePreferred();
   }

  public void AddOrder(Id customerId, OrderInfo o)
   {
     IAddOrdersToCustomer c = ORM
         .Get< IAddOrdersToCustomer>(customerId);
     c.AddOrder(o);
   }
 }
Extend behavior around role
   IMakeCustomerPreferred                   IAddOrdersToCustomer
     void MakePreferred();                    void AddOrder(Order o);




                              Customer




           T
                             MakeCustomerPreferredFetchingStrategy :
Inherits
                             IFetchingStrategy<IMakeCustomerPreferred>

                             string Strategy { get {
                              return “UnshippedOrders, OrderLines”; } }
IFetchingStrategy<T>
The extensible way
.Get<IMakeCustomerPreferred>(id)
                               Persistence

 Service Locator
           Get<IFetchingStrategy<
    new
                IMakeCustomerPreferred>>

                                   Get strategy
              MakeCustomerPreferredFetchingStrategy
And the pattern repeats…


  IMessage
              where T : IEntity




             IMessageHandler<T>
             void Handle(T message);
Once your roles
made explicit,
you have…

Extensibility and
flexibility -
simple they will be
Thank you
 Udi Dahan – The Software Simplist
 .NET Development Expert & SOA Specialist

 www.UdiDahan.com
 email@UdiDahan.com

Weitere ähnliche Inhalte

Was ist angesagt?

Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
deimos
 

Was ist angesagt? (19)

Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
 
Vaadin Flow - JavaLand 2018
Vaadin Flow - JavaLand 2018Vaadin Flow - JavaLand 2018
Vaadin Flow - JavaLand 2018
 
Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异
 
Think jQuery
Think jQueryThink jQuery
Think jQuery
 
Techlunch - Dependency Injection with Vaadin
Techlunch - Dependency Injection with VaadinTechlunch - Dependency Injection with Vaadin
Techlunch - Dependency Injection with Vaadin
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with RailsDomain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with Rails
 
Binding business data to vaadin components
Binding business data to vaadin componentsBinding business data to vaadin components
Binding business data to vaadin components
 
Wcf data services
Wcf data servicesWcf data services
Wcf data services
 
Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
 
Building impressive layout systems with vaadin
Building impressive layout systems with vaadinBuilding impressive layout systems with vaadin
Building impressive layout systems with vaadin
 
Vaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web ComponentsVaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web Components
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Introduction to Google Guice
Introduction to Google GuiceIntroduction to Google Guice
Introduction to Google Guice
 
Vaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIVaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UI
 
Angular training-course-syllabus
Angular training-course-syllabus Angular training-course-syllabus
Angular training-course-syllabus
 
Vaadin 8 with Spring Framework
Vaadin 8 with Spring FrameworkVaadin 8 with Spring Framework
Vaadin 8 with Spring Framework
 
Vaadin 8 with Spring Frameworks AutoConfiguration
Vaadin 8 with Spring Frameworks AutoConfigurationVaadin 8 with Spring Frameworks AutoConfiguration
Vaadin 8 with Spring Frameworks AutoConfiguration
 
Graphql, REST and Apollo
Graphql, REST and ApolloGraphql, REST and Apollo
Graphql, REST and Apollo
 
Wicket Next (1.4/1.5)
Wicket Next (1.4/1.5)Wicket Next (1.4/1.5)
Wicket Next (1.4/1.5)
 

Ähnlich wie 14147503 Intentions Interfaces Making Patterns Concrete

C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
Hammad Rajjoub
 
Entity framework db model的驗證機制 20130914
Entity framework db model的驗證機制 20130914Entity framework db model的驗證機制 20130914
Entity framework db model的驗證機制 20130914
LearningTech
 
Linqtosql 090629035715 Phpapp01
Linqtosql 090629035715 Phpapp01Linqtosql 090629035715 Phpapp01
Linqtosql 090629035715 Phpapp01
google
 

Ähnlich wie 14147503 Intentions Interfaces Making Patterns Concrete (20)

Lerman Vvs14 Ef Tips And Tricks
Lerman Vvs14  Ef Tips And TricksLerman Vvs14  Ef Tips And Tricks
Lerman Vvs14 Ef Tips And Tricks
 
Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
 
CDI @javaonehyderabad
CDI @javaonehyderabadCDI @javaonehyderabad
CDI @javaonehyderabad
 
Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016
 
Entity Framework v2 Best Practices
Entity Framework v2 Best PracticesEntity Framework v2 Best Practices
Entity Framework v2 Best Practices
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security Vulnerabilities
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Code Quality Practice and Tools
Code Quality Practice and ToolsCode Quality Practice and Tools
Code Quality Practice and Tools
 
Building Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchBuilding Your First App with MongoDB Stitch
Building Your First App with MongoDB Stitch
 
Cqrs api
Cqrs apiCqrs api
Cqrs api
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong Foundations
 
Finding Your Place in the Cosmos - Azure Cosmos DB
Finding Your Place in the Cosmos - Azure Cosmos DBFinding Your Place in the Cosmos - Azure Cosmos DB
Finding Your Place in the Cosmos - Azure Cosmos DB
 
B_110500002
B_110500002B_110500002
B_110500002
 
An Introduction To CQRS
An Introduction To CQRSAn Introduction To CQRS
An Introduction To CQRS
 
WCF - In a Week
WCF - In a WeekWCF - In a Week
WCF - In a Week
 
Entity framework db model的驗證機制 20130914
Entity framework db model的驗證機制 20130914Entity framework db model的驗證機制 20130914
Entity framework db model的驗證機制 20130914
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Linqtosql 090629035715 Phpapp01
Linqtosql 090629035715 Phpapp01Linqtosql 090629035715 Phpapp01
Linqtosql 090629035715 Phpapp01
 

Mehr von QConLondon2008

J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The Jvm
QConLondon2008
 
Market Risk System Bnp Paribas
Market Risk System Bnp ParibasMarket Risk System Bnp Paribas
Market Risk System Bnp Paribas
QConLondon2008
 
Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The Web
QConLondon2008
 
The Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryThe Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J Query
QConLondon2008
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1
QConLondon2008
 
Application Services On The Web Sales Forcecom
Application Services On The Web Sales ForcecomApplication Services On The Web Sales Forcecom
Application Services On The Web Sales Forcecom
QConLondon2008
 
Rest Reuse And Serendipity
Rest Reuse And SerendipityRest Reuse And Serendipity
Rest Reuse And Serendipity
QConLondon2008
 

Mehr von QConLondon2008 (10)

J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The Jvm
 
Agile Mashups
Agile MashupsAgile Mashups
Agile Mashups
 
Market Risk System Bnp Paribas
Market Risk System Bnp ParibasMarket Risk System Bnp Paribas
Market Risk System Bnp Paribas
 
A Tale Of Two Systems
A Tale Of Two SystemsA Tale Of Two Systems
A Tale Of Two Systems
 
Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The Web
 
The Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryThe Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J Query
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1
 
Application Services On The Web Sales Forcecom
Application Services On The Web Sales ForcecomApplication Services On The Web Sales Forcecom
Application Services On The Web Sales Forcecom
 
Managers In Scrum
Managers In ScrumManagers In Scrum
Managers In Scrum
 
Rest Reuse And Serendipity
Rest Reuse And SerendipityRest Reuse And Serendipity
Rest Reuse And Serendipity
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

14147503 Intentions Interfaces Making Patterns Concrete

  • 1. Intentions & Interfaces Making patterns concrete Udi Dahan – The Software Simplist .NET Development Expert & SOA Specialist www.UdiDahan.com email@UdiDahan.com
  • 2. Books, and books, and books, and books…
  • 5. Existing solutions Strategy Pattern Visitor Pattern
  • 6. Visitor pattern Requires a method for each ConcreteElement
  • 7. Strategy pattern Requires all classes to contain a strategy
  • 8. Application Code May cause a collapse of application structure Infrastructure Code at Co ion de lic App Infrastructure Code
  • 9. Doing too much can hurt ou ren„t onna eed t
  • 10. “Prediction is very difficult, especially if it's about the future.” -- Niels Bohr Physics Nobel prize 1922
  • 11. Bolt on flexibility where you need it
  • 12. Sometimes called “hooks” Application Code Infrastructure Code New New Code Code
  • 13. Flexibility you seek? Hmm? Made your roles explicit, have you? No? That is why you fail.
  • 14. Make Roles Explicit
  • 15. Some well known interfaces ISerializable IFather IHusband Java Serializable IGoToWork IComeHome IWashTheDishes
  • 16.
  • 17.
  • 18. Custom entity validation before persistence
  • 19. The old “object-oriented” way bool IsValidating; .Validate(); Customer .Validate(); * Address .Validate(); Order But what if we start here? Persistence
  • 20. It looks like our objects have too many roles to play
  • 22. Add a marker interface here, and an interface there…. IEntity where T : IEntity IValidator<T> ValidationError Validate(T entity);
  • 23. The first part is trivial: IEntity Customer Order
  • 24. The second part is more interesting IValidator<T> ValidationError Validate(T entity); Customer CustomerValidator: IValidator<Customer> ValidationError Validate(Customer entity);
  • 25. Add a dash of Inversion of Control Service-Locator style
  • 26. The extensible way .Persist(Customer) Persistence Service Locator Get<IValidator<Customer>> new Validate(Customer) Customer Validator
  • 27. But that’s not Object Oriented Is it?
  • 28. Extensible and Object Oriented .Persist(Customer) Persistence Service Locator Get<IValidator<Customer>> new Validate(Customer) Customer Validator .Validate(); Customer
  • 29. And application code stays simple Application Code .Persist(Customer) Infrastructure Code
  • 30. Loading objects from the DB public class Customer { public void MakePreferred() { foreach(Order o in this.UnshippedOrders) foreach(Orderline ol in o.OrderLines) ol.Discount(10.Percent); } } Lazy Loading
  • 31. Dangers of Lazy Loading public void MakePreferred() { foreach(Order o in this.UnshippedOrders) foreach(Orderline ol in o.OrderLines) ol.Discount(10.Percent); } DB
  • 32. Loading objects from the DB Making a customer Adding an Order “preferred” Customer Customer Order OrderLine
  • 33. Need Different “Fetching Strategies” public class ServiceLayer { public void MakePreferred(Id customerId) { Customer c = ORM.Get<Customer>(customerId); c.MakePreferred(); } public void AddOrder(Id customerId, OrderInfo o) { Customer c = ORM.Get<Customer>(customerId); c.AddOrder(o); } }
  • 34. Make Roles Explicit
  • 35. Use interfaces to differentiate roles IMakeCustomerPreferred IAddOrdersToCustomer void MakePreferred(); void AddOrder(Order o); Customer
  • 36. Application code specifies role public class ServiceLayer { public void MakePreferred(Id customerId) { IMakeCustomerPreferred c = ORM .Get< IMakeCustomerPreferred>(customerId); c.MakePreferred(); } public void AddOrder(Id customerId, OrderInfo o) { IAddOrdersToCustomer c = ORM .Get< IAddOrdersToCustomer>(customerId); c.AddOrder(o); } }
  • 37. Extend behavior around role IMakeCustomerPreferred IAddOrdersToCustomer void MakePreferred(); void AddOrder(Order o); Customer T MakeCustomerPreferredFetchingStrategy : Inherits IFetchingStrategy<IMakeCustomerPreferred> string Strategy { get { return “UnshippedOrders, OrderLines”; } } IFetchingStrategy<T>
  • 38. The extensible way .Get<IMakeCustomerPreferred>(id) Persistence Service Locator Get<IFetchingStrategy< new IMakeCustomerPreferred>> Get strategy MakeCustomerPreferredFetchingStrategy
  • 39. And the pattern repeats… IMessage where T : IEntity IMessageHandler<T> void Handle(T message);
  • 40. Once your roles made explicit, you have… Extensibility and flexibility - simple they will be
  • 41. Thank you Udi Dahan – The Software Simplist .NET Development Expert & SOA Specialist www.UdiDahan.com email@UdiDahan.com