UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling...
-
date post
21-Dec-2015 -
Category
Documents
-
view
231 -
download
2
Transcript of UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling...
![Page 1: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/1.jpg)
UML Modelling for Web Application Development
![Page 2: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/2.jpg)
Representing Designs in UML
The Unified Modeling Language (UML) is a set of diagram types
Used to represent software designs
Most commonly used diagram types are:
– Structure diagrams• A static view of objects and their relationships• Inheritance, composition, dependencies
– Sequence diagrams• A view of the dynamic behavior of software• Ordering of calls among class instances & their methods
![Page 3: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/3.jpg)
UML and PHP
• UML is designed to represent object oriented languages
• PHP can be both object-oriented and page-oriented, with procedural code embedded in a page
• Requires some tweaks to UML to represent this correctly
![Page 4: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/4.jpg)
UML Structure Diagrams
• Classes: • Visibility of variables and methods is indicated by putting + (visible) or – (private) before the variable or class name.
• Static variables are indicated by underlining them
• Can optionally indicate the signature (parameters) for methods, and the return type of a function.
![Page 5: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/5.jpg)
Representing PHP Pages
PHP Page:
Basic Idea: represent a page using the same graphic element as classes (a rectangle)
To indicate this is a page, and not a class, put “[[“ and “]]” around page name (e.g., [[index.php]]).
Variables represents those variablesdefined outside of functions on a page (page global variables).
Visibility of variables and functions isalways public.
Functions represent those functions defined on the page. Classes defined on the page are represented as separate classes in the diagram.
![Page 6: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/6.jpg)
Relationships
Inheritance– A open arrow pointing to parent class
– PHP pages cannot participate in inheritance
relationships
![Page 7: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/7.jpg)
Relationships (cont’d)
Association– In general, a semantically meaningful link between
two classes
– Represented with a line, with a label on top, with a
closed arrow indicating the directionality of the
relationship
– For PHP pages, can use this to indicate “include”
relationships among pages• Note: use only for PHP pages, not for PHP classes
![Page 8: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/8.jpg)
Familiar Example
How many:
•HTML pages
•PHP Server Pages
•Style Sheets
•Database Tables
![Page 9: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/9.jpg)
<<Persistent>><<Persistent>>GuestBook EntryGuestBook Entry
EntryIDEntryIDFirstNameLastNameDateComment
<<server page>><<server page>>RetrieveEntriesRetrieveEntries
EntryIDEntryIDFirstNameLastNameDateComment
<<client page>><<client page>>GuestBookEntriesGuestBookEntries
<<client page>><<client page>>GuestBookEntryGuestBookEntry
EntryIDEntryIDFirstNameLastNameDateComment
<<Builds>>
<<Drawn From>>
![Page 10: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/10.jpg)
<<Persistent>><<Persistent>>GuestBook EntryGuestBook Entry
EntryIDEntryIDFirstNameLastNameDateComment
<<Form>><<Form>>NewEntryNewEntry
FirstNameLastNameDateComment
<<ServerPage>><<ServerPage>>GuestBook EntryGuestBook Entry
FirstNameLastNameDateComment
<<Submit>> <<Inserts>>
![Page 11: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/11.jpg)
<<Persistent>><<Persistent>>RegisteredUsersRegisteredUsers
UserIDUserIDFirstNameLastNameUserNamePassword
<<Form>><<Form>>NewUserNewUser
FirstNameLastNameUserNamePassword
<<ServerPage>><<ServerPage>>RegisterNewUserRegisterNewUser
FirstNameLastNameUserNamePassword
<<Submit>> <<Inserts>>
![Page 12: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/12.jpg)
Version Three
How many:
•HTML pages, PHP Server Pages
•Style Sheets, Database Tables
•Cookies, session variables
![Page 13: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/13.jpg)
<<Form>><<Form>>SearchbyTopicSearchbyTopic
Topic
<<ServerPage>><<ServerPage>>TopicSearchTopicSearch
Topic<<Submit>>
<<Searches>>
<<Persistent>><<Persistent>>GuestBook EntryGuestBook Entry
EntryIDEntryIDFirstNameLastNameDateComment
<<Persistent>><<Persistent>>TopicTopic
1
n
TopicID
TopicIDTopicIDTitle
![Page 14: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/14.jpg)
<<Form>><<Form>>SearchbyUserSearchbyUser
RegisteredUser
<<ServerPage>><<ServerPage>>TopicSearchTopicSearch
RegisteredUser<<Submit>>
<<Searches>>
<<Persistent>><<Persistent>>GuestBook EntryGuestBook Entry
EntryIDEntryIDFirstNameLastNameDateComment
<<Persistent>><<Persistent>>RegisteredUserRegisteredUser
1
n
UserID
FirstNameLastNameUserNamePassword
![Page 15: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/15.jpg)
Entity Model for Version Three
![Page 16: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/16.jpg)
Looking at the World through UML Specs
![Page 17: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/17.jpg)
![Page 18: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/18.jpg)
![Page 19: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/19.jpg)
![Page 20: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/20.jpg)
![Page 21: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/21.jpg)
![Page 22: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/22.jpg)
![Page 23: UML Modelling for Web Application Development. Representing Designs in UML The Unified Modeling Language (UML) is a set of diagram types Used to represent.](https://reader036.fdocuments.us/reader036/viewer/2022062313/56649d555503460f94a32be6/html5/thumbnails/23.jpg)
“Get Staff Contact Details”
Action
1. Provide Staff Surname and Initials via a form
2. Post this information to a server program that will:
• retrieve data from the staff table in the database
• Build a web page to display the matching names
3. Select a name from this list and follow hyperlink to a server page that will:
• Get full details from staff table
• Build a web page to display full details of that member of staff
Scan from Martyn’s book!