footer to have copyright, data and page numbers only on the title slides arial, 10 points, color -...
TRANSCRIPT
© Tata Consultancy Services ltd. April 18, 2023 1
Adopting MDA in a large IT consultancy organization – opportunities, challenges and
lessons learnt
Vinay Kulkarni* and Sreedhar Reddy, Tata Research Development and Design Centre, Pune, INDIA
2
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
It all began in 1994
Ground situation Crack design team
Functional Architectural
Shortage of experienced OO programmers
Lack of proven industrial-scale OO development methods
Lack of robust development tools
A core banking product To be delivered on state-of-the-art
technologies i.e. OO, 3-tier client-server architecture with OLTP monitor, rich GUI etc.
Customizable offering catering to purpose-specific choice of
Business functionality Business process Technology platforms like
RDBMSs, OLTP monitors and GUI platforms
Long life Off the shelf product or
bespoke solution
3
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Architectural prototype
A small team of experienced architects manually implemented a sample functionality covering all the layers of implementation architecture
Objectives Firm up broad architectural
decisions as regards scalability, throughout, response time etc
Familiarization with finer nuances of technology platforms
Lead to coding guidelines and best practices
Revelations Typical business logic has low
algorithmic complexity Several reusable design and
architectural patterns Architecture can be neatly
separated from business logic
4
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Intuition
Complete implementation
Business logic Solution architecture
Snippet1 Snippet2 Snippetk
Specification Specification1 Specification2 Specification3
Generate solution architecture specific code from its declarative specifications
5
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Our MDA approach - overview
A meta model captures a recurring code pattern All meta models defined in terms of a meta meta model A model based code generator is an interpreter of meta meta model
Application structure captured in extended UML models Business logic specified using a DSL Application specifications (i.e. PIM) are translated into a PSI using
PSM-specific code-generators that encode choice of design strategies, architecture decisions and technology platforms
Integrate independently generated code snippets in a consistent manner through an architecture
Component-based development process to manage size and facilitate independent development
6
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Example – a client/server application
Instance of
GUI layer code App layer code Db layer code
Composed fromApplication implementation
Decomposes intoApplication specification
GUI layer model App layer model Db layer model
GUI layer meta model App layer meta model Db layer meta model
View ofUnified meta model
Model to code transformation
7
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Our MDA approach - architecture as the integrating glue
MVC paradigm Well-defined interfaces Universal interface in the form of
services Object façade over relational
database Transactional integrity,
distribution transparency and scale-up courtesy middlewareDatabase
GUI
UI manager
Universal Interface
Application Services
DM
Application Server
8
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Our MDA approach - component based development
Model workspace
Codeworkspace
Component workspace
Workspace for sharing Application
release
9
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Model based code generation
Class definition Attribute handling logic Getter/Setter Default constructor and copy
constructor Persistence
Primary- and Alternate-key based CRUDE methods
Primary- and foreign-key based association handling
Design strategies Soft locking, Soft delete, Auditing,
Error handling, Trace logs
Object-wrapper for non primary-key based data accesses
Component deployment Bean class, Remote interface and
Deployment descriptor
Screen definition Layout Server-side interface Placeholder for Event logic
Testing support Look-n-feel Interaction with server-side
Testing support Unit test harness for a service, Test
data generation Build support
Makefiles
10
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Representative usage data
11
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
In our experience
Product-lines and large projects adopted the approach
Technology-proofingIncreased productivityUniformly high code quality
Consistent implementation of design strategies, best practices, guidelines etc.
Prevention and early detection of errors
More complete testing of applicationEnhanced reusability
Small and medium sized projects didn’t find the approach attractive enough to adopt
High learning curvePerceived loss of controlCustomizing code generators takes
timeLess agile development process
Tight coupling with repositoryUnidirectional synchronization from
model to codeNo debugging support at model levelComplex versioning and configuration
management
12
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Addressing customizability of code generators
Model-based code generator
Model
Code
Generic code generator generator
Composition
d a t
d’ a’ t’
Selection
Repository of building blocks
D A T
Modification
Generates
Intuition - meta tools delivering tools
13
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Customizable code generators
A code generator is a hierarchical composition of building blocks
Building block is an unifying abstraction to specify [Aspect] Model Model transformation Model translation
Code generation is a three-step walk over the composition tree Model creation Model transformation Code weaving
Uses OMG QVT and OMG MTT standards
Base model Aspect model
Model to model transformation
Model to texttransformation
Text artefacts
14
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Code generation steps
Instantiation step Models are stamped out (leaf
level) Models are merged (non-leaf
level) Transformation step
Code fragments are generated (leaf level)
Weaving specifications are generated (non-leaf level)
Composition step Code fragments are weaved as
per the weaving specifications
Model2Java
Functionality Persistence
Object modelAttribute handling
OR map Audit
15
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
In our experience
Building-block based restructuring of code generators led to Product-line of code generators Refined organization of development team as platform-experts,
architecture-experts etc. Smaller development team Reuse across product-lines
Thus Enabling definition of a software factory Removing the tools team as a bottleneck as the factory can be
instantiated elsewhere too
16
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Addressing high learning curve
Complete implementation
Business logic Solution architecture
Snippet1 Snippet2 Snippetk
Java Tag1 Tag2 Tag3
Generate solution architecture specific code from its declarative specification encapsulated in tags using a code-centric development approach
17
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Metadata-driven aspect-oriented development
Business logic with metadata Code fragments
Class model
Tag processor
Tag definitions
Weaver
Architect
Developer
The toolset is realized as a set of Eclipse plug-ins
18
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
In our experience
Easy adoption by small to medium sized projects
No / low learning curveAgile loosely coupled development
processQuick turn-around time for a changeQuick development of purpose-
specific toolsAdherence to industry-standard
technologiesLeads to a repository of reusable
software artefactsGenerated application can be
effectively maintained simply with JDK
However,
A small project grows into a large project
A small offering acquires product-line nature over time
Large-sized projects are better managed with higher-level abstractions
Therefore,
A hybrid approach capable of supporting code-centric, model-centric and easy switching between the two seems called for.
19
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Merged approach
Business logic with metadata Code fragments
Annotated class models
Building block1
(for Tag1)
Weaver
MDD modelsModel to modeltransformation
Building block2
(for Tag2)Skeleton
building block
Code fragments Class definition
Metadata-driven aspect-oriented approach Model-driven development approach
20
Text in blue and black can be changedPositions in Blue text cannot be alteredText in black can be altered in position and sizes if need beText in yellow ochre is meant for legal matters and updates
Summary
MDA delivers increased productivity, better code quality, platform independence and easier change management
Excellent for large projects and product-lines Metadata-driven aspect-oriented approach seems to suit
small and medium-sized projects better Need to evolve suitable development methods that allow
MDA to be adopted in a more flexible and incremental manner than all-or-nothing top-down manner
Proposed an approach to address this pertinent need