chapter 7 design and implementation. notes from book there is a general flow but, there is a lot...

55
S Chapter 7 Design and Implementation

Upload: theresa-french

Post on 12-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

S

Chapter 7 Design and

Implementation

Page 2: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Notes from Book

There is a general flow But, there is a lot of back and forth

Use of modeling such as UML may be useful

Key topic is whether to build or buy

Object design can aid systems

Context is a starting place

Chapter 7 - Design and Implementation2

Page 3: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

(Notes)

Early use-case don’t need high detail

Rough sequence Context Architeture Objects Design models Interfaces

Chapter 7 - Design and Implementation3

Page 4: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

(Notes)

Object Identification Analyze natural lanugage descriptions – nouns, verbs Tangible entites – objects Scenarios

UML 13 models Primarily

Structural Dynamic

Chapter 7 - Design and Implementation4

Page 5: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

(Notes)

Early stages – useful models Subsystems – classes Sequence State diagrams

Interface specification Between systems

Design Patterns

Chapter 7 - Design and Implementation5

Page 6: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Fast City Grocers

You work for FastCityGrocers.com, a new startup that plans to offer a new alternative to grocery shopping. It will offer the ability for shoppers to shop for groceries on-line and either stop by the store to pick them up or have them delivered to their home. Payment may be either on-line or in-person upon delivery. In addition, the system will have to manage drivers and delivery routes for grocery delivery. It will have to interface with existing systems such as those to manage inventory and reordering from suppliers.

Chapter 7 - Design and Implementation6

Page 7: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

1. A Context Model

2. Activity Diagrams representing a. Process of an order from ordering to

pickup/delivery

3. Use cases

4. Sequence diagrams

Chapter 7 - Design and Implementation7

Page 8: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

a. Processing of an order. Consider at a minimum web entry, bagging, personal pickup, home delivery, and payment.

5. A state diagram

6. Architecture Diagram

7. Class diagrams for the objects involved. Make sure that you include customer orders with multiple items, delivery information, suppliers, orders to suppliers

8. Class hierarchy.

Chapter 7 - Design and Implementation8

Page 9: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Fast City GrocersInitial Concept

Need Aging population Need Services

Trends Netflix replaces blockbuster Amazon competes with bookstores Barnes and Noble goes online

Chapter 7 - Design and Implementation9

Page 10: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

General Ideas

Users Elderly Disabled Busy, working Younger, tech oriented

General Model Order online Pick up or deliver

Chapter 7 - Design and Implementation10

Page 11: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Possible Flow

High level (management) interview/discussion

First pass: Context, use cases, architecture Identify critical issues, feasibility Prioritization

Detailed (user) Interviews Identify user processes, data, issues, skill level

Refine Context, use cases, architecture Define stories

Key processes Activity, process, state diagrams Chapter 7 - Design and Implementation11

Page 12: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

(Flow)

Mock up User Interface

Validation With User

Models – where needed for clarity Activity diagrams Sequence diagrams State diagram

Class diagrams

Chapter 7 - Design and Implementation12

Page 13: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Context

Chapter 7 - Design and Implementation13

On LineOrdering, Processin

g, Delivery

Mapping/Routing

Credit Card

Processing

InventorySystem

Payroll System

SupplierOrdering

System(s)

Recipe System

Page 14: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Context

Other systems

Not relationship with them

Chapter 7 - Design and Implementation14

Page 15: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Fast City GrocersUse Cases

Customer – ordering system Log on Selects from categories by price Selects from Sales Selects from Products Selects items from Recipes Review/edit order – quantities selects delivery Makes payment

Chapter 7 - Design and Implementation15

Page 16: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Use Case - Graphical

Chapter 7 - Design and Implementation16

Page 17: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

(Use-Cases)

Customer- store clerk Picks up and pays at store

Customer – delivery person Gets delivery at home Make payment

Chapter 7 - Design and Implementation17

Page 18: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Use Cases

Scheduling System Generate bagging list Generate driving assignments Generate optimized routes Evaluate driver status

