• Nu S-Au Găsit Rezultate

Model Driven Development

N/A
N/A
Protected

Academic year: 2022

Share "Model Driven Development "

Copied!
51
0
0

Text complet

(1)

Course 3 – 22 October 2012 Adrian Iftene [email protected]

(2)

Recapitulation

Swebok

SCM – Revision control

Software Engineering Tools

Model Driven Development

Model Driven Architecture

Agile MDD

Test Driven Development

Domain Specific Language

Eclipse Modeling Framework

(3)

Software Engineering Body of Knowledge

Book’s authors Alain Abran, James W. Moore, 2004

10 Knowledge Areas:

Software configuration management

Software engineering management

Software engineering process

Software engineering tools and methods

(4)

The management of changes to documents, programs, and other information stored as computer files

Version control systems: Microsoft Word,

OpenOffice.org, Drupal, Joomla, WordPress, MediaWiki

Vocabulary: trunk, branch, change, checkout, checkin, merge, conflict

(5)

Requirements

Software design

Software construction

Software testing

(6)
(7)
(8)

Editors, Compilers, Interpreters, Debuggers

(9)

QA Center Performance, QuickTest Professional (QTP), WebLoad Analyzer, Unified TestPro, IBM Rational Tester

(10)

Recapitulation

Swebok

SCM – Revision control

Software Engineering Tools

Model Driven Development

Model Driven Architecture

Agile MDD

Test Driven Development

Domain Specific Language

Eclipse Modeling Framework

(11)

Model Driven Development (MDD) is a paradigm for

writing and implementing computer programs quickly, effectively and at minimum cost

MDD is an approach to software development where extensive models are created before source code is written

A primary example of MDD is the Object Management Group (OMG)’s Model Driven Architecture (MDA)

standard

(12)

MDA is a software design approach for the development of software systems. It provides a set of guidelines for the

structuring of specifications, which are expressed as models

MDA is a kind of domain engineering, and supports model-driven engineering of software systems. It was

launched by the Object Management Group (OMG) in 2001

(13)

MDA approach defines system functionality using a platform-independent model (PIM) using an appropriate domain-specific language (DSL)

PIM is a model of a software system or business system, that is

independent of the specific technological platform used to implement it

DSL is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique

PSM - the code is generated by transforming the PIM model into a platform specific model (PSM)

(14)

OMG focuses Model-driven architecture on forward engineering

One of the main aims of the MDA is to separate

design from architecture (allows system developers to choose from the best and most fitting in both

domains)

The design addresses the functional (use case)

requirements while architecture provides the

infrastructure

(15)

Creation Tool: used to elicit initial models

Analysis Tool: used to check models for completeness, inconsistencies, or error and warning conditions

Transformation Tool: used to transform models into other models

Composition Tool: used to compose several source models

Test Tool: used to “test” models

Simulation Tool: used to simulate the execution of a system

Metadata Management Tool: intended to handle the general relations between different models

Reverse Engineering Tool: intended to transform particular legacy or information artifact portfolios into full-fledged models

(16)

CA Gen is a powerful model-driven environment that will enable your organization to speed delivery and maintenance (platforms:

z/OS (CICS and IMS), UNIX, Linux, Windows, .NET and J2EE)

(17)
(18)

AMDD is the agile version of Model Driven Development (MDD)

MDD: The difference with AMDD is that instead of creating extensive models before writing

source code you instead create agile models which are just barely good enough that drive your overall development efforts

AMDD is a critical strategy for scaling agile

software development beyond the small, co-

located team approach that we saw during the

first stage of agile adoption

(19)
(20)

Initial Requirements Modeling – identify high-level requirements and the scope of the release (what you think the system should do). We can use:

◦ a form of usage model (how users will work with the system),

◦ an initial domain model (identifies fundamental business entity types and the relationships between them)

◦ an initial user interface model (UI and usability issues)

Initial Architecture Modeling - identify an

architecture that has a good chance of working

(21)

Thinking Through What You’ll Do This Iteration

(22)

Recapitulation

Swebok

SCM – Revision control

Software Engineering Tools

Model Driven Development

Model Driven Architecture

Agile MDD

Test Driven Development

Domain Specific Language

Eclipse Modeling Framework

(23)

When you code, alternate these activities:

add a test, get it to fail, and write code to pass the test

remove duplication

This inner loop pumps the outer loops of Extreme Programming – Continuous Integration, Daily

Deployment, Frequent Releases, and Steering Software Projects

(24)

1. Add a test

2. Run all tests and see if the new one fails

3. Write some code 4. Run the automated

tests and see them succeed

5. Refactor code Repeat

(25)

Benefits:

◦ programmers that wrote more tests tended to be more productive

◦ It allows a programmer to focus on the task at hand as the first goal is to make the test pass

◦ total code implementation time is typically shorter

◦ the code is modularized, flexible, and extensible

Vulnerabilities

◦ is difficult to use in situations where full functional tests are required to determine success or failure

◦ The high number of passing unit tests may bring a false sense of security and productivity

(26)

Recapitulation

Swebok

SCM – Revision control

Software Engineering Tools

Model Driven Development

Model Driven Architecture

Agile MDD

Test Driven Development

Domain Specific Language

Eclipse Modeling Framework

(27)

DSL - is a programming language or specification

language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique

Creating a domain-specific language (with software to support it) can be worthwhile if the language allows a particular type of problems or solutions to them to be expressed more clearly than pre-existing languages would allow, and the type of problem in question

reappears sufficiently often

The opposite is:

a general-purpose programming language, such as C or Java,

or a general-purpose modeling language such as UML

27

