Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Architecture: where do you start?


Published on

Simon Brown is coming to the UK to teach his Software Architecture for Developers Workshop in April, so we asked him if he could give a free talk on software architecture for our community. Simon agreed to give a talk exploring the question "Architecture, where do you start?".

Published in: Technology, News & Politics
  • Be the first to comment

Architecture: where do you start?

  1. 1. s re for developer Softwar e architectu What is software What is therole of How do you define How do you share How do you deliver architecture? a software architect? software architecture? software architecture? software architecture? Where do you start?
  2. 2. @simonbrown on Twitter
  3. 3. Software Architecture for Developers (.com) What is software architecture? What is the role of a software architect? How do you define software architecture? How do you share software architecture? How do you deliver software architecture?
  4. 4. What is software What is therole of How do you define How do you share How do you deliver architecture? a software architect? software architecture? software architecture? software architecture? How do you take a system vision through to a software design?
  5. 5. What is software architecture?
  6. 6. What is architecture? Requirements Architecture Structure Design Framework Foundations
  7. 7. Application architecture ecture r chit ti on a ware Ap plica he soft elive r t to d ides d prov n eede ati ons value f ound iness bus Requirements An application Classes & Design Patterns Frameworks Libraries Components
  8. 8. System architecture vides r e pro e hitectu r dwar m arc n d ha S yste tw are a elive r sof to d the ation s fo und value bus iness Requirements A system Services & Interoperability Software Hardware Subsystems & Integration
  9. 9. Enterprise Architecture Technology and business strategy across organisations and organisational units. { System Architecture Software and infrastructure architecture for an end-to-end system. Application Architecture Software architecture for an We call this application, sub-system or component. software architecture /// <summary> /// Represents the behaviour behind the ... /// </summary> public class SomeWizard : AbstractWizard { private DomainObject _object; private WizardPage _page; private WizardController _controller; public SomeWizard() { } ... }
  10. 10. Software architecture introduces structure and guidelines into a software system, leading to consistency and clarity
  11. 11. What is the role of a software architect?
  12. 12. The role of a software architect Management of Ownership of Architecture non-functional the bigger Leadership definition requirements picture Technology Architecture Coaching and Quality selection evaluation mentoring assurance Design, Architecture development collaboration and testing Architecture Definition Architecture Delivery
  13. 13.
  14. 14. How do you define software architecture?
  15. 15. Every system has an architecture, but not every architecture is defined bout h ink a ople t on’t ! e pe o me d Som re, s it ectu arch
  16. 16. Goal What drives architecture? Options s nt ai tr ns l Co u ra ct ite ch Ar e s pl ci in l Pr u ra ct ite ch Ar s n - nt n o me l & ire n a qu tio re n c al Reality Fu ion n ct fu
  17. 17. Functional requirements can influence the architecture (understand and challenge them if necessary) ally is il re Th e dev e tail! in t he d
  18. 18. How many elephants did you see at the zoo? How many non-elephants? Kevlin Henney
  19. 19. Non-functional requirements What non-functional requirements (e.g. “-ilities”) have you encountered in software development?
  20. 20. Performance Flexibility ✓ Scalability Extensibility ✓ Availability Maintainability Security ✓ Interoperability Disaster Recovery Legal Accessibility ✓ Regulatory Monitoring Compliance Management i18n ✓ Auditability L10n ... ... Runtime Non-runtime
  21. 21. Performance is about how fast something is
  22. 22. Response Latency and time throughput a pps, web le to ems, licab g syst App s sagin s , me e tc... UI As, SO
  23. 23. Scalability is about doing more (more requests, more data, more users, more messages, ...) ently inher lity is rrency Sc alabi oncu c ab out
  24. 24. Vertical Horizontal scalability scalability (scale-up) (scale-out) s o nent omp A ll c e ntly; iffer sc ale d easy - up is s cale
  25. 25. Availability is about uptime 9 .99%, . 9%, 9 99 %, 99 x 7, .. . %, 24 9 9.999
  26. 26. Low High availability availability (single points of failure) (redundancy) s o nent c omp abilit y All t avail f eren s have dif r istic acte char
  27. 27. Understand how to capture them tions e ques your u dienc Vary your a n ing o de pend
  28. 28. Understand how to refine them ific, Spec , RT: vable SMA A chie sur able, imely Mea T nt & R eleva
  29. 29. Understand how to challenge them u sur e yo u Ar e yo eed ? that n
  30. 30. Understand how they influence your architecture l tiona o n- func plex ! Some n e com t s ar r emen requi
  31. 31. Learn about and understand the non-functional requirements in order to build sufficient foundations
  32. 32. Software lives in the real world, and the real world has constraints
  33. 33. Constraints What constraints might affect software architecture? What constraints have you seen in your own organisations? Are all constraints negative?
  34. 34. Scope Cheap + Quickly = Feature-light Feature-rich + Quickly = Expensive Cost Time Time & budget
  35. 35. Technology (e.g. approved technology lists, existing licenses, interoperability, product maturity, common protocols, local standards, public standards, open source policies/licenses, vendor “relationships”, etc)
  36. 36. Resources skills & (e.g. team size, lead time, future availability, training, specialists, etc)
  37. 37. Other (e.g. legal/compliance, tactical vs strategic imperatives, existing systems, company politics, past failures, internal intellectual s ... tacle property, etc) will be obs e them! m T here v erco u st o yo u m
  38. 38. Beware that constraints can drive the architecture more than the requirements
  39. 39. Understand what the constraints are, why they are imposed, how they affect the architecture and how you will work with them
  40. 40. Architectural principles are the things you want to adopt duce intro e lp to larit y Th ey h y and c s tenc c onsi
  41. 41. Principles What architectural principles have you seen applied to software development projects? What principles have you seen in your own projects? Were the principles beneficial? What impact did the principles have?
  42. 42. Principles are great, but make sure they’re realistic and don’t have a massive negative impact!
  43. 43. Goal How do you get to the goal? Options s nt ai tr ns l Co u ra ct ite ch Ar e s pl ci in l Pr u ra ct ite ch Ar s n - nt n o me l & ire n a qu tio re n c al Reality Fu ion n ct fu
  44. 44. Start analysing coding or start ? para ly sis & r s alysi acto An r distr ref acto h ba d t ar e bo
  45. 45. Bo xes & l ines is Object or iented analys n Break the problem dow and de sign (OOAD ) into components and services ty Class Responsibili ) Collaboration (CRC ices What comp onents/serv ? do we need to do X ware a soft is sing nts omp o pone Dec com ating talk i nto H ow do they sys tem estim l for to each oth er? u sefu
  46. 46. ems) Standard ( (syst containers ) angle Wide ld s hou Start with the pict ure t Eve ry n t par big picture Mac fere ro a dif tory t l (cella e same s ofsses) th Telephoto (components)
  47. 47. UML eed a e on’t n e ctur Y ou d r chit do a to ol to desig n and Whiteboard? UML tool?
  48. 48. Systems Internet Banking System Administration System Allows customers to interact Allows call centre staff to securely via the web. undertake administrative actions. s New System tems Existing Sys Banking System Single point of truth for all customer data. Contains all core banking logic.
  49. 49. Containers External web server Web server Allows customers to interact Internal web server securely via the web. Allows call centre staff to Allow call centre staff to undertake administrative actions. undertake administrative actions. IIS IIS mmunication Windows Co Foundation Application server Orchestrates user interaction across big legacy system. IIS rotocol XML/TCP p SQL Database e app, Stores customer information Banking system andalon er, st b ase, ervfor all ice, data related to Internet Banking. Retains audit logs. eb s Single point of truth Wdata. erv i n, ... Stores help text, banners and customer Contains all indo ws S SB, plug other commentary. Wcore banking er, E logic. serv SQL Server app UNIX
  50. 50. mponents Web server Co r Appli cation serve Authentication Service Login. Banking Service Authorise transaction. Logout. Get accounts. Reset credentials. Get statement. Lock account. WCF service Get/create/edit/delete recipients. Make payments. WCF service r Service Laye Data Layer Audit Service Banking System Facade Write audit log entry. Get audit log entries for Single point of truth for all customer. customer data. Contains all core banking logic. C# C# Database Banking System
  51. 51. Classes e Banking S ystem Facad BankingSystemFacade <<abstract>> Get accounts. Transaction Get statement. Creates Execute transaction. Get/create/edit/delete Audit transaction. recipients. Make payments. of Uses Is made up <abstract> <abstract> BankingSystemInterface Response Request Parse XML response into domain Convert request to XML. object(s). Initiate connection. Execute transaction. e d us Close transaction. l cou , You ards RC c ... UM L, C , oard a w hiteb Banking system
  52. 52. In terfaces External web server to Application server Technology, format & protocol Internal web server Service-level agreements to Application server Ownership Technology, format & protocol Release cycle & versioning Service-level agreements etc... Ownership Release cycle & versioning etc... Application server to Database Technology, format & protocol Service-level agreements Application server Ownership to Banking System Release cycle & versioning Technology, format & protocol etc... Service-level agreements ically r e typ y es a Ownership a c o f an terf arts Release cycle & versioning In p e est ctur etc... ki e th e ris r chit w are a soft
  53. 53. Use stories/use cases to walkthrough and test your design
  54. 54. Your experience should guide you rather than constrain you , re great a s es a o use atab eed t D do n’t n l utio n u y so bu t yo r o r eve o ne f
  55. 55. Don’t blindly focus on the code; always ask what the major forces are on the system and how your architecture resolves them e ee th to s back Step e big pi ctur
  56. 56. How do you share software architecture?
  57. 57. Current Development Team Business Sponsors Future Development Team Your system Database Administrators Operations/Support Staff e ectur r chit w are a for Soft pla tfor m ocia l! is a .. be s t ion . ersa conv Other Teams Security Team Compliance and Audit
  58. 58. It looks like there are multiple architectural layers. There are many libraries in the middle-tier; are they components? There’s a web application. Lots of C# code! There are some WCF service references.
  59. 59. Process View Non-functional View Context Functional View Does the system implement Are there any significant non- What is this all about? What does the system do? functional requirements influencing business processes? the architecture? Architectural Architectural Logical View Interface View Constraints Principles What does the big picture look like Are there internal or external Are there any constraints Are there any principles influencing and how is the system structured? system interfaces? influencing the architecture? the architecture? Design View Infrastructure View Deployment View Operational View How will the system components be Is it clear how system components What does the target deployment How will people operate and deployed onto the target should be implemented? environment look like? support the system? infrastructure? Architecture Security View Data View Technology Selection How is security handled across all How is data managed, archived, What led to the selection of the Justification tiers? backed-up, etc? technologies in use? Does the chosen architecture “work”?
  60. 60. Abstract Whiteboard Software Review Wiki Ar C Cstandards chitecture oding onversation /* D t ocumenDesign conformance * Pair v0.2 Test coverage * Programming Thread safety */ n De l egatio Security /** Logging /// Represents the behaviour behind the user tion handling chitecture e(!a * Reference Ar /// <summary> /// </summary> Excepregistration page. whil ngry) { public class RegistrationWizard : AbstractWizard nsibility { hote Yo Ex r * @autstrationCandidate; u pair(you); */ private RegistrationCandidate _regi privat Under;standing e RegistrationWizardPage _page; } Morale private RegistrationWizardController _controller Specific
  61. 61. How do you deliver software architecture?
  62. 62. How much architecture do you need to do? This much? Waterfall RUP Agile This much?
  63. 63. You need to define “just enough” architecture
  64. 64. What is architecturally significant? C ostly to cha nge Complex and risky New
  65. 65. Does your architecture work? ng Satisfies th e Fou ndations for Platform for solvi vers blem arch itectural dri the code the business pro
  66. 66. Concrete experiments Requirements A system / type p roto wa way pt o r thro once Foundations A of of c code pro ction p rodu
  67. 67. Let’s wrap up...
  68. 68. What is software What is therole of How do you define How do you share How do you deliver architecture? a software architect? software architecture? software architecture? software architecture? nts Requiremen ts, constrai and principles drive ose the pro blem ures Decomp softwa re architect How dosyou take a system visionshould ms, containe r , Syste ure through sse s to a software very pict E design? com ponents, cla a different p art tell and interfaces y of th e same stor t Write code and tes your architecture ible as e arly as poss
  69. 69. @simonbrown on Twitter ! Th anks s re for developer Softwar e architectu