Introduction Software Architecture Copyright Richard N Taylor Nenad

  • Slides: 39
Download presentation
Introduction Software Architecture Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy.

Introduction Software Architecture Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.

Software Architecture Foundations, Theory, and Practice Every engineered artifact has an architecture

Software Architecture Foundations, Theory, and Practice Every engineered artifact has an architecture

Software Architecture Foundations, Theory, and Practice Sometimes refereed to as the system’s blueprint

Software Architecture Foundations, Theory, and Practice Sometimes refereed to as the system’s blueprint

Software Architecture Foundations, Theory, and Practice Importance of architecture in engineering disciplines l An

Software Architecture Foundations, Theory, and Practice Importance of architecture in engineering disciplines l An architecture may be u elegant and effective, or u clumsy and dysfunctional l Architectural models provide the means to represent and communicate the engineered artifact’s properties l Facilitates communication among the stakeholders

Software Architecture Foundations, Theory, and Practice Examples of software architecture

Software Architecture Foundations, Theory, and Practice Examples of software architecture

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture More examples Foundations, Theory, and Practice

Software Architecture Foundations, Theory, and Practice Description of a system’s architecture The Architecture of

Software Architecture Foundations, Theory, and Practice Description of a system’s architecture The Architecture of This System Next Section l usually informal prose plus box-and-line diagram l lots of appeal to intuition l rarely formal, little precision

Software Architecture Foundations, Theory, and Practice Unlike buildings and cars, software is intangible l

Software Architecture Foundations, Theory, and Practice Unlike buildings and cars, software is intangible l architectures produced by different people looking at the same code

Software Architecture Foundations, Theory, and Practice The challenge l Develop systems “architecturally” u u

Software Architecture Foundations, Theory, and Practice The challenge l Develop systems “architecturally” u u u l apply codified architectural design expertise build systems by assembling existing parts use standards for integration assure that the system has the desired properties reduce development and evolution costs Turn Software Architecture into an engineering discipline u from ad hoc definition to codified principles

