240 likes | 412 Views
Generating Enterprise Applications from Models. Vinay Kulkarni, R Venkatesh, Sreedhar Reddy Tata Research Development and Design Centre, Pune, INDIA. Outline. Engineering large software systems Model-based development Meta-modeling Generating enterprise applications from models
E N D
Generating Enterprise Applications from Models Vinay Kulkarni, R Venkatesh, Sreedhar Reddy Tata Research Development and Design Centre, Pune, INDIA
Outline • Engineering large software systems • Model-based development • Meta-modeling • Generating enterprise applications from models • A model driven software development environment • Future work
UI Prototype Analysis UML diagrams Design GUI standards ER diagrams Table design Design strategies Coding JSP implementation RDBMS implementation Java code User Interface Application Database Typical decomposition
Model-based Approach Decompose specification A into views A1…An to achieve • Structural simplicity • Efficiency Each Ai is an instance of a more generic model Mi • e.g. use-case as a model for user interaction specification
Model-based Approach A A1 A2 … A3 Decomposes into
Model-based Approach A A1 A2 … A3 C1 C2 C3 … Abstraction of C Decomposes into
Model-based Approach M1 M2 A M3 A1 A2 … A3 C1 C2 C3 … Instance of C Abstraction of Decomposes into
Relationship between Views • The views need not be independent: • property p of A may appear in two different views Ai and Aj • Ai and Aj must be ‘consistent’ with respect to property p: • e.g. data being displayed in a window being passed as a parameter to a method • Implementations of the Ais are composed to get an implementation of A. The Ais need to be consistent for the composition to be correct.
Models and Meta-models Using independent models for each set of views is • functionally adequate • hard to manage consistency An alternative is to define the models as instances of a unified meta-model.
Models M1, M2, M3 instances of a unified meta-model MM Define relationship between models Address consistency at model level MM M1 M2 M3 A1 A2 A3 Meta-models P2 P3 P1 P
Generating enterprise applications from models Illustrative example: Client Server application
source 1..* * Class Association Process 1..* 1..* destination 1..* * 1..* has has precedes has * * * * Attribute Method Task * * * * ofType realizes 1..* DataType Application layer meta model
opens Window Class * * * 1..* 1..* has has has has 1..* * * * * UIClass Button Method Attribute mapsto 0..1 1..* 0..1 0..1 calls has * 0..1 UIAttribute UI layer meta model
* * Control DataType representedBy instanceOf instanceOf 0..1 0..1 CalendarControl Date representedBy GUI standards meta model
inherits 1..* Class Table 1..* 1..* 1..* 1..* destination has has source has * * * * * Attribute Association Key Column * 1..* 0..1 0..1 0..1 0..1 * ofType composed implements 1..* mapsto DataType Database layer meta model
Some inter model consistency checks • UI should allow specification of all Tasks in the business process and be consistent with precedes relationship between Tasks • UI should display data that is consistent with respect to the Parameters being passed to the Operations invoked from the Window • DB layer should ensure that implements association is implemented in a consistent manner
MM instanceOf instanceOf instanceOf UIM AM DM A1 A2 A3 C2 C3 C1 C Consistency across layers - unified meta model
Application Database User String Name; User Name AccNo has Account String AccNo; Double Balance; Withdraw, Deposit Account AccNo Balance User Interface Name A/c No Amount Withdraw Deposit Integration across layers
A model driven software development environment MasterCraft • Models • Data Model, Class Model, GUI Model • State Diagram, Use Cases, Sequence Diagram • Semantics for models • weak • Generate • code from high-level description • unit tests
instanceOf instanceOf instanceOf MasterCraft meta model GUI model UML ER model DB specification GUI specification Business logic bxl guimod dmgen Java JSP Oracle C MasterCraft
MasterCraft • Achieves • component-based development • multiplatform code-generation (… from .NET to mainframes …) • multi-language code generation • complete separation of application specification from implementation
R E P O S I T O R Y Reqmnts model Store Refinement Composition Compo desc Compo desc Compo spec Aspect specs App code Analysis model Compose / Adapt Develop / Adapt Specify / Refine Aspect weaver Search Framework Comp code Next generation MDSD framework