1 Lecture 8 Electronic Commerce Modelling Techniques Electronic Commerce.

28
1 Lecture 8 Electronic Commerce Modelling Techniques Electronic Commerce

Transcript of 1 Lecture 8 Electronic Commerce Modelling Techniques Electronic Commerce.

1

Lecture 8

Electronic CommerceModelling Techniques

Electronic Commerce

2

This Lecture

• Review of SDLC

• Object modelling

• Partly worked example of object modelling

• References:– Hawryszkiewycz (2001) Systems Analysis and Design,

Prentice Hall

3

· client (sponsor)· system analyst

IMPLEMENTATION· install and test· train users· documentation & user manuals

· system analyst· developers· users

· system analyst· developers

· developers· users

· system analyst· managers· users

FEASIBILITY STUDY · establish feasibility & business case

SYSTEM DESIGN· physical design the system

POST INSTALLATION & REVIEW · fix errors· maintain program· add enhancements

SYSTEM ANALYSIS· determine system requirements· understand old system and problems· logical view of the system

Systems Development Life Cycle (SDLC)

4

Models in DevelopmentStrategic Design

Business Model

System Model

Implementation Model

SWOT

Rich picturesScenarios

Structured systems analysisObject modelling

Programs & databases

5

Object Orientation and the Linear Cycle

System Analysis

Requirements Analysis

SystemDesign

SystemDevelopment

Testing

Usage world

System world

System world

Implementation world

Implementation world

Use case model

Use cases and object class diagram of existing system

Object class diagram of new system

Object languages

Use cases

6

Object Modelling Approach

Use Cases

?

Object Classes

User requirements(Rich pictures)

System design model

Sequence diagrams

Event flow diagrams

State transition diagrams

7

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

8

ScenariosRich 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

9

Rich Picture for ATMCard

Withdraw cash

Account

Person

ATMBank

Cash

Insert cardEnter PIN

Report Slip

Balance

Deposit

Remove card

10

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

11

ATM Use Case Model

BankSystem

Withdraw cash

Transfer funds

Deposit funds

Get report

Customer

Operator

12

Use case – ATM withdraw cash

1. A greeting message is waiting on the ATM2. The customer inserts card into machine3. ATM asks customer for PIN4. Customer enters PIN5. ATM displays customer’s account and requests selection6. Customer selects an account7. Machine displays account limits8. Customer keys in withdrawal amount9. The money is dispensed10. Card is ejected11. Receipt is printed out

13

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

14

Final Use Case Script

Normal course

Alternative courses

1.2. ………

………………………

ATM Withdraw cash

15

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

16

Objects communicate

Object 1

Data + Methods

Object 2

Data + Methods

Message

Response

17

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

18

Sequence DiagramCustomer ATM Bank System

Amount

Customer cardRequest for PIN

PINPIN & card details

PIN OK for account #sAccount numbers

Selected account Selected accountLimits

Limits

Amount

ApprovalReceipt

19

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

20

ATM Transition Diagram

Print receipt dispense cash

Waiting for selection

Display limits

Idle Reading card Waiting for PIN

Ask bank to check PIN

Waiting for authority

Displaying accounts

Waiting for selection

Waiting for selection

Display “Invalid

PIN” msg

Request PIN

Customer inserts card

Enters PINCustomer removes card

Request security check

PIN OKAccountsCustomer selects account

Receipt

Limits

Limit exceeded

Limit reminder

Customer enters correct amount

Request PIN again

Source: Hawryszkiewycz (2001) p.287

21

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

22

Event Flow Diagram

Use Case 1

Simple flow

Exception

Use Case 2

Simple flow

Exception

Sequence diagram 1

Sequence diagram 2

Sequence diagram 3

Sequence diagram 4

Event flow diagram

23

Simplified Event Flow Diagram

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 inserts card

Customer enters PIN

Selected account amt

Request PINDisplay accountsDisplay limitsReceipt

PIN and card information

Selected account amt

PINOK / account numbers

Limits approval

24

First cut object classOBJECT1

ABCDEFG

get-msg1(A,B);get-msg2(C,D);get-msg7B,D);get-msg8(A,F);

OBJECT1 Msg5(A,F)

Msg7(E,G)

Msg7(B,D)

Msg8(A,F)

Msg1(A,B)

Msg2(E,F)

Msg3(A,E)

Msg4(E,F)

Methods

Attributes

25

OOSE Development Process

Construction

Concept formation

Implementation level

Requirements definition

Testing

DesignModel

Analysismodel

RequirementsModel

InterfacesUse case model

Subject noun listObject class model with

methods

Refined object class model with detailed functions, attributes and control

Objects and methods as programs

26

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)

27

Business Process Improvement Modelling Workflows

• A way of modelling the business functions

• Modified flowcharting

• OK for process modelling – used in BPR

• Users can understand

28

Private Study

• Workshop – Build an EC store front using MyFirstStore