Scheduling System – payroll system Reports time to payroll

Bagger - scheduling system Accept bagging task Barcode to bagging list Marks order complete

Chapter 7 - Design and Implementation18

Page 19: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Use Cases

Delivery person – Scheduling system Accept assignment Mark goods on truck Marks order delivered

Chapter 7 - Design and Implementation19

Page 20: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Use CasesTextual - Detail

Actors Bagger Order system

Description Bagger takes order on mobile device, finds each item from list, barcodes

upon putting in cart, marks unavailable items, marks bagging complete. System updates inventory

Data Order number Order items, quantities, locations

Stimulus: User takes next bagging order from system

Response: Order marked as complete

Comments

Chapter 7 - Design and Implementation20

Page 21: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Use Case - Value

Good way to get a feel for overall project

Useful to outline all activities – even if you will use other software

Graphics useful for overall picture

Textual version add details

Good outline for review with client / management

Chapter 7 - Design and Implementation21

Page 22: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Initial ArchitectureBasic System

Chapter 7 - Design and Implementation22

Web Server

Customer

Database

BaggerDelivere

rStocker

Mobile Device

Mobile Device

Mobile Device

Mobile ApplicationsServer

Page 23: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Initial ArchitectureWith External Systems

Chapter 7 - Design and Implementation23

Web Server

Customer

Database

Store Cleark Stocker

Mobile Device

Sched/Delivery/Mobile App Server

Routing System

Credit Card

Processor

Inventory System

Payroll Syste

m

Recipe Systems

Deliverer

Mobile Device

Bagger

Mobile Device

POS Terminal

POS Server

Page 24: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Architecture Diagrams

Show entities (often as boxes, could be other), such as: Users Devices – computers, terminals, data collection, … Software components – Interfaces, subsystems Databases

Shows how they connect (often with arrows, perhaps by juxtaposition) Generally where information flows

May show containment (by nesting entities)

Chapter 7 - Design and Implementation24

Page 25: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Architecture Research

Credit card handling / Merchant accounts Route optimization systems Mapping/ route systems Shopping Carts

Chapter 7 - Design and Implementation25

Page 26: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

ArchitecturePlatforms

Computer OS Languages DB software UI packages Mobile devices Scanners Networking Database

Chapter 7 - Design and Implementation26

Page 27: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

State Diagram

Chapter 7 - Design and Implementation27

Page 28: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

State Diagrams

Circles represent states (not processes) Labeled with state description Optionally labeled with action (at entry to state)

Arcs represent transition between states Transition is triggered by an event Arc is labeled with the trigger Optionally labeled with action (at transition)

Chapter 7 - Design and Implementation28

Page 29: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

State Diagrams

Useful for event driven devices/systems Controls for a car, DVD player, calculator, etc

Could represent web site States relate to page Events relate to clicks that lead to a new state Not all pages can be reached from a given page

Chapter 7 - Design and Implementation29

Page 30: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

State Diagramsand Activity Diagrams

Activity boxes represent processes not states as in state diagram

Lines represent transition to next process Transition is not triggered by an event as in state

diagram

Chapter 7 - Design and Implementation30

Page 31: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

UML Activity Diagram

Chapter 7 - Design and Implementation31

Page 32: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

UML Activity Diagram

Depicts a process

Author refers to it as both “UML Activity” diagram and “Process” diagram

Chapter 7 - Design and Implementation32

Page 33: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

UML Activity Diagram

Notation Solid circle – beginning Solid circle surrounded by ring – end Rounded boxes – process steps Arrows – transition to next step Diamond – option of two paths Solid bar – Joining of two paths

Chapter 7 - Design and Implementation33

Page 34: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Decision

Decision diamond represents separation of processing path It does not represent simple entry of a choice.

Chapter 7 - Design and Implementation34

Page 35: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Activity vs State Diagram

Arrows in Activity diagram Represent transition when a process step completes NOT a transition due to an event

Rounded boxes Represent an activity – a process step NOT a state.

