Software Engineering and Architecture

TSM_SoftwEngweek 1 to week 7 (technical aspects)

TSM_SoftwEngweek 1 to week 7 (technical aspects)


Set of flashcards Details

Flashcards 116
Language English
Category Computer Science
Level University
Created / Updated 15.09.2020 / 16.01.2021
Weblink
https://card2brain.ch/box/20200915_software_engineering_and_architecture
Embed
<iframe src="https://card2brain.ch/box/20200915_software_engineering_and_architecture/embed" width="780" height="150" scrolling="no" frameborder="0"></iframe>

Define Architectural Patterns:

Express a fundamental structural organization scheme for software systems

Define design patterns:

Scheme for refining subsystems or components. Commomly recurring structure of communication components that solves a general design problem within a particular context (GOF)

Define idioms:

Low level pattern specific to a programming language

Of which parts consists a proper pattern?

  • A problem
  • Tension: Forces that make a problem hard
  • Resolution of forces: Solution
  • Relationship to ther patterns
  • Consequences

 

Which software architectural styles was looked at in class?

  • From Mud to Structure
    • Layers
    • Pipes and Filters
    • Blackboard
  • Distributed Systems
    • Client-Server
    • Peer to Peer
    • SOA

 

Define sofware achitecture pattern:

A pattern for software architecture describes a particular recurring design problem that arises in specific design contexts, and presents a well-proven generic scheme for its solution.

What are Layers in architectural patterns used for?

The Layers architectural pattern helps to structure applications that can be decomposed into groups of subtasks iin which each group of subtasks is at a particular level of abstraction.

Architectural software patterns

Look at the slides from week 6 as well!!!

What are the benefits and liabilites of layers in software architecture?

  • Benefits:
    • Reuse of layers
    • Dependencies kept local
    • Echangeability: Layer implementation can be replaced by another, semantically equivalent implementation
  • Liabilites
    • cascades of changing behavior: e.g. lower layer doubles speed
    • Buffering of data
    • Unnecessary work: e.g. calculation checksums, encryption, decryption, ...
    • Difficulty to find correct granularity

 

What are pipes and filters in sofware architecture used for?

  • Structure for systems that process a stream of data
  • Each step is encapsulated in a filter
  • Data is passe dthrough pipes (connectors) between adjacent filters
    • Buffering
    • Synchronisation

 

What are the properties of Client-Server vs. Peer-to-Peer?

  • Client-Server
    • Local Applications (Clients), today also Webclients
    • Used Services are centrally available on a server
    • Communication is usually a simple request-respnse scheme
  • Peer-to-Peer
    • Distributed application
    • Partitioning of tasks or work load among different peers
    • Peers are equally priviliged
    • Peers can be both clients and servers

 

What is the idea about Blackboards in software architecture and what is a possible use case?

  • Originally an idea from Artificial Intelligence
  • Idea
    • Blackboard as common exchange of information
    • subsystems that process the available information and produce (and publish) new ones
    • control component that erchestrates the subsystems
  • Use Case: Image preprocessing for tracking

 

 

 

What are the Enterprise Integration Patterns?

  • File Transfer
    • Applicatoins generate files for commonly use data, which are echanged
  • Shared database
    • Applications read and write into a shared DB
  • Remote Procedure Invocation
    • Applicatoins offer interfaces that can be called
  • Messaging
    • Applications use a shared messaging system for exchanging data

What are misconceptions often made about Enterprise Integration Patterns?

  • All desing patterns are inherently good
    • Counter-example: Singleton
  • "I invented that pattern"
    • Rule of three-known-uses
  • Design patterns are blueprints
    • with cop-paste code examples -> NO!
  • Let you turn-off your brain
    • They give you better means to think about design!
  • Are for experts only
    • good OO programming without knowing design patterns is impossible today

 

