Grails Gets Me Excited About Java Again (Ryan Headley)
Groovy Grails, SpringSource April 16th, 2008
For a number of weeks now, my primary 8 to 5 job has been working with Grails as well as attempting to bring someone from the .Net world along with me. I’ll say he’s coming along, though seems to be doing things in the straight out “Java” way, which is fine when working with Groovy/Grails…matter of fact, I think its a selling point.
Now where one would think that Groovy should be easier to learn, there are still loads more “recipes” on the net for traditional Java and this is where my colleague is getting his information. In a way it bothers me that he doesn’t seem to want to learn to do things the “Groovy” way, I find myself not so worried about since I know it will run (its Java after all). That’s a beautiful thing when you think about it. He can learn from real world Java examples, and then adapt them to the Groovy way of doing things. Now, I’m not a .Net guy and I don’t pretend to be, but he keeps mentioning that he’s not used to all of this “blackbox stuff” going on. (Referring to all the nifty things Grails does for you) so I think that is why he is doing things the more traditional way…because its familiar. And it works!
I can’t say enough about my experience with Grails thus far. Grails makes me want to go out and find good..scratch that…CHEAP Java hosting. Not that I want to abandon PHP, I’m still a PHP guy, but Grails has got me excited about Java again. The layers are still there but for 80-plus percent of the folks out there, Grails does the right thing for you and you needn’t worry about your hibernate configuration, or your Spring setup, etc. (To be honest, I could hardly fight my way through that sort of thing anyway, which is probably why I’m digging the Grails thing).
It works, and its concise (at least when compared to its mother language). I’m pretty sure that I’m beginning to annoy my fellow colleagues that are still working on traditional Java. I’ll be working away on something in the Groovy/Grails world and come across something that just makes me giddy, and I feel a smile form on my face, and perhaps even get the giggles. Then I’ll have to run over to anyone who will listen and say “Check this out…” I’m pretty sure there gonna move me to the basement and turn the light out, (”I believe you have my thtapler”).
I’ve been complaning alot about people griping an not giving examples, so here’s a quick example of how you’d read in a form and populate an object in grails…are you ready?:
In the controller–(example, saving a person)
person.properties = params
person.save()Are ya kidding me? Thats all I had to do? What if I’m sending parameters from my form that the object doesn’t have? It doesn’t care, it just won’t do anything with it. How’s that for getting something done.
Sure, scaffolding is cool, helps ya hit the ground running, but there’s oh so much more than that. Again, I can’t say enough about it, and I’m only just starting out with it. The current project isn’t exaclty HUGE or enterprise level (yet), but it will grow to be bigger than its current implentation and new features will be getting added for a long time to come, so I’m sure there will be a number of rants as well. For now however, I’ll remain sitting back in my chair at work, quietly giggling…hope that doesn’t make me creepy!
Finally, if you are at all interested in the Groovy/Grails world, I HIGHLY recommend “Groovy Recipes” by Scott Davis. If you’ve ever heard Scott speak, (and enjoyed it like I did), then you’ll love the book because its written just as he speaks. Clear and concise, (much like the language the book covers…) and delivered very well. Perhaps I’ll have to give it a full review in the near future.
Anyway, I’ve sucked up enough time today…gotta go get my giggle on…
Tags: Groovy Grails, SpringSource
About
Leave a Comment
You must be logged in to post a comment.