agile software development with pragmatic mda€¦ · cobol, ims, etc. request response client:pc...

22
CompuwareCorporation Agile Software Development with Pragmatic MDA Jon Kern Jon Kern Agile MDA Evangelist [email protected] http://blogs.compuware.com/cs/blogs/jkern/ http://javacentral.compuware.com/members/straight-talk/ V1.1

Upload: others

Post on 09-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

CompuwareCorporation

Agile Software Development with Pragmatic MDA

Jon KernJon KernAgile MDA Evangelist

[email protected]://blogs.compuware.com/cs/blogs/jkern/

http://javacentral.compuware.com/members/straight-talk/

V1.1

Page 2: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 2

What are Our S/W Dev Challenges?

� Ability to meet the demands of the business– Shrinking business cycle

– Need for business agility

� Ability to meet the demands of development– Crazy schedules

– Need for application agility

– Too many “death marches”

� Producing quality software

� Striving for effective process

� Gaining productivity

� Getting a return on the IT investment

Page 3: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 3

Easy Solution to Our Quest!

� Model app & svcs completely in UML

� Push some buttons in our MDA tool

� Presto-magic, your business app is done!

Page 4: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 4

How Is Software Built?

� People,

� Process, and

� Tools!

� In about that order…– Good people will trump poor/non-existent process

– Good people will either create tools or use tools in an effective manner

– Process and Tools cannot make up for inadequacies of the development staff

– Gray matter is a pre-requisite

Page 5: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 5

3 Keys to S/W Development Success

� Separation of Concerns– Model the Business

– Keep technology separate

� Construction Consistency– Application Architecture

– Consistent application of:

� Technical architecture

� Construction guidelines

� Standards & conventions

� Agile Development Environment– Frequent, working, tangible results

Page 6: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 6

Separation of Concerns

� Architectural best practice

� Keep business logic in one place

� Architect for the future

� Keep Technology at arm’s length

� Isolate change

User Interface

Business/Problem DomainBusiness/Problem Domain

PersistencePersistence

DBDB DB

Legacy/Ext. SystemsLegacy/Ext. Systems

#1

Page 7: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 7

“It’s The Business!”

� Protect the company’s primary asset:Business Intellectual Property

� That is…– The UI is not the business

– J2EE/.NET is not the business

– Messaging is not the business

– WebServices is not the business

– DBMS is not the business

� Your Business is the Business!– Architect to Protect!

Page 8: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 8

No Separation of Concerns?

� Older applications are “brittle” – hard to change without causing breakage

� It takes 80% of the effort just to “keep the lights on”

� It is hard to add new features

� No one can really point to your business model

� It is very hard to train new developers to work on the application

UI

DomainDomain

DBMSDBMS

DB

LegacyLegacy

Page 9: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 9

Eliminate Technical Debt

� Software development makes it easy to build up a slow, insidious, internal “poison”

� How?– Small infractions of writing spaghetti code

– Seem harmless at the time

– They accumulate over time (like rust, or barnacles on a boat)

� It can get so bad that…– You are no longer competitive

– You can’t even service the debt

– You can go bankrupt

TechnicalDebt

Page 10: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 10

Construction Craftsmanship

Point of Sale System Product System

Cashier

Inventory System

Scan Productor "Identify" Product

Total Items

Take in Payment

Credit

Check

Debit

Price Lookup

Determine Tax

Update Product Count

<<include>>

<<include>>

Right-click, choose "Hyperlink To" menu, select the hyperlink and watch what happens.

<<moment-interval>>CashSaleThe entity

<<ui-component>>POSFrame

The std cashier UICashier

SaleDM(The database)

makes a sale

lnkSaleDM

Please refer to Doug Rosenberg's book on "Use Case Driven Object Modeling with UML"for more information on Robustness Diagrams.

Application Arch.

Features

Features

Technical Arch.

ActionServlet...ControllerServlet...ControllerServlet...ControllerServlet...ControllerServlet

EJBContainer:JBoss

EntityEJB:BudgetCenter(optional)

SessionEJB

LegacyCobol,IMS, etc.

Request

Response

Client:PC

Browser(IE)

DBMS:Solid

WebContainer:Tomcat

ControllerServletControllerServletControllerServletControllerServlet:ControllerServle:ControllerServle:ControllerServle:ControllerServletttt

View(JSP)View(JSP)View(JSP)View(JSP)

BusinessInterface

BusinessDelegateIf both containersare on one server(e.g., WebLogic),better performancecan be achieved.

SOA, Distr

.,

Web AppSOA, D

istr.,

Web App

Working App!

Construction GuidelinesPatterns,

Conventions

Patterns,

Conventions

ConsistentConsistentVariableVariable

#2

Page 11: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 11

Agile Development

� A state of mind!

� Shrink waterfall cycle into small iterations

� Ensure working application andfeature progress

� Make it simpler to embrace change

� Improve communication between business and IT

� Deliver business valuefaster and continuously

� Make change an asset!

#3

Analysis

Test Design

Code Deploy/Run

Page 12: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 12

Agile Manifesto

� Individuals and Interactions

� Working software

� Customer collaboration

� Responding to change

� Processes and Tools

� Comprehensive documentation

� Contract negotiation

� Following a plan

While we value the things on the right,

