Submit Search
Upload
Whoops! Where did my architecture go?
•
0 likes
•
973 views
Oliver Gierke
Follow
Slides of my SpringOne 2011 talk on how to implement and enforce architecture in codebases.
Read less
Read more
Technology
News & Politics
Report
Share
Report
Share
1 of 62
Download now
Download to read offline
Recommended
LatJUG. Spring Roo
LatJUG. Spring Roo
denis Udod
Mobile trends and impressions
Mobile trends and impressions
Shafaq Abdullah
Coding & Music Passion And Profession
Coding & Music Passion And Profession
Oliver Gierke
REST based web applications with Spring 3
REST based web applications with Spring 3
Oliver Gierke
Spring Data and MongoDB
Spring Data and MongoDB
Oliver Gierke
Whoops! where did my architecture go?
Whoops! where did my architecture go?
Oliver Gierke
Spring Data and MongoDB
Spring Data and MongoDB
Oliver Gierke
Increasing developer procutivity with Mylyn (Devoxx 2010)
Increasing developer procutivity with Mylyn (Devoxx 2010)
Oliver Gierke
Recommended
LatJUG. Spring Roo
LatJUG. Spring Roo
denis Udod
Mobile trends and impressions
Mobile trends and impressions
Shafaq Abdullah
Coding & Music Passion And Profession
Coding & Music Passion And Profession
Oliver Gierke
REST based web applications with Spring 3
REST based web applications with Spring 3
Oliver Gierke
Spring Data and MongoDB
Spring Data and MongoDB
Oliver Gierke
Whoops! where did my architecture go?
Whoops! where did my architecture go?
Oliver Gierke
Spring Data and MongoDB
Spring Data and MongoDB
Oliver Gierke
Increasing developer procutivity with Mylyn (Devoxx 2010)
Increasing developer procutivity with Mylyn (Devoxx 2010)
Oliver Gierke
Sophisticated JPA with Spring & Hades
Sophisticated JPA with Spring & Hades
Oliver Gierke
Spring Roo 1.0.0 Technical Deep Dive
Spring Roo 1.0.0 Technical Deep Dive
Ben Alex
Mylyn - Increasing developer productivity
Mylyn - Increasing developer productivity
Oliver Gierke
Generic DAOs With Hades
Generic DAOs With Hades
Oliver Gierke
Mylyn
Mylyn
Oliver Gierke
Real world dependency injection - DPC10
Real world dependency injection - DPC10
Stephan Hochdörfer
Spring in action - Hades & Spring Roo
Spring in action - Hades & Spring Roo
Oliver Gierke
Data Access 2.0? Please welcome, Spring Data!
Data Access 2.0? Please welcome, Spring Data!
Oliver Gierke
An introduction into Spring Data
An introduction into Spring Data
Oliver Gierke
Spring integration
Spring integration
Oliver Gierke
Spring Data JPA - Repositories done right
Spring Data JPA - Repositories done right
Oliver Gierke
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
Oliver Gierke
Whoops! Where did my architecture go?
Whoops! Where did my architecture go?
Oliver Gierke
An Introduction to Spring Data
An Introduction to Spring Data
Oliver Gierke
Flash camp portugal - Let's talk about Flex baby
Flash camp portugal - Let's talk about Flex baby
Michael Chaize
Shoretel brilliantly simple_overview
Shoretel brilliantly simple_overview
Chuck Brown
Montpellier - Flex UG
Montpellier - Flex UG
Michael Chaize
Project Controls Expo, 13th Nov 2013 - "Integrated Project Planning/Schedulin...
Project Controls Expo, 13th Nov 2013 - "Integrated Project Planning/Schedulin...
Project Controls Expo
Converge SE 2011 Building a Strong Foundation
Converge SE 2011 Building a Strong Foundation
Aaron Quinn
Flex presentation for Paris Android User group PAUG
Flex presentation for Paris Android User group PAUG
Michael Chaize
Flexpaug 111207121300-phpapp01
Flexpaug 111207121300-phpapp01
Paris Android User Group
スマートフォン対策ビジネスセミナー / Session1:Adobe AIRで実現する超生産的スマートフォンアプリ開発
スマートフォン対策ビジネスセミナー / Session1:Adobe AIRで実現する超生産的スマートフォンアプリ開発
Nishiyama Shoichi
More Related Content
Viewers also liked
Sophisticated JPA with Spring & Hades
Sophisticated JPA with Spring & Hades
Oliver Gierke
Spring Roo 1.0.0 Technical Deep Dive
Spring Roo 1.0.0 Technical Deep Dive
Ben Alex
Mylyn - Increasing developer productivity
Mylyn - Increasing developer productivity
Oliver Gierke
Generic DAOs With Hades
Generic DAOs With Hades
Oliver Gierke
Mylyn
Mylyn
Oliver Gierke
Real world dependency injection - DPC10
Real world dependency injection - DPC10
Stephan Hochdörfer
Spring in action - Hades & Spring Roo
Spring in action - Hades & Spring Roo
Oliver Gierke
Data Access 2.0? Please welcome, Spring Data!
Data Access 2.0? Please welcome, Spring Data!
Oliver Gierke
An introduction into Spring Data
An introduction into Spring Data
Oliver Gierke
Spring integration
Spring integration
Oliver Gierke
Spring Data JPA - Repositories done right
Spring Data JPA - Repositories done right
Oliver Gierke
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
Oliver Gierke
Whoops! Where did my architecture go?
Whoops! Where did my architecture go?
Oliver Gierke
Viewers also liked
(13)
Sophisticated JPA with Spring & Hades
Sophisticated JPA with Spring & Hades
Spring Roo 1.0.0 Technical Deep Dive
Spring Roo 1.0.0 Technical Deep Dive
Mylyn - Increasing developer productivity
Mylyn - Increasing developer productivity
Generic DAOs With Hades
Generic DAOs With Hades
Mylyn
Mylyn
Real world dependency injection - DPC10
Real world dependency injection - DPC10
Spring in action - Hades & Spring Roo
Spring in action - Hades & Spring Roo
Data Access 2.0? Please welcome, Spring Data!
Data Access 2.0? Please welcome, Spring Data!
An introduction into Spring Data
An introduction into Spring Data
Spring integration
Spring integration
Spring Data JPA - Repositories done right
Spring Data JPA - Repositories done right
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
Whoops! Where did my architecture go?
Whoops! Where did my architecture go?
Similar to Whoops! Where did my architecture go?
An Introduction to Spring Data
An Introduction to Spring Data
Oliver Gierke
Flash camp portugal - Let's talk about Flex baby
Flash camp portugal - Let's talk about Flex baby
Michael Chaize
Shoretel brilliantly simple_overview
Shoretel brilliantly simple_overview
Chuck Brown
Montpellier - Flex UG
Montpellier - Flex UG
Michael Chaize
Project Controls Expo, 13th Nov 2013 - "Integrated Project Planning/Schedulin...
Project Controls Expo, 13th Nov 2013 - "Integrated Project Planning/Schedulin...
Project Controls Expo
Converge SE 2011 Building a Strong Foundation
Converge SE 2011 Building a Strong Foundation
Aaron Quinn
Flex presentation for Paris Android User group PAUG
Flex presentation for Paris Android User group PAUG
Michael Chaize
Flexpaug 111207121300-phpapp01
Flexpaug 111207121300-phpapp01
Paris Android User Group
スマートフォン対策ビジネスセミナー / Session1:Adobe AIRで実現する超生産的スマートフォンアプリ開発
スマートフォン対策ビジネスセミナー / Session1:Adobe AIRで実現する超生産的スマートフォンアプリ開発
Nishiyama Shoichi
Sweet dreams of load testing
Sweet dreams of load testing
Oleg Tatarchuk
Oop2012 mobile workshops
Oop2012 mobile workshops
Michael Chaize
engineering mechanics andrew pytelch 11
engineering mechanics andrew pytelch 11
BrijeshRai19
Using Google Analytics with jQuery Mobile
Using Google Analytics with jQuery Mobile
Koji Ishimoto
Jenkins Enterprise by CloudBees Webinar
Jenkins Enterprise by CloudBees Webinar
CloudBees
In The Future We All Use Symfony2
In The Future We All Use Symfony2
Brent Shaffer
Opening opensource : The Jenkins Way
Opening opensource : The Jenkins Way
Nicolas De Loof
Project Controls Expo, 13th Nov 2013 - "A new visual way to engage executive ...
Project Controls Expo, 13th Nov 2013 - "A new visual way to engage executive ...
Project Controls Expo
Reasons for Flash: Flash Development in an HTML5 and App Store World
Reasons for Flash: Flash Development in an HTML5 and App Store World
EffectiveUI
SharePoint2010Integration
SharePoint2010Integration
Slava Gorbunov
360iDev OTA Distribution and Build Automation
360iDev OTA Distribution and Build Automation
Jay Graves
Similar to Whoops! Where did my architecture go?
(20)
An Introduction to Spring Data
An Introduction to Spring Data
Flash camp portugal - Let's talk about Flex baby
Flash camp portugal - Let's talk about Flex baby
Shoretel brilliantly simple_overview
Shoretel brilliantly simple_overview
Montpellier - Flex UG
Montpellier - Flex UG
Project Controls Expo, 13th Nov 2013 - "Integrated Project Planning/Schedulin...
Project Controls Expo, 13th Nov 2013 - "Integrated Project Planning/Schedulin...
Converge SE 2011 Building a Strong Foundation
Converge SE 2011 Building a Strong Foundation
Flex presentation for Paris Android User group PAUG
Flex presentation for Paris Android User group PAUG
Flexpaug 111207121300-phpapp01
Flexpaug 111207121300-phpapp01
スマートフォン対策ビジネスセミナー / Session1:Adobe AIRで実現する超生産的スマートフォンアプリ開発
スマートフォン対策ビジネスセミナー / Session1:Adobe AIRで実現する超生産的スマートフォンアプリ開発
Sweet dreams of load testing
Sweet dreams of load testing
Oop2012 mobile workshops
Oop2012 mobile workshops
engineering mechanics andrew pytelch 11
engineering mechanics andrew pytelch 11
Using Google Analytics with jQuery Mobile
Using Google Analytics with jQuery Mobile
Jenkins Enterprise by CloudBees Webinar
Jenkins Enterprise by CloudBees Webinar
In The Future We All Use Symfony2
In The Future We All Use Symfony2
Opening opensource : The Jenkins Way
Opening opensource : The Jenkins Way
Project Controls Expo, 13th Nov 2013 - "A new visual way to engage executive ...
Project Controls Expo, 13th Nov 2013 - "A new visual way to engage executive ...
Reasons for Flash: Flash Development in an HTML5 and App Store World
Reasons for Flash: Flash Development in an HTML5 and App Store World
SharePoint2010Integration
SharePoint2010Integration
360iDev OTA Distribution and Build Automation
360iDev OTA Distribution and Build Automation
Recently uploaded
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
SeasiaInfotech2
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
Alfredo García Lavilla
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Memoori
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Wonjun Hwang
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Recently uploaded
(20)
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Whoops! Where did my architecture go?
1.
Whoops! Where did
my architecture go? Approaches to architecture management for Java and Spring applications Oliver Gierke © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
2.
Oliver Gierke
Spring Data Core/JPA/MongoDB ogierke@vmware.com www.olivergierke.de olivergierke © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
3.
Background
Few years of consulting Lots of code reviews Eoin Woods‘ talk on InfoQ © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
4.
Roadmap
Architecture 101 A Java packages model Hera © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
5.
Architecture 101 © 2011
SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
6.
Know your
dependencies © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
7.
Granularity
Modules Layers Vertical slices Subsystems © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
8.
Granularity
Java ARchive Package Class © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
9.
Of layers
and slices… © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
10.
Slice A
Slice B Slice C Layer 1 Layer 2 Layer 3 © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
11.
Layers
Well understood Known to developers Less important to business © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
12.
Slices
Hardly understood New to developers Key for business req © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
13.
Slice A
Slice B Slice C Layer 1 Layer 2 Layer 3 © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
14.
"
How to implement an architecture inside a codebase? © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
15.
Architecture
VS. Codebase © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
16.
"
How to implement an architecture inside a codebase? © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
17.
"
How to enforce an architecture inside a codebase? © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
18.
Code analysis
JDepend Sonar © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
19.
Demo © 2011 SpringOne
2GX 2011. All rights reserved. Do not distribute without permission.
20.
Sonargraph
Formerly known as SonarJ © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
21.
Demo © 2011 SpringOne
2GX 2011. All rights reserved. Do not distribute without permission.
22.
A plain Java
based approach © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
23.
Slice A
Slice B Slice C Layer 1 Layer 2 Layer 3 © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
24.
….${layer}.${slice}
VS. ….${slice}.${layer} © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
25.
Layers first
Leaks slice internals Lower layers visible to everyone © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
26.
"
Start with less packages and the least visibility possible… © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
27.
Slice A
Slice B Slice C Layer 1 Layer 2 Layer 3 © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
28.
Slice A
Slice B Slice C Layer 1 Layer 2 Layer 3 © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
29.
Slices first
Start with package per slice Expose interfaces and domain types Keep implementations private © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
30.
Slices first
Encapsulates business module Internals understood anyway © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
31.
Subsystems © 2011 SpringOne
2GX 2011. All rights reserved. Do not distribute without permission.
32.
Background
Risk mgmt. at German public bank Quite a few other SpringSource clients © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
33.
"
The smallest plugin system ever! © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
34.
Host
SPI SPI SPI Plugin Plugin © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
35.
Context
No OSGi Spring based Build-time composition Don‘t touch the host system © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
36.
App
Plugin Plugin Host © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
37.
"
How to make the host aware of the plugins? © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
38.
"
How to dynami- cally collect Spring beans of a given type? © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
39.
classpath*:META-INF/
spring/plugin-context.xml © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
40.
classpath*:META-INF/
spring/plugin-context.xml SPI SPI SPI META-INF/spring/ META-INF/spring/ plugin-context.xml plugin-context.xml © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
41.
@Component public class
MyComponentImpl implements TransferService { private List<MyPlugin> plugins; @Autowired public MyComponentImpl(List<MyPlugin> plugins) { this.plugins = plugins; } … } public interface MyPlugin { void doSomething(); } © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
42.
Demo © 2011 SpringOne
2GX 2011. All rights reserved. Do not distribute without permission.
43.
XML?
Back in the days © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
44.
(XML?)
Back in the days Probably not a big deal anymore © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
45.
Easy access? © 2011
SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
46.
@Component public class
MyComponentImpl implements TransferService { private List<MyPlugin> plugins; @Autowired public MyComponentImpl(List<MyPlugin> plugins) { this.plugins = plugins; } … } public interface MyPlugin { void doSomething(); } © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
47.
@Component public class
MyComponentImpl implements TransferService { // Constructor omitted public Result myMethod(SomeParameter parameter) { // Select the first one to match to invoke? // Select multiple ones to invoke? // Select and fallback to one if none found? // Select and throw an exception if none found? } } © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
48.
Plugins
Selection criterion Callback method Let the implementation decide © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
49.
Registry
Equipped with plugins Common access patterns © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
50.
public interface Plugin<T>
{ public boolean supports(T delimiter ); } public interface PluginRegistry<S extends Plugin<T>, T> { T getPluginFor(S delimiter); T getPluginFor(S delimiter, T default); <E extends Exception> T getPluginFor(S del, E exception) throws E; List<T> getPluginsFor(S delimiter); … } © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
51.
@Component public class
MyComponentImpl implements TransferService { private PluginRegistry<MyPlugin, String> plugins; @Autowired public MyComponentImpl(PluginRegistry<MyPlugin, String> plugins) { this.plugins = plugins; } … } public interface MyPlugin extends Plugin<String> { void doSomething(); } © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
52.
@Component public class
MyComponentImpl implements TransferService { private final MyPlugin defaultPlugin = new MyDefaultPlugin(); public Result myMethod(String parameter) { // Select the first one to match to invoke? … = plugins.getPluginFor(parameter); // Select multiple ones to invoke? … = plugins.getPluginsFor(parameter); // Select and fallback to one if none found? … = plugins.getPluginFor(parameter, defaultPlugin); // Select and throw an exception if none found? … = plugins.getPluginsFor(parameter, new RuntimeException()); } } © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
53.
OrderAware
PluginRegistry Respects @Order/Ordered OAPR.reverse() © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
54.
Bells‘n‘whistles
FactoryBean Spring namespace Lazy-eval © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
55.
Hera © 2011 SpringOne
2GX 2011. All rights reserved. Do not distribute without permission.
56.
Hera
http://hera.synyx.org Apache 2.0 Soon to be on GitHub © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
57.
Spring
Integration 2 © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
58.
<bean class="….FirstSamplePlugin" />
<bean class="….SecondSamplePlugin" /> <int:channel id="input" /> <int:channel id="output" /> <int-hera:dynamic-service-activator input-channel="input" outputChannel="output" plugin-type= "….MyPlugin" method= "myBusinessMethod" delimiter="payload" invocation-arguments= "payload" /> © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
59.
Demo © 2011 SpringOne
2GX 2011. All rights reserved. Do not distribute without permission.
60.
Take-aways
Know your dependencies On every granularity Start as strict as possible Get lenient where necessary © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
61.
Thanks & credits
Eoin Woods - Talk @ InfoQ © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
62.
Resources
Sourcecode @ GitHub Sonargraph © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Download now