Foreword

The year 2005 was a traumatic year for the Java web application development community. It was under fire for the unnecessary "fat" architecture of Java Platform, Enterprise Edition (Java EE) systems compared to the new kids on the block like Ruby on Rails and Django. The search began for Java's answer to these frameworks. I had an existing product that was heavily invested in Java frameworks such as Spring and Hibernate, but because I had been involved with the Groovy team for a while, I knew we could create the solution that people were looking for. Hence, Grails was born.

I knew Groovy itself was a phenomenal piece of technology that combined the best of the dynamic language worlds and Java. Innovation has been rife within the Groovy community since the early days with its builder concept. It had inspired other languages, and more recent languages such as ActionScript 3 and ECMAScript 4 had adopted its support for mixed typing. Groovy had proven to me that you can mix a dynamically typed language like Groovy with a statically typed language like Java in the same code base and get the best of both worlds without incurring the cost of context switching.

In addition, I knew that the Java community has invested years in building the largest amount of open source software in the world. Thousands of libraries exist for Java, built by years of best practice. Reinventing the wheel seemed like a crazy idea. Building Grails on top of existing technologies like Spring and Hibernate has proven to be one of the best decisions we have made. For me, Grails is the natural next step for Java EE developers. If Spring and Hibernate provided an abstraction over Java EE and simplified development, then Grails is an abstraction over Spring, Hibernate, and Java EE that can take you, the developer, to the next level.

Through the use of domain-specific languages and higher-level abstractions, Grails dramatically simplifies web development on the Java platform. By bundling a container and a database, we eliminated all barriers, and by supporting hot reloading during development, agile development became a reality. However, even with all this simplicity, as Grails has matured it has become much more than a web framework. It has become a web platform that participates in your entire project life cycle. Grasping all the concepts and conventions and applying them to your projects can be a challenge.

Fortunately, books like Beginning Groovy and Grails can help you get a grasp on the technology and guide you through the steps to make your application a reality. Chris, Joseph, and Jim do an excellent job of guiding you through the basics and then plunging headfirst into advanced topics like security, Asynchronous JavaScript and XML (Ajax), and deployment.

Books like this one take a while to write, and Grails itself was nearly three years in the making. However, what staggers me most is not the progress of Grails, but rather the progress of the community. The Groovy and Grails communities are some of the most vibrant around. The Grails mailing lists receive around 150 posts a day from enthusiastic users either asking questions or responding to questions from others.

During the development of Grails, we made a conscious decision to implement a plug-in system so that others could extend and embrace the Grails philosophy of convention over configuration. The idea was based on the success seen by other open source projects, like the Firefox browser, in allowing the user community to embrace and extend the core platform. This has resulted in more than 60 user-contributed plug-ins (http://plugins.grails.org/) that extend and enhance Grails' core functionality. They represent more than three million lines of user-contributed code.

It gives me great pleasure that Beginning Groovy and Grails takes a look at not only Grails, but also some of the excellent plug-ins made available by our users. So many problems out there already have excellent solutions; why reinvent the wheel?

Graeme Rocher

Grails Project Lead and CTO of G2One Inc. (http://www.g2one.com)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset