CS 575: Software Design

Similar documents
An Introduction to Software Architecture. David Garlan & Mary Shaw 94

SOA = Same Old Architecture?

ICS 52: Introduction to Software Engineering

In this Lecture you will Learn: System Design. System Architecture. System Architecture

Application Architectures, Design Patterns

Describing the architecture: Creating and Using Architectural Description Languages (ADLs): What are the attributes and R-forms?

1 Software Architecture

An Introduction to Software Architecture

ICS 52: Introduction to Software Engineering

Goal: Offer practical information to help the architecture evaluation of an SOA system. Evaluating a Service-Oriented Architecture

An Introduction to Software Architecture

Ch 1: The Architecture Business Cycle

Architectural Styles I

Service-Oriented Architecture

Software Engineering with Objects and Components Open Issues and Course Summary

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

SOFTWARE ARCHITECTURE & DESIGN INTRODUCTION

What is Software Architecture

CHAPTER 9 DESIGN ENGINEERING. Overview

Web Services. Lecture I. Valdas Rapševičius Vilnius University Faculty of Mathematics and Informatics

DOMAIN ENGINEERING OF COMPONENTS

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Lesson 5 Web Service Interface Definition (Part II)

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered

Avancier Methods. Very basic design patterns. It is illegal to copy, share or show this document

WHAT IS SOFTWARE ARCHITECTURE?

Appendix A - Glossary(of OO software term s)

Software Architecture

Architectural Blueprint

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

Requirements and Design Overview

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Lesson 19 Software engineering aspects

A Comparison of Service-oriented, Resource-oriented, and Object-oriented Architecture Styles

Implementing a Ground Service- Oriented Architecture (SOA) March 28, 2006

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

CAS 703 Software Design

Service-Oriented Architecture (SOA)

Integration With the Business Modeler

CSE 70 Final Exam Fall 2009

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

Accelerate Your Enterprise Private Cloud Initiative

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

Object Design II: Design Patterns

Recap : UML artefacts. Black Box Requirements. Functional Specification. System. System. Test. Design. System. System. Development.

1.264 Lecture 16. Legacy Middleware

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

Topics. Software Process. Agile. Requirements. Basic Design. Modular Design. Design Patterns. Testing. Quality. Refactoring.

Software Design. Introduction. Software Design (Introduction) SERG

BSIF. A Freeware Framework for. Integrated Business Solutions Modeling. Using. Sparx Systems. Enterprise Architect

Architectural Design

A Reference Architecture for Service Oriented Architecture (SOA)

UP Requirements. Software Design - Dr Eitan Hadar (c) Activities of greater emphasis in this book. UP Workflows. Business Modeling.

Services Oriented Architecture and the Enterprise Services Bus

BUILDING MICROSERVICES ON AZURE. ~ Vaibhav

Systems Development Life Cycle SDLC Planning Analysis Detailed systems design Implementation Maintenance 7 8 SDLC - Planning SDLC - Analysis Planning

Sentinet for BizTalk Server SENTINET

Global Reference Architecture: Overview of National Standards. Michael Jacobson, SEARCH Diane Graski, NCSC Oct. 3, 2013 Arizona ewarrants

Web Services. Lecture I. Valdas Rapševičius. Vilnius University Faculty of Mathematics and Informatics

The Design Patterns Matrix From Analysis to Implementation

Architectural Styles I

CASE TOOLS LAB VIVA QUESTION

Unit-3 Software Design (Lecture Notes)

Software Design Fundamentals. CSCE Lecture 11-09/27/2016

Lecture Notes UML UNIT-II. Subject: OOAD Semester: 8TH Course No: CSE-802

Design Patterns V Structural Design Patterns, 2

Design Concepts and Principles

Enterprise Architect Training Courses

(9A05803) WEB SERVICES (ELECTIVE - III)

Software Reuse and Component-Based Software Engineering

webmethods EntireX for ESB: Leveraging Platform and Application Flexibility While Optimizing Service Reuse

Goals of the BPEL4WS Specification

Final Exam. Final Exam Review. Ch 1: Introduction: Object-oriented analysis, design, implementation. Exam Format

UNIT II Requirements Analysis and Specification & Software Design

Incremental development A.Y. 2018/2019

