Lecture 8 Electronic Commerce Modelling Techniques
This Lecture Review of SDLC Object modelling Partly worked example of object modelling References: Hawryszkiewycz (2001) Systems Analysis and Design, Prentice Hall
FEASIBILITY STUDY · establish feasibility & business case Systems Development Life Cycle (SDLC) FEASIBILITY STUDY · establish feasibility & business case · client (sponsor) · system analyst SYSTEM ANALYSIS · determine system requirements · understand old system and problems · logical view of the system · system analyst · managers · users SYSTEM DESIGN · physical design the system · system analyst · developers IMPLEMENTATION · install and test · train users · documentation & user manuals · system analyst · developers · users POST INSTALLATION & REVIEW · fix errors · maintain program · add enhancements · developers · users
Models in Development Strategic Design SWOT Business Model System Model Implementation Model SWOT Rich pictures Scenarios Structured systems analysis Object modelling Programs & databases
Object Orientation and the Linear Cycle System Analysis Use case model Usage world Use cases and object class diagram of existing system Requirements Analysis System world Object class diagram of new system System Design System world Object languages System Development Implementation world Testing Use cases Implementation world
Object Modelling Approach Use Cases User requirements (Rich pictures) ? Sequence diagrams Event flow diagrams State transition diagrams Object Classes System design model
Example Using an Automatic Teller Machine What are the activities that take place through an ATM? Withdrawing cash Transferring funds between accounts Depositing funds Getting reports e.g. balance
Scenarios Rich Pictures Scenarios illustrate the system dynamics by modelling sequences of actions in the user world Rich picture diagrams are one way to model interactions Scenarios may describe: Processes followed Problem solutions
Rich Picture for ATM Card Withdraw cash Insert card Enter PIN Remove card Balance ATM Bank Deposit Account Person Cash Report Slip
Use Case Model A use case model defines all use cases and the actors Each use case has a script and actors Actors are active elements Customers, bank systems The script describes the set of steps for a specific activity Alternate steps must be included
ATM Use Case Model Withdraw cash Transfer funds Bank System Customer Deposit funds Get report Bank System Customer Operator
Use case – ATM withdraw cash A greeting message is waiting on the ATM The customer inserts card into machine ATM asks customer for PIN Customer enters PIN ATM displays customer’s account and requests selection Customer selects an account Machine displays account limits Customer keys in withdrawal amount The money is dispensed Card is ejected Receipt is printed out
An alternative course of events must be written for each exception Alternatives Events What if card is not accepted? What if the customers enters an incorrect PIN? What if the withdrawal is too large? What is the customer stops the process and with draws the card? An alternative course of events must be written for each exception
Final Use Case Script ATM Withdraw cash Normal course ……… ……… ……… Alternative courses 1. 2. ………
Use case to objects Each use case is examined to identify objects Three objects can be readily identified in the ATM withdraw cash use case Customer ATM Bank System
Objects communicate Object 1 Data + Methods Object 2 Data + Methods Message Response
Sequence Diagram Describe messages exchanged between objects Sequence diagram rules Generally, each actor becomes an object Time moves downwards No decisions are shown Create a sequence diagram for each use case Every alternative has its own sequence diagram
Sequence Diagram Customer ATM Bank System Customer card Request for PIN PIN PIN & card details PIN OK for account #s Account numbers Selected account Selected account Limits Limits Amount Amount Approval Receipt
Transition Diagrams Models dynamics of the system as the system state changes as a result of messages and events Circles or ellipses represent state of an object An arrow represents a change
ATM Transition Diagram Customer inserts card Receipt Print receipt dispense cash Idle Reading card Request PIN Waiting for PIN Customer enters correct amount Customer removes card Enters PIN Limit exceeded Waiting for selection Waiting for selection Ask bank to check PIN Request PIN again Display “Invalid PIN” msg Limit reminder Request security check Limits Display limits Waiting for selection Displaying accounts Waiting for authority Customer selects account Accounts PIN OK Source: Hawryszkiewycz (2001) p.287
Event Flow Diagram Bring all sequence diagrams together Get everything to do with an object in one place Obtain a first cut of the object class Note: All objects in the sequence diagrams appear only once in the event flow diagram All messages are shown in the event flow diagram
Event Flow Diagram Event flow diagram Use Case 1 Simple flow Exception Sequence diagram 1 Sequence diagram 2 Event flow diagram Use Case 2 Simple flow Exception Sequence diagram 3 Sequence diagram 4
Simplified Event Flow Diagram Customer inserts card PIN and card information CUSTOMER get-PINrequest; get-accounts; get-limits; get-receipt; ATM get-card; get-PIN; get-account; get-amount; get-PINOK; get-limits; get-approval; CUSTOMER get-PINrequest; get-accounts; get-limits; get-receipt; BANK SYSTEM get-PIN&Card; get-selection; get-amount; Customer enters PIN Selected account amt Selected account amt PINOK / account numbers Request PIN Display accounts Display limits Receipt Limits approval
First cut object class Attributes Methods OBJECT1 A B C D E F G get-msg1(A,B); get-msg2(C,D); get-msg7B,D); get-msg8(A,F); Msg1(A,B) Msg2(E,F) Msg5(A,F) Msg7(E,G) OBJECT1 Msg3(A,E) Msg4(E,F) Msg7(B,D) Msg8(A,F) Attributes Methods
OOSE Development Process Interfaces Use case model Concept formation Requirements Model Subject noun list Object class model with methods Requirements definition Analysis model Refined object class model with detailed functions, attributes and control Construction Design Model Testing Implementation level Objects and methods as programs
Object Approach & RAD Object methods are suitable for prototyping and rapid application development After JAD start with some objects connect into the system Experiment Add new functionality to objects Add new objects Use objects from a library Specialise them and save (object reuse)
Business Process Improvement Modelling Workflows A way of modelling the business functions Modified flowcharting OK for process modelling – used in BPR Users can understand
Private Study Workshop Build an EC store front using MyFirstStore