Chapter 7 - Design and Implementation35

Page 36: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Sequence Diagram

Chapter 7 - Design and Implementation36

Page 37: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Sequence Diagram

Actors and objects labeled across top

Dotted vertical line represents timeline

Boxes represent activity timeframe

Arrows indicate interaction between entities

Arrows flow down the page to indicate sesquence

Dotted arrow is a repsonse

Alternatives indicated by a box separated by a dashed line

Chapter 7 - Design and Implementation37

Page 38: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Sequence Diagram

Different from Flow chart

More to characterize flow of activity

Chapter 7 - Design and Implementation38

Page 39: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

User Interface

Itemize list of screens Product areas Product selection Checkout list

Mocked up screens With hot links With sample Data

May be derived from other products (Cart)

Chapter 7 - Design and Implementation39

Page 40: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Elicitation Interviews

Based on screen mock ups

Go through a sample order

Go though a sample bagging

Go through a sample delivery

Chapter 7 - Design and Implementation40

Page 41: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Refinement

Especially after interviews

Generally some backtracking occurs throughout entire process

Chapter 7 - Design and Implementation41

Page 42: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Phased Development Plan

Not entirely Agile Some design, planning done ahead

Phases: Enough to have basic functionality Enough to show progess Enough to be deployable

Chapter 7 - Design and Implementation42

Page 43: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Class Diagrams

Chapter 7 - Design and Implementation43

Page 44: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Class Associations

Chapter 7 - Design and Implementation44

Page 45: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Class Hierarchy- Inheritance

Chapter 7 - Design and Implementation45

Page 46: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Class Diagrams

Can be combined

Chapter 7 - Design and Implementation46

Page 47: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Object Design

Other Systems May use objects supplied by vendor May have to create objects using vendor tools

May use communication protocol May use textual data transfer May use shared database

Chapter 7 - Design and Implementation47

Page 48: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Database design

Tables

Table relationships

Procedures

Triggers

Chapter 7 - Design and Implementation48

Page 49: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Task Assignment and Development

Distributed to developers

Source code check in system Code review at check in

Daily Builds

Developers to do initial testing

Chapter 7 - Design and Implementation49

Page 50: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Code Reuse

When starting new code, check for existing code that does the same

Sometimes patterns develop after development is well underway

Refactoring is necessary

Chapter 7 - Design and Implementation50

Page 51: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Configuration Management

Several systems exist – SCCS - Source Code Control System (older) RCS – Revision Control System Source Safe

Characteristics Master source code stored in central repository Source maintained for every intermediate version Checkout-Checkin control with locking Difference between two versions can be viewed

Chapter 7 - Design and Implementation51

Page 52: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Configuration Management

Scenarios Problem started occurring after Aug 1 – what code changed

then? Problem introduced by major change on July 2 - Need to

retrieve previous version and recode from there Two developers want to work on same piece of code which is

very large – merge process Checkin shows changes – opportunity for code walkthrough We are delivering version 3 which is not fully distributed to

users of earlier systems. We need to make a change to version 2.9, recompile and deliver it.

Chapter 7 - Design and Implementation52

Page 53: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Host-Target Deployment

Small organizations are tempted to have development done on production system

ALWAYS have separate development and deployment systems.

ALWAYS have a way to get back to a prior version

Chapter 7 - Design and Implementation53

Page 54: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Host- Target Development

Multi-tiered development Individual developer has full version on his/her

system with uncommitted changes Checked in changes are compiled for testing –

executable distributed to testing systems Beta version compiled and delivered to some

production environements Final version deployed elsewhere

Chapter 7 - Design and Implementation54

Page 55: Chapter 7 Design and Implementation. Notes from Book  There is a general flow  But, there is a lot of back and forth  Use of modeling such as UML

Licensing

Affects Operating Systems Databases Web servers Application objects GUI objects …

Open source May limit distribution May charge for distribution

Proprietary May charge for distribution May charge only for development machines

Chapter 7 - Design and Implementation55