Showing posts with label Groovy. Show all posts
Showing posts with label Groovy. Show all posts

Thursday, April 24, 2014

Groovy Builder AST merged to Groovy Core!

Hi!

Today it turned out that Paul King merged the Builder AST transform that based on my PojoBuilder to core of Groovy. So you will be able to use it when the new version of Groovy gets released.

You can take a look at the code here

https://github.com/groovy/groovy-core/pull/389

Many thanks go to Marcin Zajączkowski for his code review to the initial version.

It's not the biggest features in the world but anyway, enjoy :)

Wednesday, February 19, 2014

Warsaw Groovy User Group talk

Hi!

Since tomorrow I'm giving a talk on XML transformations in Groovy I'd like to publish the code that will be presented during the presentation. Check out the Github repo and the Bitbucket repository.

The presentation (in polish) can be found on youtube.

Tuesday, February 4, 2014

Introduction to Groovy runtime metaprogramming and AST transforms

Hi!

I'm very happy to share my presentation regarding Groovy metaprogramming and AST transforms. The slides are available at SlideShare and the code is available at TooMuchCoding Bitbucket and TooMuchCoding Github repositories. If you have any problems with reading any part of the slides or sth just post a comment here and I'll tr to help you :)

Enjoy!


Saturday, March 30, 2013

Execution of Groovy scripts from Java - XmlSlurper and MarkupBuilder in mapping issues


Problem with mappings


In our project we came across a really big problem related to mapping. Having two systems that initially were defined by the BA to be somehwat simillar we have chosen the simple XSLT (done through Altova Mapforce) of the input message to the output one.

Afterwards it turned out that the functions required to perform a mapping are becoming enormous. An example of such a mapping is:
From the input message take a list of Cars iterate over it and find a Car whose field "prodcutionDate" is the lowest and the attribute "make" is equal to "Honda" and as the output return the "saleDate"
So in order to map it we decided to move to JBoss Drools. The decision tables were out of question since the logic was to complex and customized to be placed in the spreadsheet so we coded everything in the DRL files. Soon the rules got really big and some of our developers were forced to spend plenty of time on constant recreation of rules stated by the BA.

Out of frustration and after having seen all the amazing things at the 33rd degree conference I decided to start finding solutions to my problems which were: