El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

33
Enginyeria del SW II: El procés de desenvolupament: Un exemple utilitzant el mètode ICONIX El procés de desenvolupament Un exemple utilitzant el mètode ICONIX Toni Navarrete Enginyeria del Software II – UPF 2002

description

El procés de desenvolupament Un exemple utilitzant el mètode ICONIX. Toni Navarrete Enginyeria del Software II – UPF 2002. Enunciat. Sistema d’una gran llibreria on-line (basat en [1]). Requeriments: The bookstore shall accept orders over the Internet. - PowerPoint PPT Presentation

Transcript of El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Page 1: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Eng

inye

ria d

el S

W II

: El p

rocé

s de

des

envo

lupa

men

t:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

El procés de desenvolupamentUn exemple utilitzant el mètode ICONIX

Toni NavarreteEnginyeria del Software II – UPF 2002

Page 2: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 2E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Enunciat• Sistema d’una gran llibreria on-line (basat en [1]). Requeriments:

– The bookstore shall accept orders over the Internet.– The bookstore shall maintain a list of accounts for up to 1,000,000

customers.– The bookstore shall provide password protection for all accounts.– The bookstore shall provide the ability to search the master book catalog.– The bookstore shall provide a number of search methods on that catalog,

including search by author, search by title, search by ISBN number, and search by keyword.

– The bookstore shall provide a secure means of allowing customers to pay by credit card.

– The bookstore shall provide electronic links between the Web and database and the shipping fulfillment system.

– The bookstore shall provide electronic links between the Web and database and the inventory management system.

– The bookstore shall maintain reviews of books, and allow anyone to upload review comments.

– The bookstore shall maintain ratings on books, based on customer inputs.

[1] Dough Rosenberg: Applying Use Case Driven Object Modelling With UML

Page 3: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 3E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Recordatori: el mètode ICONIX

• “You can model 80% of most problems by using about 20% of UML”– Pretén definir aquest subconjunt de manera que

sigui suficient• Es un mètode “use-case driven”• Es pot fer de forma iterativa i incremental

Page 4: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 4E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Recordatori: el mètode ICONIX, el “mapa” complet

Page 5: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 5E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Model del dominiUser

Billing Info

Status

User PreferencesAccount

Order Details

Shipping Method

Master Account Table

Item

Shopping Cart

Order

Order Table

Price Schedule

Book

Search Results Catalog

Review PublisherStock

Customer ReviewEditorial Review

Page 6: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 6E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Diagrama de casos d’ús

Customer

Log In

Edit Contents of Shopping Cart

Browse List of Books

Cancel Order

Check Out

Open Account

Track Recent Order

Search by Author

Shipping Clerk Shipping Station

Shipper

Ship Order

Receiving Clerk

Receiving Station

Process Received ShipmentInventory Clerk

• Només de la part de compra – per exemple no s’inclou afegir un “review”, ni altres tipus de cerca

Page 7: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 7E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Log InBasic Course 

The Customer clicks the Log In button on the Home Page. The system displays the Login Page. The Customer enters his or her user ID and password and then clicks the Log In button. The system validates the login information against the persistent Account data and then returns the Customer to the Home Page.

  Alternate Courses 

If the Customer clicks the New Account button on the Login Page, the system invokes the Open Account use case. If the Customer clicks the Reminder Word button on the Login Page, the system displays the reminder word stored for that Customer, in a separate dialog box. When the Customer clicks the OK button, the system returns the Customer to the Login Page. If the Customer enters a user ID that the system does not recognize, the system displays a message to that effect and prompts the Customer to either enter a different ID or click the New Account button. If the Customer enters an incorrect password, the system displays a message to that effect and prompts the Customer to reenter his or her password. If the Customer enters an incorrect password three times, the system displays a page telling the Customer that he or she should contact customer service, and also freezes the Login Page.

Page 8: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 8E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Log In. Diagrama de robustesa. Exemple de diagrama amb errors

No es poden connectar dues classes frontera Aquest control s’hauria de comunicar amb Account

No s’han mostrat els fluxos alternatius

Page 9: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 9E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Log In. Diagrama de robustesa

Account

Validate

Reminder Word Dialog Box

Customer

Login Page

Home Page

Open Account

Display

click Log In

click OK

enter data and click Login

Page 10: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 10E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Com passar del diagrama de robustesa al diagrama de seqüència

1. Copiar el text del cas d’ús a l’esquerra2. Afegir l’usuari generador del cas d’ús i

els objectes de frontera i d’entitat (identificats al diagrama de robustesa)

