måndag 29 april 2013

Porting a Java Spring Hibernate Maven application over to Grails - Part 1

If you want to learn to build an application from scratch, there are plenty of tutorials available online. But what if you are stuck with an existing Java application, how easy is it to port it over to Grails? If the existing application is using spring, maven and hibernate or JPA, it is actually quite easy. But before we start the porting, lets look at the Grails architecture compared to a "standard Java architecture":
As you can see, the architecture of Grails is quite similar to the one on the left (which is a Java + Spring MVC application I pulled from GitHub).
There are some small differences:
- Grails has no DAO-layer (What! No more DAO? That's the most fun of all the Java programming I do!)
- The Java application on the left hand side uses Maven to handle dependencies and building, Grails on the right handles dependencies and building on it's own (If you want, you can choose to continue to build with Maven, more on that later in this article).

The similarities makes the porting over to Grails pretty painless, hopefully we only have to place the files in the correct place according to the Grails conventions, and we're good to go.

Next up, part2

fredag 26 april 2013

Porting a Java Spring Hibernate Maven application over to Grails - Slides

Yesterday I gave a presentation at https://sites.google.com/site/stockholmgtug/Home/april-mte-2013 about how to port an existing java application over to Grails. This is the slides from that presentation. http://www.youtube.com/watch?v=msr3LcDjmIc&feature=youtu.be