S-Object Oriented Analysis and Design
S-Object Oriented Analysis and Design
S-Object Oriented Analysis and Design
Joaquin Miller:
• “Specification of a system and its
environment”
Model Taxonomy
Platform
general definition
– middleware platforms
• J2EE
• .NET
– OS platforms
• Linux
• Mac OSX
– can be more specific
• BEA WebLogic Platform 8.1
OMG definition
– general approach
OMG definition of “platform”
MDA recognizes that the target "platform" will likely be a
collection of platforms: Linux+JBoss+J2EE+Hibernate+
MySQL+Struts+JSP
CIM
Computation Independent Model
– Collection of UML diagrams
• Use case, activity, class, state, etc.
– High-level of abstraction
– Color modeling
– Analysis model
CIM in Together
Separate project vs separate package
• Separate project provides good isolation
– Can be a challenge for traceability
• Separate package partitions ok
– Much better for managing tracability
Model compiler
Model->Model
Activity diagram to Ant script transformation
Freedom to Delete
"clients are intimately familiar with details but are stuck in how it is
done now, overlooking potential improvements"
"Once the object model is created, then user scenarios are helpful
in fleshing out the "how".'
Visualizing Requirements 1
Visualizing Requirements 2
Visualizing Requirements 3
Visualizing Requirements 4
User Interface Models
from
Lean Interaction Design
and Implementation:
Using Statecharts with
Feature Driven Development
Examples:
• Visual layout suggests order
• Naming conventions
• Size matters
• Color modeling
• Model structure
• Traceability
Visual layout suggests
order
perceived time/order
Naming conventions
The value of naming conventions for code is well-
known.
http://www.featuredrivendevelopment.com/node/view/566
See also
MDA Journal at www.bptrends.com/
The MDA Logo
Note the industry verticals… MDA is not intended
to be a general purpose model-to-code solution.
Platform
Platform is a relative concept
According to the MDA Guide:
– “A platform in general is a set of subsystems/technologies that
provide a coherent set of functionality through interfaces and
specified usage patterns that any subsystem that depends on
the platform can use without concern for the details of how the
functionality provided by the platform is implemented.”
Platform Independence
– The quality that the model is independent of the features of a
platform of any particular type.
Platform-Independent Models
– Better called platform computational-independent?
Transformations
This is the challenge for MDA!
Inspired by existing CWM transformation technology
– MOF2 Core will align basis of UML and CWM
Query, View, Transformation specification is needed
– At present, QVT is MIA
A record of
transformation is
required to maintain
traceability and
synchronization.
Model Marking
Transformation
Marks are specific to a transformation
– Can be a stereotype in a profile, for example
The Abstraction Gap
Middleware makes MDA a potential reality
House Person
0..* 1
-value:Money -ssn:Integer
houses owner -salary:Money
+getMortgage(sum:Money,security:House):Mortgage
1 security
1 borrower
Mortgage
-principal:Money
0..* 0..*
-monthlyPayment:Money
mortgages -start:Date mortgages
-end:Date
Abstraction Gap
Today! Level of
Abstraction
Middleware
Practical(ly)
with
3GL with
Generators
Unlikely?
Framework
Middleware
Impractical?
3GL with Operating System
Machine Code with Operating
Impossible?
System
Machine Code
What About SOA and BPM?
Business Process Execution Language for Web Services
(BPEL4WS)
– An XML standard for defining business processes with
Web Services
– Provides high level of abstraction lends itself to
generation from models
• Negligible abstraction gap
– UML Profile for Automated Business Processes
• Allows UML Class and Activity diagrams to model BPEL
• Generate WSDL, BPEL and XSD Schema
Business Process Definition Metamodel being developed
– UML2-based metamodel with profile for BPD with
mapping to BPEL4WS
Model and Code
Synchronization
Forward Engineering Only
– The ultimate goal (?)
– Need Action Semantics
– Done in real-time and embedded systems today!
Partial Round-Trip Engineering
– Protected blocks for code
– WYSIWYG GUI tools have done this
Full Round-Trip Engineering
– Changes reflected up and down layers of abstraction
– Necessary to wean programmers off 3GLs?
Building Better Model[er]s
As models move from design artifacts to
development artifacts:
– Casual modelers will need to be upgraded
– Rigorous models required for generation
– Model validation becomes more important
– Model repositories will be needed
MDA® Summary
MDA is a collection of many specifications
– Many of which are incomplete at present
MDA has promise
MDA is no silver bullet
The jump from 3GLs to MDA is considerably
longer than from Assembly to 3GLs
MDA can be done with agility
– Waterfall not prescribed
MDA will require improved model(er)s
3. MDA Overview
MDD with Together®
ControlCenter™
Use Design language to model requirements and
domain model (CIM & PIM)
Refine computational portion in PIM package
Export to target language project (e.g. Java, C#,
C++)
Apply design patterns and elaborate design (PSM)
PSM and Code model maintained in sync with
LiveSource™
Support of the Latest
Standards
Current work in progress:
– UML™ 2 support in development
– OCL 2 support in development
– XMI 2 support in development
– Diagram Interchange support in development
– JMI-based metamodel support (JSR-040)
– Java-based transformation engine for QVT
– UML™ Profile support in development
• Custom profile definition to be supported
Improving the
Modeling Experience
Look for future support in Together® for:
– Expanded modeling capabilities
• Cater modeling environment to role
• Graphical view of metamodels
– Modeling helpers and tutorials
– Model-level audits and metrics
• Validate models for transformation
– OCL expression validation
– Transformation definition samples for
extensibility
MDD with Together ®
Tomorrow
Together Together
® ®
Designer Architect
<<include>>
Together®
Developer
PSMCode LiveSource™
Code Audits & Metrics
Embedded IDE Integration
Industry Support in
modeling & MDA®
Look for future support in Together® for:
– Industry models
• IAA
• eTOM
• etc…
– Industry frameworks
• C4ISR
• Zachman
• etc…
Model Accessibility
Several possibilities:
– Proprietary metamodel API
– Java™ Metadata Interface (JMI)
• Defined by JSR-040
– Eclipse Modeling Framework (EMF)
• Corresponding UML2 project
Internally, Together® utilizes own metamodel
– Known as “Entity” model
• Full UML2 metamodel implementation unrealistic
– Will be wrapped with standard JMI API for access
• Done with on-the-fly model transformations
Query View
Transformation (QVT)
No specification available yet
– No standard way to define a
transformation
OMG issued RFP on April 10, 2002
– 8 submissions, with 2 main groups:
• QVT-Merge Group
• Compuware/Sun Microsystems
Open Source
Transformers
Generative Model Transformer (GMT) http://www.eclipse.org/gmt
– Eclipse project (vaporware, JUUT-je prototype, UMLX 0.0)
– XMI-based (XMI+XMIXMI, XMIXMI, XMItext)
– Transformations based on “textures”
• Patterns specified in unambiguous UML-based format
AndroMDA http://www.amdromda.org
– Builds on XDoclet, utilizes Velocity template engine
– Takes UML XMI file input and generates output using “cartridges”
– Current cartridges: Java, EJB, Hibernate, Struts
– Generates no business logic
Jamda http://jamda.sourceforge.net
– Takes UML XMI file as input, using Jamda profile
– Java-based code generators
• Generated class definitions added to UML model before codegen
• Currently J2EE-centric
Others: UMT-QVT, QVT-Partners; Open Generator FrameWork, etc.
Model Transformation
Research
OCL-based transformations
– Input and output patterns defined in OCL
– Prolog-based engine
• Identifies input pattern in source model
• Generates output pattern in target model
Rule-based transformations
– Rules declared in XML
– Model access and transform via JMI API
– Batch processing of model, with potential incremental approach
Pattern-based transformations
– Transformation declared with metaclass and OCL
– Traverse modelexamine constraintsapply pattern to target
model
– Technique used in current Together® pattern technology
Model Validation
Current audits & metrics apply only to source model
– Source Code Interface (SCI) to code model
Model audits use JMI API
– Access and evaluate OCL constraints in model
– Audits themselves can be written in OCL
OCL validator accesses model constraints with JMI API
All validation results utilize common interface
– Unified format for analysis
What you can do now…
Refine your models:
– Leverage UML profiles where appropriate
– Specify all types
– Specify all multiplicities
– Name all associations and association ends
– Clean up “dangling” model elements
– Make models semantically complete
– Declare constraints in OCL
What you can do now…
Treat models as if they were development artifacts
– Not as throwaway design relics
Learn UML2 and OCL
– OMG’s UML2 Certification Program
Avoid UML constructs not supported by MOF:
– N-ary associations
– Qualified associations
– Association classes
Stop hand crafting XSDs, DTDs, and Java APIs for metadata
– Generators exist today!
3. MDA Overview
Overview of Future Support
Support of the Latest Standards
– As they become available…
Improve the Modeling Experience
– Align Products with MDA® Roles & Activities
– Support Industry Models and Frameworks
Increase Generative Capabilities and
Customizability
– Model access, validation, transformation
Improving the Modeling
Experience