3. Cada objecte de control es transforma en mètodes de les classes de frontera i entitat

• Recordatori: cercar alta cohesió i baix acoblament

• Es poden aplicar patrons GRASP i d’altres

Page 11: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 11E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Log In. Diagrama de seqüència

Customer

Home Page Login Page Reminder Word Dialog Account

onLogin( )

onLogin( )

display( )

onNewAccount( )Invoke Open

Account use case

validateLoginInfo( )

displayErrorAndPrompt( )

Basic Course

The Customer clicks the Log In button onthe Home Page.

The system displays the Login Page.

The Customer enters his or her user IDand password and then clicks the Log Inbutton.

The system validates the login informationagainst the persistent Account data andthen returns the Customer to the HomePage.

Alternate Courses

If the Customer clicks the New Accountbutton on the Login Page, the systeminvokes the Open Account use case.

If the Customer clicks the Reminder Wordbutton on the Login Page, the systemdisplays the reminder word stored for thatCustomer, in a separate dialog box. Whenthe Customer clicks the OK button, thesystem returns the Customer to the LoginPage.

If the Customer enters a user ID that thesystem does not recognize, the systemdisplays a message to that effect andprompts the Customer to either enter adifferent ID or click the New Accountbutton.

If the Customer enters an incorrectpassword, the system displays a messageto that effect and prompts the Customer toreenter his or her password.

If the Customer enters an incorrectpassword three times, the system displaysa page telling the Customer that he or sheshould contact customer service, and alsofreezes the Login Page.

display( )

onReminderWord( )

display( )

onOK( )

display( )

displayErrorAndPrompt( )

freeze( )

Page 12: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 12E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Problema d’aquest mètode

• Els objectes de frontera (capa d’interfície d’usuari) estan molt acoblats als objectes entitat (capa de domini)

• Una millora seria utilitzar un objecte de control “artificial” per gestionar el cas d’ús (recordar patrons GRASP Controller i Pure Fabrication; patró Facade)

Page 13: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 13E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Search by authorBasic Course

The Customer types the name of an Author on the Search Page and then presses the Search button. The system ensures that the Customer typed a valid search phrase, and then searches the Catalog and retrieves all of the Books with which that Author is associated. The the system retrieves the important details about each Book, and creates a Search Results object with that information. Then the system displays the list of Books on the Search Results Page, with the Books listed in reverse chronological order by publication date. Each entry has a thumbnail of the Book's cover, the Book's title and authors, the average Rating, and an Add to Shopping Cart button. The Customer presses the Add to Shopping Cart button for a particular Book. The system passes control to the Add Item to Shopping Cart use case.

 Alternate Courses

 If the Customer did not type a search phrase before pressing the Search button, the system displays an error message to that effect and prompts the Customer to type a search phrase. If the system was unable to find any Books associated with the Author that the Customer specified, the system displays a message to that effect and prompts the Customer to perform a different search. If the Customer leaves the page in a way other than by pressing an Add to Shopping Cart button, the system returns control to the use case from which this use case received control.

Page 14: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 14E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Search by author. Diagrama de robustesa

Catalog

Verify Search Phrase

Display

Customer

Search Page

Home Page

Add to Shopping Cart

Search on Author

select book

type author name;press Search

no phrase

no books

Search Results

CreateRetrieve Details

Book

Page 15: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 15E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Search by author. Diagrama de seqüència

Customer

Search Page Search Results Catalog Book

onSearch( )

verifySearchPhrase( )

searchOnAuthor( )

retrieveDetails( )

onAddToShoppingCart( )

Pass control toAdd to Shopping

Cart use case

displayErrorAndPrompt( )

Search

create( )

display( )

displayErrorAndPrompt( )

Basic Course

The Customer types the name of anAuthor on the Search Page and thenpresses the Search button.

The system ensures that theCustomer typed a valid searchphrase, and then searches theCatalog and retrieves all of the Bookswith which that Author is associated.

The the system retrieves theimportant details about each Book,and creates a Search Results objectwith that information.

Then the system displays the list ofBooks on the Search Results Page,with the Books listed in reversechronological order by publicationdate. Each entry has a thumbnail ofthe Book's cover, the Book's title andauthors, the average Rating, and anAdd to Shopping Cart button.

The Customer presses the Add toShopping Cart button for a particularBook. The system passes control tothe Add Item to Shopping Cart usecase.

Alternate Courses

If the Customer did not type a searchphrase before pressing the Searchbutton, the system displays an errormessage to that effect and promptsthe Customer to type a search phrase.

