Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Domain Driven Design 101<br />
Agenda<br />Why<br />Building blocks<br />Repositories, entities, specifications etc<br />Putting it to practice<br />Depe...
Software is complicated<br />
We solve complexity in software by distilling our problems<br />
publicboolCanBook(Cargocargo, Voyagevoyage)<br />{<br />doublemaxBooking = voyage.Capacity * 1.1;<br />if (voyage.BookedCa...
Domain Model<br />
Ubiquitous language<br />
publicinterfaceISapService<br />{<br />doubleGetHourlyRate(intsapId);<br />}<br />û<br />A poor abstraction<br />publicint...
publicclassEmployee<br />{<br />voidApplyForLeave(DateTime start,<br />DateTime end,<br />ILeaveService leaves)<br />    {...
Domain Expert<br />
Entities<br />
Value Types<br />
publicclassEmployee : IEquatable&lt;Employee&gt;<br />{<br />publicbool Equals(Employee other)<br />    {<br />returnthis....
publicclassColour<br />{<br />publicint Red { get; privateset; }<br />publicint Green { get; privateset; }<br />publicint ...
Aggregates<br />
Aggregate root<br />*<br />
Repositories<br />
publicinterfaceIEmployeeRepository<br />{<br />EmployeeGetById(int id);<br />void Add(Employeeemployee);<br />void Remove(...
Domain Services<br />
publicinterfaceITripService<br />{<br />floatGetDrivingDistanceBetween(Location a, Location b);<br />}<br />
Specifications<br />
classGoldCustomerSpecification : ISpecification&lt;Customer&gt;<br />{<br />publicboolIsSatisfiedBy(Customer candidate)<br...
Specifications can be used…<br />to construct objects<br />
var spec = newPizzaSpecification()<br />              .BasedOn(newMargaritaPizzaSpecification())<br />              .WithT...
Specifications can be used…<br />for querying<br />
publicinterfaceICustomerRepository<br />{<br />IEnumerable&lt;Customer&gt; GetCustomersSatisfying(<br />ISpecification&lt;...
Anticorruption Layer<br />
Your subsystem<br />Anti-corruption layer<br />Other subsystem<br />
Any 3rd party system that I have to integrate with was written by a drunken monkey typing with his feet.<br />Oren Eini ak...
Bounded Context<br />
publicclassLead<br />{<br />publicIEnumerable&lt;Opportunity&gt; Opportunities { get; }<br />publicPerson Contact { get; }...
Dependency Injection<br />
publicinterfaceINotificationService<br />{<br />void Notify(Employeeemployee, string message);<br />}<br />An interface de...
publicclassLeaveService<br />{<br />privatereadonlyINotificationService notifications;<br /> <br />publicLeaveService(INot...
Persistence Ignorance<br />
…ordinary  classes where you focus on the business problem at hand without adding stuff for infrastructure-related reasons...
publicclassCustomer<br />{<br />publicint Id { get; privateset; }<br />publicstringFirstName { get; set; }<br />publicstri...
[global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName=&quot;AdventureWorksLTModel&quot;, Name=&quo...
Architecture<br />
Traditional Architecture<br />Presentation<br />Business Logic (BLL)<br />Infrastructure<br />Data Access (DAL)<br />
Onion Architecture<br />User Interface<br />G<br />Application Services<br />M<br />Domain Services<br />Database<br />Dom...
Onion Architecture<br />EmployeeController<br />User Interface<br />G<br />Application Services<br />M<br />IEmailSender<b...
Validation<br />
Validation Examples<br />Input validation<br />Is the first name filled in?<br />Is the e-mail address format valid?<br />...
publicclassPersonRepository : IPersonRepository<br />{<br />publicvoid Save(Person customer)<br />    {<br />if (!customer...
The golden rule for validation:<br />The Domain Model is always <br />in a valid state<br />
publicclassNewUserFormValidator : AbstractValidator&lt;NewUserForm&gt;<br />{<br />IUsernameAvailabilityServiceusernameAva...
Where validation fits<br />EmployeeController<br />User Interface<br />G<br />Application Services<br />M<br />IEmailSende...
Making Roles Explicit<br />
Challenges<br />
When DDD isn’t appropriate<br />
Benefits<br />
Books<br />
Links<br />Domain Driven Design mailing list<br />http://tech.groups.yahoo.com/group/domaindrivendesign/<br />ALT.NET mail...
Nächste SlideShare
Wird geladen in …5
×

publicclassPersonRepository : IPersonRepository<br />{<br />publicvoid Domain Driven Design 101

40.328 Aufrufe

Veröffentlicht am

publicclassPersonRepository : IPersonRepository{publicvoid Save(Person customer) {if (!customer.IsValid())thrownewException(...) }}validation and persistence anti-patterns

Veröffentlicht in: Technologie, Business
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Dating for everyone is here: ♥♥♥ http://bit.ly/36cXjBY ♥♥♥
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Follow the link, new dating source: ❤❤❤ http://bit.ly/36cXjBY ❤❤❤
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

×