1 / 23

UML Modelling for Web Application Development

UML Modelling for Web Application Development. 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

Download Presentation

UML Modelling for Web Application Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UML Modelling for Web Application Development

  2. 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

  3. 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

  4. 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. UML Structure Diagrams

  5. 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 variables defined outside of functions on a page (page global variables). Visibility of variables and functions is always public. Functions represent those functions defined on the page. Classes defined on the page are represented as separate classes in the diagram. Representing PHP Pages

  6. Relationships Inheritance – A open arrow pointing to parent class – PHP pages cannot participate in inheritance relationships

  7. 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

  8. Familiar Example • How many: • HTML pages • PHP Server Pages • Style Sheets • Database Tables

  9. <<Builds>> <<client page>> GuestBookEntries <<server page>> RetrieveEntries <<Drawn From>> EntryID FirstName LastName Date Comment <<client page>> GuestBookEntry <<Persistent>> GuestBook Entry EntryID FirstName LastName Date Comment EntryID FirstName LastName Date Comment

  10. <<ServerPage>> GuestBook Entry FirstName LastName Date Comment <<Inserts>> <<Submit>> <<Form>> NewEntry <<Persistent>> GuestBook Entry FirstName LastName Date Comment EntryID FirstName LastName Date Comment

  11. <<ServerPage>> RegisterNewUser FirstName LastName UserName Password <<Inserts>> <<Submit>> <<Form>> NewUser <<Persistent>> RegisteredUsers FirstName LastName UserName Password UserID FirstName LastName UserName Password

  12. Version Three • How many: • HTML pages, PHP Server Pages • Style Sheets, Database Tables • Cookies, session variables

  13. <<ServerPage>> TopicSearch <<Submit>> Topic TopicID <<Form>> SearchbyTopic <<Searches>> Topic <<Persistent>> Topic <<Persistent>> GuestBook Entry 1 n TopicID Title EntryID FirstName LastName Date Comment

  14. <<ServerPage>> TopicSearch <<Submit>> RegisteredUser UserID <<Form>> SearchbyUser <<Searches>> RegisteredUser <<Persistent>> RegisteredUser <<Persistent>> GuestBook Entry 1 n FirstName LastName UserName Password EntryID FirstName LastName Date Comment

  15. Entity Model for Version Three

  16. Looking at the World through UML Specs

  17. “Get Staff Contact Details” • Action • Provide Staff Surname and Initials via a form • 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 • 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!

More Related