What is Grails. Why should a Spring developer use it?

When I first heard about Grails, I thought Rails finally visit Java. I like Groovy, as it is quite easy for me to pick up and an framework based on it will be fun. That’s what I thought. Does things look good? Will it worth your time to shift? Let’s see.

I never really had a chance to use Grails up until last year, for my pet project. Which I longingly desired to change it from very old Spring version to something new. It was done around 2008, without any annotations.

First thing you easily notice is, when you start with Grails, you get excited. Yes, configuration is none. Which as a Spring developer, I find a good one. Next, scaffolding. I had few CRUD part which I don’t need to do with Grails, which is again good thing, All I have to do is, create domain class, create controller, map them and slap them. Bam! CRUD page is ready! And gsp is sight for sore eyes, if you have only worked with JSP till today(which I heavily doubt apart from people who always stay in maintenance work). As I stopped working in JSP long ago, gsp never impressed me. But still much better than JSP, and it looks much similar to some template engines available for Node.js. And most important thing is, it sure reduced lot of boilerplate code. Even if I don’t use scaffolding, LoC is greatly reduced compared to Spring counterpart. That is something to be considered.

After initial phase of Wow, and Oooh is over, you have to face the fact. I wanted to use JPA as I wanna give it a try and see if it really get along with Grails,. Boy, it wasn’t as easy as I thought it would be. I had to do a lot of hoopla and dropped the idea, as it was taking much more time than I expected. Not worth the time, as it is for my pet project. GORM is decent enough, well, at least for me.

Now, for worst part, speed is awful. I know, but for dev, productivity is important and every time I make changes in Java, it hot-reloads and at same time, system started slowing down. At certain point, it feels like slideshow. So I had to kill few processes to get it back to life.

Plugins : Yes, there are plugins. Lots of plugins!! You want to do X, chances are you already have X plugin. Certain things were made real easy, which makes me cry in joy! But by looking at source/issues you can see, even most popular one’s are discarded by it’s author. Yeah, it is open source and we can do whatever we want, but honestly, that’s not something we want. As much as I love to work in OSS, making it work for our requirement is again an development hurdle in my opinion.

So, what the hell am I thinking? If it matters for you, I pretty much like Grails, and as a Spring developer, it is quite an interesting journey. But do I consider using it in my existing project? I don’t know. It is not worth it. May be if something new and small comes in my way, I might give it a try. Next time, I use it for some real small project and blog here, on how it went?


If you have any queries feel free to write to author

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s