Docsity

Software Architecture Evaluation: Cohesion and Coupling, Study notes of Computer Science

Toggle sidebar
bg1
Software Architecture Paradigms
“We have found that understanding software
architecture is the key to developing many important
software solutions.”
B. Stroustrup, 1991.
1. Objectives................................................................................3
2. Definitions...............................................................................3
3. Architecture Style [J. Peters and W. Pedrycz 2000]:...............4
4. Data Flow Systems..................................................................9
4.1 Pipelines...........................................................................9
5. Call & return Systems............................................................11
5.1 Layered Architecture:....................................................11
6. N-Tier Architecture : (www.n-tier.com)................................14
6.1 Motivations....................................................................14
6.2 Architecture:..................................................................15
6.3 Client/Server (C/S)........................................................16
6.3.1 Different Types of Architectures...............................16
7. Independent Processes...........................................................20
7.1 Communicating Processes:............................................20
8. Repository..............................................................................25
8.1 Blackboard Architecture................................................25
9. Architecture Evaluation: Good Structure..............................29
9.1 Goals..............................................................................29
9.2 Cohesion........................................................................29
9.2.1 Coincidental cohesion................................................30
9.2.2 Logical cohesion........................................................30
9.2.3 Temporal cohesion.....................................................31
9.2.4 Procedural cohesion...................................................31
9.2.5 Communicational cohesion........................................32
9.2.6 Informational cohesion..............................................32
A. Bellaachia Page: 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b

Partial preview of the text

Download Software Architecture Evaluation: Cohesion and Coupling and more Study notes Computer Science in PDF only on Docsity!

Software Architecture Paradigms

“We have found that understanding software architecture is the key to developing many important software solutions.”

    1. Objectives................................................................................ B. Stroustrup, 1991.
    1. Definitions...............................................................................
    1. Architecture Style [J. Peters and W. Pedrycz 2000]:...............
    1. Data Flow Systems..................................................................
    • 4.1 Pipelines...........................................................................
    1. Call & return Systems............................................................
    • 5.1 Layered Architecture:....................................................
    1. N-Tier Architecture : (www.n-tier.com)................................
    • 6.1 Motivations....................................................................
    • 6.2 Architecture:..................................................................
    • 6.3 Client/Server (C/S)........................................................
      • 6.3.1 Different Types of Architectures...............................
    1. Independent Processes...........................................................
    • 7.1 Communicating Processes:............................................
    1. Repository..............................................................................
    • 8.1 Blackboard Architecture................................................
    1. Architecture Evaluation: Good Structure..............................
    • 9.1 Goals..............................................................................
    • 9.2 Cohesion........................................................................
      • 9.2.1 Coincidental cohesion................................................
      • 9.2.2 Logical cohesion........................................................
      • 9.2.3 Temporal cohesion.....................................................
      • 9.2.4 Procedural cohesion...................................................
      • 9.2.5 Communicational cohesion........................................
      • 9.2.6 Informational cohesion..............................................
      • 9.2.7 Functional cohesion...................................................
    • 9.3 Coupling........................................................................
      • 9.3.1 Content Coupling.......................................................
      • 9.3.2 Common Coupling.....................................................
      • 9.3.3 Control Coupling.......................................................
      • 9.3.4 Stamp Coupling.........................................................
      • 9.3.5 Data Coupling............................................................
    1. Formal Definitions.............................................................
    1. Summary............................................................................

4. Architecture Style [J. Peters and W. Pedrycz 2000]:

 An architecture style is a pattern of structural

organization in an architecture. It appears as a toolbox containing tools (architecture) useful in constructing different kinds of software modules.

 Characteristics:

Types of components : Processing elements used to transform data (i.e., formatting routines in text formatting package).  Types of connectors : Control and data paths between components.  Constraints : Restrictions on processing, data, and allowable ways to “wire” components together.

 Architectural styles provide four things:

Vocabulary : A set of design elements such as pipes, filters, client, severs, parsers, databases, etc. Architectural Elements Processing Elements Or Components Data Elements (^) Connecting Elements

Design rules : These are the set of constraints that dictates how the processing elements should be connected.  Semantic interpretation: An architectural style provides a well-defined meaning of the connected design elements.  Analyses: Many styles provide analyses that can be performed on systems build in that style, i.e., deadlock detection, scheduling, etc.  Detailed Description:

o Components communicate through one or more

ports or interfaces.

o Connectors : can be implemented using shared

variables, remote procedure call, and message passing.

o An interface : user interface, variables, a method

that can be called by another component, events, etc.

o Attributes define the behavior of the element:

Processing Element or Component {Attributes} Processing Element or Component {Attributes} Connectors {Attributes} Configuration Interfaces or ports

