new ways around generation gap pattern

93
ekke (ekkehard gentz), softwarearchitect (c) 2009 Eclipse Public License (EPL) Freitag, 8. Mai 2009

Upload: ekkehard-gentz

Post on 17-Nov-2014

2.251 views

Category:

Technology


1 download

DESCRIPTION

The Generation Gap Pattern (see also John Vlissides) is widely used to separate generated code from modifdied/extended code. But the Generation Gap Pattern isn't always aplicable - from my experiences it fails if you generate code into areas with partly complex inheritance hierarchies like Persistence Layer with Entity, Embeddable, EJB3 etc. Using a modern Generation Framework as oAW (openArchitectureWare) from Eclipse Modeling Tools Project you can implement a Veto Strategy in your workflow components to optimize file handling using Generation Gap Pattern. In this presentation I introduce a VetoRedirectStrategy to find ways without applying the Generation Gap Pattern. I tried to make a presentation partly in ZEN style and with easy-to-understand slides - so have fun. HINT: YOU CAN WATCH THESE SLIDES AS A VIDEO+AUDIO: http://vimeo.com/ekkescorner Additional Informations: http://ekkes-corner.org (blog in english) http://ekkes-ecke.org (blog in german) http://ekkes-corner-tv.org (video podcasts) iTunes (search for "ekkes-corner") @ekkescorner (twitter) references: (c) 1996 John Vlissides "Generation Gap Pattern" http://www.research.ibm.com/designpatterns/pubs/gg.html Article Heike Behrens "Generation Gap Pattern" http://www.1160pm.net/2009/04/23/generation-gap-pattern/

TRANSCRIPT

Page 1: New Ways around Generation Gap Pattern

ekke (ekkehard gentz), softwarearchitect(c) 2009 Eclipse Public License (EPL)

Freitag, 8. Mai 2009

Page 2: New Ways around Generation Gap Pattern

New Ways around Generation Gap Pattern:

ekke (ekkehard gentz), softwarearchitect(c) 2009 Eclipse Public License (EPL)

Freitag, 8. Mai 2009

Page 3: New Ways around Generation Gap Pattern

New Ways around Generation Gap Pattern:

Protected Regions

ekke (ekkehard gentz), softwarearchitect(c) 2009 Eclipse Public License (EPL)

Freitag, 8. Mai 2009

Page 4: New Ways around Generation Gap Pattern

New Ways around Generation Gap Pattern:

Protected RegionsVetoRedirectStrategy

ekke (ekkehard gentz), softwarearchitect(c) 2009 Eclipse Public License (EPL)

Freitag, 8. Mai 2009

Page 5: New Ways around Generation Gap Pattern

1996

Freitag, 8. Mai 2009

Page 6: New Ways around Generation Gap Pattern

John Vlissides

Freitag, 8. Mai 2009

Page 7: New Ways around Generation Gap Pattern

Generation Gap Pattern

Freitag, 8. Mai 2009

Page 8: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 9: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 10: New Ways around Generation Gap Pattern

1996

2009

Freitag, 8. Mai 2009

Page 11: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 12: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 13: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 14: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 15: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 16: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 17: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 18: New Ways around Generation Gap Pattern

?Freitag, 8. Mai 2009

Page 19: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 20: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 21: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 22: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 23: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 24: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 25: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

Freitag, 8. Mai 2009

Page 26: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

Freitag, 8. Mai 2009

Page 27: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

Freitag, 8. Mai 2009

Page 28: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

Freitag, 8. Mai 2009

Page 29: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

DISABL

ED

Freitag, 8. Mai 2009

Page 30: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

DISABL

ED

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// /* PROTECTED REGION END */

Freitag, 8. Mai 2009

Page 31: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

DISABL

ED

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// /* PROTECTED REGION END */

now here‘s changed code

Freitag, 8. Mai 2009

Page 32: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

DISABL

ED

/* PROTECTED REGION ID(MY_UNIQU_ID) ENABLED START */// /* PROTECTED REGION END */

now here‘s changed code

Freitag, 8. Mai 2009

Page 33: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// some default code/* PROTECTED REGION END */

DISABL

ED

/* PROTECTED REGION ID(MY_UNIQU_ID) ENABLED START */// /* PROTECTED REGION END */

ENABLE

D

now here‘s changed code

Freitag, 8. Mai 2009

Page 34: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) ENABLED START */// /* PROTECTED REGION END */

ENABLE

D

now here‘s changed code

DISABL

ED

Freitag, 8. Mai 2009

Page 35: New Ways around Generation Gap Pattern

