CS代写 Property of Penn Engineering

Property of Penn Engineering

What is Software
Architecture?

Copyright By PowCoder代写 加微信 powcoder

Property of Penn Engineering

l Analyzability: readability and understandability

l Changeability: ease with which code can be changed

l Stability: modifying one part has limited effect on others

l Testability: controllability, observability

l Reusability: can be used in a variety of applications

Review: Internal Quality

Property of Penn Engineering

1. Modeling: identify concepts and their relationships

2. Apply good architecture

3. Use appropriate data structures

4. Use design patterns when appropriate

5. Refactor (change the design) as necessary

Review: How Do We Design Software?

Property of Penn Engineering

1. Modeling: identify concepts and their relationships

2. Apply good architecture

3. Use appropriate data structures

4. Use design patterns when appropriate

5. Refactor (change the design) as necessary

Review: How Do We Design Software?

Property of Penn Engineering

•Design a Java program that reads a file containing info
about courses, instructors, and enrollment

• And then allows the user to choose to see:
• the instructor(s) for a given course
• the course(s) taught by a given instructor
• the average enrollment for a given course

Motivating Example

Property of Penn Engineering

• A single piece of code (main method) that:
• Reads the data from the file and puts it into a data

• Prompts the user for the operation to perform

• Prompts the user to enter any additional data

• Performs the operation and handles errors accordingly

• Shows the results to the user

The Monolith

Property of Penn Engineering

Property of Penn Engineering

• Analyzability: main method can be fairly long

• Changeability: changes to functionality may require
changes in multiple places

• Stability: hard to know whether a change in one place will
affect other places

• Testability: if something goes wrong, hard to find bug

• Reusability: can only use this code in this application

What’s Wrong with the Monolith?

Property of Penn Engineering

•Divide system into subsystems that address major
parts of functionality

• Each subsystem should be able to do its work with
minimal dependency on other subsystems and
minimal knowledge of their implementation

Software Architecture

Property of Penn Engineering

Presentation Get input from user.Display output.

Logic Perform calculations.Make decisions.

Data Store and retrieve data.

Three-Tier Architecture

Property of Penn Engineering

• Analyzability: the program is divided into smaller pieces
that are easier to read and understand

• Changeability: easier to find the code you want to
change; less code to change

• Stability: can change one piece without worrying about its
effect on others

• Testability: easy to test each of these separately

• Reusability: can reuse different parts of the code

Why is This Better than the Monolith?

Property of Penn Engineering

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com