Software Architecture Foundations, Theory, and Practice What is the nature of software construction? [somewhat

Software Architecture Foundations, Theory, and Practice What is the nature of software construction? [somewhat conflicting] quotes: l Software engineering is, in fact, a form of engineering David Parnas (modules, hiding, & OO) l Programming is an art and a science Donald Knuth (computational complexity, analysis of algorithms)

Software Architecture Foundations, Theory, and Practice what is engineering? definitions abound. They have in

Software Architecture Foundations, Theory, and Practice what is engineering? definitions abound. They have in common: Creating cost-effective solutions. . . to practical problems. . . by applying scientific knowledge. . . building things. . . in the service of mankind engineering enables ordinary people to do things that formerly required virtuosos engineering entails making decisions under the constraints of limited time, knowledge, and resources

Software Architecture Foundations, Theory, and Practice SA & programming address different issues Architecture Programs

Software Architecture Foundations, Theory, and Practice SA & programming address different issues Architecture Programs interactions among parts implementations of parts system-wide views local views declarative operational more stable components dynamic allocation system-level performance algorithmic performance software engineering is, in fact, a form of engineering David Parnas programming is an art and a science Donald Knuth

Software Architecture Foundations, Theory, and Practice SA makes a difference: AT&T l Design Reviews

Software Architecture Foundations, Theory, and Practice SA makes a difference: AT&T l Design Reviews at AT&T u u l Architecture Review Board created 1988 facilitates architectural reviews for projects Results u reviewed over 350 projects from 1989 -95 u “a correct architecture has the largest single impact on cost and quality of the product” (Maranzano 1995) u “based on experience … we found an average savings of at least one-half staff year per project reviewed, and substantially larger savings on several projects reviewed. ” u estimated cumulative savings: approx 175 staff years

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l l The

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l l The Web is a collection of resources, each of which has a unique name known as a uniform resource locator, or “URL”. Each resource denotes, informally, some information. URI’s can be used to determine the identity of a machine on the Internet, known as an origin server, where the value of the resource may be ascertained. Communication is initiated by clients, known as user agents, who make requests of servers. u Web browsers are common instances of user agents. 19

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l l l

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l l l Resources can be manipulated through their representations. u HTML is a very common representation language used on the Web. All communication between user agents and origin servers must be performed by a simple, generic protocol (HTTP), which offers the command methods GET, POST, etc. All communication between user agents and origin servers must be fully self-contained. (So-called “stateless interactions”) 20

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l l l

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l l l Architecture of the Web is wholly separate from the code There is no single piece of code that implements the architecture. There are multiple pieces of code that implement the various components of the architecture. u E. g. , different Web browsers 21

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l Stylistic constraints

Software Architecture Foundations, Theory, and Practice SA makes a difference: WWW l Stylistic constraints of the Web’s architectural style are not apparent in the code u The effects of the constraints are evident in the Web l One of the world’s most successful applications is only understood adequately from an architectural vantage point. 22

Software Architecture Foundations, Theory, and Practice SA makes a difference: Unix l l Remember

Software Architecture Foundations, Theory, and Practice SA makes a difference: Unix l l Remember pipes and filters in Unix? u ls invoices | grep –e august | sort Application architecture can be understood based on very few rules Applications can be composed by non-programmers u Akin to Lego blocks A simple architectural concept that can be comprehended and applied by a broad audience 23

Software Architecture Foundations, Theory, and Practice Fundamental Understanding l l Architecture is a set

Software Architecture Foundations, Theory, and Practice Fundamental Understanding l l Architecture is a set of principal design decisions about a software system Three fundamental understandings of software architecture u Every application has an architecture u Every application has at least one architect u Architecture is not a phase of development 24

Software Architecture Foundations, Theory, and Practice Wrong View: Architecture as a Phase Treating architecture

Software Architecture Foundations, Theory, and Practice Wrong View: Architecture as a Phase Treating architecture as a phase denies its foundational role in software development u More than “high-level design” u Architecture is also represented, e. g. , by object code, source code, … u 25

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l l Requirements

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l l Requirements Design Implementation Analysis and Testing Evolution Development Process Let’s look at a few of these… see the book for more details 26

Software Architecture Foundations, Theory, and Practice Context of Software Architecture Ø l l l

Software Architecture Foundations, Theory, and Practice Context of Software Architecture Ø l l l Requirements Design Implementation Analysis and Testing Evolution Development Process 27

Software Architecture Foundations, Theory, and Practice The Twin Peaks Model 28

Software Architecture Foundations, Theory, and Practice The Twin Peaks Model 28

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l Ø l

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l Ø l l l Requirements Design Implementation Analysis and Testing Evolution Development Process 29

Software Architecture Foundations, Theory, and Practice Implementation l The objective is to create machine-executable

Software Architecture Foundations, Theory, and Practice Implementation l The objective is to create machine-executable source code u That code should be faithful to the architecture l Alternatively, it may adapt the architecture l How much adaptation is allowed? l Architecturally-relevant vs. -unimportant adaptations u It must fully develop all outstanding details of the application 30

Software Architecture Foundations, Theory, and Practice Faithful Implementation l l All of the structural

Software Architecture Foundations, Theory, and Practice Faithful Implementation l l All of the structural elements found in the architecture are implemented in the source code Source code must not utilize major new computational elements that have no corresponding elements in the architecture Source code must not contain new connections between architectural elements that are not found in the architecture Is this realistic? Overly constraining? What if we deviate from this? 31

Software Architecture Foundations, Theory, and Practice Unfaithful Implementation l l The implementation does have

Software Architecture Foundations, Theory, and Practice Unfaithful Implementation l l The implementation does have an architecture u It is latent, as opposed to what is documented. Failure to recognize the distinction between planned and implemented architecture u robs one of the ability to reason about the application’s architecture in the future u misleads all stakeholders regarding what they believe they have as opposed to what they really have u makes any development or evolution strategy that is based on the documented (but inaccurate) architecture doomed to failure 32

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l l Ø

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l l Ø l l Requirements Design Implementation Analysis and Testing Evolution Development Process 33

Software Architecture Foundations, Theory, and Practice Analysis and Testing l l l Analysis and

Software Architecture Foundations, Theory, and Practice Analysis and Testing l l l Analysis and testing are activities undertaken to assess the qualities of an artifact The earlier an error is detected and corrected the lower the aggregate cost Rigorous representations are required for analysis, so precise questions can be asked answered 34

Software Architecture Foundations, Theory, and Practice Analysis of Architectural Models l l l Formal

Software Architecture Foundations, Theory, and Practice Analysis of Architectural Models l l l Formal architectural model can be examined for internal consistency and correctness An analysis on a formal model can reveal u Component mismatch u Incomplete specifications u Undesired communication patterns u Deadlocks u Security flaws It can be used for size and development time estimations 35

Software Architecture Foundations, Theory, and Practice Analysis of Architectural Models (cont’d) l Architectural model

Software Architecture Foundations, Theory, and Practice Analysis of Architectural Models (cont’d) l Architectural model u may be examined for consistency with requirements u may be used in determining analysis and testing strategies for source code u may be used to check if an implementation is faithful 36

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l Ø l

Software Architecture Foundations, Theory, and Practice Context of Software Architecture l l Ø l Requirements Design Implementation Analysis and Testing Evolution Development Process 37

Software Architecture Foundations, Theory, and Practice Evolution and Maintenance l l All activities that

Software Architecture Foundations, Theory, and Practice Evolution and Maintenance l l All activities that chronologically follow the release of an application Software will evolve u Regardless of whether one is using an architecture-centric development process or not The traditional software engineering approach to maintenance is largely ad hoc u Risk of architectural decay and overall quality degradation Architecture-centric approach u Sustained focus on an explicit, substantive, modifiable, faithful architectural model 38

Software Architecture Foundations, Theory, and Practice Why study software architecture? http: //money. cnn. com/gallery/pf/2015/01/27/best-jobs-2015

Software Architecture Foundations, Theory, and Practice Why study software architecture? http: //money. cnn. com/gallery/pf/2015/01/27/best-jobs-2015