(28)

Logo for children

Spreadsheet formulas and macros

(29)

SQL for relational database queries

LINQ - a series of language extensions

(30)

YACC grammars for creating parsers

Regular expressions for specifying lexers

◦ \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b

◦ <TAG\b[^>]*>(.*?)</TAG>

◦ ^(19|20)\d\d[- \.](0[1-9]|1[012])[- \.](0[1-9]|[12][0- 9]|3[01])$

The Generic Eclipse Modeling System for creating

diagramming languages

(31)

In design and implementation

Visual diagramming language, such as those created by the Generic Eclipse Modeling System

Programmatic abstractions, such as the Eclipse Modeling Framework

Programming tools

functional language XSLT, specifically designed for transforming one XML graph into another

Unix shell scripts - a domain-specific language for data organization

MediaWiki templates - support the creation of

page templates and inclusion by reference

(32)

Metacompilers - useful for generating parsers and code generators for domain specific languages

TexLanguage - a typesetting language developed by Donald Knuth

LaTex, a macro package for Tex which provides higher-level abstractions (though still for general-purpose document

formatting)

BibTex, a macro package for Tex which specializes in handling citations/bibliographies for scholarly works

(33)

Some of the advantages:

Domain experts can understand, validate, modify, and develop DSL programs

Self-documenting code

Enhance quality, productivity, reliability, maintainability, portability and reusability

Domain-specific languages allow validation at the domain level

Some of the disadvantages:

Cost of learning a new language vs. its limited applicability

Cost of designing, implementing, and maintaining a DSL

Finding, setting, and maintaining proper scope

Difficulty of balancing trade-offs between domain-specificity and general-purpose programming language constructs

Loss of processor efficiency

(34)

34

EMF started out as an implementation of the

Object Management Group’s (OMG) Meta Object Facility (MOF) specification

EMF is a Java open source framework and code- generation facility for building tools and other applications based on a structured model

EMF provides an efficient reflective API and

allows you to work with dynamic, non-generated,

models

(35)

EMF can generate Java source code that will allow you to create, query, update, serialize, deserialize, validate, and track changes to instances of your models

EMF supports generating code from XML

Schema, UML class diagrams (Rational Rose or

UML2), and annotated Java interfaces

(36)

Model generated looks like:

(37)

EMF Updates sites:

http://download.eclipse.org/modeling/emf/updates/releases/

Eclipse -> Help -> Install new software

(38)

Help -> About Eclipse -> Installation details -> Plug-ins

(39)

http://help.eclipse.org/ganymede/topic/org.eclipse.emf.doc/tut orials/clibmod/library.mdl (save the file to your computer)

(40)
(41)
(42)

(object Class "Book"

quid "40C81E700047"

class_attributes (list class_attribute_list (object ClassAttribute "title"

quid "40C81E770119"

type "String") (object ClassAttribute "pages"

quid "40C81E7E03A3"

type "int"

initv "100") (object ClassAttribute "category"

quid "40C81E890344"

type "BookCategory")))

(43)
(44)
(45)
(46)
(47)

Eclipse 3.7 (Indigo): http://www.eclipse.org/indigo/

Eclipse EMF Tutorial:

http://www.vogella.de/articles/EclipseEMF/article.html

(48)
(49)
(50)

Swebok Home: http://www.swebok.org/

Revision Control: http://en.wikipedia.org/wiki/Revision_Control

SCM: http://en.wikipedia.org/wiki/Software_configuration_management

Software testing tools: http://www.docstoc.com/docs/82854752/Software- Testing-Tools-for-Software-Test-Automation

MDA: http://en.wikipedia.org/wiki/Model-driven_architecture

CA Gen: http://www.ca.com/us/products/detail/ca-gen.aspx

AMDD: http://www.agilemodeling.com/essays/amdd.htm

TDD: http://c2.com/cgi/wiki?TestDrivenDevelopment, http://en.wikipedia.org/wiki/Test-driven_development

EMF: http://www.eclipse.org/modeling/emf/, http://www.devx.com/Java/Article/29093

Generating an EMF Model:

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.emf.doc/referen ces/overview/EMF.html

http://www.eclipse.org/modeling/emf/docs/2.x/tutorials/clibmod/clibmod_emf 2.0.html

Eclipse EMF Tutorial: http://www.vogella.de/articles/EclipseEMF/article.html

50

(51)

Swebok Book:

http://se.sjtu.edu.cn/sites/se/gb/CCSE/Swebok_

Ironman_June_23_%202004.pdf

Benefits of MDD:

http://www.ca.com/files/industryanalystreports/

the_benefits_of_model_driven_development.pdf

Referințe

DOCUMENTE SIMILARE

Keywords: Electric arc furnace, random differential equation, Ornstein-Uhlenbeck process, Monte Carlo method, polynomial chaos

deep understanding of the lived experience of people as it unfolds in a particular cultural context, and the representation of that understanding in ways that

The algorithm is based on a trigram language model and provides both word prediction and phrase completion. Word chaining guesses zero or more

Haskell is a general purpose, purely functional programming language exhibiting many of the recent innovations in functional (as well as other) programming language re-

Further, the global language hotspot list is intended to be used by both linguists and funding agencies as a ways of prioritizing particular areas and languages so that

Hull (1998) concludes that Makuva is rather an Austronesian language that is closely related to the Meher language spoken on the island of Kisar off the north coast of East Timor

If v in V is a word with a maxime frequency which occurs in the context c solved with the sense sj, then v is a feature for sense sj, according with the principle “one

– Players, Objectives, Procedures, Rules, Resources, Conflict, Boundaries, Outcome. •