1 Timothy D. Korson [email protected] Model Driven Development: A New Symbiotic Relationship...

36
1 Timothy D. Korson [email protected] Model Driven Development: A New Symbiotic Relationship Between Developers and Testers

Transcript of 1 Timothy D. Korson [email protected] Model Driven Development: A New Symbiotic Relationship...

Page 1: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

1Timothy D. [email protected]

Model Driven Development:A New Symbiotic Relationship Between Developers and Testers

Page 2: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

2 of 35

Copyright © 2006 Korson-Consulting

MDD Premise

Generate systems from models

Page 3: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

3 of 35

Copyright © 2006 Korson-Consulting

Blueprints to Buildings

It is like having a team of Robots that could automatically construct a building from a detailed set of blueprints

Page 4: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

4 of 35

Copyright © 2006 Korson-Consulting

Blueprints to Buildings

VendorsOMG

Page 5: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

5 of 35

Copyright © 2006 Korson-Consulting

Poll #1

What background do you have with MDD?

Page 6: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

6 of 35

Copyright © 2006 Korson-Consulting

Natural Progression

00110111000011100 Assembler FORTRAN Ada Java Middleware Components … MDA

Page 7: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

7 of 35

Copyright © 2006 Korson-Consulting

State of Software Development Lots of advances, but

programmers still spend and inordinate amount of time on details that could be automated Distribution mechanisms GUI layout Database structure and access

mechanisms And there is still a huge

disconnect between requirements, architecture and code

Page 8: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

8 of 35

Copyright © 2006 Korson-Consulting

Corporate Architecture

multiple industry standards-CORBA, EJB/J2EE, .NET, XML/SOAP, These become “MDA compiler

options” instead of “Bet the Company” decisions

Page 9: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

9 of 35

Copyright © 2006 Korson-Consulting

MDA: OMG’s Current Brainchild

Scope makes MDA Unique

Page 10: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

10 of 35

Copyright © 2006 Korson-Consulting

Family of OMG Standards MDA is an umbrella over a

growing family of standards that now includes the UML V2.0, the Meta Object Facility (MOF), the Common Warehousing Model, and the Software Process Engineering Metamodel (SPEM), among others.

Model Driven Development is a more generic term that includes approaches that do not adhere to the MDA standards

Page 11: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

11 of 35

Copyright © 2006 Korson-Consulting

Current Problems in Software Development Portability/new technologies

Rapid pace of change Interoperability Maintenance and documentation

Lack of documentation Any documentation one does have

is out of date

Too much overhead

Page 12: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

12 of 35

Copyright © 2006 Korson-Consulting

MDA Process

Business Analysis Use Cases Computation

Independent ModelSystems Definition

Platform Independent Model

Design Transformation Platform

Specific ModelCode Transformation

codeDeployment

executables

TransformationTool

TransformationTool

Business Analysis

Systems Definition

Page 13: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

13 of 35

Copyright © 2006 Korson-Consulting

MDA Benefits Productivity

Automated transformation tools Portability

Multiple PSMs for a given PIM Interoperability

PSM bridges Maintenance and Documentation

Maintenance is done directly on the models so the models cannot get out of sync with the code.

The models are no longer overhead

Page 14: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

14 of 35

Copyright © 2006 Korson-Consulting

MDA Advantages

1. The business logic for PIMs can be developed, and validated, by business analysts with little or no technical background. Some MDA tools even let you “run” a PIM on a virtual machine to test it.

2. There is full traceability from PIM through PSM and the ultimate deployed software. This provides a great deal of quality assurance.

3. Subsequent changes in either the business model or the technology platform can be gracefully accommodated. Changes in the technology don’t require changes to the PIM. Changes to the PIM can be traced to determine their likely impact on the PSM and ultimate deployed implementation.

Page 15: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

15 of 35

Copyright © 2006 Korson-Consulting

Not Your Father’s UML

Most UML modeling tools generate code One UML class – one Java class

MDA tools are model-driven, pattern-based One UML class – many code

artifacts

MDA tools intelligently generate infrastructure from models

Page 16: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

16 of 35

Copyright © 2006 Korson-Consulting

From a Customer Class in UML A good MDA tool can generate (for

example): The appropriate Data definition language

to create, delete, and init the RDBMS table.

A Data Access Object or Enterprise JavaBeans data access layer

A SessionFacade to access the bean A ServiceLocator to find the bean A set of Data Transfer Objects to pass to

the web tier A Struts-based framework to perform

CRUD operations on a "Customer" All the security, logging, exception and

other hooks that one would expect to use

Page 17: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

17 of 35

Copyright © 2006 Korson-Consulting

Focus

Changes from Coding to Modeling Business analysts will not need IT

skills in order to stay involved in systems development from beginning to end

