Domain Modelling and Implementation Canonical modelling approach Simon
- Slides: 55
Domain Modelling and Implementation Canonical modelling approach Simon Cox Research Scientist Sydney - December, 3 rd 2010
Overview • • • UML, Modeling basics Hollow-World: the ISO HM, SWE and O&M Standard stereotypes Tagged values Modeling practices CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Unified Modeling Language CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Unified Modelling Language (UML) • OMG’s ‘Platform Independent’ modelling environment • Object-oriented • 13 types of diagrams • Structure • Package, class, object, component, deployment … • Behaviour • Use-case, activity, state • Interactions • Sequence, communication … CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Classes CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Class diagrams • Show information objects, their properties and relationships Class Additional parent not shown Class stereotype Specialization Attribute stereotype }Class attributes Association-end role name Association Not shown – class operations }Class constraints CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Relationships CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Properties • Class attributes & navigable association-ends • Navigable end owned by source class • Composite association ≈ attribute CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML Constraints • Rules that can’t be captured in boxes and lines • Text, or OCL CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Diagrams are selective • The diagrams are not the model • Each diagram is a ’projection’ or ‘view’ of part of the model, to communicate a key point • Fight the A 0 plotter syndrome! CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Lots of diagrams are a Good Thing • Especially in packages containing many classes CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Other diagrams used in data modeling CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Package diagrams • Dependencies & maintenance arrangements CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Object diagrams • … can get busy very fast “Accidents in Legoland” Mostly useful in the analysis phase CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Summary of UML structure diagrams • Package • ownership (governance arrangements) • dependencies • Class • the data model • Objects • examples in action CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Hollow. World CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Hollow World template • A template for designing application schemas in UML • Contains key standards components • ISO 19100 Harmonized Model • OGC SWE Model • ISO 19136 stereotypes and tagged values • Optimized for Sparx Enterprise Architect … CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
ISO Harmonized Model • Key packages used for Application Schema design: • • 19103 – primitive types 19107 – geometry 19108 – temporal 19111 – coords 19115 – metadata 19123 – coverages 19136 – GML 19156 – O&M • (go to EA live to explore) CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Standard components: OGC Sensor Web • Key packages used for Application Schema design: • • Sensor. ML Observations & Measurements SWE Common SOS, SPS. . . • (go to EA live to explore) CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Elements from external standards • The standard components are loaded by EA from remote SVNs • They are locked against modification by unauthorized users (i. e. mere application-schema designers!) • i. e. the tool enforces the governance arrangements • Package domain model separately CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Hollow World UI Access to standard/utility components Access to standard stereotypes CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML extensibility points CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML extensions • Stereotypes • Extend the meta-model: • To create an additional class-of- [classes, associations, attributes] CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML Stereotypes «Feature. Type» standard properties & behaviour ~multiple inheritance CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Class stereotypes • «Feature. Type» • Domain class, instances have identity • «Type» or none • Has identity, but not a feature; e. g. geometry, topology, temporal object, definition • «Data. Type» • Just a data structure, no external identity, always inline • «Union» • Ad-hoc choice • «Enumeration» • Closed enumeration • «Codelist» • Extensible enumeration CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Package stereotypes • «Application Schema» • independently governed package, separate XML namespace • «Leaf» • Convenience package, no subpackages, separate XSD document CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML extensions • Stereotypes • Tagged values • Embed information for specific implementation platforms • Doesn’t relate to the conceptual level CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML Tagged values CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Tagged values for GML encoding • Package • xsd. Document • xmlns • target. Namespace • Class • • no. Property. Type by. Value. Property. Type as. Dictionary ( «code. List» only) owned. By (proposed) • Attribute and association end • sequence. Number • inline. Or. By. Reference • estimated. Property (proposed) https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/Uml. Gml. Stereotypes. And. Tagged. Values CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
High level usage guidelines CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Use of UML • Informative - sketch or illustrate ideas • Ambler (Agile methodologies …) uses it mostly this way vs. • Formal & complete • In order to feed a CASE tool • For automatic implementation, the model must be complete • Everything required for implementation must be in either • The model • The rule for converting from model to implementation • UML == ‘graphical programming language’ • Every comma counts, just like real programming CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Be aware of the workflow • Raw observations • E. g. temperature field, flow-rate history, density distribution, colour distribution (image) • i. e. evidence • Interpolated/modelled properties • Geophysics, Met. Ocean • Results of simulations and process models, conditioned by observations • i. e. predictions, simulations, inversions • ‘Real-world’ features • E. g. weather system, ore-body, forest, reef • i. e. result of interpretation • Often useful to segregate these viewpoints into different packages CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Be consistent about the abstraction level • Conceptual - Domain semantics • Terminology as used by practitioners in the discipline • not an abstraction from data management • ‘Ore-body’, not ‘Table’ or ‘Polygon’ or ‘URI’ • Don’t show identifier, key/keyref in the class model • these are implicit in the relationships • Implementation • Shows implementation artefacts like ‘string’, ‘id’, ‘index’ CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
More information • For more detail: • https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/Uml. Outline • https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/Uml. Gml. Stereotypes. And. Tagg ed. Values • https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/Uml. Gml. Test. Models CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Design strategy CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Model is in the markup <gsml: Borehole gml: id="gc. DD 0214"> <gml: name code. Space="urn: cgi: authority: CGI: GSV“ >gc. DD 0214</gml: name> <sa: length uom="m">48. 3</sa: length> <sa: shape> <gml: Line. String gml: id="gc. DD 0214 survey“ >. . . </gml: Line. String> </sa: shape> <gsml: collar. Location> <gsml: Borehole. Collar gml: id="gc. DD 0214 c"> <gsml: location> <gml: Point gml: id="gc. DD 0214 p"> <gml: pos srs. Name="urn: ogc: crs: EPSG: : 4326“ >-31. 939 115. 832</gml: pos> </gml: Point> </gsml: location> <gsml: elevation srs. Name=“urn: ogc: crs: EPSG: : 5711 ” >34. 5</gsml: elevation> </gsml: Borehole. Collar> </gsml: collar. Location> <gsml: index. Data> <gsml: Borehole. Details>. . . </gsml: Borehole. Details> </gsml: index. Data>. . . </gsml: Borehole> • ‘striped’ syntax - Upper. Camel. Case objects, lower. Camel. Case properties • Manually generate Instance examples - Don’t need XSD during design phase CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Design strategy – UML + XML instances • Iterative design process • test the model with manually generated XML fragments • Wait to generate an XML Schema until model is substantially complete • E. g. https: //www. seegrid. csiro. au/subversion/Geo. Sci. ML/trunk/instances CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Earth Science & Resource Engineering Simon Cox Research Scientist Phone: 08 6436 8639 Email: simon. cox@csiro. au Web: www. csiro. au Thank you Contact Us Phone: 1300 363 400 or +61 3 9545 2176 Email: enquiries@csiro. au Web: www. csiro. au CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML vs. other formalizations CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML vs. XML • UML = objects, operations • Object associations - graph topology • XML = elements, attributes – no ops • Element nesting = tree topology T C A 1 H G M A 3 CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Links • Use links used to build graphs in XML <document> <Circle id="A 1"> <Circle id="C"> <Circle id="T"> <Circle id="H"> </Circle> <link href="#M"/> </Circle> <Circle id="M"> <link href="#T"/> <link href="http: //example. org/X"/> </Circle> <Circle id="G"> <Circle id="A 3"> <link href="#M"/> </Circle> <link href="#C"/> </Circle> </document> H G • In general, link targets are identified by URI • N. B. URI open-world CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010 T C A 1 M A 3 X
UML Profile for XML • XML is not as expressive as UML • restricted profile of UML must be used, to enable XML serialization following these patterns CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
UML Structure models vs. RDF/OWL • Both are based on graphs of resources + relationships • Largely transformable • Key relationships have special symbols in UML • E. g. sub. Class. Of == Generalization • RDF one diagram type, two meta-levels: class and individual • Description Logic is based on set-theory, i. e sets and members • UML many diagram types, separate diagrams for class and object; but UML includes an arbitrary number of meta-levels • «metaclass» stereotype, -- «implements» - relationship • UML does not support “complement” or “not” • UML closed-world • Strictly cardinality rules, complete model, validity checking • RDF open-world • Anyone can say anything, never see complete model, inferencing CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
The model-based method CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Information modeling • [ISO 19103] The following modeling phases are recommended: • • • Phase 0: Identify scope and context. Phase 1: Identify basic classes. Phase 2: Specify relationships, attributes and operations. Phase 3: Completion of constraints using text/OCL. Phase 4: Model definition harmonization – with sub-models and other work items. CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Model based design • Premise: • domain analysis captured in a formal model should precede, and if possible drive, implementations • Argument: • Analysis can be done at the right level of abstraction • Applications derived from a conceptual view are more robust than software developed directly on a specific technology • Platform independent representation supports multiple platforms • Types can be reliably traced between platforms • Revisions flow through automatically to all platforms • Goal • One normative artefact – the UML model • Software and documentation generated automatically • Origins in ‘CASE’ tools CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Object diagrams CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Standard components: GML extensions to HM • Key elements used in Application Schema design: • Abstract. Feature • Definition, Dictionary • Line. String, Polygon • (go to EA live to explore) CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Using Hollow. World CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Software and configuration 1. Checkout Hollow. World SVN 2. Make a copy of the Hollow. World template model 3. Checkout any other models that will be used as dependencies of your model 4. Install Enterprise Architect 5. Run EA, load the template, fix the Version Control Settings, load the GML profile https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/ Configuring. UMLTool. For. Hollow. World • • Create «Application Schema» package Start modelling … https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/Modeling. Using. Hollow. World https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/Uml. Gml. Test. Models CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Classes Test model 08 Test model 19 • https: //www. seegrid. csiro. au/twiki/bin/view/App. Schemas/Uml. Gml. Test. Models CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Example project CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Example project: GGIC Earth Resource model CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Main dependencies CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
Class diagrams CSIRO. Masterclass: Domain Modelling and Implementation - Sydney 03/12/2010
- Canonical clauses
- Grand partition function
- Big bang vs phased implementation approach pros and cons
- Big bang vs phased implementation approach pros and cons
- Language processor
- Domain and range games
- What is time domain and frequency domain
- The designer expresses the ideas in terms related to the
- Applying agile approach in erp implementation
- Traditional approach in system analysis and design
- Canonical and standard forms
- Canonical form and standard form
- Z domain to frequency domain
- What is the z - transform of anu[n] and -anu[-n-1]
- Z transform of ramp function
- Domain specific vs domain general
- Domain specific software engineering
- Problem domain vs knowledge domain
- S domain to z domain
- Virtual circuit and datagram
- Tony wagner's seven survival skills
- Simplex
- Canonical cover example
- Canonical base
- Application of canonical ensemble
- Pickoff point
- Http and dns
- Observable canonical form example
- Controllable canonical form
- Hamilton method
- Canonical discriminant analysis spss
- Canonical correlation assumptions
- Canoncorr matlab
- Canonical form boolean algebra
- Fungsi boolean dalam bentuk sop dan pos
- Canonical form digital logic
- Rerational
- Aws signature version 4
- Block diagram representation of control system
- Phase variable canonical form
- Phase equilibrium
- Canonical lr
- Canonology
- Canonical ensemble
- Pde
- Canonical xml
- Weak solution
- Canonical view volume
- Canonical perspective
- Canonical view volume
- Epipolar
- Canonical view volume
- Canonical conjugate
- Reti prefix
- Cognitive approach vs behavioral approach
- Waterfall and sprinkler strategy