Advanced Software Engineering
Paolo Bottoni
Lecture 7: WebML (IFML)
IFML usage
• High-level description of a Web application
• Multiple views of the same content
• Repository of the meta-information collected during
the design process
• Data manipulation operations for
– updating the site content
– interacting with arbitrary external services
• Separate information content from composition into
pages, navigation, and presentation
• Explicit modelling of users and communities
2
Advanced Software Engineering Lesson7WebML
3
Advanced Software Engineering Lesson7WebML
What it is for:
interaction
3
Advanced Software Engineering Lesson7WebML
4
Advanced Software Engineering Lesson7WebML
What it is for: multiple
interaction
4
Advanced Software Engineering Lesson7WebML
5
Advanced Software Engineering Lesson7WebML
What it is for:
actions
5
Advanced Software Engineering Lesson7WebML
6
Advanced Software Engineering Lesson7WebML
What it is for: forms
6
Advanced Software Engineering Lesson7WebML
7
Advanced Software Engineering Lesson7WebML
The IFML metamodel
Advanced Software Engineering Lesson7WebML
8
Advanced Software Engineering Lesson7WebML
Metamodel for interaction flow
Advanced Software Engineering Lesson7WebML
9
Advanced Software Engineering Lesson7WebML
Metamodel for events
Advanced Software Engineering Lesson7WebML
10
Advanced Software Engineering Lesson7WebML
Metamodel for parameter binding
Advanced Software Engineering Lesson7WebML
11
Advanced Software Engineering Lesson7WebML
Metamodel for view components
Advanced Software Engineering Lesson7WebML
12
Advanced Software Engineering Lesson7WebML
Metamodel for modules
Advanced Software Engineering Lesson7WebML
Models
• Data Model
– conceptual data organization
– compatible with ER and UML class diagrams.
• Derivation model
– extends structure model with calculated data
• Hypertext model
– specification of the front-end of the application
• Content Management Model
– extends hypertext model with operations and transactions
13
Advanced Software Engineering Lesson7WebML
Data Model
• Based on Entity-Relationship
– Entities, attributes, data types, relationships
• Entities
– Description of common features of set of objects
– Population: set of objects described by entity.
• Attributes
– relevant properties of real world objects
– entity instances characterized by same attributes
14
Advanced Software Engineering Lesson7WebML
Relationships
• Generalization
– Single inheritance among entities
– Instances from only one sub-entity
– Entities in at most one generalization hierarchy
• Relations
– Semantic connections between entities
– Entities have roles
– Minimum and maximum cardinality constraints
15
Advanced Software Engineering Lesson7WebML
Notations
16
Advanced Software Engineering Lesson7WebML
Derivation model
• Extends the elements of the structure model with
calculated elements
– Augment entity content by adding attributes calculated
or imported from related objects
– Define populations of entities and relationships based
on some property of the involved objects
• WebML-OQL: set-oriented, navigational query
language
– Now the standard defines only the metamodel
• UML OCL and OQL path expressions
17
Advanced Software Engineering Lesson7WebML
WEBML-OQL attributes
• Imported
– affiliationName = Self.Affiliation.name
• Calculated
– netPrice = Self.grossPrice – Self.tax
• Aggregate
– totalAlbums = count(Self.ArtistToAlbum)
– TotalTracksDuration =
sum(Self.ArtistToAlbum.AlbumToTrack.duration)
18
Advanced Software Engineering Lesson7WebML
WEBML-OQL filters
recentAlbumsCount =
count(Self.ArtistToAlbum as B
WHERE B.date > '1997-01-01')
totRecentTracksDuration =
sum(Self.ArtistToAlbum(as B).
AlbumToTrack.duration
WHERE B.date > '1997-01-01').
19
Advanced Software Engineering Lesson7WebML
WebML-OQL: derived relationships
• Concatenation of relationships
CoParticipation =
Self.ArtistToCompilation.CompilationToArtist
• Evaluation of predicates
CoParticipation = Self.ArtistToCompilation.CompilationToArtist
as A where Self.Affiliation = A.Affiliation
20
Advanced Software Engineering Lesson7WebML
Hypertext model
• Specifies organization of front-end interfaces
• Elements:
– units: atomic pieces of publishable content
– pages: interface elements delivered to users
– links: navigation and parameter passing
• Modularization constructs
– areas: clusters of pages with homogeneous purpose
– site view: coherent hypertext for set of requirements
21
Advanced Software Engineering Lesson7WebML
Units
• Data unit: information about single object.
• Multidata unit: information about set of objects
• Index unit: list of descriptive properties of objects.
• Scroller unit: browsing of ordered set
• Entry unit: entry forms for input gathering.
22
Advanced Software Engineering Lesson7WebML
Icons for units (WebML)
23
Advanced Software Engineering Lesson7WebML
24
Advanced Software Engineering Lesson7WebML
From WebML to IFML I
25
Advanced Software Engineering Lesson7WebML
From WebML to IFML II
26
Advanced Software Engineering Lesson7WebML
From WebML to IFML III
Module
Parameter Binding
27
Advanced Software Engineering Lesson7WebML
Architecture of IFML diagrams
28
Advanced Software Engineering Lesson7WebML
Diagram interchange metamodel
Role of units
Multiplicity Role Operations
Data Single Presentation Publishing
Set Presentation Publishing
Index Set Selection Publishing
Set Selection Publishing
Entry Acquisition
Multidata
Scroller
29
Advanced Software Engineering Lesson7WebML
Getting content for data units
• Source: name of entity, type of object
providing content.
• Selector: predicate to determine the actual
objects of the source entity that contribute
– Conjunction / Disjunction of elementary
conditions, built from entity attributes and relations
and from constant or variable terms.
30
Advanced Software Engineering Lesson7WebML
Getting content for multidata units
• Name: user-defined name
• Source: entity providing content
• Selector: predicate selecting objects.
• Included attributes: set of attributes to be
visualized for each object
• Order clause: set of attributes used to sort
objects and sorting criterion
31
Advanced Software Engineering Lesson7WebML
Getting content for index units
• Name: user-defined name
• Source: entity providing content
• Selector: predicate selecting objects
• Included attributes: set of attributes used to display the index entries.
• Order clause: set of attributes used to sort objects and sorting criterion
• Variants:
– multi-choice index unit, checkbox associated with entries
– hierarchical index, index entries organised in a multi-level tree
32
Advanced Software Engineering Lesson7WebML
Notation
33
Advanced Software Engineering Lesson7WebML
Variants of index units
IndexUnit AlbumIndex hierarchical
(source Album;
attributes Title;
orderby Title
NEST Track
selector AlbumToTrack;
attributes Title;
orderby Title)
IndexUnit AlbumIndex multi-choice
(source Album;
attributes Title;
orderby Title)
34
Advanced Software Engineering Lesson7WebML
Scroller units
• Name: user-defined name
• Source: entity providing content
• Selector: predicate selecting objects
• Block factor: number of objects scrolled together.
• Block window: maximum number of shown blocks
that preceed and follow the current block
• Order clause:set of attributes used to sort the objects
and sorting criterion
35
Advanced Software Engineering Lesson7WebML
Entry units
• Name: user-defined name
• Fields: set of fields for inputting values.
• Property of fields:
– Name: name of the field.
– Type: data type of the value input
– Initial value: default value initially proposed
– Modifiability: flag specifying if the user can modify the initial
field value or not
– Validity predicate: Boolean condition on the input
36
Advanced Software Engineering Lesson7WebML
Notation
37
Advanced Software Engineering Lesson7WebML
Links
Inter-Page
Contextual CA CE
Non contextual NA NE
Intra-Page
parametric selector
link parameter
NE
CE
38
Advanced Software Engineering Lesson7WebML
Links
CA
Multiple outgoing links from a hierarchy
39
Advanced Software Engineering Lesson7WebML
Complex navigations
40
Advanced Software Engineering Lesson7WebML
Global parameters
• Context information not transferred point-to-
point during navigation, but available to all
the pages of a site
– e.g. multi-country Web site, user selects the
country of interest and then browses the site's
content relative to that country
– hypertext the same for all countries, actual content
varies country by country
• Use of set unit
41
Advanced Software Engineering Lesson7WebML
Views and areas
42
Advanced Software Engineering Lesson7WebML
Conjunctive nested pages
43
Advanced Software Engineering Lesson7WebML
Disjunctive nested pages
44
Advanced Software Engineering Lesson7WebML
Content management model
• Operation unit: processing executed as result of link
navigation
– data manipulation
– execution of a generic external service.
• OK and KO-links: operation success and failure
– allow alternative courses after execution of an operation
• Transactions: clusters of operation units
– succeed or fail as a whole. Undone if one fails
45
Advanced Software Engineering Lesson7WebML
Operations
• Predefined
– Creation, deletion and modification of objects, and relationships.
• Generic
– Integration of external procedures of arbitrary complexity
• Operations:
– May have multiple incoming links.
– May be linked to form a sequence.
– One regular incoming link, and transport links. Navigates the
regular link and uses the parameters associated with input links.
– Have one OK link and one KO link
– May have any number of outgoing transport links
46
Advanced Software Engineering Lesson7WebML
Icons for operations
47
Advanced Software Engineering Lesson7WebML
Object creation
User-defined Name
Source entity
Set of assignments
48
Advanced Software Engineering Lesson7WebML
Object deletion
User-defined name
Source entity
Selector
49
Advanced Software Engineering Lesson7WebML
Multiple deletion
50
Advanced Software Engineering Lesson7WebML
Object modification
User-defined name
Source entity
Selector
Set of assignments
51
Advanced Software Engineering Lesson7WebML
Relation creation
User-defined name
Source relationship role
Two selectors, one for
objects of the source entity
and one for objects of the
destination entity.
52
Advanced Software Engineering Lesson7WebML
Relation deletion
User-defined name
Source relationship role
Two selectors, one for
objects of the source
entity and one for object
of the destination entity.
53
Advanced Software Engineering Lesson7WebML
Transactions
• ACID properties
– Atomicity: either all the involved operations are successfully
completed, producing a new database state, or the initial
database state is left unchanged.
– Consistency: carrying out a transaction should not violate the
integrity of data.
– Isolation: each transaction execution is independent of the
simultaneous execution of other transactions.
– Durability: effects of transactions that complete successfully are
recorded persistently.
• Operations chained by a sequence of OK links
• The last OK link leads to the (unique) hypertext page shown
after the successful completion of the transaction.
54
Advanced Software Engineering Lesson7WebML
Icons for sessions
55
Advanced Software Engineering Lesson7WebML
Icons for services
56
Advanced Software Engineering Lesson7WebML
Icons for control flow
57
Advanced Software Engineering Lesson7WebML
Icons for utilities
58
Advanced Software Engineering Lesson7WebML

