The Definitive Guide to Grails 2nd Edition (Expert's Voice in Web Development)
The Definitive Guide to Grails 2nd Edition (Expert's Voice in Web Development) by Graeme Rocher and Jeff Brown
- Binding:
- Paperback
- Number of Pages:
- 648
- ISBN:
- 1590599950
- Product Group:
- book
- Publisher:
- APRESS
- Publication Date:
- Jan. 21, 2009
- BooksForGeeks.com ID:
- 7
Reviews for The Definitive Guide to Grails 2nd Edition (Expert's Voice in Web Development)
-
Could be better
Rated out of 5 stars, February 12th, 2010
I bought this book based on the reviews of others and I must admit to been underwhelmed.
"The Definitive Guide" it is not. What is presented is a well crafted example that guides your through the basics. There is no mention of best practices or reference to real world design decisions that you would need to make in the real world. Granted, thats an expectation of mine and not the authors.
At times I wasn't entirely sure whether I should be adding some of the code examples to my private version of gTunes that you build up as you work through the book or whether the code was provided for information purposes. This required flicking back and forth making it harder to follow.
I also found the book a little disjointed. The book introduces concepts as you go through the example system but there is often references to cocepts that have not been introduced.
In summary a good book but nothing special as far as tech books go. It does whats intended but other than offering a basic beginners guide I can't see myself using this as a reference.
"Grails in Action" is a much better book and one that covers all the bases for someone wishing to learn a new technology. The coverage is more in-depth and I felt had a little more substance to it. In my opinion the -
Excellent starter book for Grails
Rated out of 5 stars, September 12th, 2009
I've been meaning to learn Grails for ages and then two projects came along for which Grails seemed like the ideal choice. This book assumes that you already know Groovy (if not, then Groovy in Action is an ideal companion--though there is an Appendix on Groovy in the book). It then steps you though buiding a music store. It introduces all the key concepts such as Domain objects, Controllers and views, but also covers security (very well, with all sorts of generally useful security hints), url rewriting, services, commands and taglibs.
It also shows you how to leverage existing plug-ins and to write your own (including why you should do this even if you don't intend to make it publicly available).
All in all an excellent, clearly written, useful book. -
Absolutely Essential!
Rated out of 5 stars, July 12th, 2009
An absolutely essential purchase for anyone working with Grails! This book can be read from start to finish or used as a useful reference... it covers almost everything and the examples are great! I would recommend this books for people new to Grails and also 'seasoned' Grails developers! This book rarely leaves my desk! -
A must for the aspiring Grails developer. A thorough grounding in Grails. Highly recommended.
Rated out of 5 stars, February 12st, 2009
The books builds a music store application - 'gTunes'.
It calls upon Amazon Web Services to download album art and Quicktime to playback music as streaming audio. Initially this is done natively with Groovy and later a technique is used to call upon Java's NIO methods to make process more efficient.
An email notification services is provided enabling users to be notified of new album releases by an artist by using ActiveMQ JMS.
The book also demostrates FCKEditor, a web enabled text editor akin to Word, conventionally used for blogging, but added to the pot to integrate web master style announcements.
Grails is build upon Spring and Hibernate 3. It simplifies the developers life though by abstracting away the need to deal directly with so much of the XML configuration. So in effect you don't have as many disparate artifacts making up the code. It does this by utilising closures one of tne key features of Groovy. I believe Grails draws some of its inspiration from Ruby on Rails and follows the mantra. Convention over Configuration. All this makes the developers life easier.
Other aspects where Grails shines are in the way that all the telemetry involved in handling pagination. This is automatically provided out of the box.
The book shows how to create wizard type functionality. Now this builds upon Spring Web Flow. Grails narrows the disparity between the traditional Spring programming models of 'Spring MVC' versus 'Spring Web Flow' in this process and makes use of things like conversational and flash scopes. Something Struts 2 or JBoss Seam developers will be familiar with.
GORM the Groovy object relational mapping technology is showcased in detail. It's a DSL founded upon Hibernate 3 that does away with the need for the Data Access Object design pattern. It automatically creates finder methods for your domain properties through the Groovy Meta Object Protocol (MOP).
With GORM you embelish Domain classes with constraints which are used for validation purposes. But you can also embelish conventional annotated JPA domain classes by providing an additional class with the naming convention of 'domain name' with Constraint' appended, so you can easily reutilise EJB3 code. Compare this to things like Commons Validator or early Spring Bean Validation Framework with all it's XML and you'll find this a boon. (Things have admittedly improved with annotated BVF, JSR303 and Hibernate Validator).
GSP is illustrated. It much like JSP, but by taking advantage of the operator overloading Groovy provides to enhance Java, it becomes much easier to write custom tags.
In the area of Security, JSecurity is utilised and permissions used to only allow songs deemed as purchased to be listened to.
The book also touches upon how to defend against SQL Injection/Denial of Service attacks and Cross Site scripting.
The book also showcases Gant. (The Groovy version of Ant. Enables you to do conditional/loop processing without need for Ant Contrib). The book uses Gant and integrates with Ivy for dependency management instead of Maven. It is an agile development environment and is pre-configured for use with Jetty, much like Matt Raible's AppFuse. It touches upon how to manage the deployment process as well as IDE's that support Groovy/Grails.
The various flavours of Ajax integration gets a brief mention.
Web service coverage predominantly revolves around REST. There is an intro to using SOAP with Grails, but the example didn't seem to gel with the text.
The Appendix contains an overview of Groovy.
There were a number of listings quoted in the text which are incorrect. I guess this comes from the re-editing process and a lack of final proof reading. This tended to confuse things at times, but for the most part I was able to resolve these to their proper value and fed this back to APress/Graeme.
Overall the book is not as clear as Beginning Groovy & Grails, in that it tends to veer off course from time to time and illustrate things that aren't building upon the core gTunes app. But all in all it provides a much finer level of granularity and clarifies how Grails integrates & sits upon Spring and Hibernate.
To the uninitiated, I'd recommend reading Groovy in Action, Beginning Groovy & Grails, then this book to get a good understanding of both Groovy & Grails.