Software Architecture. Lecture 5

1 Executive Overview The Benefits and Objectives of BPDM

Tuesday, October 4. Announcements

ENTITIES IN THE OBJECT-ORIENTED DESIGN PROCESS MODEL

Human Computer Interaction Lecture 14. HCI in Software Process. HCI in the software process

Chapter 6 Architectural Design. Chapter 6 Architectural design

Minsoo Ryu. College of Information and Communications Hanyang University.

Architectural Code Analysis. Using it in building Microservices NYC Cloud Expo 2017 (June 6-8)

The Strategy Pattern Design Principle: Design Principle: Design Principle:

Basic Properties of Styles

Architectural Design

Software Architectures

DESIGN PATTERN - INTERVIEW QUESTIONS

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

LECTURE 3: SOFTWARE DESIGN. Software Engineering Mike Wooldridge

In this Lecture you will Learn: Design Patterns. Patterns vs. Frameworks. Patterns vs. Frameworks

Recalling the definition of design as set of models let's consider the modeling of some real software.

CSCU9T4: Managing Information

Application Oriented Networks: An SOA Perspective

Human Computer Interaction Lecture 06 [ HCI in Software Process ] HCI in the software process

Chapter 13: Architecture Patterns

Oracle SOA Suite 10g: Services Orchestration

Developing in a Service-oriented World

Ch 1: The Architecture Business Cycle

Transcription:

CS 575: Software Design Introduction 1

Software Design A software design is a precise description of a system, using a variety of different perspectives Structural Behavioral Packaging Requirements, Test/Validation Criteria Infrastructure 2

Expressing A Software Design Software Designs are complicated, therefore, they must be modeled Similar to an architects blueprint A model is an abstraction of the underlying problem Designs should be modeled, and expressed as a series of views Helpful to use a modeling language such as UML 3

Modeling as a Design Technique Designs are too complicated to develop from scratch Good designs tend to be build using models 1) Abstract different views of the system 2) Build models using precise notations (e.g., UML) 3) Verify that the models satisfy the requirements 4) Gradually add details to transform the models into the design 4

Modeling as a Design Technique Lets Build this System Structural Behavioral Models Packaging Requirements, Test/Validation Criteria Infrastructure Incremental Refinement Lets Start Building this System Design 5

Modeling as a Design Technique - Improved Lets Build this System Structural Behavioral Models Packaging Requirements, Test/Validation Criteria Infrastructure Frameworks, Patterns, Templates, etc. Incremental Refinement Lets Start Building this System Design 6

Modeling Designs Design Designing With Models Model Repository Very Complicated To Understand Modeling Tool Visualization 7

UML A modeling Notation for Design Structural Class Diagrams Packaging/Implementation Package Diagrams Component Diagrams Requirements, Test/Validation Criteria Behavioral Use Cases Infrastructure/ Sequence Diagrams Environment Collaboration Diagrams Deployment Diagrams Statechart Diagrams Activity Diagrams 8

Software Architecture According to Shaw and Garlan The Software Architecture of a system consists of a description of the system elements, interactions between the system elements, patterns that guide the system elements, and constraints on the relationships between system elements. Its a more abstract view of the design Its helpful for communication and complexity management Problem: There is no standard definition see http://www.sei.cmu.edu/architecture/definitions.html 9

The Software Architecture Stack Software Architecture Subsystem Decomposition Subsystem Dependencies Subsystem Interfaces Module/Class Decompositions Module/Class Dependencies Module/Class Interfaces Data Structures Algorithms 10

The Software Architecture Stack Software Architecture Subsystem Decomposition Subsystem Dependencies High-Level (Abstract) Design Subsystem Interfaces Module/Class Decompositions Low-Level (Detailed) Design Module/Class Dependencies Module/Class Interfaces Data Structures Algorithms 11

Why do we design A software design is not necessary for trivial systems, but for large systems a design is essential Manage complexity Validation of delivered software Simplify future maintenance A mechanism for communication between domain experts and technical professionals Enables Visualization Enables project team members to work concurrently Partitioning the work effort with limited overlap Example: Concurrently developing test cases while the code is being development 12

Why is design so hard Software design can t be taught, but principles of good design can There are degrees of good and bad design, but its hard to say if a design is correct or not The underlying assumptions and requirements that support the design change A design is like wine, it takes a long time to see if it is good or not 13

Design Methodologies Waterfall Iterative Extreme Programming 14

Software Development Methodology A Methodology is: A Process What happens over time Coupled to the Software Development Lifecycle (SDLC) A Management Approach What is needed to move from one step to another Helps with the project management aspects of a software development project 15

Modeling Emphasis for Different Design Approaches Data Object Oriented Component Oriented Structure Traditional/ Structured Function 16

Jumpstarting Design? Starting from scratch blank screen is tough. Components of a design toolbox Templates, Patterns, Reference Architectures, Frameworks, and so on 17

Example: Jakarta Struts Presentation Framework 18

Example: J2EE Architecture Patterns Source: http://java.sun.com/ blueprints/ corej2eepatterns/patterns/ 19

Example: Intercepting Filter Pattern Architectural Pattern Problem: Preprocessing and post-processing of a client Web request and response are required When a request enters a Web application, it often must pass several entrance tests prior to the main processing stage: Has the client been authenticated? Does the client have a valid session? Is the client's IP address from a trusted network? Does the request path violate any constraints? What encoding does the client use to send the data? Do we support the browser type of the client? The key to solving this problem in a flexible and unobtrusive manner is to have a simple mechanism for adding and removing processing components, in which each component completes a specific filtering action. 20

Design Patterns Example: Observer Pattern Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically Note: Design pattern references often include sample code in a variety of languages to illustrate how to use the pattern. 21

What s good about Patterns They solve common problems in a proven way They tend not to be implementation specific They tend to be classified in a common way context, forces, examples, etc They embody good design principles Example: Loose Coupling 22

Design Quality Software design quality, as with other ideas on quality, is an elusive concept: It depends on priorities of your company and the customers: fastest to implement easiest to implement easiest to maintain, evolve, port most efficient/reliable/robust end-product. 23

How to Fix A Software Design Many times the source code is the only up-to-date documentation for a software system Must be able to recover the design to some extent Must be able to improve the design where appropriate 24

Improving Existing Designs - Refactoring See Martin Fowler s Book What is Refactoring: Refactoring is a technique to restructure code in a disciplined way Used to improve a system design in any number of ways Pattern/Template based process Automated tools exist Refactoring is a behavior preserving transformation of the source code 25

Example: Refactoring PushDown Method Before Bill +setname() +getaddress() +send() After Bill +setname() +getaddress() #send() Note: There are many ways to do this type of refactoring this is just one example. EBill +send() MailBill +send() 26

Anti-Patterns (plus Refactoring) AntiPatterns are Negative Solutions that present more problems than they address AntiPatterns are a natural extension to design patterns AntiPatterns bridge the gap between architectural concepts and real-world implementations. Understanding AntiPatterns provides the knowledge to prevent or recover from them Recovery can be via Refactoring From: www.antipatterns.com 27

Antipattern Example: Poltergeists Proliferation of classes [Riel 96] Spurious classes and associations Stateless, short-lifecycle classes Classes with few responsibilities Transient associations Excessive complexity Unstable analysis and design models Analysis paralysis Divergent design and implementation Poor system performance Lack of system extensibility From: www.antipatterns.com 28

Antipattern Example: Poltergeists From: www.antipatterns.com 29

Antipattern Example: Fixing Poltergeists Refactor to eliminate irrelevant classes Delete external classes (outside the system) Delete classes with no domain relevance Refactor to eliminate transient data classes Refactor to eliminate operation classes Refactor other classes with short lifecycles or few responsibilities Move into collaborating classes Regroup into cohesive larger classes From: www.antipatterns.com 30

Good Design Properties Hierarchical: A good design should be organized into a well-designed hierarchy of components. Modular: Separate distinct concerns (dataand processing) into distinct containers (i.e.,subsystems, modules, and/or classes). Hide implementation details and provide clean, simple interfaces for each container. 31

Good Design Properties Independent: Group similar things together; limit the amount of special knowledge that unrelated components may share. If you change your mind about something, the impact will be localized. 32

Good Design Properties Simple Interfaces: Endless flexibility adds complexity. Complex interfaces mean: hard to understand by users and developers (e.g., Unix man page syndrome) many possible variations of use inconvenient to change interface in order to eliminate bad options. You can get away with flexible interfaces in a low-level localized setting, but the larger the scale, the simpler the interface should be. 33

