1 / 54

DPR308 Emergent Architecture

DPR308 Emergent Architecture. Richard Hundhausen President, Accentient VS ALM MVP, RD. Richard Hundhausen. President of Accentient From Boise, Idaho Microsoft Regional Director Microsoft MVP (Visual Studio ALM) Author of Professional Scrum Developer course richard@accentient.com

helki
Download Presentation

DPR308 Emergent Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DPR308Emergent Architecture Richard Hundhausen President, Accentient VS ALM MVP, RD

  2. Richard Hundhausen • President of Accentient • From Boise, Idaho • Microsoft Regional Director • Microsoft MVP (Visual Studio ALM) • Author of Professional Scrum Developer course • richard@accentient.com @rhundhausen

  3. So, who designed this thing anyway?

  4. AgileManifesto.org Says it all

  5. The Wisdom of Building Roads and Bridges … • Building a Bridge • Building Software • Design risks are low • Design costs are low relative to construction costs • Schedule and resource the tasks • Cannot deliver incrementally • More is unknown than known • Design risks are greater • Value-up measures value delivered incrementally

  6. BDUF = Big Design Up Front • The approach in which the design is to be completed and perfected before implementation starts

  7. Why Big Design Up Front SeemsGood • Requirements are better understood • Thinking things out ahead of time saves headaches • Changes to specs are cheaper than changes to code • Bugs are cheaper to fix early

  8. Why Big Design Up Front Isn’t Good • Requirements aren’t well known in the first place • Requirements change • Developers are not able to foresee all problems • Some implementation is required to flesh out the details • Customers are not able to tell you what they want • Only what they don’t want … after they see it • There is no business value in architecture or design!

  9. Where are you today? BDUF Emergent Waterfall Cowboy Some DUF

  10. What is Emergent Architecture? • The opposite of Big Design Up Front • It allows architecture to emerge as you develop • Some architectural decisions will need to be made before you write your first line of code • Technologies, frameworks, languages, patterns, practices • Most of these decisions will be hard to change later

  11. Impossible! • It’s not impossible, but it isn’t easy either • Here is one of my favorite FAQs Q. Do you have to be smart to be Agile? A. No, you have to be smart to develop software.

  12. Business Value and Priority • Let the customer value and prioritize the what, not the how • Architecture and infrastructure decisions are the how • Architecture exists to serve the team, not the other way around • Quality attributes (the ”ilities”) become acceptance criteria or entries on the Definition of Done • Let the team (not the customer) decide what is fit for purpose

  13. Fit for Purpose • The solution should be suitable for the intended purpose • Defined by title, user story, and acceptance criteria • Example • Title: All cars must stop at One Microsoft Way • User Story: As the intersection safety officer I want all cars approaching One Microsoft Way to stop so no geek pedestrians get injured • Acceptance Criteria: solution should be universally understood, should be available 24x7, should have a low TCO

  14. Specifying Acceptance Criteria • This can be done incrementally • Initially, a story can just have a title • Later, the story can be updated to include a more detailed description • Later, the story can be updated to include detailed acceptance criteria • Later, the story can be linked to a test case with more detailed criteria • Later, the test case can have detailed, manual steps specified • Manual tests can be recorded and played-back as automated tests Disambiguity

  15. Release Planning

  16. It’s all About Business Value • In Agile there is a rule that every sprint generates an increment of potentially-shippable business value • Therefore: • It is not ok to have an “architecture sprint” • It is not ok to have an “infrastructure sprint” • There is no such thing as sprint 0 • And while we’re on the topic: there’s no such thing as “done done”

  17. Developing architecture • The team performs design as part of the sprint to provide a solid basis to support their sprint goal • Some sprints (i.e. sprint 1) will be more design-heavy than others • The team should keep this in mind as they make their commitments

  18. Make Smart Decisions • Sprint 1 will include selecting an architecture • Leverage popular, maintainable, and testable architectures, frameworks, and patterns • Build in the flexibility to adapt to reasonable changes without building a meta-product • Don’t gold plate

  19. Don’t Over-Architect the Product • Build at least one increment of business functionality every sprint • Build enough of the architecture and design to support that business functionality • Build adequate architecture and design to meet any non-functional requirements • Solve today’s problem today, tomorrow’s problem tomorrow

  20. Minimize Documentation • Create just enough documentation as a basis of discussion • Choose whiteboards over electronic media • Models can help you • Understand and visualize a system, application, or component • Models can hurt you • Don’t model what’s not in scope for that sprint • Don’t become a slave to the model • Let the Team decide if and when to use models • Burn them at the earliest responsible time

  21. When Should you Maintain Documentation? • When there is business value in that documentation • i.e. an ISV providing API docs • When the documentation can be auto-generated or serves additional technical purposes • i.e. generating Sequence diagrams • i.e. using Layer diagrams for validation

  22. Layer Diagrams • Layer diagrams allow you to visualize the logical architecture of your system • A layer diagram organizes the physical artifacts in your system into logical, abstract groups called layers • These layers help you identify, describe, and differentiate the kinds of tasks that those artifacts perform • More than just pretty pictures, these diagrams can be used for ongoing validation

  23. Sprint 1

  24. Sprint 1 Development Tasks • Create dbo.Jobs table • Tip: use a database project • Create Job public class • Use LINQ to SQL or EF to assist you • Add the essential interface methods • Use the Repository Pattern • Write and run unit tests

  25. Sprint 1 Development Tasks – continued • Enable the Careers Action and View • Use the Add View dialog to generate astrongly-typed view based on the model • Make the view interesting • Using HTML Helpers to help generate content • No gold plating

  26. Sprint 1 Development Tasks – continued • Write and run acceptance tests • Use Microsoft Test Manager • Record the tests executions • Consider converting to Coded UI Tests • Complete all work according to definition of done

  27. DONE Sprint 1

  28. Effective Emergent Architecture • Use Principles, Patterns, and Practices • Refactor • Test early, often, and automatically • Application Lifecycle Management

  29. Principles, Patterns, and Practices • Use popular Principles effectively • Coupling, cohesion, composition, encapsulation, … • Use popular Patterns effectively • GoF, .NET, Microsoft P&P, MVC, MVP, MVVM, … • Use popular Practices effectively And my favorite: YAGNI (You Ain’t Gonna Need It)

  30. Refactoring • A disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior • You should refactor … • Little and often • At the unit as well as architecture level • Using automated unit tests, CI, and code coverage • Using automated regression tests • Using modern tools

  31. Refactoring Tools • Resharper (JetBrains) • Refactor! (Devexpress) • Visual Studio • Visual C# • Database projects

  32. Refactoring Support

  33. Refactoring Support

  34. Refactoring Support • C# • Database Projects

  35. Visual Studio Application Lifecycle Management

  36. Strong Software Engineering Platform • Visual Studio 2010 + Team Foundation Server 2010 • Enables the team, customer, and stakeholders • Automated builds • Continuous Integration (CI) builds • Architecture and refactoring tools • White and black box testing tools • Increased traceability • Increased transparency

  37. Sprint 2

  38. Sprint 2 Development Tasks • Create dbo.Resumes table • Tip: use a database project • Create Resume public class • Use LINQ to SQL or EF to assist you • Add the essential interface methods • Use the Repository Pattern • Write and run unit tests

  39. Sprint 2 Development Tasks – continued • Enable the appropriate Action and View • Use the Add View dialog to generate a strongly-typed view based on the model • Make the view interesting • Using HTML Helpers to help generate content • No gold plating

  40. Sprint 2 Development Tasks – continued • Write and run acceptance tests • Use Microsoft Test Manager • Record the tests executions • Consider converting to Coded UI Tests • Complete all work according to definition of done

  41. DONEAt Sprint Review it’s decided thatthe company does not need the last feature … ship it! Sprint 2

  42. Know when you are “Done” • Done defines when an increment of product functionality is potentially shippable • Definition of Done (DoD) • A simple, auditable checklist owned by the team • It can be influenced by organizational standards and specific requirements of the product or release • Can be maintained … • In a document or wiki • Using a custom TFS work item control (http://bit.ly/egJdcx)

  43. Example: A Simple Definition of Done • Coded • Acceptance criteria met • Tests pass • Checked-in

  44. What about a Complete Rewrite? Your customer has a large legacy application. It works fine. The product owner tells you that the users are very happy and use all features; however, usage statistics are not available. He wants your team to rewrite it using modern technologies, but is unwilling to create or manage a Product Backlog, let alone assign business value or prioritize any items. He claims that the new system “must do exactly what the old system did” and until that happens, the new system won’t have any business value.

  45. Be Transparent • Everyone should be able to inspect … • The team’s Definition of Done (DoD) • The product backlog (user stories) • The sprint backlog (tasks) • The impediments • Deployments • Test results • Bugs • Everyone should adapt to these inspections

  46. What if you are not really done? Your team believes that they have met their sprint goal and the product owner is quite happy with the increment’s functionality. One of the user stories wasn’t completed according to your definition of done. It seems that a Code Analysis warning remains:

  47. Pop Quiz In sprint 3 you start implementing the customer management component of the web site. You’ve committed to delivering basic add, edit, and view functionality. But, you know that in sprint 4 the productowner is going to want the ability to deletea customer. How should you consider this whiledelivering the sprint 3 increment?

  48. Resource: Professional Scrum Developer Program Learn more here: www.scrum.org Follow us on Twitter: #proscrumdev Contact me: richard@accentient.com or @rhundhausen

  49. Resource: Professional Scrum with TFS 2010 Book • Wrox Press • Pages: 336 • Authors: Steve Resnick, Aaron Bjork, Michael de la Maza • Published: April 2011 • ISBN: 0470943335 • In stock at the TechEd bookstore!

More Related