If the system was unable to find anyBooks associated with the Author thatthe Customer specified, the systemdisplays a message to that effect andprompts the Customer to perform adifferent search.

If the Customer leaves the page in away other than by pressing an Add toShopping Cart button, the systemreturns control to the use case fromwhich this use case received control.

Page 16: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 16E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Edit contents on shopping cartBasic Course 

On the Shopping Cart Page, the Customer modifies the quantity of an Item in the Shopping Cart and then presses the Update button. The system stores the new quantity and then computes and displays the new cost for that Item. The Customer presses the Continue Shopping button. The system returns control to the use case from which it received control.

  Alternate Courses 

If the Customer changes the quantity of the Item to 0, the system deletes that Item from the Shopping Cart. If the Customer presses the Delete button instead of the Update button, the system deletes that Item from the Shopping Cart. If the Customer presses the Check Out button instead of the Continue Shopping button, the system passes control to the Check Out use case.

Page 17: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 17E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Edit contents on shopping cart. Diagrama de robustesa

Update Quantity and Cost

Display

Customer

Shopping Cart Page

Add to Shopping Cartmodify quantity;press Update

Item

Delete Item

Shopping Cart

Page 18: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 18E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Edit contents on shopping cart. Diagrama de seqüència

Customer

Shopping Cart Page Item Shopping Cart

onUpdate( )

updateQuantityAndCost( )

deleteItem( )

Pass controlto Check Out

use case

displayCost( )

getItem( )

deleteItem( )

onContinueShopping( )

onCheckOut( )

destroy( )

Basic Course

On the Shopping Cart Page, the Customermodifies the quantity of an Item in the ShoppingCart and then presses the Update button.

The system stores the new quantity and thencomputes and displays the new cost for thatItem.

The Customer presses the Continue Shoppingbutton. The system returns control to the usecase from which it received control.

Alternate Courses

If the Customer changes the quantity of the Itemto 0, the system deletes that Item from theShopping Cart.

If the Customer presses the Delete buttoninstead of the Update button, the system deletesthat Item from the Shopping Cart.

If the Customer presses the Check Out buttoninstead of the Continue Shopping button, thesystem passes control to the Check Out usecase.

deleteItem( )

onDelete( )

Page 19: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 19E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Ship order

Basic Course 

The Shipping Clerk ensures that the Items listed on the packing slip for the Order match the physical items. The Clerk waves the bar code on the packing slip under the sensor at the shipping station. The system changes the status of the Order to "shipping." Then the system retrieves the Shipping Method that the Customer specified for this Order and displays it on the Shipping Station Console. The Clerk weighs the set of physical items. The Clerk packages the Items. The Clerk attaches a manifest appropriate for the given shipping method. The Clerk waves the bar code on the manifest under the sensor. The Clerk sends the package out via the associated Shipper.

  Alternate Course 

If the Shipping Clerk finds a mismatch between the Order and the physical items, the Clerk stops processing of the Order until he or she is able to make a match.

Page 20: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 20E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Ship order. Diagrama de robustesa

Retrieve Shipping MethodDisplay Shipping Method

Shipping Clerk

Shipper Interface

modify quantity;press Update

Change Status

Shopping Cart

Shipper

Shipping Station Sensor

Shipping Station Console

wave bar code

Page 21: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 21E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Ship order. Diagrama de seqüència

Shipper

Shipping Station Sensor Shipping Station Console Shipper Interface Order

readBarCode( )

changeStatus( )

retrieveShippingMethod( )

receivePackage( )

displayShipping Method( )

displayErrorAndPrompt( )

freeze( )

Shipping ClerkBasic Course

The Shipping Clerk ensures that theItems listed on the packing slip for theOrder match the physical items.

The Clerk waves the bar code on thepacking slip under the sensor at theshipping station.

The system changes the status of theOrder to "shipping."

Then the system retrieves the ShippingMethod that the Customer specified forthis Order and displays it on theShipping Station Console.

The Clerk weighs the set of physicalitems. The Clerk packages the Items.The Clerk attaches a manifestappropriate for the given shippingmethod.

The Clerk sends the package out via theassociated Shipper.

Alternate Course

If the Shipping Clerk finds a mismatchbetween the Order and the physicalitems, the Clerk stops processing of theOrder until he or she is able to make amatch.

Page 22: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 22E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Track recent ordersBasic Course

