180 likes | 196 Views
Practical use of Generative Techniques in Software Development Projects: an Approach that Survives in Harsh Environments. Motivation. Realistic assumptions about the average skill levels in real project teams Leveraging existing skills to achieve: Unambiguous architecture representations
E N D
Practical use of Generative Techniques in Software Development Projects: an Approach that Survives in Harsh Environments
Motivation • Realistic assumptions about the average skill levels in real project teams • Leveraging existing skills to achieve: • Unambiguous architecture representations • Reusable, implementation language independent design models • Improved software quality • Increased software development productivity • Shorter release cycles
Typical use of UML Cluttered Design Model … peppered with implementation details.
We don’t want the clutter! Observations: • The model is on the same level of abstraction as source code • The model is tedious to maintain • The sheer number of model elements obscures the architecture • At best - the model is an artistic illustration of source code • At worst - the model is outdated and not traceable to source code
We rather want ... To Raise the level of abstraction of design models with the following goals: • understandable, meaningful UML diagrams • a reduction in the number of model elements that an application developer has to worry about • the design model focuses on the application domain, the architecture is described in a separate model • the ability to automate the generation of structural code, and to hide the implementation from application developers
Uncluttered Design Model … free of implementation details.
Separation of concerns in UML models • What? - Raising the level of abstraction of design models. • How? - The basic idea is straight forward: use the UML to model each allowable construct that can appear in the UML design model in an architecture model, and then use the UML to model all the corresponding implementation constructs in an implementation model. • Why? - The achievable difference in the level of abstraction between UML model and implementation code directly corresponds to a gain in productivity if code generation techniques are used to map from UML model to target language(s).
Architecture Design Model Model Architecture Model (UML) (UML) - Design Model mapping Architecture Model Design Model - - Implementation Model Implementation mapping mapping Implementation Implementation (Java, XML, SQL) Model Implementation Model (UML) - Implementation mapping Types of Models
The Architecture Model The Architecture Model is a model is on the same level of abstraction as the Design Model. It describes the usage of design patterns and specifies design constraints.
The Design Model The Design Model is a model on a high level of abstraction that hides all implementation language details. Most UML tools do not provide the features needed to generate code from such a model.
The Implementation By Implementation we mean all source code artefacts. Some implementation artefacts can be fully generated from the abstract design model, others need to be partially handcrafted.
The Implementation Model The Implementation Model is a model on the same level of abstraction as the implementation. In projects that make extensive use of reverse engineering features of UML tools, the implementation model is often called “design model”.
Template Languages A good template language needs to provide: • full access to the [UML] model that stores abstract specifications • conditional constructs • iteration constructs • support for recursion • useful granularity of templates • readable template code • readable generated code
Template-Based Generators A good template-based generator should provide: • pre- and post-template execution user exists at generation time • high quality template debugging capabilities • a well-thought out template execution environment that can be integrated into a build process • meaningful error messages at generation time • an industry-strength approach to non-destructive generation
[UML] Modelling Tools A good [UML] modelling tool should provide: • a 100% reliable impact analysis • a built-in industry strength support for object-relational mappings that are defined via customisable set of mapping rules • support for user-definable architectural constraints and validation checks • version control at the model element level • well-thought out features to support team development • meta-modelling capabilities beyond UML profiles
Links Many - but not all ;-) of the tool features discussed are [partially] built into at least one of the following two products: LANSA/RUOM from LANSA Inc., see http://www.lansa.com/products/documentation.htm GenIt Architect from Codagen Technologies Corp., see http://www.codagen.com Other Products? Please indicate!
Conjectures [UML] model-driven, code-template-based generation is the only practical approach to introduce “traditional” software development teams to generative techniques. The countless trivial generation utilities that are developed and used on an ad-hoc basis give generative techniques a bad reputation. Only techniques & tools that integrate well with widely used IDEs and UML tools have a chance of mainstream acceptance.