D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e.

Slides:



Advertisements
Similar presentations
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Advertisements

Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Professor John Hosking, Dean of Engineering and Computer Science Models, Modelling, MBSE.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development.
Programming Distributed Systems Lab Institute of Computer Science University of Augsburg Universitätsstraße 14, D Augsburg Tel.: (+49) 821/ ,
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Introduction To System Analysis and Design
1/18 CS 693/793 Lecture 09 Special Topics in Domain Specific Languages CS 693/793-1C Spring 2004 Mo, We, Fr 10:10 – 11:00 CH 430.
Review Amit Shabtay. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Where to learn more? What is for the.
Knowledge Acquisitioning. Definition The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
1/31 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2005] January 22, 2009.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
Course Instructor: Aisha Azeem
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
1 Ivano Malavolta, University of L’aquila, Computer Science Department Ivano Malavolta DUALLy: an Eclipse platform for architectural languages interoperability.
Chapter 1 The Systems Development Environment
Spectra Software Defined Radio Products Applying Model Driven Design, Generative Programming, and Agile Software Techniques to the SDR Domain OOPSLA '05.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
What is Enterprise Architecture?
A Generative and Model Driven Framework for Automated Software Product Generation Wei Zhao Advisor: Dr. Barrett Bryant Computer and Information Sciences.
Copyright 2002 Prentice-Hall, Inc. Chapter 1 The Systems Development Environment 1.1 Modern Systems Analysis and Design.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
CSE 303 – Software Design and Architecture
ArchiMate Authors : eSchoolink Group - ITNLU. Contents 1. What’s ArchiMate ? 2. Why ArchiMate ? 3. Main Benefits of ArchiMate 4. Layers of ArchiMate 5.
University of Utah SoCCS Lecture 61 Architecture – An Introduction CS Lecture 6 Nathan Dykman.
I n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r. MDSD Best Practices -
Introduction to MDA (Model Driven Architecture) CYT.
I n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r MDSD Intro & Overview.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
I n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r. Using DSLs in Practice.
Alignment of ATL and QVT © 2006 ATLAS Nantes Alignment of ATL and QVT Ivan Kurtev ATLAS group, INRIA & University of Nantes, France
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
Introduction To System Analysis and Design
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Basic Concepts Software Architecture. What is Software Architecture? Definition: – A software architecture is the set of principal design decisions about.
University of Southern California Center for Systems and Software Engineering Model-Based Software Engineering Supannika Koolmanojwong Spring 2013.
Generative Programming. Automated Assembly Lines.
L8 - March 28, 2006copyright Thomas Pole , all rights reserved 1 Lecture 8: Software Asset Management and Text Ch. 5: Software Factories, (Review)
1 5 Nov 2002 Risto Pohjonen, Juha-Pekka Tolvanen MetaCase Consulting AUTOMATED PRODUCTION OF FAMILY MEMBERS: LESSONS LEARNED.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Introducing Allors Applications, Tools & Platform.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Introduction to Software Architecture.
Software Design Process
OOPSLA workshop on Domain-Specific Visual Languages 1 Juha-Pekka Tolvanen, Steven Kelly, Jeff Gray, Kalle Lyytinen.
LanguageLab A Meta-modelling Environment Terje Gjøsæter and Andreas Prinz, University of Agder, Norway SDL Forum 2015, Berlin, Germany.
Science and Technology Norwegian University of NTNU Rolv Bræk, January Introduction to Systems Engineering by Rolv Bræk NTNU.
Developing Product Line Components Jan Bosch Professor of Software Engineering University of Groningen, Netherlands
Software Reuse Course: # The Johns-Hopkins University Montgomery County Campus Fall 2000 Session 4 Lecture # 3 - September 28, 2004.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Aspect Oriented Security Tim Hollebeek, Ph.D.
Yu, et al.’s “A Model-Driven Development Framework for Enterprise Web Services” In proceedings of the 10 th IEEE Intl Enterprise Distributed Object Computing.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
MDD-Kurs / MDA Cortex Brainware Consulting & Training GmbH Copyright © 2007 Cortex Brainware GmbH Bild 1Ver.: 1.0 How does intelligent functionality implemented.
Chapter 1 The Systems Development Environment
Chapter 1 The Systems Development Environment
Chapter 20 Object-Oriented Analysis and Design
Model-Driven Software Development
Chapter 1 The Systems Development Environment
From Use Cases to Implementation
Presentation transcript:

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Domain-DrivenDevelopment An introduction Markus Völter

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Markus Völter Independent Consultant Based out of Heidenheim, Germany Focus on Software Architecture Middleware Model-Driven Software Development About me

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Domain Driven Development Domain Driven Development is about making software development more domain-related as opposed to computing related. It is also about making software development in a certain domain more efficient.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Reasons for DDD Software Development is too complex and too expensive (now, this is a really new finding ) … … because: There is too little reuse Technology changes faster than developers can learn Knowledge and practices are hardly captured explicitly and made available for reuse Domain experts cannot understand all the technology stuff involved in software development DDD aims at attacking some of these problems. We shall see how on the following slides.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r What is a „Domain“ A definition could be: A domain is a bounded area of knowledge or interest. Examples (from the world of Software) include: eBanking Embedded Software Web-Based eBusiness Applications Control Software for 4-Cylinder Diesel Engines Astronomical Image Processing Software Domains can have varios „scopes“ as well as various „flavours“ – see next slides.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Hierarchical Structuring of Domains Since Domains can be of any size or granularity, it is useful to structure domains hierarchically. Automotive Example: eBanking Example:

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r „Kinds“ of Domains In the context of software development it is also useful to distinguish (at least) two kinds of domains: Technical Domains adress key technical issues related to software development such as Distribution, Failover and Load-Balancin Persistence and Transactions GUI Design Concurreny and Realtime Functional Domains represent the business/professional issues; examples include Banking Human resource management Insurance Engine Controllers Astronomical Telescope Control

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Domains in a Software System As a consequence of the classifications on the previous slides, a software system typically consists of several domains:

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Reuse in the context of these domains Key to more efficient software development is to aim at systematic reuse in each of these domains. (see also Software System Families and Product Line Engineering) Traditionally, this reuse can contain Knowledge Best Practices Patterns Artifacts Libraries Platforms Components Aspects Middleware

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Reuse in the context of these domains – Building Systems In order to allow for reuse of software artifacts, these have to be self-contained have minimal overlap to other artifacts ideally represent only one concerns (in the sense of AOP) adaptable to a reasonable degree easy to use, automating repetitive tasks In short: they need to have a certain quality – they are software development assets. Building a system then involves composing suitable artifacts from the different domains to a coherent application. Often, certain (domain-specific) tools will be required to achieve this, such as DSL editors & generators or aspect weavers

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r Reuse of the infrastructure So: you don‘t just reuse finished software building blocks; rather you also reuse the infrastructure to build the software. This specifically includes modelling tools, build environments, generators, weavers, etc. DDD is thus about building an infrastructure for efficient software development in a certain domain. Thus, this requires to some extend building your own tools – you might have to deviate from standards (e.g. not use UML for modelling). For reasons of economy, this is especially useful in the context of Product Line Engineering and Software System Families.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – Focus on Good Architecture In order to reuse any software artifact, it must have a clear underlying structure have a well-defined interfaces and context dependencies have a clearly defined responsibility be maintainble and extendable and satisfy performance considerations In one word, the architecture of the artifacts must be solid. It is a good idea to build it upon well-proven architectural patterns. This is also true for the applications built from these artifacts.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – Expressive Code As advertised by the Agile folks, code should be readable like prose text (for those who understand the language). This requires that the core concepts, constraints and processes of a domain are suitable represented by the code. As a consequence the program can to some extend directly represent the domain knowledge, as opposed to being a cluttered piece of „just implementation“. This requires a good code structure, and to some extend wrapping the underlying base technology.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – Separation of Concerns & AOP Since not all the domains in a system are „components“ and thus directly modularized, separation of concerns and concerns weaving is required. This requirement can be adressed by several means, among them the architecture of a system (interceptor pattern, e.g.) or on language level using Aspect Oriented Programming (AOP). Or using model-driven code generation

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – How does AOP work I Many concerns in software systems cannot be localized (or modularized) with traditional techniques (and cannot be handled easily on architectural level) The following example shows session handling code in the apache web server (in red). Not being localized creates a whealth of problems: It cannot be plugged in or out easily It‘s hard to change the strategy by replacing the code It is not readily available for reuse

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – How does AOP work II AOP aims at localizing the cross-cutting concern in a separate entity, the aspect. This solves the problems mentioned on the previous slide. However, you need additional stuff to make that work: You need additional programming language constructs to describe aspects and their „attachments“ to regular code You need a tool that does the weaving for you (statically, or at runtime).

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – How does AOP work III Developer develops program code Developer develops (or reuses) aspect code Developers specifies the weaving rules (defines pointcuts) Aspect Weaver weaves program and aspects together and produces the „aspectized“ program

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – Domain Specific Languages While staying on the expressive level of programming languages, the ability to become more domain- specific is limited. Key to make software development more domain-specific is to use Domain-Specific (Programming) Languages (or DSLs) to express domain concepts and functionality. These DSL-Programs are then translated to executable code using transformation or code-generation tools (this process is not unlike what compilers do – just based on your own, domain-specific language). This approach is called Model-Driven Software Development, or MDSD.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – How does MDSD work A domain metamodel describes the core concepts of a domain A DSL adds sematics and a concrete syntax and allows for building precise and complete models. The models are transformed into executable applications that run or a certain platform by a transformation or code generation tool Model Domain Specific Language Metamodel textual graphical Domain Ontology bounded area of knowlege/interest semantics precise/ executable multiple partial viewpoint subdomains composable Metametamodel platform transform compile interpret multi-step single-step no roundtrip knowledge several design expertise Application

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – Simple DSL Example The following is an example model for a J2ME system, desribed in a simple, graphical DSL On the right side, is the metamodel for the DSL.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – MDSD Benefits I Models are free of implementation artifacts – they directly represent domain knowledge and are thus reusable. Implementations for various platforms can be generated in principle – the technology change problem is adressed to some extend. Technology freaks and domain experts can take care of „their business“ (transformations and models, respectively) and need to care of each other‘s problems only in a limited way. Domain experts can play a direct role in development since they can more easily understand models expressed with a DSL as opposed to implementation code.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – MDSD Benefits II Development becomes more efficient since repetitive implementation code can be generated automatically. Architectural contraints/rules/patterns can more easily be enforced, since the they are embedded in the templates rather than just being documented (and ignored). This is especially important in really large teams, often in the context of Product-Line Engineering and Software System Families. Transformer/Generator can address cross-cutting concerns (just like an aspect weaver)

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – MDSD Predjudices MDSD does not require UML – any kind of modelling language is ok, graphical or textual Precise and complete models… … are not the the same as „visualized code“ – the abstraction level is higher … are not the same as analysis models – analysis models are not computational MDSD does not require – not even recommend – a waterfall. Development of the generative infrastructure is iterative and incremental. You do not need big and expensive tools – a lot of small and useful open source tools are available. You don‘t need to generate 100% of the code – it is ok, to also code some aspects in a 3GL.

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – AOP vs. MDSD (not necessarily MDA) Both can be used to separate concerns. Both can be used to factor out (and later, re-integrate) repetitive, often technical aspects Technically, both work with queries on models/code and transformations on the selected model/code elements. AOP can be applied to finished systems after the fact. AOP works on the level of the (3GL, OO) programming language MDSD can introduce domain-specific notations that appeal to non-developers, too. MDSD can also produce/integrate non-programming-language artifacts such as build files The AO idea can be applied on modelling/DSL level, too. The MDSD Generator can handle some of the cross-cutting concerns (in the templates, or by weaving the models representing the various aspects. MDSD can use aspects as an implementation technology. MDSD can generate an „AO Architecture“ (proxy, interceptor…)

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r DDD Techniques – How it all fits together Model-Driven Software Devlopment Expressive Code Aspect Oriented Programming Architecture/ Platform Expressive Code

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r The End.  Thanks  Questions?  Comments?  Criticism?

D O M A I N – D R I V E N D E V E L O P M E N T: Introduction i n g e n i e u r b ü r o f ü r s o f t w a r e t e c h n o l o g i e w w w. v o e l t e r. d e © M a rk u s V ö l t e r The other talks: Arno (11:00) Some concepts on using AOP to keep the code and the domain model in sync Rickard (13:00) Experiences on using AOP for implementing a commercial product Markus (14:15) Experiences (Best Practices) of Model-Driven Software Development from condensed several projects Steve (15:45) Microsoft’s Approach to MDSD called Software Factories Panel: Your questions…