Docsity

Lecture Notes on Software Architecture - Software Engineering 1 | CSIS 360, Study notes of Civil Engineering

Toggle sidebar
bg1
CSIS 360 Lecture 20
Design Principles
What is design?
Translation of user requirements into a description of how the system will satisfy those
requirements.
Software Architecture
"The overall structure of the software and the ways in which that structure provides
conceptual integrity for a system" – Mary Shaw and David Garlan, Software
Architecture, 1996
The structure or organization of the software components, their interaction, and the
structure of data used in the components.
Diagrams are very helpful here!
There are some common architectural patterns that are used in many software systems.
Tiered or Layered architecture: system functionality is partitioned (or layered) so that
each partition performs specific functionality, and only communicates with the adjoining
layers. Frequently, each layer executes on a separate computer, although multiple layers
may reside on one computer.
Each layer provides service to the layer above it, and receives service from the layer
below. Each layer provides an interface that is used to communicate with it. This allows
layers to be changed easily - new versions only have to provide the same interface
Layered architectures can also be more scalable. Often, a layer can reside on multiple
computers in parallel, with each computer providing the layer's services. Requests for
service can go to any of the machines.
We can think of many applications as having three parts: presentation, application
processing, and data management.
Presentation layer: concerned with presenting information to the user and user
interaction.
Application processing layer: implements the logic of the application.
Data management layer: concerned with database operations.
pf3
pf4
pf5

Partial preview of the text

Download Lecture Notes on Software Architecture - Software Engineering 1 | CSIS 360 and more Study notes Civil Engineering in PDF only on Docsity!

CSIS 360 Lecture 20

Design Principles What is design? Translation of user requirements into a description of how the system will satisfy those requirements. Software Architecture "The overall structure of the software and the ways in which that structure provides conceptual integrity for a system" – Mary Shaw and David Garlan, Software Architecture, 1996 The structure or organization of the software components, their interaction, and the structure of data used in the components. Diagrams are very helpful here! There are some common architectural patterns that are used in many software systems. Tiered or Layered architecture: system functionality is partitioned (or layered) so that each partition performs specific functionality, and only communicates with the adjoining layers. Frequently, each layer executes on a separate computer, although multiple layers may reside on one computer. Each layer provides service to the layer above it, and receives service from the layer below. Each layer provides an interface that is used to communicate with it. This allows layers to be changed easily - new versions only have to provide the same interface Layered architectures can also be more scalable. Often, a layer can reside on multiple computers in parallel, with each computer providing the layer's services. Requests for service can go to any of the machines. We can think of many applications as having three parts: presentation, application processing, and data management.  Presentation layer: concerned with presenting information to the user and user interaction.  Application processing layer: implements the logic of the application.  Data management layer: concerned with database operations.

If we organize our applications carefully, we can separate these into layers. presentation ^ | v application processing ^ | v data management Note that the presentation layer does not interact directly with the data management layer. How can we map applications onto computing systems? Single-Tier Architecture (monolithic) Older style of computing. Mainframe computer with lots of dumb terminals. In this case, the three application layers all run on one computer, and may not clearly separated. Also, single-user application running on a PC (e.g., MS Office). 2-Tier Also called client/server architecture. Typical 2-tier architecture: application and database. Application includes business logic and presentation (display). Application needs to be installed on every computer on which it needs to be used. 2 major forms

  • thin client - client responsible for presentation only. Server is responsible for all application logic and data management
  • fat client - client responsible for presentation and application logic. Server responsible for data management only. (This is the style show in Figure 12-2 of the text). The thin client model is often used when large, single-tier systems are migrated to client/server systems. PCs are often used to connect to central mainframes, and they become responsible for the presentation layer. Disadvantages of thin-client model: heavy processing load on central server and on network. PCs have lots of computing power that is largely unused in this model.
  • Coupling - the level of dependency between modules or subsystems. Low coupling is desirable. Obviously, components have to communicate with each other. But, you want to limit the amount of inter-component communication. As classes become more interdependent, system complexity increases, and the system becomes more difficult to implement, test, and maintain. UML Class Diagrams

What is UML?

The Unified Modeling Language (UML) is

  • a family of graphical notations
  • helpful in describing and designing software systems,

particularly software systems built using the object-oriented

(OO) style.

There are many types of diagrams in the UML: state diagrams, interactions diagrams, use case diagrams, class diagrams, sequence diagrams. Some of these diagrams describe/document the structure of a system (e.g. class diagram). Some of them describe the behavior of a system (use case diagrams, sequence diagrams). I want to start looking at class diagrams at a high-level today. Class Diagram

  • shows static structure of the classes in a system o attributes o operations
  • classes represent "things" that are handled in the system
  • classes are related to each other in a number of ways: o associated (connected to each other) o dependent (one depends upon another) o specialized (one is a specialization of another) Class diagram looks similar to a data model filled with entities and relationships (E-R diagram). But, class diagrams include information about operations or methods. Let's look at a simple class diagram that models an insurance business (see page 89 of UML book).

Insurance Company Insurance Company Insurance Contract Customer 0..*

CS

IS

Le

ctu

re

1 0..*

CS

IS

Le

ctu

re

1..*

CS

IS

Le

An insurance company has many (0..*) insurance contracts. An insurance contract is related to one insurance company. The contract is related to many insurance customers. This diagram is only showing the class names (no attributes or operations) Finding classes How do you find the classes to model? Good classes reflect the problem domain. A class is a person, place, thing, event, or concept in the environment Derive them from the UC descriptions and requirements spec:

  • Is there data that must be stored and analyzed?
  • Are there concepts that must be registered in the system?
  • Are there events or transactions that occur at specific moments?
  • What roles do the actors play? Often, these roles can be seen as classes: user, system operator, student, customer, etc.