Geeks will focus on building the MDA transformation tools

Business applications will be build by analysts and architects skilled in modeling

Page 18: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

18 of 35

Copyright © 2006 Korson-Consulting

Agile MDA

Incremental techniques work well with MDA

Most XP practices such as “pair programming” extend naturally to MDA

The PIM replaces what “code” is to agile development teams

Page 19: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

19 of 35

Copyright © 2006 Korson-Consulting

Increased importance

Inspections CIM PIM

Page 20: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

20 of 35

Copyright © 2006 Korson-Consulting

System testing still needed With MDA software developers

can generate far more code than with traditional techniques

Testers are already faced with more work than they can handle

How will testers keep up with MDA developers???

Page 21: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

21 of 35

Copyright © 2006 Korson-Consulting

If You Can’t Beat Them, Join Them An automated test suite is a

software system So use MDA

UML testing profile(U2TP)

The models that developers use to generate the application are useful to the testersThis will have a

major impact on the skillsrequired of testers and thetest process itself.

Page 22: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

22 of 35

Copyright © 2006 Korson-Consulting

Generated Code Should be Bug Free Focus can be on testing business

logic rather than the middleware and other system code and interactions.

We assume the C compiler doesn’t introduce translation bugs into the assembly code Community at large

finds these errors

Page 23: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

23 of 35

Copyright © 2006 Korson-Consulting

MDA for Prototyping

RepeatModelGenerate prototype using MDAEvaluate prototype

Until stakeholders are happy with prototype

Build system using traditional techniques

Page 24: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

24

MDAHype versus Reality

Page 25: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

25 of 35

Copyright © 2006 Korson-Consulting

MDA Compliant

Vendors make MDA claims whenever their tool implements one of the many standards in the MDA family of standards

This is misleading An MDA environment should be

able to turn a PIM into a running system

Page 26: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

26 of 35

Copyright © 2006 Korson-Consulting

Current Tools

There are only a handful of vendors that produce full fledged MDA tools. If you see a long list anywhere – it just isn’t correct

Page 27: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

27 of 35

Copyright © 2006 Korson-Consulting

Current Tools Don’t Always Generate All the Code

Page 28: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

28 of 35

Copyright © 2006 Korson-Consulting

They Do Generate the Messy Error Prone CodeGenerated

Middleware Business objects Data Base stuff Objects and method stubs Default GUI

Typically Not Generated Customization to the GUI Method Bodies for the

Business algorithms

TransformationTool

TransformationTool

Page 29: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

29 of 35

Copyright © 2006 Korson-Consulting

Two step Process

TransformationTool

TransformationTool

Most of the development

Certain architectural configurationand GUI customization

Custom business logic

Page 30: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

30 of 35

Copyright © 2006 Korson-Consulting

Controlled Study

Page 31: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

31 of 35

Copyright © 2006 Korson-Consulting

Case Study Conclusions

35% gain in development productivity

Up to 70% gains in maintenance productivity

Page 32: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

32 of 35

Copyright © 2006 Korson-Consulting

Poll #2

Will you consider using full code generation from a modeling tool which includes method bodies, for your project?

Page 33: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

33 of 35

Copyright © 2006 Korson-Consulting

Crystal Ball MDA is not the only game in town.

Neither the problems that plague the software industry, nor the principles of good software engineering are secrets known only to the MDA elite.

All the tool vendors out there are searching to find solutions that will win in the marketplace.

At the same time that MDA environments are starting to mature, IDEs are becoming more and more powerful and multi-use components more widespread.

My personal opinion is that both the IDE style programming approach and the MDA style modeling approach will exist side by side during the next decade. MDA will not take over the application development

space, but it will play an important role there. Two of the biggest risks to the future of MDA are:

Will the development community be patient with MDA while the MDA tools mature, and

Will the OMG find the “right” way to specify business logic at the PIM level in a timely manner.

Page 34: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

34 of 35

Copyright © 2006 Korson-Consulting

Conclusions MDA is a natural step in raising the level of

abstraction at which we develop systems. MDA embodies the basic engineering concept

of separation of concerns. It is clear both intuitively and anecdotally that

MDA can lead to important gains in productivity, portability, and the ability to focus on business functionality as opposed to technology details.

Most importantly, MDA is not a proprietary vendor initiative, but is a technology enabled by a family of standards developed by the OMG consortia of computing users and vendors.

The implications to testers of a move to MDA style development are especially significant.

Page 35: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

35 of 35

Copyright © 2006 Korson-Consulting

Thank you for attending

Please feel free to contact me with any follow up questions or comments

Timothy [email protected]

Page 36: 1 Timothy D. Korson tim@korson-consulting.com Model Driven Development: A New Symbiotic Relationship Between Developers and Testers.

36 of 35

Copyright © 2006 Korson-Consulting