The system retrieves the Orders that the Customer has placed within the last 30 days and displays these Orders on the Order Tracking Page. Each entry has the Order ID (in the form of a link), the Order date, the Order status, the Order recipient, and the Shipping Method by which the Order was shipped. The Customer clicks on a link.The system retrieves the relevant contents of the Order, and then displays this information, in view-only mode, on the Order Details Page. The Customer presses OK to return to the Order Tracking Page. Once the Customer has finished viewing Orders, he or she clicks the Account Maintenance link on the Order Tracking Page. The system returns control to the invoking use case.

 Alternate Course

If the Customer has not placed any Orders within the last 30 days, the system displays a message to that effect on the Order Tracking Page.

Page 23: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 23E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Track recent orders. Diagrama de robustesa

Retrieve Recent OrdersDisplay

CustomerOrder Tracking Page

Retrieve Order Details

Order Table

Order Details Page

Order

Page 24: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 24E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Track recent orders. Diagrama de seqüència

Customer

Order Tracking Page Order Details Page OrderTable Order

retrieveRecentOrders( )

retrieveDetails( )

display( )

onLinkClick( )

getDetails( )

displayNoOrderMessage( )

create( )

onOK( )

display( )

Basic Course

The system retrieves the Orders that theCustomer has placed within the last 30 days anddisplays these Orders on the Order TrackingPage. Each entry has the Order ID (in the formof a link), the Order date, the Order status, theOrder recipient, and the Shipping Method bywhich the Order was shipped.

The Customer clicks on a link.The systemretrieves the relevant contents of the Order, andthen displays this information, in view-onlymode, on the Order Details Page.

The Customer presses OK to return to the OrderTracking Page.

Once the Customer has finished viewing Orders,he or she clicks the Account Maintenance linkon the Order Tracking Page. The system returnscontrol to the invoking use case.

Alternate Course

If the Customer has not placed any Orderswithin the last 30 days, the system displays amessage to that effect on the Order TrackingPage.

displayRecentOrders( )

Order Details

onAccountMaintenance( )

Page 25: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 25E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Open AccountBasic Course

The system displays the New Account Page. The Customer types his or her name, an e-mail address, and a password (twice), and then presses the Create Account button. The system ensures that the Customer has provided valid data and then adds an Account to the Master Account Table using that data. Then the system returns the Customer to the Home Page.

Alternate CoursesIf the Customer did not provide a name, the system displays an error message to that effect and prompts the Customer to type a name. If the Customer provided an email address that's not in the correct form, the system displays an error message to that effect and prompts the Customer to type a different address. If the Customer provided a password that is too short, the system displays an error message to that effect and prompts the Customer to type a longer password. If the Customer did not type the same password twice, the system displays an error message to that effect and prompts the Customer to type the password correctly the second time. If the account is already in the master account table, notify the user.

Page 26: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 26E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Open Account. Diagrama de robustesa

Get Account Info

Account(f rom Domain with Attributes)

New Account Page

Home Page

Validate Correct Entry of Account Info

cl ick Create Account

Master Account Table(f rom Domain)

Dsplay Page

Display Name Missing

Display Password Too Short

Display Bad E-Mail Address

Display Password Mismatch

Customer

Add Account

Error Page

Flag Dupl icate Account

Page 27: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 27E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Cas d’ús Open Account. Diagrama de seqüència1 : Customer 2 : New

Account Page3 : Error Page 4 :

Acc...5 :

Mast...6 : Home Page : Get

Acc...

Basic Course

The system displays the New Account Page. The Customer types his or her name, an email address, and a password (twice), and then presses the Create Account button.

The system ensures that the Customer has provided val id data, and then adds an Account to the Master Account Table using that data. Then the system returns the Customer to the Home Page.

Alternate Courses

If the Customer did not provide a name, the system displays an error message to that effect and prompts the Customer to type a name.

If the Customer provided an email address that's not in the correct form, the system displays an error message to that effect and prompts the Customer to type a different address.

If the Customer provided a password that is too short, the system displays an error message to that effect and prompts the Customer to type a longer password.

If the Customer did not type the same password twice, the system displays an error message to that effect and prompts the Customer to type the password correctly the sec...

displayPage( )

enterText( )

onClickCreate( )

setName( )

setEmail( )

setPassword( )

val idateAccount( )

addAccount( )display( )

displayNameMissing( )

displayBadEmailAddress( )

displayBadPassword( )

Page 28: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 28E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Model de classes de disseny.Part 1 de 3

Catalog

searchOnAuthor()

PublishernamepublicationDate

StockreplenishThresholdquantityOnHand

