Slashdot Mirror


Mastering the Grails Powerful Tiny Web Framework

Someone from IBM tips this article on their Developerworks site about Grails, a modern Web development framework that mixes familiar Java technologies like Spring and Hibernate. "Grails gives you the development experience of Ruby on Rails while being firmly grounded in proven Java technologies. This article show you how to build your first Grails application with the lessons learned from Rails and the sensibilities of modern Java development."

6 of 89 comments (clear)

  1. Rails set a milestone, what will be next? by filbranden · · Score: 4, Interesting

    It seems that Rails set a milestone for development frameworks, and nowadays everything new has to be based or inspired or copied from Rails. Seems that Rails really made a breaktrough there, in fact, it seems to be responsable for most of Ruby's popularity. Rails has been translated several times to other languages, like Python (Django, also TurboGears to a lesser extent) and Java (Groovy to a lesser extent, now Grails that it's a ripoff even on the name).

    This makes me think that sometime ago the buzzword of the moment was J2EE, and everything everyone made had to be J2EE compliant. Even C# and .NET was a big Microsoft ripoff of Java and J2EE to fight against the big migration of programmers to Java.

    Which leads me to the fact that soon the buzz around Rails will be over, as much as nobody creates a new J2EE-based framework, now everything is taken for granted. So, what will be the next milestone? The next technology that will have people talking? Have everyone trying to clone its own?

    1. Re:Rails set a milestone, what will be next? by Shados · · Score: 3, Interesting

      Who knows. The thing with Rails though, is that it brought a bunch of technologies that were big standards in the enterprise world, and packaged it as one...

      Its not much more than an MVC framework, an OR Mapper, and a 4th Gen tool wrapped as one... But in many circles, like in the PHP world, or in the more hobbyist groups of the other platforms, these things were not known. Basically, the people that browsed internet forums weren't used to it, and Rails brought it to them ine one buzzword compliant package... Its still not very special...

      So now, you have a bunch of frameworks in Python, PHP, .NET, or Java, that were really just derivative of the J2EE-based world, package themselves, tweak one or two "conventions", and change their name to BlahRail... but the tool is really the same as it used to be. Its just more buzzworld compliant now.

      So I guess Rails did set a milestone. A "buzzy" one. My current employer trips in his feet all over Rails (we're a .NET shop), and every few days shows me yet another "OMG!" feature of Rail...that actually was already implemented in our main product long before that buzzword came out... Oh, aside ActiveRecord::Migration. That we actually added after Rail. Thank god it brought to light that hugely complex and powerful feature! (That took exactly 6 hours to reimplement)

  2. Grails? by Loconut1389 · · Score: 5, Funny

    I guess they didn't want to call it Jails?

  3. Re:I have just one "word" for you... by Shados · · Score: 4, Insightful

    and you can just hear the resounding SMACK of a million programmers at once wondering why they didn't do it first
    Here's where its different. With Rails, you have thousands of hobbyist and wannabes going "Why the hell didn't I think of that?!?!", and the rest of us looking at our existing frameworks going "Check...check...check...OH WAIT I don't have this...oh wait, I didn't WANT it because last time we tried we lost a 5 million$ in wasted time.... check...check....hrm...so what is it exactly?"

    Again, I remember bursting out laughing when my boss bragged about how superior Rails was because it had... a unit testing framework! "We don't have to make our own! It can even generates the base unit tests!!!!. Oh, and it can actually handles the Data Access Layer on its own!!!".

    Or the priceless one: "Rail puts MVC on the map!". I mean, thats even WORSE than your Ajax example.... its like if 3 years from now some framework came out with Ajax, and everyone thought it made Ajax mainstream... MVC has been a buzzword (and an overrated one) for so long, I've been wanting to cry even BEFORE Rail...

    Rails is definately great stuff, not saying any different... but really, it only makes a buzz among people who didn't know much before... At least Ajax mainstreamed async http requests in javascript (even though we were doing it in 2001ish here, we didn't have all the ajax framework available and had to do it on our own...but what Rails offer...we haven't had to do it for almost a decade...)
  4. Re:Fail by fireboy1919 · · Score: 5, Insightful

    Couple of things:
    toy object model that gets forced upon you all the time
    1) Hibernate makes Active Record look like a toy. If you have to deal with database systems that don't fit all the constraints of active record, you're pretty much out of luck. Not so with Hibernate. Hibernate basically converts a relational database into an object oriented database because of the availability of HQL. It's very different from just getting an OOP API on top of a relational database - which is essentially what Active Record is.

    Incidentally, if you've got legacy data with a compound key, how hard is that to deal with in Rails? It's pretty easy with Hibernate. (hint: extremely difficult)

    2) Spring eliminates glue more than anything else. Inversion of control is an advanced concept to do this, and unless your system has something like it, you have to write glue code (usually in your controller). There is nothing I know like it for any other language (ironically, there are several Java projects that do this. That alone makes it worth using languages that compile to Java bytecode even if you aren't using Java.

    Those are the modern sensibilities - design patterns that haven't yet caught on in any other language.
    As to the bloated, overengineered bit, I'm not entirely sure what you're referring to. Why don't you tell the whole class?

    3) This sounds like a poor man's Rails.

    More like a rich man's rails - where "rich" means "well educated in design pattern theory." For that matter, Java projects tend to be better funded and less buggy than rails projects, so rich man's rails probably fits in the traditional sense of "rich."

    --
    Mod me down and I will become more powerful than you can possibly imagine!
  5. Re:Fail by Cyberax · · Score: 3, Insightful

    IoC is nothing new. However, good IoC _frameworks_ is a relatively new development.

    Spring blows almost everything out of water - it's very powerful and easy to use, and it can be integrated easy enough with _everything_. Even for very complex applications.