SlideShare a Scribd company logo
© Computas AS 09.09.2010Enhance your Maven plugins with Groovy(experiences with Groovyfication)Harald Søvikhso @ computas.com
SpeakersHarald SøvikJava Tech Lead, M.Sc.hso@computas.com2© Computas AS 09.09.2010bpmwork support systemsknowledgemanagementconsultancy servicescustom software solutions180 employees w/ M.Sc. or Ph.D.100% owned by employees
3© Computas AS 09.09.2010GroovyOOdynamicrun onjvmJava-likeJava-interoperablescripting / web / jms ++
4© Computas AS 09.09.2010Pro formaI’m not a Groovyexpert !I’mfocusingon Java <> Groovynot neccessarilythevery best wayofsolving it alltogether !Using pure Java 	librarieswould make a different story
5© Computas AS 09.09.2010GoalInvestigate home-brew enterprise Maven pluginsWould Groovyfication™ affect ..Simplicity? Maintainability? Testability?
6© Computas AS 09.09.2010Recipe for your Maven projectadd build step with gmaven-pluginadd dependency to gmaven-mojosrc/java vssrc/groovy.java vs.groovycompile and enjoy !
7© Computas AS 09.09.2010Example 0: archetype:generatePurposeWrite text to fileCode generated from archetype:generate type 12A Maven Java plugin development projectDifferencesException handlingControlling flow of execution
8© Computas AS 09.09.2010Example 1: plugin:goal ”help”PurposeWrite text to consoleDifferencesMulti line output
9© Computas AS 09.09.2010Example 2: Enterprise pluginlogicPurposeExecute external programDetermine exit valueDifferencesException handlingControlling flow of execution
10© Computas AS 09.09.2010Example 4: Enterprise pluginlogicPurposeCheckif URL has content (~ ping)DifferencesException handlingControlling flow of execution (“debug comments”)Readability
11© Computas AS 09.09.2010Example 5: DTOPurposeInternal ”entity” classDifferencesConstructorConstructorcall, readabilityAccessormethods
12© Computas AS 09.09.2010Example 6: TestabilityPurposeTest a method converting a String with windows style path to posix-style pathDifferences”Groovy set of mind”Highlight low cohesionRefactoring opportunities

More Related Content

PPTX
How to setup aws amplify in a vue project
PDF
certificaat
PDF
Primer shiftclouds
PPTX
Vue.js LT
PDF
Progressive Javascript: Why React when you can Vue?
PDF
Bizboard - who we are
PDF
Reference
PPT
A swimming pool project of junhao hotel(4 star)
How to setup aws amplify in a vue project
certificaat
Primer shiftclouds
Vue.js LT
Progressive Javascript: Why React when you can Vue?
Bizboard - who we are
Reference
A swimming pool project of junhao hotel(4 star)

Viewers also liked (20)

PPTX
La cruz del cambio
PDF
Let's head to the square
PPTX
Kinect
PDF
DAE Introduction Presentation
PDF
Webサーバ構築で心がけるべき二つのこと
PDF
Portfolio Pablo Calderon
PDF
Giovani, lavoro e Web
PPTX
Apostolate Of Married People
PDF
Passionist JPIC booklet (english)
PPT
Persia
PPTX
Analisi delle reti peer to peer: Sanremo 2011
PPT
Impact of the new deal.pptb
PPT
The cold war heats up
PPT
Women in public life
PPT
2007 ogt
PDF
Italia Oggi-Lo Compro o no? Decide il blog
PPTX
Reddito di Base Incondizionato - Presentazione Ufficiale
PPT
The franks
PDF
Operations Foundation Business Brief 2
PPT
The columbian exchange
La cruz del cambio
Let's head to the square
Kinect
DAE Introduction Presentation
Webサーバ構築で心がけるべき二つのこと
Portfolio Pablo Calderon
Giovani, lavoro e Web
Apostolate Of Married People
Passionist JPIC booklet (english)
Persia
Analisi delle reti peer to peer: Sanremo 2011
Impact of the new deal.pptb
The cold war heats up
Women in public life
2007 ogt
Italia Oggi-Lo Compro o no? Decide il blog
Reddito di Base Incondizionato - Presentazione Ufficiale
The franks
Operations Foundation Business Brief 2
The columbian exchange
Ad

More from Harald Soevik (6)

PPTX
Modularization, testing and technical debt (in a large agile project)
PDF
Tech challenges in a large scale agile project
PPT
Continuous Integration
PPTX
Scrum skjuler teknisk gjeld
PPT
Maven 2 - more than a build tool
Modularization, testing and technical debt (in a large agile project)
Tech challenges in a large scale agile project
Continuous Integration
Scrum skjuler teknisk gjeld
Maven 2 - more than a build tool
Ad

Enhance your Maven plugins with Groovy

  • 1. © Computas AS 09.09.2010Enhance your Maven plugins with Groovy(experiences with Groovyfication)Harald Søvikhso @ computas.com
  • 2. SpeakersHarald SøvikJava Tech Lead, M.Sc.hso@computas.com2© Computas AS 09.09.2010bpmwork support systemsknowledgemanagementconsultancy servicescustom software solutions180 employees w/ M.Sc. or Ph.D.100% owned by employees
  • 3. 3© Computas AS 09.09.2010GroovyOOdynamicrun onjvmJava-likeJava-interoperablescripting / web / jms ++
  • 4. 4© Computas AS 09.09.2010Pro formaI’m not a Groovyexpert !I’mfocusingon Java <> Groovynot neccessarilythevery best wayofsolving it alltogether !Using pure Java librarieswould make a different story
  • 5. 5© Computas AS 09.09.2010GoalInvestigate home-brew enterprise Maven pluginsWould Groovyfication™ affect ..Simplicity? Maintainability? Testability?
  • 6. 6© Computas AS 09.09.2010Recipe for your Maven projectadd build step with gmaven-pluginadd dependency to gmaven-mojosrc/java vssrc/groovy.java vs.groovycompile and enjoy !
  • 7. 7© Computas AS 09.09.2010Example 0: archetype:generatePurposeWrite text to fileCode generated from archetype:generate type 12A Maven Java plugin development projectDifferencesException handlingControlling flow of execution
  • 8. 8© Computas AS 09.09.2010Example 1: plugin:goal ”help”PurposeWrite text to consoleDifferencesMulti line output
  • 9. 9© Computas AS 09.09.2010Example 2: Enterprise pluginlogicPurposeExecute external programDetermine exit valueDifferencesException handlingControlling flow of execution
  • 10. 10© Computas AS 09.09.2010Example 4: Enterprise pluginlogicPurposeCheckif URL has content (~ ping)DifferencesException handlingControlling flow of execution (“debug comments”)Readability
  • 11. 11© Computas AS 09.09.2010Example 5: DTOPurposeInternal ”entity” classDifferencesConstructorConstructorcall, readabilityAccessormethods
  • 12. 12© Computas AS 09.09.2010Example 6: TestabilityPurposeTest a method converting a String with windows style path to posix-style pathDifferences”Groovy set of mind”Highlight low cohesionRefactoring opportunities
  • 13. 13© Computas AS 09.09.2010Experiences>> Task-oriented, high-level operations Testability readyness<< Complex, procedural code Detailed logging, exception handling Low cohesion
  • 14. Questions or comments ?14© Computas AS 09.09.2010Booth B5jobopenings for experienceddevelopers !www.computas.com

Editor's Notes

  • #3: computasdrivert stort sett med modellering av forretningsprosesser, fagsystemer og integrasjon