logo sudovi.com
- X /home/ryan/Grails and Giggles -- Apr 16, 2008 9:20am

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...


~
:wq!


- X /home/ryan -- 2008-04-16 13:34:41
I just giggled again -- created a custom taglib to handle a drop-down list of states and if passed in, will choose that selected state (e.g. pass in a previously selected state value stored in session, some other object etc). Now all I need to do in my form to get a fully functional state drop down list is g:stateDropDrown name="state" id="state" selectedValue="${some.stat}". Pretty sure I really annoyed my cube mates...
~
:wq!


- X /home/ryan -- 2008-04-16 17:00:17
UPDATE: to see what made me giggle (from the above comment) check this link out: http://www.grails.org/Contribute+a+Tag#ContributeaTag-stateDropDown Don't say I've never given back ;)
~
:wq!


- X /home/sal -- 2008-04-17 18:07:24
I'm hosting apps on Panix's Virtual Collocated servers. Starting at $20 a month you get a virtual linux box. I'm running Ubuntu Fawn with java6 and Python 2.5 on mine as well as some creaky old Perl 5.8 code.
~
:wq!


- X /home/ryan -- 2008-04-18 14:04:02
@sal -- Hey man, thanks for the info. I'll have to investigate this a bit. Thanks for the info!
~
:wq!


- X /home/shawn -- 2008-04-23 12:22:36
I'm a LAMP man myself (~10 years on Linux web development... even before we called it LAMP) ...been working in Java now full time for two years. When I came across Grails it was a real dream come true. Check out how simple it is to extend the framework:

http://hartsock.blogspot.com/2008/04/inside-hibernate-events-and-audit.html

... you really can rough out some complicated stuff quick, quick, quick! I've been using Quartz Jobs and services in combination to get all kinds of nifty behaviors that occur asynchronously from the browser window too. Grails is a nice stack and cleaner to deploy than anything I've worked with in Java-land yet.
~
:wq!


- X /home/ryan -- 2008-04-23 12:47:06
@shawn -- I couldn't agree more. After using Grails for the past two or three months (I've actually lost track of time...) I cannot imagine doing Java any other way.
~
:wq!


- X /home/Albert Harris -- 2010-02-19 03:51:48
You have to express more your opinion to attract more readers, because just a video or plain text without any personal approach is not that valuable. But it is just form my point of view
~
:wq!


- X /home/Arnold Bailey -- 2010-02-20 04:10:57
You have really great taste on catch article titles, even when you are not interested in this topic you push to read it
~
:wq!


- X /home/Buck Hunter -- 2010-02-21 08:41:04
You have really great taste on catch article titles, even when you are not interested in this topic you push to read it
~
:wq!


- X Add Comments
All Fields Req'd (I won't display your email)
Do not use "http" or "href" in your comment.
You will be blocked.

Bold: [b]your bold text[/b]
Italics: [i]your italic text[/i]
Underline: [u]your underlined text[/u]
Link: [mylink]http://wherever[/mylink]

Copyright 2008 -- all rights reserved