we value those on the left more

http://agilemanifesto.org

over…

over…

over…

over…

Page 13: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 13

Running Software

� Necessary – but not sufficient!

� Don’t be fooled by running software alone

� It must be built on a good architectural foundation

� It must not incur technical debt

� It must be treated as an important asset

� Even poorly architected software can give the appearance of being “good” – at the user interface level.

Page 14: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 14

Analysis

Test Design

Code Deploy/Run

Agile

Agile

Development

#3

Three Fundamentals

Separation of Concerns

#1

#2

Point of Sale System Product System

Cashier

Inventory System

Scan Productor "Identify" Product

Total Items

Take in Payment

Credit

Check

Debit

Price Lookup

Determine Tax

Update Product Count

<<include>>

<<include>>

Right-click, choose "Hyperlink To" menu, select the hyperlink and watch what happens.

<<moment-interval>>CashSaleThe entity

<<ui-component>>POSFrame

The std cashier UICashier

SaleDM(The database)

makes a sale

lnkSaleDM

Please refer to Doug Rosenberg's book on "Use Case Driven Object Modeling with UML"for more information on Robustness Diagrams.

Application Arch. Technical Arch.ActionServlet

...ControllerServlet...ControllerServlet...ControllerServlet...ControllerServlet

EJBContainer:JBoss

EntityEJB:BudgetCenter(optional)

SessionEJB

LegacyCobol,IMS, etc.

Request

Response

Client:PC

Browser(IE)

DBMS:Solid

WebContainer:Tomcat

ControllerServletControllerServletControllerServletControllerServlet:ControllerServle:ControllerServle:ControllerServle:ControllerServletttt

View(JSP)View(JSP)View(JSP)View(JSP)

BusinessInterface

BusinessDelegateIf both containersare on one server(e.g., WebLogic),better performancecan be achieved.

Working App!

Dual Architecture

Construction Guidelines

User Interface

Business/Problem DomainBusiness/Problem Domain

PersistencePersistence

DBDB DB

Legacy/Ext. SystemsLegacy/Ext. Systems

OptimalJOptimalJ

MDAMDA

Page 15: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 15

What Needs to be Agile?

� Move at the Speed of Business– Business model changes

– New requirements

� Allow for changes in technology!– Framework refactoring

– Vendor changes

– Platform changes

– Mergers/Acquisitions

� How does Pragmatic MDA help?

Page 16: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 16

The Simplicity of Pragmatic MDA

� Meta Data

– Models are used for business

– Models are used for technical artifacts (e.g., DBMS, build.xml)

Transformation

Rules

Model-to-CodeTransformationsModel-to-Code

Transformations

Model-to-ModelTransformationsModel-to-ModelTransformations

DomainModel

CodeModel

ApplicationModel

PI

M

PSM

Code

OptimalJ OMG

� Transformations

– Templates/Java used to transform the models to your desired architecture

– First pass is an Application Model (platform-specific)

– Second pass is the Code Model (i.e., working app)

� Intermediate Model Useful

– Permits using technology:

– J2EE Security

– EJB Finders

– DBMS Logical Model

– Etc.

Page 17: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 17

Meta Data Models

� Models about your models (“M2”)

� Model of UML classes, etc.– Yields the ability to model classes, Tables, UIs

� Ability to model custom metadata– Your own unique artifact types

Data M0

Models M1

Metamodels M2

Metamodel languageM3

Page 18: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 18

Model-to-Code

Transformations

� Transform a UML model to a Database model– Model to Model

� Transform Database model to SQL– Model to Code

ClassesClassesClassesClasses TablesTablesTablesTables SQL CodeSQL CodeSQL CodeSQL Code

Model-to-Model

Page 19: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 19

Multi-Tier Models

� Platform Independent Model (PIM)– Business, business rules, process

� Platform Specific Model (PSM)– Technology features

– Architecture goes here; e.g.:

� JSP

� Struts

� EJB/CMP

� RDBMS

– Integration (DBMS, WSs, Cobol,MQ, etc.)

� Code Model (code ;=)

Page 20: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 20

How it Works in PracticeR

elat

ive

Par

tici

pat

ion

Development Cycle Duration / Time

Model the Business (Appl. Architecture)

Create Technical Architecture(Or re-use existing)

Work out Appl. Details (Coding, UI, Integration)

Continuous Integration and Testing

Design the technical

architecture

Each Iteration/ReleaseWork out ‘N#’ of features to be delivered.

Work out breadth of application’s features

Conduct verification of high-risk issues

(as often as needed)

Page 21: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 21

Recap: MDA/OJ Provides…

� Dramatic Potential for improving application Development and lowering TCO

– Separation of Concerns +

– Appl/Technical Architecture +

– Agile Development

� Open, flexible, agile, iterative environment that delivers pure source code

� Vendor neutral approach to DBMSs & App Servers, etc.

– Domain Model

– Technical Transformations

– End-to-end Working Application

Page 22: Agile Software Development with Pragmatic MDA€¦ · Cobol, IMS, etc. Request Response Client:PC Browser (IE) DBMS:Solid WebContainer:Tomcat ControllerServlet:ControllerServle:ControllerServle

Page 22

People and software for business applicationssm

Thank You!

Feel Free to contact me: [email protected]