PriceSchedulepricediscountPct

Reviewrating

write()

BooktitlepricepublishedDatethumbnailquantityOnHandreplenishThresholddiscountPctpublisher

retrieveDetails()

Purchase OrderdatePlacedstatusitems : Vector

Itemquantitycost

updateQuantityAndCost()destroy()getItem()

Search Results

create()

Order Details Page

display()onOK()

Shopping Cart

deleteItem()getItem()

Reminder Word Dialog Box

display()onOK()

Search Page

onSearch()verifySearchPhrase()displayErrorAndPrompt()

Search Results Page

display()onAddToShoppingCart()

Order Tracking Page

displayRecentOrders()onLinkClick()display()onAccountMaintenance()displayNoOrderMessage()

Error Page

displayNameMissing()displayBadEmailAddress()displayBadPassword()

Shopping Cart Page

onUpdate()displayCost()onContinueShopping()onDelete()onCheckOut()deleteItem()

New Account Page

displayPage()enterText()onClickCreate()

Customer(from Use Case View)

click OK

type author name;

select book

modify quantity;

Home Page

onLogin()display()opname()

click Log In

Login Page

display()onLogin()displayErrorAndPrompt()freeze()onNewAccount()onReminderWord()

enter data and click Login

Page 29: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 29E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Model de classes de disseny.Part 2 de 3

Shipping Station(from Use Case View)

Purchase OrderdatePlacedstatusitems : Vector

Order Details Page

display()onOK()

Itemquantitycost

updateQuantityAndCost()destroy()getItem() Shipping Method

Order Details

create()getDetails()

Shopping Cart

deleteItem()getItem()

Order Tracking Page

displayRecentOrders()onLinkClick()display()onAccountMaintenance()displayNoOrderMessage()Shopping Cart Page

onUpdate()displayCost()onContinueShopping()onDelete()onCheckOut()deleteItem()

OrderIDdatePlaceddateShippedrecipienttrackingNumberstatusshippingMethodforeignInventoryDBKey

changeStatus()retrieveShippingMethod()retrieveDetails()

Customer(from Use Case View)

modify quantity;

Order Table

retrieveRecentOrders()

Home Page

onLogin()display()opname()

click Log In

New Account Page

displayPage()enterText()onClickCreate()

User

Login Page

display()onLogin()displayErrorAndPrompt()freeze()onNewAccount()onReminderWord()

enter data and click Login

AccountuserIDpasswordreminderWordemailAddress

countBadPasswords()setName()setEmail()setPassword()validateAccount()

Login Manager

Page 30: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 30E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Model de classes de disseny.Part 3 de 3

Shipper Interface

receivePackage()

Shipping Station Console

displayShippingMethod()

Shipping Clerk(from Use Case View)

Shipping Station(from Use Case View)

Status

Shipping Station Sensor

readBarCode()

wave bar code

OrderIDdatePlaceddateShippedrecipienttrackingNumberstatusshippingMethodforeignInventoryDBKey

changeStatus()retrieveShippingMethod()retrieveDetails()

User Preferences

User

Order Table

retrieveRecentOrders()

Billing InfocreditCardTypecreditCardNumber

AccountuserIDpasswordreminderWordemailAddress

countBadPasswords()setName()setEmail()setPassword()validateAccount()

Page 31: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 31E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Implementació i proves

• Si és necessari es poden crear diagrames de components i desplegament per reflectir l’arquitectura i com s’agrupen les classes en components

• Els escencaris d’ús (casos d’ús, use cases) es converteixen en escenaris de proves (casos de prova, test cases)

Page 32: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 32E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

No ben cobert per aquest mètode

• Aspectes del disseny de la persistència• Separació en capes (típic d’aplicacions

web)• Aspectes propis de disseny d’aplicacions

web. Exemple: JSPs, pàgines estàtiques, servlets,...

Page 33: El procés de desenvolupament Un exemple utilitzant el mètode ICONIX

Pàgina 33E

ngin

yeria

del

SW

II: E

l pro

cés

de d

esen

volu

pam

ent:

U

n ex

empl

e ut

ilitz

ant e

l mèt

ode

ICO

NIX

Bibliografia utilitzada

• Doug Rosenberg (amb Kendall Scott): Applying Use Case Driven Object Modeling with UML: An Annotated e-Commerce Example. Addison Wesley (Object Technology Series)

• Doug Rosenberg (amb Kendall Scott): Use Case Driven Object Modeling With Uml: A Practical Approach. Addison Wesley (Object Technology Series)