Grails 1.1 Web Application Development

Reclaiming Productivity for faster Java Web Development

Grails 1.1 Web Application Development

Jon Dickinson

Reclaiming Productivity for faster Java Web Development
Mapt Subscription
FREE
$29.99/m after trial
eBook
$16.80
RRP $23.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$16.80
$39.99
$29.99p/m after trial
RRP $23.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781847196682
Paperback328 pages

Book Description

Web development is tricky—even a simple web application has a number of context changes ready to trip up the unwary. Grails takes the everyday pain out of web application development, allowing us to focus on delivering real application logic and create seamless experiences that will address the needs of our users. This book will take the pain out of Grails by showing you exactly how to build a web application with a minimum of fuss.

With this book, even if you are new to Grails, you will be up and running before you know it. You will be able to code faster and your code will be better. This clear and concise book is packed with examples and clear instructions to help you build your first Grails application and gives you the skills to speed up your application development by adding a different angle for learning about the topic. After a brief introduction to the dynamic JVM-based Groovy programming language, which teaches you enough about Groovy to understand the relationship between Grails and the Groovy scripting language, it shows how to use Grails and a number of key plug-ins to deliver valuable web applications. It also takes you through creating, developing, testing, and deploying an example team collaboration application in Grails.

Using an incremental and iterative approach you will learn how to build a basic web application with secure authentication and different levels of authorization. You will learn how to handle file upload allowing users to share files. Some advanced features of object-oriented persistence will be introduced through adding tags for messages and files to giving users a robust categorization system.

You will then build on the basic application to enhance the user experience through AJAX and the RichUI plug-in. You will take a further step into the world of Web 2.0 by adding an RSS feed and a REST service to the application. Once the entire application is up and running, you will learn how to create your own plug-in for tagging. Finally, you will learn how to deploy this application to a production environment.

Table of Contents

Chapter 1: Getting Started with Grails
Why Grails?
Installing Grails
Build a team communication portal
Summary
Chapter 2: Managing Users with Scaffolding
What is scaffolding?
Create the domain classes
Creating controllers to enable scaffolding
Control through constraints
Meeting the relations
Bootstrapping demo data
Summary
Chapter 3: Posting Messages
Message domain class
Rendering a form
Handling user input
Create a home page
Styles and navigation
Tidying up
Summary
Chapter 4: Introduction to Groovy
What is Groovy?
Why Groovy?
Running Groovy
Groovy features
Summary
Chapter 5: Authentication with JSecurity Plug-in
Where to find plug-ins
Installing a plug-in
Configuring JSecurity plug-in
Add the missing pieces
JSecurity tags
Who posted that?
Summary
Chapter 6: Testing
Writing unit tests
JUnit refresher
Unit tests in Grails
Integration testing
Integration tests in Grails
Functional testing
Functional testing In Grails
Testing guidance
Summary
Chapter 7: File Sharing
File domain object
FileController
File Upload GSP
Saving the file
Viewing files
Modeling for efficiency
Downloading files
Summary
Chapter 8: More GORM and Criteria
More GORM relationships
Querying with criteria
Updating FileController
Render file versions
Fix file download
Summary
Chapter 9: Services
Introducing services
Implementing FileService
Summary
Chapter 10: Managing Content through Tagging
Add basic tagging
Customize the home page
All Messages and Files
Summary
Chapter 11: AJAX and RIA Frameworks
Edit tags inline
Auto-complete tags
Introducing tag clouds
Summary
Chapter 12: Searching, RSS, and REST Services
Searching
RSS
REST services
Summary
Chapter 13: Build your own Plug-in
The tagger plug-in
Using plug-in events
Summary
Chapter 14: Deployment and the Real World
Set up the environment
Configure Grails
Hosting options
Next steps
Summary

What You Will Learn

  • Understand the relationship between Grails and the Groovy scripting language
  • Learn enough about Groovy to get you writing your first Grails applications
  • Use the built-in AJAX support to enhance user interaction and create slick user interfaces with the RichUI plug-in
  • Develop and use a REST service interface and provide an API through REST
  • Handle file upload and versioning allowing users to share files
  • Use Grails scaffolding to generate a user interface to allow management of users and roles within the application.
  • Secure your application with the JSecurity plug-in and use plug-ins to solve common problems
  • Reduce object persistence issues using Grails Object-Relational Mapper
  • Create your own Grails plug-in for tagging to limit the amount of data that is displayed on your home page
  • Get to grips with automated testing to write functional tests that drive the application
  • Expose your application to other developers with a RESTful API

Authors

Table of Contents

Chapter 1: Getting Started with Grails
Why Grails?
Installing Grails
Build a team communication portal
Summary
Chapter 2: Managing Users with Scaffolding
What is scaffolding?
Create the domain classes
Creating controllers to enable scaffolding
Control through constraints
Meeting the relations
Bootstrapping demo data
Summary
Chapter 3: Posting Messages
Message domain class
Rendering a form
Handling user input
Create a home page
Styles and navigation
Tidying up
Summary
Chapter 4: Introduction to Groovy
What is Groovy?
Why Groovy?
Running Groovy
Groovy features
Summary
Chapter 5: Authentication with JSecurity Plug-in
Where to find plug-ins
Installing a plug-in
Configuring JSecurity plug-in
Add the missing pieces
JSecurity tags
Who posted that?
Summary
Chapter 6: Testing
Writing unit tests
JUnit refresher
Unit tests in Grails
Integration testing
Integration tests in Grails
Functional testing
Functional testing In Grails
Testing guidance
Summary
Chapter 7: File Sharing
File domain object
FileController
File Upload GSP
Saving the file
Viewing files
Modeling for efficiency
Downloading files
Summary
Chapter 8: More GORM and Criteria
More GORM relationships
Querying with criteria
Updating FileController
Render file versions
Fix file download
Summary
Chapter 9: Services
Introducing services
Implementing FileService
Summary
Chapter 10: Managing Content through Tagging
Add basic tagging
Customize the home page
All Messages and Files
Summary
Chapter 11: AJAX and RIA Frameworks
Edit tags inline
Auto-complete tags
Introducing tag clouds
Summary
Chapter 12: Searching, RSS, and REST Services
Searching
RSS
REST services
Summary
Chapter 13: Build your own Plug-in
The tagger plug-in
Using plug-in events
Summary
Chapter 14: Deployment and the Real World
Set up the environment
Configure Grails
Hosting options
Next steps
Summary

Book Details

ISBN 139781847196682
Paperback328 pages
Read More

Read More Reviews

Recommended for You

Alfresco Share Book Cover
Alfresco Share
$ 29.99
$ 21.00
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
Alfresco Developer Guide Book Cover
Alfresco Developer Guide
$ 35.99
$ 25.20
Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Alfresco 3 Cookbook Book Cover
Alfresco 3 Cookbook
$ 35.99
$ 25.20
iReport 3.7 Book Cover
iReport 3.7
$ 23.99
$ 16.80