Summary: Software Design Good software designers are experienced software designers Given a design, and experienced designer can tell you: What s good, What s Bad, and provide suggestions for improvement Patterns and Frameworks are very helpful to software designers Good software designs are based on good design principles 34

Demystifying SOA Service-Oriented architecture is the latest buzz in the information technology and enterprise application domains There is a lot of hype, buzzwording and misconception around SOA We will place a good bit of emphasis in this course examining at SOA to try to understand its pro s and con s from an application architecture and design perspective. 35

SOA Its an Architecture, Design and Instantiation Approach Understanding SOA requires one to answer the following questions: What is a service oriented architecture? What is a service? How do I design an application that adheres to a SOA? How do I implement an application designed using SOA principles? 36

Traditional versus SOA applications a line and box view Traditional Application SOA Application Application Components Service Messaging Service Service Applications designed in conjunction with an SOA style are easier to design, implement, maintain and extend due to the loose coupling of components that reside in different services The pieces (services) in an SOA are designed with a courser granularity than an design based on traditional components, making the system simpler to deal with The messaging interfaces between the services in an SOA have structure and semantics allowing them to be intelligently routed and provisioned based on application-specified policies 37

What is a service? Service (also application service): An application function that (a) within each request, encompasses a complete parcel of work (business or technical), (b) may stand on its own or be part of a larger set of functions that constitute a larger service but its scope is such that each request leaves the system in a long-term steady state, (c) is designed for and provides a network-accessible interface and (d) is designed to receive requests from any source, making no assumptions as to the functional correctness (syntactic or semantic) of an incoming request. 38

What is a service? Technically Provided Interface <<Service>> C1 C2 Required Interface C3 Service boundaries are explicit Service invocation based on message passing and not method invocation Services are autonomous Services can be deployed and/or extended independently of the service consumers (i.e., applications) Services can be developed in any language since the binding is in the form of an encoded message in a standard format 39

What is a service? Technically Provided Interface <<Service>> C1 C2 Required Interface C3 Services share schema and contract, not class Services advertise a contract that describes the structure (schema) of messages it can send and/or receive as well as some degree of ordering constraints over those messages. Interfaces are defined in terms of a schema and not binary classes Example: WSDL in Web Services 40

What is a service? Technically Provided Interface <<Service>> C1 C2 Required Interface C3 Service compatibility is determined based on policy Due to the tightly coupled nature of OO and Component designs, they assume that structural compatibility implies semantic compatibility Structural compatibility in SOA is based on contract and schema and can be validated (if not enforced) by machine-based techniques (such as packet-sniffing, validating firewalls). Semantic compatibility is based on explicit statements of capabilities and requirements in the form of policy. Policy expressions indicate which conditions and guarantees (called assertions) must hold true to enable the normal operation of the service. 41

Why SOA Another Layer of Abstraction OO abstractions were introduced to deal with the complexity of managing functions independent of data CBD abstractions were introduced to deal with the complexity of distribution, packaging, and deployment SOA abstractions were introduced to create the notion of a network-aware, single instance component that can participate in a both synchronous and asynchronous business process 42

Activates to consider when designing an SOA [ref: http://www.webservices.org/index.php/ws/content/view/full/55441] SOA separates the concerns of the service consumer and the service provider. 43

Logical Layering for SOA [ref: http://www.webservices.org/index.php/ws/content/view/full/55441] (e.g., ESB) 44

Services are another layer of Abstraction Services are special types of components, having a published interface that consists of a subset of one or more public component interfaces that collectively defines the service boundary Components are built from a collection of objects where the emphasis is on creating a deployable package that enables the component to execute in a managed application server container such as.net or J2EE/WebSphere Objects are compiled code, developed in a specific programming language, that represent the most granular element of the system s implementation 45

SOA Design Principles Course-Grained Interface-based Design Discoverable Single Instance Loosely Coupled Asynchronous 46

Patterns for SOA SOA-design is often done using the following integration and orchestration architecture patterns: Value-Object Proxy Facade Business Delegate (perhaps with factory) Adapter Layer We will talk about these in a later lecture 47