290 likes | 441 Views
Model Based Software Development - a pragmatic view. Mikkel Lauritsen Intentia R&D A/S mikkel.lauritsen@intentia.dk. Agenda. Introduction Modeling Model based software development ... in an ideal world: MDA ... in the real world: DSL’s Demo Summary and questions. Introduction.
E N D
Model Based Software Development- a pragmatic view • Mikkel Lauritsen • Intentia R&D A/S • mikkel.lauritsen@intentia.dk
Agenda • Introduction • Modeling • Model based software development • ... in an ideal world: MDA • ... in the real world: DSL’s • Demo • Summary and questions
Introduction The next 2 x 45 minutes will be • Pragmatic • Useful in ”the real world” • Focused on technology
Introduction Hopefully you will get an idea about • What is model driven software development? • Why use it? Other stuff includes • a bunch of acronyms
Introduction Who am I? • 33 years old, MSc in computer science • Works as a software architect at Intentia R&D in Ballerup • Does model based J2EE e-Commerce applications for a living
Agenda • Introduction • Modeling • Model based software development • ... in an ideal world: MDA • ... in the real world: DSL’s • Demo • Summary and questions
Modeling As defined by OMG: Designing before coding • A model is an abstraction – it gives a high-level description of objects • Models are often graphical • You often have specialized tooling for modeling
Modeling Level 0 Information (data) Product(”DVD Player”, 299.95) Level 1 Model (metadata) Record(”Product”, (Field(”name”, String), Field(”price”, Money)) Level 2 Metamodel (meta-metadata) Class(”Record”, (Attr(”name”, String), Attr(”fields”, List<”Field”>)) Class(”Field”, […]) Level 3 Meta-metamodel Hardwired
Agenda • Introduction • Modeling • Model based software development • ... in an ideal world: MDA • ... in the real world: DSL’s • Demo • Summary and questions
Software development What is software development? • Specification • Design • Coding • Testing • etc. And processes to connect it all
Coding • ´The challenge: it’s too difficult Time spent Total time Time to write code Program size
Model based software development • The natural extension of programming languages • High-level primitives • The model becomes the code Generator (compiler) Model (program) Artifacts
Advantages of model based development • Design = code • Reduced time consumption – lower cost. • Early validation – perhaps more in theory than in practice • Agility • Simplicity - avoid (some of) the complexity that always creeps into large software projects • Platform independence
Modeling vs. component libraries Compared to component libraries, modeling and code generation gives you • Simplicity • Consistency checking • Portability • No need for AOP and other dirty tricks
Agenda • Introduction • Modeling • Model based software development • ... in an ideal world: MDA • ... in the real world: DSL’s • Demo • Summary and questions
Modeling: Model Driven Architecture • MDA is defined by the Object Management Group, OMG • http://www.omg.org • Much theory, little practice
Modeling: MDA Not targeted at any specific kind of applications The core concern: platform independency • Platform Independent Model describes business logic • Platform Specific Model describes mapping to underlying platform From the PIM programs are generated using one or more PSM’s
Modeling: Unified Modeling Language • Mix of multiple languages for separate domains • Not really useful
Modeling: (XMI and) XML XML is a way of expressing metadata (structure) in textual data <book> <title>Effective XML</title> <author>Elliotte Rusty Harold</author> <price>31.49</price> </book> XML is really great because of • ubiquitous tooling • human readability
Agenda • Introduction • Modeling • Model based software development • ... in an ideal world: MDA • ... in the real world: DSL’s • Demo • Summary and questions
Modeling: Domain Specific Languages More specific metamodel and code generation than in MDA • DSL’s have primitives that somehow match a domain • … defined technically, functionality-wise or in other ways Examples: see http://compose.labri.fr/documentation/dsl/
Advantages of DSL’s On top of the advantages of more generic modeling like UML • Better coverage • Consistency checking - at a high level All in all: SIMPLICITY
Advantages of DSL’s, continued Handling of nonfunctional requirements like • Performance • Concurrency support • Security DSL’s make it harder to shoot yourself in the foot
Agenda • Introduction • Modeling • Model based software development • ... in an ideal world: MDA • ... in the real world: DSL’s • Demo • Summary and questions
Agenda • Introduction • Modeling • Model based software development • ... in an ideal world: MDA • ... in the real world: DSL’s • Demo • Summary and questions
Summary and questions • Model based software development: generate code from model • Increases simplicity, lowers price • Allows you to focus on business value instead of technical details Questions?