Top Banner
Agile Modeling From Anti-Patterns to Best Practices 1 Agile Tour Vilnius, 6 October 2011
46

Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Jun 21, 2015

Download

Technology

Agile Lietuva
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Agile Modeling

From Anti-Patterns to Best Practices

1 Agile Tour Vilnius, 6 October 2011

Page 2: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

> A popular UML-based modeling tool developed in Lithuania

> Available since 1998

> Over 500.000 downloads in 90 countries

> Standard-compliant and highly customizable platform

> MagicDraw R&D teams uses a lot of Agile practices

More info: www.magicdraw.com

2

Awards

Best Team

Development

Tool

Best Java

Modeling

Tool

Jolt

Productivity

Winner

Best Java

Database Tool

Jolt

Productivity

Winner

About MagicDraw

Page 3: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Rokas Bartkevičius,

Solution Architect

@ No Magic Europe

3

About Speakers

Darius Šilingas,

Head of Solutions

Department

@ No Magic Europe

> 7 years modeling consultancy

> training and consultation sessions done in close to 100

organizations from 20 countries

Page 4: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Agenda

UML vs. Agile

Anti-Patterns vs. Best Practices

Wrap-up

4

Page 5: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

About UML

UML is widely acknowledged as de

facto standard for software modeling

UML does not specify a method, just

the modeling language elements

UML receives a lot of criticism for

being too complicated and difficult to

apply

A typical modeler needs ~20% of

UML applied with a well-defined

method

5

Page 6: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Agile Manifesto

We are uncovering better ways of developing software by doing

it and helping others do it. Through this work we have come

to value

Individuals and interactions over

processes and tools

Working software over comprehensive documentation

Customer collaboration over contract negotiation

Responding to change over following a plan

That is, while there is value in the items on the right, we value

the items on the left more.

6

Page 7: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

• It’s not about communication, it’s about the way

how you communicate

7

Modeling May Help

• Model could help

• Picture is worth

1000 words

Page 8: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Agile and UML: Friends or Foes?

Agile practitioners tend to not use modeling and UML

They focus on coding

Quite often, a big picture is lost

Our experience shows that code is not enough

Modeling is still a valuable tool in agile organizations for

capturing domain concepts and processes, system

requirements and high level designs

From our consulting experience, we conclude that a bad

name for UML results from common bad practices

8

Page 9: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Top 5 Anti-Patterns

1. Code abstraction level

2. Too complex diagrams

3. Misuse of UML concepts

4. No reuse of model elements

5. Mixed modeling styles

9

Page 10: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #1: Code Abstraction Level

10

Page 11: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Issues

Duplicating information available in code

Dependence on technical platform

Complex and difficult to read diagrams

11

Page 12: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Best Practice #1

Raise level of abstraction

12

Page 13: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #1: Code Abstraction Level

13

Page 14: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #1

14

Page 15: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Encapsulate Technical Platform Details in Transformation

CREATE TABLE Test (

title varchar (255) NOT NULL,

instructions varchar (255) NOT NULL,

id integer PRIMARY KEY,

fk_Class integer NOT NULL,

fk_Teacher integer NOT NULL,

FOREIGN KEY(fk_Class)

REFERENCES Class (id),

FOREIGN KEY(fk_Teacher)

REFERENCES Teacher (id));

CREATE TABLE Question (

description varchar (255) NOT NULL,

id integer PRIMARY KEY

...);

CREATE TABLE QuestionTest (

fk_Question integer,

fk_Test integer,

... ); Transformation Template (VTL)

15

Page 16: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #2: Too Complex Diagrams

16

Page 17: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

17

~450 Actions

~950 Control Flows

17

Page 18: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Issues

Difficult to read and understand

Hides incompleteness issues

Difficult to maintain

18

Everything should be made as simple as possible,

but not simpler. Albert Einstein

Page 19: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Best Practice #2

Use several levels of detail

19

www.implementingscrum.com

Page 20: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #2: Too Complex Diagrams

20

Page 21: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #2: Overview

21

Page 22: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #2: MagicTest

22

Page 23: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #2: MagicTest Q & A

23

Page 24: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

24

Refactoring #2: MagicUniversity

Page 25: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #3: Misuse of UML Concepts

25

Page 26: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Issues

Inconsistency in modeling conventions

Ambiguous understanding

Redundant stereotyping

26

Page 27: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Best Practice #3

Apply consistent modeling method

based on UML subset

27

Page 28: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #3: Misuse of UML Concepts

28

Page 29: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #3: Main Use Cases

29

Page 30: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #3: Actions in the Workflow

30

Page 31: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #4: No Reuse of Model Elements

31

Page 32: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Issues

Duplicated/redundant information in

separate architecture views

Difficult to maintain consistent model

32

Page 33: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Best Practice #4

Integrate architecture views

33

Page 34: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #4: No Reuse of Model Elements

34

Page 35: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #4: Structural View

35

Page 36: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #4: Implementation View

36

Page 37: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #4: Behavioral View

37

Page 38: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #5: Mixed Modeling Styles

38

Page 39: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Issues

Difficult to read and understand

39

Page 40: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Best Practice #5

Establish modeling conventions

40

Page 41: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Anti-Pattern #5: Mixed Modeling Styles

41

Page 42: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Refactoring #5

42

Page 43: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Top 5 Best Practices

1. Raise level of abstraction

2. Use several levels of detail

3. Apply consistent modeling method based

on UML subset

4. Integrate architecture views

5. Follow modeling conventions

43

Page 44: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

How to Establish Agile Modeling Culture?

Define your modeling solution

– Subset of UML

– Consistent modeling method

– Simple modeling environment

Identify modeling champions

Apply Agile programming practices in modeling

Share anti-patterns and best practices

Adopt modeling incrementally

44

Page 45: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Suggested Readings

A whitepaper Efficient UML from Anti-

Patterns to Best Practices is scheduled for

December 15

Refactoring BPMN Models: from Bad

Smells to Best Practices and Process

Patterns in BPMN 2.0 Handbook

Agile Modeling

Elements of UML 2.0 Style

45

Page 46: Darius Šilingas and Rokas Bartkevicius: Agile Modeling: from Anti-Patterns to Best Practices

Thank You for Attention!

Let’s keep in touch:

Rokas Bartkevičius

e-mail: [email protected]

Skype: rokas.bartkevicius

http://lt.linkedin.com/in/rokasbartkevicius

Darius Šilingas

e-mail: [email protected]

Skype: darius.silingas

http://lt.linkedin.com/in/dariussilingas

46