/* PROTECTED REGION ID(MY_UNIQU_ID) START */// new generated default code/* PROTECTED REGION END */

/* PROTECTED REGION ID(MY_UNIQU_ID) ENABLED START */// /* PROTECTED REGION END */

ENABLE

D

now here‘s changed code

DISABL

ED

Freitag, 8. Mai 2009

Page 36: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 37: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 38: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 39: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 40: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 41: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 42: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 43: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 44: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 45: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 46: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

Freitag, 8. Mai 2009

Page 47: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

Freitag, 8. Mai 2009

Page 48: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D D D

Freitag, 8. Mai 2009

Page 49: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D D D

Freitag, 8. Mai 2009

Page 50: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D

D

D

D

D

Freitag, 8. Mai 2009

Page 51: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D

D

D

E

Freitag, 8. Mai 2009

Page 52: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D

E E

Freitag, 8. Mai 2009

Page 53: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D

E E

Freitag, 8. Mai 2009

Page 54: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D

E E

Freitag, 8. Mai 2009

Page 55: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D

E E

Freitag, 8. Mai 2009

Page 56: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D

E E

Freitag, 8. Mai 2009

Page 57: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

G G D D D

E E

Freitag, 8. Mai 2009

Page 58: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

vetoG

GD

E E

D

D

Freitag, 8. Mai 2009

Page 59: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

Freitag, 8. Mai 2009

Page 60: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

Freitag, 8. Mai 2009

Page 61: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

Freitag, 8. Mai 2009

Page 62: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

Freitag, 8. Mai 2009

Page 63: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G

Freitag, 8. Mai 2009

Page 64: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

Freitag, 8. Mai 2009

Page 65: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D E

Freitag, 8. Mai 2009

Page 66: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D E

Freitag, 8. Mai 2009

Page 67: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D E

veto

Freitag, 8. Mai 2009

Page 68: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

Freitag, 8. Mai 2009

Page 69: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

Freitag, 8. Mai 2009

Page 70: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D E

Freitag, 8. Mai 2009

Page 71: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D E

Freitag, 8. Mai 2009

Page 72: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D E

veto

Freitag, 8. Mai 2009

Page 73: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

Freitag, 8. Mai 2009

Page 74: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

Freitag, 8. Mai 2009

Page 75: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

D

Freitag, 8. Mai 2009

Page 76: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

D

Freitag, 8. Mai 2009

Page 77: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

D

Freitag, 8. Mai 2009

Page 78: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

D

Freitag, 8. Mai 2009

Page 79: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

D

=

Freitag, 8. Mai 2009

Page 80: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E E

G G D

E

D

E

D

x

Freitag, 8. Mai 2009

Page 81: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E

G G D

E

D

E

D

E

Freitag, 8. Mai 2009

Page 82: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E

G G D

E

D

E

D

E

Freitag, 8. Mai 2009

Page 83: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E

G G D D D

E

E E

Freitag, 8. Mai 2009

Page 84: New Ways around Generation Gap Pattern

src-man M M M M M

src-gen

src-gen-pr

veto

E

G G D D D

E

Freitag, 8. Mai 2009

Page 85: New Ways around Generation Gap Pattern

summary

Freitag, 8. Mai 2009

Page 86: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 87: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 88: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 89: New Ways around Generation Gap Pattern

Freitag, 8. Mai 2009

Page 90: New Ways around Generation Gap Pattern

ekke (ekkehard gentz)softwarearchitect(c) 2009 Eclipse Public License (EPL)(c) 2009 iStockphoto.com (some photos)Freitag, 8. Mai 2009

Page 91: New Ways around Generation Gap Pattern

@ekkescornerekke (ekkehard gentz)softwarearchitect(c) 2009 Eclipse Public License (EPL)(c) 2009 iStockphoto.com (some photos)Freitag, 8. Mai 2009

Page 92: New Ways around Generation Gap Pattern

ekkes-corner.org@ekkescornerekke (ekkehard gentz)

softwarearchitect(c) 2009 Eclipse Public License (EPL)(c) 2009 iStockphoto.com (some photos)Freitag, 8. Mai 2009

Page 93: New Ways around Generation Gap Pattern

this presentation is designed in ZEN style

http://www.presentationzen.com/

you can hear and watch at:http://vimeo.com/ekkescorner (video)

iTunes: search „ekkes-corner“ (iPhone)http://ekkes-corner-tv.org (QuickTime)

ekke (ekkehard gentz), softwarearchitect(c) 2009 Eclipse Public License (EPL)

Freitag, 8. Mai 2009