Presentación De Powerpoint
Total Page:16
File Type:pdf, Size:1020Kb
Software Architecture of Oviedoof University Software Architecture Documentation Science Computer of of Course 2018/2019 Jose E. Labra Gayo School Software Architecture Contents of Oviedoof Communicating software architecture University Goal of documentation Documentation stakeholders Views Documentation and agile projects Guidelines Documentation approaches Kuchten 4+1 views Science Views and beyond C4 model Computer of of Arc42 School Software Software School of Computer Science University of Oviedo Architecture Software Architecture of Oviedoof Architecture is more than code University The code doesn't tell the whole story Questions the code doesn't answer How the software fits into existing system landscape? Why the technologies were chosen? What's the overall structure of the system? Where the components are deployed at runtime? How do the components communicate? How and where to add new functionality? What common patterns and principles are used? Science How the interfaces with other systems work? Computer How security/scalability/… has been achieved? of of . School Software Architecture of Oviedoof Goal of documentation Main goal: communicate the structure University Understand the big picture Create a shared vision: team and stakeholders Common vocabulary Describe what the sofware is and how is being built Focus for technical conversations about new features Provide a map to navigate the source code Justify design decisions Science Help new developers that join the team Computer of of School Software Architecture Documentation requirements of Oviedoof Understandable by different stakeholders University Technical and non-technical stakeholders Reflect the reality Be careful of the model-code gap Move fast and adapt to changes Adapt to agile projects Evolutionary architecture Science Computer of of School Software Architecture Rules for good documentation of Oviedoof University Write documentation from reader's point of view Find who will be the readers and their expectations Avoid unnecessary repetition (DRY principle) Avoid ambiguity Explain the notation (or use a standard one) For diagrams, use legends Use a standard organization or template Add TBD/To do when necessary Science Organize for easy of reference/links Computer Record rationale of of Keep documentation current School Software Architecture Problem vs Solution space of Oviedoof University Software architecture = path from problem to solution Understand the problem Design a solution Rationale for the solutions proposed Record different design alternatives Problem Solution Space Space Stakeholders Building blocks Science Context Interfaces Quality goals Components Constraints Patterns/styles Computer Principles Tactics of of … … School Software Architecture Views & viewpoints of Oviedoof University Software architecture is a complex entity It cannot be described in a single 1-dimension It requires several views for different stakeholders View = A representation of a system with regards to some concerns Different views support different goals and uses Viewpoint = A collection of patterns, templates and conventions for constructing a view Science Examples: structure, behaviour, deployment Computer of of School Software Architecture Documenting views of Oviedoof Introduction University Textual description of the view Diagram(s) Add descriptive title including structures depicted Create a legend to explain meaning of symbols Don't forget to explain the lines/arrows List of elements and responsibilities Give descriptive names Define your terms (include a glossary) Science Rationale Computer of of School Software Architecture Documenting views of Oviedoof Strive for Consistency and simplicity University Keep elements consistent Colors, shapes, arrows,… If you use a color scheme, follow it consitstently Check names across views,… Record possible inconsistencies Avoid too many details Remember Miller's law Average person can keep 7 ( 2) elements in memory Science Computer of of School Software Architecture Tools for diagrams of Oviedoof Sketches University Drawing tools for diagrams Text-based diagramming tools Modeling tools Reverse-engineering the model Architecture description languages Science Computer of of School Software Architecture Sketches of Oviedoof University Most people start with a sketch on paper or whiteboard Great way to collaborate and exchange ideas Usually intended for short lifespan But sooner or later, they must be recorded Simple approach: Photos And later conversion to diagrams or models Science Computer of of School Fuente: https://c4model.com/ Software Architecture Drawing tools for Diagrams of Oviedoof University Desktop Microsoft Visio, Omnigraffle, SimpleDiagrams, … Web-based: draw.io, gliffy, LucidChart,… Drawing tools of general-purpose tools: Word, Powerpoint, Keynote,… Science Front User Backend Computer End DB of of School Software Architecture Text-based diagramming tools of Oviedoof University Usually based on UML WebSequenceDiagrams, yUML, nomnoml PlantUML: http://plantuml.com/ @startuml Agent -> Agent : init Agent -> Manager : sendEmail() Agent <-- Manager : reply X Agent -> Manager : blabla( X ) User -> Manager : check( X ) Science User <-- Manager : ok @enduml Computer of of School PlantUML Online: https://www.planttext.com/ Software Architecture Modeling tools of Oviedoof Allow to create a model of the software system University Visual representations are generated from model Alternatives: Sparx Enterprise Architect, Visual Paradigm, Archi, StarUML, ArgoUML, Modelio,… Usually support different notations UML, SysML, BPMN, ArchiMate Useful for up-front design Science Good for refactoring & renaming components… Computer of of School Software Architecture Reverse-engineering the model of Oviedoof University Some of the previous modelling tools support this Static analysis tools: Structure101, NDepend, Lattix, Sonargraph,… Create the model based on existing code Useful to visualize existing codebases Problem: Resulting diagrams tend to include too much details Science Difficult to see the architecture Computer of of School Software Architecture Architecture Description Languages of Oviedoof ADLs University Formally define the architecture of a system Create textual descriptions instead of diagrams Formal specification Describes the structure and behaviour Mostly in academic environments Not very popular in industrial settings Some examples: xArch/xADL (http://isr.uci.edu/projects/xarchuci/) Science ACME (http://www.cs.cmu.edu/~able/) Computer of of AADL (http://www.aadl.info/) School Software Architecture Software architecture templates of Oviedoof University Several possibilities Kruchten 4+1 views Views & beyond C4 model Arc42 templates . Science Computer of of School Software Architecture Kruchten 4+1 views of Oviedoof Embraced as part of Rational Unified Process University 5 concurrent views 1 Logical view: functionality of the system 2 Development view: modules, layers,... 3 Process view: execution units, concurrency,… 4 Physical view: Infrastructure & deployment topology (+1) Scenarios view: selected use cases or scenarios End-user Programmers Functionality Software management Logical Development view view Science Scenarios Process Deployment Computer System engineers of of view view Integrators Topology Performance Communications School Scalability Software Architecture Views and beyond of Oviedoof Select a set of viewpoints University According to stakeholder's needs Define views according to those viewpoints Add a "Beyond views" document Overall architecture Information about how views relate . Science Computer of of School Software Architecture C4 model (https://c4model.com/) of Oviedoof University Describe Context: System or enterprise context diagram Container diagram: high level shape Components diagram: zoom and decompose Code: UML class diagrams, ER diagrams, … Documentation guidebook Context Code Functional overview Data Infrastructure architecture Science Quality attributes Constraints Deployment Principles Development environment Computer of of Operation and support Decision log School Software Architecture Arc42 https://arc42.org/ of Oviedoof Structure to document software systems University Goal: Clear, simple and effective Templates available for several systems Asciidoc Word (docx) Markdown LaTeX ReStructuredText Science Confluence . Computer of of School Software Architecture Arc42 overview of Oviedoof 1.- Introduction and goals University Problem 2.- Constraints 3.- Context & scope 4.- Solution strategy 5.- Building block view 6.- Runtime view 7.- Deployment view Solution 8.- Crosscutting concepts 9.- Architectural decisions Science 10.- Quality requirements 11.- Risks and technical debt Computer of of 12.-Glossary School Picture source: https://commons.wikimedia.org/wiki/File:Ficherosclasicoscatalogo.JPG Software Architecture 1 - Introduction and goals of Oviedoof University Short description of: - Requirements - Main quality goals - Stakeholders Science Computer of of School Picture source: https://arc42.org/overview/ Software Architecture 1 Introduction and goals of Oviedoof 1.1 Requirements overview University Short description of functional requirements Use-case tables It can link to existing requirements documents Full requirement documents are usually longer Select architecturally significant requirements Science Computer of of School Software Architecture 1 Introduction and goals of Oviedoof 1.2 Main quality goals University Enumerate the main quality goals Quality goals: Main quality attributes