Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Java

Mastering the Grails Powerful Tiny Web Framework 89

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."
This discussion has been archived. No new comments can be posted.

Mastering the Grails Powerful Tiny Web Framework

Comments Filter:
  • by SanityInAnarchy ( 655584 ) <ninja@slaphack.com> on Saturday January 26, 2008 @10:33PM (#22197568) Journal
    AJAX.

    Not that AJAX is a bad idea, but that it needed a word. And that word irritates the hell out of those of us who knew it as DHTML, or simply as Javascript.

    Or, how's this: "Blog".

    It's a journal, or it's a column. Either way, the only thing that makes it special is that it's on the Internet.

    Or how about this: "Myspace".

    This one makes me absolutely livid. It's Geocities 2.0, and you can just hear the resounding SMACK of a million programmers at once wondering why they didn't do it first. Not "think of it", because we already had Geocities, but do it.

    I'm with you, somewhat, but that doesn't mean Rails is worthless.
  • by Shados ( 741919 ) on Saturday January 26, 2008 @11:12PM (#22197726)

    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...)
  • Re:Fail (Score:5, Insightful)

    by fireboy1919 ( 257783 ) <rustyp AT freeshell DOT org> on Sunday January 27, 2008 @02:35AM (#22198524) Homepage Journal
    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."
  • Re:Fail (Score:4, Insightful)

    by Cyberax ( 705495 ) on Sunday January 27, 2008 @06:48AM (#22199196)
    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.
  • Re:Java Sucks (Score:2, Insightful)

    by Wiseman1024 ( 993899 ) on Sunday January 27, 2008 @04:46PM (#22202088)

    Where's the compiler-checked documentation in Python?
    It's supposed those using Python seriously aren't supposed to need that kind of babysitting.

    Where's the keystroke or mouse-click to get to the implementation?
    What? That's not a feature of Python, nor Java, nor any language that I know of. You are talking about editors. And again, there's a point to make: a good language shouldn't require any special editor features because it's a mess. You can edit large Python programs with anything you want, as it never gets as bloated and complicated, and the abstraction capabilities are much better.

    Back to the language, can you in Java start a thread with a console so you can introspect into objects in real time, have access to a function's internals, the stack frames and anything else, update code in real time, and so on?

    To find all references?
    You can only do this reliably in a language that's so limited as to not have first-class functions, among other things. And I consider this lame. If we start omitting abstraction features to make things easier, we might as well end up with assembly. (Wait, you can dynamically alter code from assembly.)

    To rename things?
    Renaming symbols is as easy in Python as it would be in Java, only that you don't even have to go through all of it if you want something renamed just for you. For example, if you don't like the "pow" builtin function to be "pow" and want it named "power", just do power = pow. It's actually shameful that you can't do such a simple thing in Java. Perhaps that's one of the reasons why you're so concerned about renaming.

    Where's the IDE that finds errors while I'm typing?
    Do you really like all those babysitting features? There are lints for Python, as well of syntax highlighting, and that's more than you should need.

    More importantly, you shouldn't want to know, for example, whether a property you're trying to use actually exists, or whether an object you're passed is of a particular class. That breaks abstraction and reusability

"Engineering without management is art." -- Jeff Johnson

Working...