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."
...getting interviewed about Groovy here.
There's some other good stuff there too, although the interview with Dr. Stonebreaker about column-oriented storage is kind of light on technical detail.
The Army reading list
I've heard that while the true Grail will bring you life, the false one will take it from you.
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?
I guess they didn't want to call it Jails?
Our apologies
The IBM developerWorks Web site is currently under maintenance.
Please try again later.
"Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
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.
Don't thank God, thank a doctor!
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!
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.
> Rails has been translated several times to other languages, like Python (Django...)
Absolutely not. Django preexisted the Rails buzz by years (it was an internal application at LJworld initially), and one of the reasons it's so good is that, unlike many, it is precisely not trying to mimic Rails.
That doesn't invalidate your point, though. I just thought I'd point it out, because, you know, to reach the next milestone, you first need to stop targetting the current one, and as you point out, not many are doing that right now.
-- B.
This sig does in fact not have the property it claims not to have.
Java has to be overengineered, because you need to use its API (or rework it all from scratch). Its object model is a toy: it lacks countless of features such as multiple inheritance, mixins, dynamic modification, parametric polymorphism, functional properties, introspection, operator overloading, and the list goes on and on. If you want an example of a non-toy object model, i.e. one that doesn't get in your way, but actually allows you to build powerful abstractions, supplant builtins and reuse code that might even not yet exist, take a look at Python's.
Also, I was not particularly defending Rails, nor claiming it can solve every problem.
I was about to say 13256278887989457651018865901401704640, but it appears this number is private property.
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
I was about to say 13256278887989457651018865901401704640, but it appears this number is private property.
> Where's the keystroke or mouse-click to get to the implementation?
EMACS and tags; Meta-.
> For auto-completion?
EMACS and dabrev; I bind it to Meta-Space.
> Where's the IDE that finds errors while I'm typing?
EMACS and flymake; It works for Java, PHP, perl, python, etc.
Here are screenshots of it working with python, all candy-colored for your editing pleasure, with mouseovers or minibuffer reports of errors as you type:
http://blog.printf.net/articles/2007/10/15/productivity-a-year-on