Dirk Draheim, Gerald Weber Form-Oriented Analysis A New Methodology to Model Form-Based Applications Figures Springer, 2004. Fig.2.1. Example pages of the online bookshop – Part I Welcome Page Logout My Shopping Cart Book Quantity Price Quine: Word and Object 1 12.46 Delete Wittgenstein: Tractatus 1 23.06 Delete Varela: The Embodied Mind 2 44.68 Delete Adams: Watership Down 7 62.30 Delete Update Buy items in cart Search for a book: Search Springer Verlag 2004 Fig.2.1. Example pages of the online bookshop – Part II Customer Registration Welcome Page E-mail Address: Password: Full Name: Repeat Pwd: Street Address: City: Register State: ZIP: Country: Card Type Credit Card No. WhateverCard Expiration Date 01 Springer Verlag 2004 2006 Cardholder Fig. 2.2. Examples of ultra-thin client based submit/response style systems HTTP GET hypertext/dir/index.html HTTP/1.0 Browser Web Presentation Layer CGI ....<head> <title> Dummy </title></head>.... Application Server PC-Memory Database PC 3270 Data Stream AID Cursor Address Data..... Application Program 3270 Terminal Command Device Buffer Cursor Address Data..... TP-Monitor Disk Disk Mainframe Springer Verlag 2004 Fig. 2.3. SAP R/3 architecture - a client/server submit/response style system screen program ABAP/4 GUI ABAP/4 Interpreter PBO input template PAI PBO input template PAI PBO input template PAI module pool TRPC Application Server transactional remote procedure call Springer Verlag 2004 Database process before output process after input Fig. 2.4. Example formchart for a system login capability LoginLink Welcome Login WelcomeLink Springer Verlag 2004 LoginForm Fig.3.1. Welcome screen of the online bookshop Welcome to Our Online Bookstore ! You can choose: Browse the bookstore View Cart Login Register as a new customer Our recommendations: • Richard Adams. Watership Down. view details • Niccolo Machiavelli. Discourses. view details • Willard Quine. Word and Object. view details Search for a book: Search Springer Verlag 2004 Fig.3.2. Login screen of the online bookshop Login Welcome Page An error occurred. The password that you provided did not match your e-mail address. Please try to log in again or register as a new customer. Your e-mail address: Login Your password: Register as a new customer Springer Verlag 2004 Fig.3.3. Registration screen of the online bookshop Customer Registration Welcome Page E-mail Address: Password: Full Name: Repeat Password: Street Address: City: Register State: ZIP: Country: Card Type WhateverCard Springer Verlag 2004 Credit Card No. Expiration Date 01 2006 Cardholder Fig.3.4. Category screen of the online bookshop Category: All Books Welcome Page View Cart Login Register as a new customer Browse subcategories: • Computer • Cooking • Philosophy • Literature • Science Fiction • Sports Our recommendations: • Richard Adams. Watership Down. view details • Niccolo Machiavelli. Discourses. view details • Willard Quine. Word and Object. view details Search for a book: Search Springer Verlag 2004 Add selected items to cart Fig.3.5. Book page of the online bookshop Welcome Page View Cart Login Register as a new customer Form-Oriented Analysis Authors: Dirk Draheim, Gerald Weber Abstract: What is the business logic of an enterprise system? How do I specify it in such a way that I know how to transform it into a running system, by skill and by automated tool support? This book gives a selfcontained introduction to the modeling and development of business logic for enterprise systems. Add this book to cart Price: $ 79,95 Search for a book: Search Springer Verlag 2004 Fig.3.6. Shopping cart of the online bookshop Welcome Page Logout My Shopping Cart Book Quantity Price Quine: Word and Object 1 12.46 Delete Wittgenstein: Tractatus 1 23.06 Delete Varela: The Embodied Mind 2 44.68 Delete Adams: Watership Down 7 62.30 Delete Update Buy items in cart Search for a book: Search Springer Verlag 2004 Fig.3.7. Order information page of the online bookshop Welcome Page View Cart Logout Edit Account Order Information Shipping Details Payment Method John Q. Public 49 Nowhere Lane New Haven, Connecticut 06511, U.S.A. WhateverCard, ***- 86745 Expiration: 01/2008 Book Quine: Word and Object Wittgenstein: Tractatus Varela: The Embodied Mind Adams: Watership Down Total Springer Verlag 2004 Quantity 1 1 2 7 Price 12.46 23.06 44.68 62.30 142.50 Place your order Fig.3.8. Search result page of the online bookshop Search Result Welcome Page View Cart Login Register as a new customer Search items: Immanuel Kant • Immanuel Kant. Critique of Judgement. view details • Immanuel Kant. Critique of Pure Reason. view details • Immanuel Kant. Critique of Practical Reason. view details • Immanuel Kant. Critique of the Power of Judgment. view details • Immanuel Kant. Groundwork of the Metaphysics of Morals. view details • Immanuel Kant. Theoretical Philosophy. view details • Immanuel Kant. Practical Philosophy. view details Add selected items to cart Search for a book: Search Springer Verlag 2004 Fig.3.9. Data model of the online bookshop subcategories 0..* Book title:String featuredBooks abstract:String price: Amount Category name:String 0..* 1 1..* authors Author name:String item OrderItem quantity:Number Address streetAddress:String city:String state:String zip:Number country:String address Springer Verlag 2004 1 1..* orderItems Order 1 buyer Customer email:String fullName:String password:String CardInformation cardType:CardType cardNumber:String expiration:Date cardholder:String 1 cardInformation Fig.4.1. Page Diagram – Part I the login data was erroneous Login the registration data was erroneous Welcome browse the books on offer by exploring more and more subcategories select a book out of a list of featured books in order to view details of the book SearchResult Registration Book Category add book to the shopping cart select books out of a list of featured books in order to add them to the shopping cart update cart items delete a cart item ShoppingCart Springer Verlag 2004 Fig.4.1. Page Diagram – Part II ShoppingCart if the user is not yet a registered customer, he or she might register now order items: this link only exists, if the cart is not empty the user is not logged in OrderLogin the user is logged in the login data was erroneous OrderInformation the registration data was erroneous place an order OrderRegistration Confirmation Springer Verlag 2004 Fig.4.2. Screen diagram – Part I – Welcome Page Logout My Shopping Cart Book Quantity Price Quine: Word and Object 1 12.46 Delete Wittgenstein: Tractatus 1 23.06 Delete Adams: Dirk Gently 2 24.00 Delete Update Search for a book: Search Login Buy items in cart Welcome Page E-mail: Password: Springer Verlag 2004 login Register as new already logged in Fig.4.2. Screen diagram – Part II – login Customer Registration Welcome Page E-mail: Register as new Full Name: error occurred Street Address: City: Order Information State: Welcome Page View Cart Logout Edit Account ZIP: Country: Payment Method John Q. Public Whatever, ***- 86745 49 Nowhere Lane Expiration: 01/2008 New Haven Place your order CT 06511, U.S.A. Book Quine: Word and Object Wittgenstein: Tractatus Adams: Dirk Gently Total Springer Verlag 2004 Quantity Price 1 1 2 12.46 23.06 24.00 59.52 error occurred Shipping Details Password: Repeat Password: Card Type Card No. WhateverCard Expiration Date 01 Cardholder 2006 Register Fig.4.3. List of options for a single conceptual option Welcome Page Logout My Shopping Cart Book Quantity Price Quine: Word and Object 1 12.46 Delete Wittgenstein: Tractatus 1 23.06 Delete Adams: Dirk Gently 2 24.00 Delete Update Search for a book: Search Springer Verlag 2004 Buy items in cart } Fig.4.4. Form storyboard – Part I UpdateCart • cartItem • quantity DeleteCartItem • cartItem ShoppingCart Search • searchItem Order error occurred OrderLogin OrderRegistrationLink OrderRegistration WelcomeLink OrderLoginForm • e-mail • password Springer Verlag 2004 WelcomeLink Fig.4.4. Form storyboard – Part II Order OrderLoginForm • e-mail • password OrderInformation WelcomeLink PlaceOrder Springer Verlag 2004 OrderRegistrationForm • eMail • fullName • streetAddress • city • state • zip • country • password • repeatedPassword • cardType • cardNumber • expiration • cardholder error occurred OrderRegistration Fig.4.5. Page images – Part I WelcomeLink ShoppingCart Logout UpdateCart • cartItem • quantity Search • searchItem OrderInformation DeleteCartItem • cartItem Order OrderLogin WelcomeLink OrderLoginForm • e-mail • password OrderRegistrationLink Springer Verlag 2004 Fig.4.5. Page images – Part II OrderLogin WelcomeLink WelcomeLink OrderLoginForm • e-mail • password OrderRegistrationLink OrderInformation WelcomeLink Logout ViewCart OrderChangeLink PlaceOrder Springer Verlag 2004 OrderRegistration RegistrationForm • eMail • fullName • streetAddress • city • state • zip • country • password • repeatedPassword • cardType • cardNumber • expiration • cardholder Fig.4.6. Form storyboard annotated with interaction information – Part I UpdateCart cartItem quantity DeleteCartItem cartItem ShoppingCart Search searchItem OrderLogin error occurred Order Springer Verlag 2004 WelcomeLink OrderRegistrationLink OrderRegistration WelcomeLink OrderLoginForm e-mail password Fig.4.6. Form storyboard annotated with interaction information – Part II Order OrderLoginForm e-mail password OrderInformation WelcomeLink PlaceOrder Springer Verlag 2004 OrderRegistrationForm eMail fullName streetAddress city state zip country password repeatedPassword cardType cardNumber expiration cardholder error occurred OrderRegistration Fig.4.7. Message storyboard– Part I UpdateCart cartItem quantity DeleteCartItem cartItem ShoppingCart cartItem 2 error occurred ! authorName Search searchItem ! title defaultQuantity ! price Order OrderRegistrationLink 2 OrderLoginForm email password Springer Verlag 2004 OrderLogin ! errorMessage defaultEmail WelcomeLink OrderRegistration ! errorMessage defaultEmail defaultFullName defaultStreetAddress defaultCity defaultState defaultZip defaultCountry defaultCardType defaultCardNumber defaultExpiration defaultCardholder Fig.4.7. Message storyboard– Part II Order OrderLoginForm email password 1 1 user already logged in 3 error occurred 4 shipping details 5 payment method OrderInformation ! fullName 4 ! streetAddress ! city ! state ! zip ! country 5 ! cardType ! truncatedCardNumber ! expiration WelcomeLink PlaceOrder Springer Verlag 2004 ! authorName ! title ! quantity ! price ! totalPrice OrderRegistration ! errorMessage defaultEmail defaultFullName and so on... 3 OrderRegistrationForm eMail fullName streetAddress city state zip country password repeatedPassword cardType cardNumber expiration cardholder Fig.5.1. The information system model of form-oriented analysis Dialogue Model Dialogue Specification Signature Definition User Message Model Reuse Referring Shared Model Opaque Identity Model Referring Information Model Springer Verlag 2004 Reuse Fig.5.2. A first formchart example RegistrationLink Login LoginForm Welcome RegistrationForm ViewBook Search SearchResult Registration ViewCategory Book Category UpdateCart AddToCart DeleteCartItem ShoppingCart OrderLogin OrderLoginForm Order OrderRegistrationLink OrderInformation OrderRegistration Springer Verlag 2004 OrderRegistrationForm PlaceOrder Confirmation Fig.5.3. Two alternative formcharts for the same model (i) (ii) D B Q Q E E F A P P F A R R D D B B V V C S R Springer Verlag 2004 S C D P B Fig.5.4. Formchart naming conventions default transition name default target name default source name P P P>T P TO A T A T>A A P>T>A custom name Springer Verlag 2004 global default name Fig.5.5. Opaque references in the information model product 1..1 non-deletable oref opaque reference facade information types 0..1 instance Product Springer Verlag 2004 Fig.5.6. Formchart notational elements P client output constraint server input constraint A enabling condition flow condition flow condition server output constraint P client input constraint Springer Verlag 2004 A P Fig.5.8. Meaning of path expressions in the formchart D Q B E P S F R G Springer Verlag 2004 C P TO A A Fig.5.9. Complete formchart for the bookstore example – Part I WelcomeLink ViewCategory ViewCart LoginLink LoginLink Logout Login LoginForm Logout Welcome WelcomeLink RegistrationLink ChangeLink LoginForm LoginForm RegistrationLink ViewBook RegistrationForm Search RegistrationLink RegistrationForm ChangeLink Springer Verlag 2004 WelcomeLink Registration RegistrationForm Fig.5.9. Complete formchart for the bookstore example – Part II WelcomeLink ViewCart ViewCategory WelcomeLink LoginLink ViewCart ViewBook Category LoginLink Logout Book RegistrationLink Search Logout ChangeLink RegistrationLink AddToCart ChangeLink Search ViewCategory WelcomeLink ViewBook ViewCart Logout AddToCart Search AddToCart ShoppingCart UpdateCart DeleteCartItem UpdateCart Springer Verlag 2004 DeleteCartItem Order Search Fig.5.9. Complete formchart for the bookstore example – Part III ViewCart OrderInformation Logout ViewCart LoginLink WelcomeLink Order WelcomeLink Logout SearchResult RegistrationLink Search ChangeLink OrderChangeLink ViewBook OrderLoginForm PlaceOrder AddToCart OrderRegistrationForm PlaceOrder Order Search WelcomeLink OrderLogin OrderLoginForm WelcomeLink Confirmation Logout OrderRegistrationLink OrderLoginForm OrderRegistrationLink OrderRegistrationForm Springer Verlag 2004 OrderChangeLink OrderRegistration WelcomeLink OrderRegistrationForm Fig.5.10. Login, registration and logout feature of the online bookshop Logout Welcome LoginLink WelcomeLink Login LoginForm RegistrationLink Registration Springer Verlag 2004 RegistrationForm Fig.5.11. Conditional server/page transitions forgottenEmailPassword 2. forgottenEmail 3. Login forgottenPassword 4. noSuchUser LoginForm 5. 6. passwordMismatch Springer Verlag 2004 1. Welcome Fig.5.12. Refinement of a server input constraint LoginForm Login Welcome Refinement • dropping server input constraint • adding transitions • adding flow conditions Welcome forgottenEmailPassword 2. forgottenEmail 1. 3. noSuchUser forgottenPassword Registration 4. 5. Login LoginForm RegistrationLink 6. passwordMismatch LoginLink Springer Verlag 2004 PasswordError Fig.5.13. Browsing feature of the online bookshop Welcome ViewCategory 1 view a bestseller 2 view a featured book 1 Category UpdateCart 2 ViewBook Book SearchResult Springer Verlag 2004 AddToCart ShoppingCart DeleteCartItem Fig.5.14. Shopping cart feature of the online bookshop UpdateCart UpdateCart update ShoppingCart DeleteCartItem Springer Verlag 2004 ShoppingCart delete Fig.5.15. Buying feature of the online bookshop ShoppingCart Order OrderLogin OrderInformation PlaceOrder Confirmation OrderLoginForm OrderRegistrationLink WelcomeLink OrderRegistration Springer Verlag 2004 OrderRegistrationForm Welcome Fig.5.16. Reuse of the login and registration subdialogues Logout ShoppingCart OrderInformation Welcome PlaceOrder Confirmation Order WelcomeLink 2. LoginLink WelcomeLink Welcome NewLoginForm NewLogin 2. 1. NewRegistrationLink NewRegistration Springer Verlag 2004 NewRegistrationForm Fig.5.17. Managing user data in the online bookshop RegistrationLink Welcome Registration ChangeLink Springer Verlag 2004 Fig.5.18. Search feature of the online bookshop Welcome Book Category Book Search ViewBook SearchResult ShoppingCart SearchResult AddToCart Springer Verlag 2004 Fig.5.19. Graphical representation of a client output constraint formchart ViewBook Category message model no direct input Category ViewBook {selection} opaque reference facade selected 0..1 featuredBooks 1..* book Springer Verlag 2004 single selection Fig.6.1. Named partitioning of a formchart i iii ii vi v vii iv A Springer Verlag 2004 viii B C D E F G H Fig.6.2. Hierarchical formchart decomposition A B C D E F G i H ii A B iii C B C D E F G H vi iv A E B v G C D E F H viii vii B Springer Verlag 2004 F F G H Fig.6.3. Structured analysis: leveled data flow diagram Source 0 Sink Context DFD Source flow 1 2 Sink DFD0 Source 1.1 1.2 flow S 2.1 2.2 Sink S DFD1 Springer Verlag 2004 flow DFD2 Fig.6.4. A flat formchart A Springer Verlag 2004 B C D E F G H Fig.6.5. Additional features of the bookstore – Part I Login Login Welcome Welcome Registration Category Book LoginLink Login Welcome Book Category SearchResult ShoppingCart SearchResult View Cart Welcome OrderInformation Category OrderLogin ViewCart Book ShoppingCart OrderRegistration SearchResult Confirmation OrderInformation Springer Verlag 2004 WelcomeLink Fig.6.5. Additional features of the bookstore – Part II Logout Welcome Welcome Change User Data Category Logout Book Welcome Category ChangeLink Registration Book SearchResult SearchResult ShoppingCart OrderRegistration OrderInformation OrderInformation OrderChangeLink Confirmation Registration Welcome Search Welcome Category Category RegistrationLink Book SearchResult Springer Verlag 2004 SearchResult Search ShoppingCart Book Fig.6.6. Modeling with state set notation B A P D Springer Verlag 2004 Q E C A,B,C P,Q,R R F D,E,F Fig.6.7. Using state set notation for the bookstore features – Part I Welcome, Category, Book, SearchResult LoginLink, Logout, RegistrationLink, ChangeLink Login Logout Registration Change User Data 1 links to LoginLink only exist, if user is not logged in 2 links to Logout only exist, if user is logged in 3 links to RegistrationLink only exist, if user is not logged in 4 links to ChangeLink only exist, if user is logged in ShoppingCart, OrderInformation, Confirmation Logout Welcome LoginLink Login ChangeLink Registration OrderChangeLink OrderInformation Springer Verlag 2004 OrderRegistration Fig.6.7. Using state set notation for the bookstore features – Part II Login, Registration, Book, Category, ShoppingCart, SearchResult, OrderInformation, OrderLogin, OrderRegistration, Confirmation Welcome, Category, Book, SearchResult, OrderInformation Welcome Welcome WelcomeLink View Cart ShoppingCart ViewCart Welcome, Category, Book, SearchResult, ShoppingCart Search Book Search Springer Verlag 2004 Fig.6.8. Modeling enabling conditions based on state specialization (i) A1 A2 A3 A4 A5 S3 Start S1 S2 S5 End S4 B1 (ii) A1 B2 A2 A3 B3 A4 A5 S3‘ S1‘ S2‘ S5‘ S4‘ Start End S3‘‘ S1‘‘ S2‘‘ S5‘‘ S4‘‘ B1 Springer Verlag 2004 B2 B3 Fig.7.1. The data model of the bookshop as a PD model Category name String featuredBooks title String Book abstract String item price Amount subcategories OrderItem orderItems Order quantity Number Customer name Author String authors buyer email String fullName String password String address streetAddress String cardInformation Address city state zip country Springer Verlag 2004 String String CardInformation cardType cardNumber expiration Number CardType String Date String cardholder String Fig.7.2. A submodel of the bookshop title String Book abstract String item OrderItem orderItems price quantity Number Order Customer Amount name Author String authors buyer email String fullName String password String Springer Verlag 2004 Fig.7.3. A relation of arity 3 and an alternative model with a relationship Customer Offer contact Salesperson Springer Verlag 2004 Customer Offer Contact Salesperson Fig.7.4. A partial order in the data model and a valid state of this model Partial order Fro to2fro fro2to To Data model Springer Verlag 2004 Data state Fig.7.5. A composition constraint with composite entity and contents model composite entity detouring relation type weak entity type master relation types contents subsystem Springer Verlag 2004 external reference Fig.8.1. An example data type interchange diagram showing all the notational elements message representing transaction messages of bidirectional transactional signature of “order” advertise getinsurance ship order deliver inquiry CRMprocess unit system Springer Verlag 2004 input type welcomeMessage output type Fig.8.2. Similar to functional decomposition, a model subsystem in one DTIM can be defined by a whole sub-DTIM c a c b Springer Verlag 2004 a b Fig.8.3. Edges between actions within the same model subsystem can and should be replaced v v i a i a u Springer Verlag 2004 h u h Fig.8.4. Example DTIMs describing how the login dialogue accesses a remote authentication service flow: incorrect password Login Form-Oriented Client Login Welcome Solution A LoginForm Welcome Bookshop System LoginForm Customer Management Authentication Service Receiver flow: incorrect password Springer Verlag 2004 Solution B LoginForm Login FailReceiver Welcome OKReceiver Authentication Service Fig.8.5. A DTIM and an equivalent DFD DTIM b DFD b w v c i i w v a h a u j Springer Verlag 2004 h h u c a j Fig.10.1. The Angie language related tool suite Java Server Pages Angie Generator Click-Dummy Prototype Angie JSPick Model Recovery Java Server Pages Springer Verlag 2004 Revangie Model Recovery Load Angie Load Test Report Angil Load Test Angil OLAP Web Presentation Layer Fig.10.2. Bookstore login capability Welcome login LoginLink WelcomeLink Springer Verlag 2004 Login welcome login LoginForm Fig.10.3. Revangie: example screen classifications ACME events ACME Specials ACME Welcome 1 3 view goodies home ACME bargains identity title source targets source title targets title source targets source title targets title source targets Springer Verlag 2004 ACME Specials ACME Welcome 2 4 screen classification 1-2 3-4 5 6 7 8 1 2 3-4 5-6-7 8 1-2 3-4 5-6 7-8 1-2 3-4 5-6-7 8 1-2 3-4 5-6 7-8 1-2 3-4 5-6-7-8 1 2 3-4 5 6 7 8 1-2 3-4 5 6 7 8 1 2 3-4 5-6 7 8 view products Hardware Drugs Food Goodies 5 6 7 8 non-food food Fig.11.1. CPDS and CPTS forms are editable method calls client page CPTS CPDS page description is interpreted page targets server side code Browser Server code unit that produces page descriptions (e.g. server page) Springer Verlag 2004 code unit that produces page descriptions (e.g. server page) code unit that produces page descriptions (e.g. server page) Fig.11.2. Model 2 architecture request C Java Servlet M create/update request dispatching client Java Server Page response V Springer Verlag 2004 front presentation access server-side objects Fig.11.5. Higher-order server pages design example registration A registration B registration C error and registrationAalong new Customer error and registrationBalong error and registrationCalong not error Springer Verlag 2004 registration B somewhere Fig.12.1. The core syntax model of the PD modeling language RelationType EntityType Role 1 Springer Verlag 2004 1 Fig.12.2. Multiplicity syntax model and union with PD syntax model 1 Number Upper multiplicity Lower multiplicity 1 Number 1 1 Springer Verlag 2004 1 RelationType 1 1 Role 1 1 EntityType Number Upper multiplicity Lower multiplicity Number 1 Fig.12.3. A cutout message storyboard of the bookshop example with custom transition names LoginLink l Welcome ! loggedIn:Boolean ! customerName:String Springer Verlag 2004 v s ViewCart ShoppingCart Fig.13.2. A formchart is derived from the semantic framework formchartframework shdframework pageServer StartState ClientPage ServerAction ServerPage Category WelcomeLink Welcome ViewCategory Springer Verlag 2004 Fig.13.3. The object net over a formchart is a path WelcomeLink Welcome Category Springer Verlag 2004 ViewCategory singleInstance: CurrentEnd Fig.13.4. A login subdialogue as UML state machine submit [valid password] Welcome Login submit [invalid password] Springer Verlag 2004 Fig.13.6. Example of path expressions v A B w y x C z D B’ aA:A v aB1:B v w aC1:C aC1:C y aC2:C aC2:C aC2:C z aC3:C y y aB2:B w aB’:B’ Springer Verlag 2004 duplicate x aC1:C aC2:C result bag Fig.13.7. UML tree definition parent {xor} 1..* Node Leaf Springer Verlag 2004 1..* parent 1 InnerNode 1 <<singleton>> Root Fig.16.1. The Seeheim model of user interfaces Presentation Springer Verlag 2004 Dialogue Control Application Interface Model Fig.16.2. Data flow diagram of a system login and registration feature user-id error-message CurrentUser User login email-and-password customer-and-repeated-password register error-message Springer Verlag 2004 Customer Fig.16.2. Jacobson-style use case diagram of the example bookstore. browse categories search view shopping cart manage shopping cart buy register User change customer data login logout Springer Verlag 2004 system