What are dangers of Enterprise Integration Patterns?

  • Too much flexibility
    • Think about YAGNI (You ain't gonna need it) and simple code!
  • Too many patterns in adesign
    • use where you really have the problem and can live with the drawbacks!
  • separate patterns split into separate classes
    • typical beginners' mistake!
    • class explosion
  • Over-engineering
  • Misunderstanding the example/diagram for the pattern

 

Some things about patterns to know. Name some important ones:

  • There are more than 23 Software architectural patterns
  • Pattern names give us a common vocabulary to discuss design efficiently
    • Alternatives
    • Higher-level abstractions of object interactions
    • architectures
  • A pattern names a recurring successful solution concept
  • Hoest pattern descriptions tell drawbacks and alternatives
  • Patterns are targets for refactoring!
  • Beware of YAGNI (You ain't gonna need it)! Create simple code

 

What is the Model-View-Controller Pattern in software architecture about?

The Model-View-Contoller architectural pattern (MVC) divides an interactive application into three components. The model contains the core functionality and data. Views display information to the user. Controllers handle user input. Views and contollers together comprise the user interface. A change propagation mechanism ensures consistency between the user interface and the model.

What are the benefits and liabilites of the Model-View-Controller Pattern in software architecture?

  • Benefits
    • multiple views for the same model
    • synchronized views
    • "pluggable" views and contollers
    • exchange of "look and feel"
    • Framework potential
  • Liabilites
    • increased complexity
    • Potential excessive number of updates
    • priivate, intimate coupling between view and contoller
    • close coupling of views and cotrollers to a model

 

What is the Publisher - Subscriber Pattern in software architecture about?

The Publisher-Subscriber pattern helps to keep the state of cooperating components synchrinzed. To chieve this it enables one-way propagation of changes: one publisher notifies any number of subscribers about changes to its state.

What are the benefits and liabilites of the Publisher-subscriber Pattern in software architecture about?

  • Benefits
    • Decoupliing of subscribers from publishers
    • Publishers, subscribers can come and go
    • Publisher may go off-line for a while
    • If implemented accordingly, event service can deliver old events for subscribers which were off-line for a while
  • Liabilites
    • Event service may need to store event. Ho long?
    • Authenticity of events: How can a subscriber assume authenticiry of an event (if it does not know the subscriber)?
      • The subscriber must trust the event service
      • The event service tzrusts it publishers

 

Give a short summary about the most important points in architecture stxles and patterns:

  • A pattern sonsists of more than the solution (diagram) but is a description of a prove engineering pxperience that applies in a given context and solves a problem generically with stating benefits and liabilities
  • There are more patterns to know about than the 23 design patterns
  • some patterns are obsolete (Singleton)
  • Good pattern descriptions are honest about the consequences and clear about the problem and its forces driving the solution

 

Why is quality in the Software Architecture that important and how is it observable?

  • The notion of quality is central in software architecting: a software architecture is devised to gain insight in the qualities of a system at the earliest possible stage.
  • Some qualities are observable via execution: performance, security, availability, functionality, usability
  • And some are not observable via execution: modifiability, portability, reusability, testability

 

What is the idea behind ADD (Attribute Driven Design)?

  • Beside functional and business requirements you consider also quality requirements
  • From the quality requirements (quality attributes) you choose among different sets of tactics
  • The selection of tactitcs helps you finding the architecture

 

To figure out the architecture some information regarding the quality is needed. How are they called in general and which are they?

Quality Attributes like 

  • System qualities
    • Availabitlity, modifiability, performance, security, testability, usability
  • Business qualities
    • Time-to-market, etc.

 

What are Quality Attribute Scenarios (Quality Requirements) for? Name its six parts.

  • Quality attribute scenarios are a means to characterize quality attributes
  • Definition: Aquality attribute scenario is a quality-attribute-specific requirement. It consists of six parts:
  1. Source of Stimulus
    - A human, another computer, another acuator
  2. Stimulus
    - a sort of an event such as: a crash, an unexpected message, change request
  3. Environment (or Context)
    - operating condition of the system such as "normal mode", "overloaded"
  4. Artifact
    - the "thing" that is stumulated (the system, a process, a component, ...)
  5. Respnse
    - an activity undertaken after arrival of the stimulus
  6. Response measure
    - something measurable upon completion of the response activity (down time, ...)

 

Which Attribute Scenario Types exist?

  • General quality attribute scenarios
    • system independent
    • can potentially be relevant for any system
  • Concrete quality attribute scenarios
    • specific to a particular system under consideration

 

Give an example for a general attriute scenario type and a concrete attribute scenatio type for a availability scenario (Table form):

Give an example for a general attriute scenario type and a concrete attribute scenatio type for the modifiability scenario (Table form):

What is defined after the attribute scenarios in software architecture?

The software architectural tactics:

  • Availabilty tactics
  • modifiability tactics
  • performance tactics
  • security tactics
  • testability tactics
  • usability tactics

Tactics detemine architectural patterns or styles.

 

Define software architectural tactics:

A tactic is a design desicion that influences the control of a quality attribute respnse.

  • tactitcs ca refine other tactics
    • Example: redundancy (primary tactic) can be refined into
      • redundancy of data (in a database)
      • redundancy oin a computation (in an embedded system)
  • Patterns can encapsulate several tactics
    • A pattern that supports availabilty will also support a redundancy tactic and a synchronization tactic

 

What can we choose as soon the architectural tactics are given?

The architecture style/pattern for a starting point for finden the architecture.

Recall what software architecture is about:

A software system's architecture is the set of principal design decisions about the system.

What defines a goog software architecture?

  • Result of a consistent set of principles and techniques, applied consistently through all phases of a project
  • Resilient in the face of (inevitable) changes
  • Source of guidance throughout the product lifetime
  • Consists of a few key geatures and rules for combining them

 

What is the architectural (Style/) Pattern about?

An architectural (style/) pattern expresses a fundamental structural schema for a software system. it provids a set of predefined subsystems, specifies their responsibilities, and includes rules and guidelines for organizing the relationships beween them

  • subsystems: element types
    - databases, objects, abstract data types
  • structural schema: topological layout
  • responsibilites: semantic constraints
    - signatures, pre/post conditions
  • rules: interaction mechanisms
    - procedure calls, pipes, event broadcast

An architectural style/pattern typically implements several tactics.

Draw an overview of Attribute Scenarios, Architectural Tactics and architectural styles/patterns:

Explain the working steps in ADD (Attribute Driven Design):

  • Choose module to decompose
  • Refine this module:
    • choose "achitectural drivers"
      • achitectural drivers: set of functionality, quality, ...
    • choose style or pattern that satisfies drivers -> child modules
      • for each quality there are identifiable tactics, and for many tactics there are more architectural styles/patterns
    • allocate funcionality to child modules from use cases
    • define interfaces for child modules
    • verify use cases and quality scenatios to be constraints
  • Repeat steps