Your SlideShare is downloading. ×
0
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Orthogonal Architecture
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Orthogonal Architecture

2,041

Published on

"Orthogonal Architecture" talk at NRWCONF'09 on 28.08.2009 in Wuppertal

"Orthogonal Architecture" talk at NRWCONF'09 on 28.08.2009 in Wuppertal

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,041
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • PROVIDE YOU SESSION CODE AND NAME AS IT WAS DEFINED BY AGENDA OWNERS.WELCOME ATTENDEES. INTRODUCE YOURSELF AND YOUR SESSION.
  • Aggregate root (as in DDD)
  • Logging, exception handling, transactions
  • PROVIDE 5 MIN BEFORE SESSION ENDS FOR Q&A.
  • Transcript

    • 1. Orthogonal ArchitectureA pragmatic approach<br />Sergey Shishkin<br />InterComponentWare AG<br />sergey.shishkin@icw.de<br />http://shishkin.org<br />
    • 2. This talk is supposed to be focused on...<br />
    • 3. This talk is not supposed to discuss in detail...<br />
    • 4. What is architecture?<br />
    • 5. Architecture Open Space 2009<br />http://picasaweb.google.com/lcorneliussen/ArchitectureNETOpenSpace2009#5347109274901628498<br />
    • 6. The decisions that are hard to change<br />—Martin Fowler, PoEA<br />
    • 7. Reversibility<br />
    • 8. The Last Responsible Moment<br />
    • 9. S.O.L.I.D.<br />
    • 10. Open/Closed Principle<br />
    • 11. Presentation Patterns<br />
    • 12. The View<br />publicclassEditPatientView:UserControl, IEditPatientView<br />{<br />  privateEditPatientPresenter presenter;<br /> <br />  publicEditPatientView()<br />  {<br />    PatientName = newTextBoxAdapter(patientNameTextBox);<br />  }<br /> <br />  publicIViewElementPatientName { get; set; }<br /> <br />  privatevoidOnSaveClicked(object sender, EventArgs e)<br />  {<br />    presenter.SavePatient();<br />  }<br />}<br />
    • 13. The Presenter<br />publicclassEditPatientPresenter : Presenter<br />{<br />  publicvoidSavePatient()<br />  {<br />    if (Validate(view.PatientName.IsRequired(<br />&amp;quot;Name is required&amp;quot;)))<br />    {<br />      var name = view.PatientName.Text;<br /> ...<br />    }<br />  }<br /> ...<br />}<br />
    • 14. The Test<br />publicclassWhen_patient_name_is_missing : InstanceContextSpecification&amp;lt;EditPatientPresenter&amp;gt;<br />{<br />  protectedoverridevoid Because()<br />  {<br />    The&amp;lt;IEditPatientView&amp;gt;().PatientName.Text = &amp;quot;&amp;quot;;<br />  }<br /> <br />  [Observation]<br />  publicvoidShould_display_error_message()<br />  {<br />    The&amp;lt;IEditPatientView&amp;gt;().PatientName.ErrorMessage<br /> .ShouldNotBeNull();<br />  }<br />}<br />
    • 15. Dependency Injection Container<br />
    • 16. Constructor Injection<br />I’m not going to call this constructor in my code<br />publicclassEditPatientPresenter<br />{<br />  privateIEditPatientView view;<br />  privateIMessageBus bus;<br /> <br />  publicEditPatientPresenter(<br />IEditPatientView view, IMessageBus bus)<br />  {<br />    this.view = view;<br />    this.bus = bus;<br />  }<br />}<br />
    • 17. Message Bus / Event Broker<br />
    • 18. Message Bus<br />publicclassEditPatientPresenter<br />{<br /> ... <br />  publicvoidSavePatient()<br />  {<br />   var command = newEditPatientCommand { Patient = view.Patient };<br />    bus.Send(command);<br />  }<br />}<br />
    • 19. Service Layer<br />publicclassPatientHandler : IHandler&amp;lt;EditPatientCommand&amp;gt;<br />{<br />  publicvoid Handle(EditPatientCommand message)<br /> {<br />    using (vartx = newTransactionScope())<br /> {<br />      var patient = repository.Get(<br />message.PatientId);<br />patient.ChangeName(message.PatientName);<br />repository.Save(patient);<br />tx.Complete();<br />    }<br />  }<br />}<br />
    • 20. Data Access Layer / O/R Mapper<br />
    • 21. Querying<br />publicstaticclassPatientRepositoryExtensions<br />{<br />  publicstaticICollection&amp;lt;Patient&amp;gt; FindByName(<br />    thisIRepository&amp;lt;Patient&amp;gt; repository,<br />    stringsearchText)<br />  {<br />    returnrepository.AllEntities<br />      .Where(p =&amp;gt; p.Name.Contains(searchText))<br />      .ToList();<br />  }<br />}<br />var collection = repository.FindByName(“Smith”);<br />
    • 22. Aspect-Oriented Programming<br />
    • 23. Automated<br />Tests<br />Continuous<br />Integration<br />Refactoring<br />
    • 24. Resources<br />SOLID<br />http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod<br />Presentation Patterns:<br />http://www.jeremydmiller.com/ppatterns/<br />Clean Code Developer<br />http://clean-code-developer.de<br />Books:<br />Michael Feathers, “Working effectively with legacy code”<br />Robert C. Martin, “Clean code” and “Agile principles, patterns and practices in C#”<br />Martin Fowler, “Patterns of enterprise architecture”<br />
    • 25. Q&amp;A<br />Sergey Shishkin<br />sergey.shishkin@icw.de<br />http://shishkin.org<br />

    ×