Grails En Accion
Enviado por cbiran666 • 21 de Agosto de 2013 • 726 Palabras (3 Páginas) • 190 Visitas
Why Grails?
Grails is a next-generation Java web development framework that generates great
developer productivity gains through the confluence of a dynamic language, a Convention
over Configuration philosophy, powerfully pragmatic supporting tools, and
an agile perspective drawn from the best emerging web development paradigms.
1.1.1 First there was Rails...
Some have incorrectly labeled Grails a port of Ruby on Rails to the Java platform, but
this fails to recognize several points about Grails:
■ The amazing innovations that Grails, itself, has brought to the enterprise development
sector with its own secret sauces
■ The broad range of platforms that have influenced Grails (which include Ruby,
Python, PHP, and Java frameworks)
■ The many features that Grails brings to the table that aren’t presently available
in Rails—features drawn from the JVMs long history of use in enterprise settings
Nevertheless, Grails does embrace many of the innovative philosophies that Rails
brought to web development. When Ruby on Rails hit the web development landscape
(in 2004), and started gaining real industry traction and critical acclaim (during
2006), a whole new set of ideas about web development started to germinate.
None of the ideas were particularly new, but the execution was truly stunning.
Things like Convention over Configuration, scaffolding, code templates, and easy
database integration made bootstrapping an application lightning fast. The killer
demo was when David Heinemeier Hansson (the Rails founder) developed a
database-driven blog application from scratch in 15 minutes. Everyone’s jaw dropped.
The real power of these ideas was brought to the fore in Rails by using a dynamic
language (Ruby) to perform amazing metaclass magic. For those of us in enterprise
Java-land, there wasn’t a compelling Java equivalent. We were stuck with a statically
typed language that didn’t give us the same agility to do the metaclass work that made
it all work so elegantly.
1.1.2 Why Grails changed the game
Then, in 2006, along came Grails. Taking full advantage of Groovy as the underlying
dynamic language, Grails made it possible to create a Book object and query it with
dynamic methods like Book.findByTitle("Grails in Action") or Book.findAllBy-
DatePublishedGreaterThanAndTitleLike(myDate, "Grails"), even though none of
those methods really existed on the Book object.
Even better, you could also access any Java code or libraries you were already
using, and the language syntax was similar enough to Java to make the learning curve
painless. But best of all, at the end of the day, you had a WAR file to deploy to
...