Lesson7WebML.pdf

  • 1.
    Advanced Software Engineering PaoloBottoni Lecture 7: WebML (IFML)
  • 2.
    IFML usage • High-leveldescription of a Web application • Multiple views of the same content • Repository of the meta-information collected during the design process • Data manipulation operations for – updating the site content – interacting with arbitrary external services • Separate information content from composition into pages, navigation, and presentation • Explicit modelling of users and communities 2 Advanced Software Engineering Lesson7WebML
  • 3.
    3 Advanced Software EngineeringLesson7WebML What it is for: interaction 3 Advanced Software Engineering Lesson7WebML
  • 4.
    4 Advanced Software EngineeringLesson7WebML What it is for: multiple interaction 4 Advanced Software Engineering Lesson7WebML
  • 5.
    5 Advanced Software EngineeringLesson7WebML What it is for: actions 5 Advanced Software Engineering Lesson7WebML
  • 6.
    6 Advanced Software EngineeringLesson7WebML What it is for: forms 6 Advanced Software Engineering Lesson7WebML
  • 7.
    7 Advanced Software EngineeringLesson7WebML The IFML metamodel Advanced Software Engineering Lesson7WebML
  • 8.
    8 Advanced Software EngineeringLesson7WebML Metamodel for interaction flow Advanced Software Engineering Lesson7WebML
  • 9.
    9 Advanced Software EngineeringLesson7WebML Metamodel for events Advanced Software Engineering Lesson7WebML
  • 10.
    10 Advanced Software EngineeringLesson7WebML Metamodel for parameter binding Advanced Software Engineering Lesson7WebML
  • 11.
    11 Advanced Software EngineeringLesson7WebML Metamodel for view components Advanced Software Engineering Lesson7WebML
  • 12.
    12 Advanced Software EngineeringLesson7WebML Metamodel for modules Advanced Software Engineering Lesson7WebML
  • 13.
    Models • Data Model –conceptual data organization – compatible with ER and UML class diagrams. • Derivation model – extends structure model with calculated data • Hypertext model – specification of the front-end of the application • Content Management Model – extends hypertext model with operations and transactions 13 Advanced Software Engineering Lesson7WebML
  • 14.
    Data Model • Basedon Entity-Relationship – Entities, attributes, data types, relationships • Entities – Description of common features of set of objects – Population: set of objects described by entity. • Attributes – relevant properties of real world objects – entity instances characterized by same attributes 14 Advanced Software Engineering Lesson7WebML
  • 15.
    Relationships • Generalization – Singleinheritance among entities – Instances from only one sub-entity – Entities in at most one generalization hierarchy • Relations – Semantic connections between entities – Entities have roles – Minimum and maximum cardinality constraints 15 Advanced Software Engineering Lesson7WebML
  • 16.
  • 17.
    Derivation model • Extendsthe elements of the structure model with calculated elements – Augment entity content by adding attributes calculated or imported from related objects – Define populations of entities and relationships based on some property of the involved objects • WebML-OQL: set-oriented, navigational query language – Now the standard defines only the metamodel • UML OCL and OQL path expressions 17 Advanced Software Engineering Lesson7WebML
  • 18.
    WEBML-OQL attributes • Imported –affiliationName = Self.Affiliation.name • Calculated – netPrice = Self.grossPrice – Self.tax • Aggregate – totalAlbums = count(Self.ArtistToAlbum) – TotalTracksDuration = sum(Self.ArtistToAlbum.AlbumToTrack.duration) 18 Advanced Software Engineering Lesson7WebML
  • 19.
    WEBML-OQL filters recentAlbumsCount = count(Self.ArtistToAlbumas B WHERE B.date > '1997-01-01') totRecentTracksDuration = sum(Self.ArtistToAlbum(as B). AlbumToTrack.duration WHERE B.date > '1997-01-01'). 19 Advanced Software Engineering Lesson7WebML
  • 20.
    WebML-OQL: derived relationships •Concatenation of relationships CoParticipation = Self.ArtistToCompilation.CompilationToArtist • Evaluation of predicates CoParticipation = Self.ArtistToCompilation.CompilationToArtist as A where Self.Affiliation = A.Affiliation 20 Advanced Software Engineering Lesson7WebML
  • 21.
    Hypertext model • Specifiesorganization of front-end interfaces • Elements: – units: atomic pieces of publishable content – pages: interface elements delivered to users – links: navigation and parameter passing • Modularization constructs – areas: clusters of pages with homogeneous purpose – site view: coherent hypertext for set of requirements 21 Advanced Software Engineering Lesson7WebML
  • 22.
    Units • Data unit:information about single object. • Multidata unit: information about set of objects • Index unit: list of descriptive properties of objects. • Scroller unit: browsing of ordered set • Entry unit: entry forms for input gathering. 22 Advanced Software Engineering Lesson7WebML
  • 23.
    Icons for units(WebML) 23 Advanced Software Engineering Lesson7WebML
  • 24.
    24 Advanced Software EngineeringLesson7WebML From WebML to IFML I
  • 25.
    25 Advanced Software EngineeringLesson7WebML From WebML to IFML II
  • 26.
    26 Advanced Software EngineeringLesson7WebML From WebML to IFML III Module Parameter Binding
  • 27.
    27 Advanced Software EngineeringLesson7WebML Architecture of IFML diagrams
  • 28.
    28 Advanced Software EngineeringLesson7WebML Diagram interchange metamodel
  • 29.
    Role of units MultiplicityRole Operations Data Single Presentation Publishing Set Presentation Publishing Index Set Selection Publishing Set Selection Publishing Entry Acquisition Multidata Scroller 29 Advanced Software Engineering Lesson7WebML
  • 30.
    Getting content fordata units • Source: name of entity, type of object providing content. • Selector: predicate to determine the actual objects of the source entity that contribute – Conjunction / Disjunction of elementary conditions, built from entity attributes and relations and from constant or variable terms. 30 Advanced Software Engineering Lesson7WebML
  • 31.
    Getting content formultidata units • Name: user-defined name • Source: entity providing content • Selector: predicate selecting objects. • Included attributes: set of attributes to be visualized for each object • Order clause: set of attributes used to sort objects and sorting criterion 31 Advanced Software Engineering Lesson7WebML
  • 32.
    Getting content forindex units • Name: user-defined name • Source: entity providing content • Selector: predicate selecting objects • Included attributes: set of attributes used to display the index entries. • Order clause: set of attributes used to sort objects and sorting criterion • Variants: – multi-choice index unit, checkbox associated with entries – hierarchical index, index entries organised in a multi-level tree 32 Advanced Software Engineering Lesson7WebML
  • 33.
  • 34.
    Variants of indexunits IndexUnit AlbumIndex hierarchical (source Album; attributes Title; orderby Title NEST Track selector AlbumToTrack; attributes Title; orderby Title) IndexUnit AlbumIndex multi-choice (source Album; attributes Title; orderby Title) 34 Advanced Software Engineering Lesson7WebML
  • 35.
    Scroller units • Name:user-defined name • Source: entity providing content • Selector: predicate selecting objects • Block factor: number of objects scrolled together. • Block window: maximum number of shown blocks that preceed and follow the current block • Order clause:set of attributes used to sort the objects and sorting criterion 35 Advanced Software Engineering Lesson7WebML
  • 36.
    Entry units • Name:user-defined name • Fields: set of fields for inputting values. • Property of fields: – Name: name of the field. – Type: data type of the value input – Initial value: default value initially proposed – Modifiability: flag specifying if the user can modify the initial field value or not – Validity predicate: Boolean condition on the input 36 Advanced Software Engineering Lesson7WebML
  • 37.
  • 38.
    Links Inter-Page Contextual CA CE Noncontextual NA NE Intra-Page parametric selector link parameter NE CE 38 Advanced Software Engineering Lesson7WebML
  • 39.
    Links CA Multiple outgoing linksfrom a hierarchy 39 Advanced Software Engineering Lesson7WebML
  • 40.
  • 41.
    Global parameters • Contextinformation not transferred point-to- point during navigation, but available to all the pages of a site – e.g. multi-country Web site, user selects the country of interest and then browses the site's content relative to that country – hypertext the same for all countries, actual content varies country by country • Use of set unit 41 Advanced Software Engineering Lesson7WebML
  • 42.
    Views and areas 42 AdvancedSoftware Engineering Lesson7WebML
  • 43.
    Conjunctive nested pages 43 AdvancedSoftware Engineering Lesson7WebML
  • 44.
    Disjunctive nested pages 44 AdvancedSoftware Engineering Lesson7WebML
  • 45.
    Content management model •Operation unit: processing executed as result of link navigation – data manipulation – execution of a generic external service. • OK and KO-links: operation success and failure – allow alternative courses after execution of an operation • Transactions: clusters of operation units – succeed or fail as a whole. Undone if one fails 45 Advanced Software Engineering Lesson7WebML
  • 46.
    Operations • Predefined – Creation,deletion and modification of objects, and relationships. • Generic – Integration of external procedures of arbitrary complexity • Operations: – May have multiple incoming links. – May be linked to form a sequence. – One regular incoming link, and transport links. Navigates the regular link and uses the parameters associated with input links. – Have one OK link and one KO link – May have any number of outgoing transport links 46 Advanced Software Engineering Lesson7WebML
  • 47.
    Icons for operations 47 AdvancedSoftware Engineering Lesson7WebML
  • 48.
    Object creation User-defined Name Sourceentity Set of assignments 48 Advanced Software Engineering Lesson7WebML
  • 49.
    Object deletion User-defined name Sourceentity Selector 49 Advanced Software Engineering Lesson7WebML
  • 50.
  • 51.
    Object modification User-defined name Sourceentity Selector Set of assignments 51 Advanced Software Engineering Lesson7WebML
  • 52.
    Relation creation User-defined name Sourcerelationship role Two selectors, one for objects of the source entity and one for objects of the destination entity. 52 Advanced Software Engineering Lesson7WebML
  • 53.
    Relation deletion User-defined name Sourcerelationship role Two selectors, one for objects of the source entity and one for object of the destination entity. 53 Advanced Software Engineering Lesson7WebML
  • 54.
    Transactions • ACID properties –Atomicity: either all the involved operations are successfully completed, producing a new database state, or the initial database state is left unchanged. – Consistency: carrying out a transaction should not violate the integrity of data. – Isolation: each transaction execution is independent of the simultaneous execution of other transactions. – Durability: effects of transactions that complete successfully are recorded persistently. • Operations chained by a sequence of OK links • The last OK link leads to the (unique) hypertext page shown after the successful completion of the transaction. 54 Advanced Software Engineering Lesson7WebML
  • 55.
    Icons for sessions 55 AdvancedSoftware Engineering Lesson7WebML
  • 56.
    Icons for services 56 AdvancedSoftware Engineering Lesson7WebML
  • 57.
    Icons for controlflow 57 Advanced Software Engineering Lesson7WebML
  • 58.
    Icons for utilities 58 AdvancedSoftware Engineering Lesson7WebML