Architecture element : Application package: MS Word  Processing elements or components : Spelling, grammar, Thesaurus, Word count, etc.  Data element : File name  Connectors : Pull-down menu and item buttons

 Categories:

Dataflow Systems : Pipelines (pipes & filters) Batch processing, Process control  Call-&Return : Object-oriented (OO) Layered Procedure oriented  Independent-Process : Event-action system Distributed system Communicating processes Parallel processes Agent  Repository : Database Hypertext Archival Blackboard  Virtual Machine : Intelligent system Rule-based system

Interpreters

 Example: A Unix shell programming command

Pipes % cat filename | sort | tail -3 | grep Mac Unix Windows Bell Mac Input to sort Bell Mac Unix Windows Input to tail Mac Unix Windows Input to grep Mac Pipeline Output

6. Call & return Systems

6.1Layered Architecture:

 Layered architecture style works well whenever

system requirements call independent tasks organized hierarchically.

 Architecture layers have been used in database,

operating, computer-to-computer communications, etc.

 Definitions:

 A layered architecture is designed as a hierarchy of client-server processes that minimizes interaction between layers.  Each layer acts as a client for the module above it and acts as a server for the module below it in an architecture layer.

Executive layer: provides record managements.  Kernel layer: Handles I/O (device drivers), schedules and control processes, manages memory.

 Advantages:

 Layered architecture provides an incremental approach to designing a complex system. Maintainability: Layered can be easily maintained and even replaced.  Extendibility: new services (layers) can be easily added.

7. N-Tier Architecture : (www.n-tier.com)

7.1Motivations

 N-Tier applications mean using whatever mix of

Computer Hardware and/or Software Layers you need, in order to build a modular information system.

 What does N-tier mean?

 N-Tier means "Any Number of Tiers"  ~ No Limits ~

 Levels/Layers/Tiers

 Clients & Customers

 Objects & Components

 Servers & Services

 Programs partitioned into Tiers allow each layer or

component part to be developed, managed, deployed and enhanced independently.

 The N-Tier model of computing enables the overall

performance and maintainability of Client/Server systems to be substantially improved.

 This layered environment also simplifies code

distribution, since most of the business logic has been moved from the client to the server.

 Other advantages of Multi-Tier Client/Server

architectures include:  Changes to the user interface or to the application logic are largely independent from one another, allowing the application to evolve easily to meet new requirements.

program (usually on a different machine) for a specific function or purpose. The client exists in the position of the requester for the service provided by the server. 7.3.1 Different Types of Architectures

 The term Client/Server has traditionally been

associated with a desktop PC connected over a

network to some sort of SQL-database server.

 One-Tier ~ Monolithic (C/S) Architectures

The Information Technology (IT) industry,

have been practicing a simple form of

Client/Server computing since the initial

inception of the mainframe. That

configuration, a mainframe host and a

directly connected, (unintelligent) terminal

constitutes a one-tier C/S system.

 Two-Tier Client/Server Architectures

 In two-tier client/server architecture, the client communicates directly with the database server. The application or business logic either resides on the client or on the database server in the form of stored procedures.  A two-tier (C/S) model first began to emerge with the applications developed for local area networks in the late eighties, and was primarily based upon simple file sharing techniques implemented by X-base style products (dBase, FoxPro, Clipper, Paradox, etc.).

 Three-Tier Client/Server

Architectures

 A newer generation of Client/Server implementations takes this segmented model a step further and adds a middle tier to achieve a '3-tier' architecture.

intelligent "fat" client where most of the processing occurs.  This configuration did not scale well however, to facilitate large or even mid-size information systems (greater than 50 or so connected clients).

 Fat Servers

 An alternative 'Thin' Client < --- > 'Fat' Server configuration, where the user invokes procedures stored at the database server.  The 'Fat' Server model, is more effective in gaining performance

 Fat Middle

 A multi-tier architecture augments traditional client/server and two-tier computing by introducing (one or more) middle-tier components.  The client system interacts with the middle-tier via a standard protocol such as HTTP or RPC. The middle-tier interacts with the backend server via standard database protocols such as SQL, ODBC and JDBC.  This middle-tier contains most of the application logic, translating client calls into database queries and other actions, and translating data from the database into client data in return.

8. Independent Processes

8.1Communicating Processes:

 A communicating process is an object with input and

output ports.

 A port is an identifiable means of “wiring” process

together. Ports are connected by input and output channels.

 Processes are connected together to form different

topology, i.e., mesh, tree, etc.

 A communicating processes form of architecture includes:

Processes and channels to communicate these processes.

 Examples: Pipeline, Mesh, Tree

 Process-based architecture can be described using

Communicating Sequential Processes (CSP) specification language. CSP was introduced by Hoare (1978, 1985).