The Definitive Guide to Grails 2

Grails is a whole stack framework which goals to vastly simplify the duty of creating severe net purposes for the JVM. The options inside of Grails, like interceptors, tag libs, and Groovy Server Pages (GSP), make these within the Java neighborhood suppose correct at home.

Grails’ origin is on stable open resource applied sciences corresponding to Spring, Hibernate, and SiteMesh, which supplies it much more strength within the Java area: Spring offers strong inversion of regulate and MVC, Hibernate brings a good, mature item relational mapping expertise having the ability to combine with legacy platforms, and SiteMesh handles versatile structure keep watch over and web page decoration.

Grails enhances those with extra positive aspects that reap the benefits of the coding–by–convention paradigm equivalent to dynamic tag libraries, Grails item relational mapping, Groovy Server Pages, and scaffolding.

Graeme Rocher, Grails lead and founder, and Jeff Brown carry you thoroughly up–to–date with their authoritative and entirely accomplished advisor to the Grails 2 framework. You’ll get to grasp all of the center positive factors, providers, and Grails extensions through plug–ins, and comprehend the jobs that great and Grails are enjoying within the altering Web.

Show description

Preview of The Definitive Guide to Grails 2 PDF

Similar Development books

Introduction to Programming Using Python plus MyProgrammingLab with Pearson eText -- Access Card

Word: prior to buying, consult with your teacher to make sure you decide upon the proper ISBN. numerous models of Pearson's MyLab & learning items exist for every name, and registrations aren't transferable. To sign in for and use Pearson's MyLab & learning items, you may as well want a path identification, which your teacher will offer.

Ground Control: Fear and Happiness in the Twenty-First-Century City

While the figures say crime is falling, why are we extra nervous than ever? may perhaps our cities and towns be developing worry and distrust? extra estate is being in-built Britain than at any time because the moment global battle - yet it really is owned by means of deepest organizations, designed for revenue and watched over by means of CCTV.

The Dragon's Gift: The Real Story of China in Africa

Is China a rogue donor, as a few media pundits recommend? Or is China assisting the constructing international pave a pathway out of poverty, because the chinese language declare? within the previous couple of years, China's relief application has leapt out of the shadows. Media studies approximately large relief applications, aid for pariah regimes, regiments of chinese language hard work, and the ruthless exploitation of staff and ordinary assets in the various poorest international locations on the planet sparked fierce debates.

The Coming Prosperity: How Entrepreneurs Are Transforming the Global Economy

Ours is the main dynamic period in human heritage. some great benefits of 4 centuries of technological and organizational switch are eventually achieving a formerly excluded international majority. this alteration will create large-scale possibilities in richer nations just like the usa simply because it has in poorer international locations now within the ascent.

Extra info for The Definitive Guide to Grails 2

Show sample text content

Songs? }" var="song">

  • ${song. title}
  • Now that you've a template, you could regulate the grails-app/views/album/_albumList. gsp template to take advantage of jQuery to name a controller motion, demonstrate, at the AlbumController for every merchandise within the checklist. directory 8-15 exhibits (in daring) the alterations made to the _albumList. gsp template. directory 8-15. Updating _albumList. gsp to take advantage of jQuery hyperlinks

    • ${album. title}
    • $('#albumLink${album. id}'). click(function() { $('#musicPanel'). load(this. href); go back fake; });

    once more you notice that the JavaScript code is wrapped within the r:script tag, which factors the entire JavaScript to be loaded on the finish of the web page for functionality purposes. If a web page comprises a number of makes use of of the r:script tag, all that code is merged right into a unmarried script tag on the backside of the web page. realize how one can use the replace characteristic to specify that you really want the contents of the reaction to be positioned into an HTML

    that has a DOM identification with the price musicPanel. when you refresh the web page at this aspect and take a look at the hyperlinks, you’ll detect that the Ajax a part of the image is operating already! the drawback is that considering there is not any reveal motion within the AlbumController at this aspect, you get a 404 “Page now not discovered” mistakes from the server. Let’s right that by way of commencing AlbumController and imposing the exhibit motion. directory 8-16 exhibits the code, which easily obtains the Album example utilizing the identification parameter from the params item after which makes use of it to render the _album. gsp template built in directory 8-14. directory 8-16. The show motion of AlbumController def display() { def album = Album. get(params. identification) if(album) { def artist = album. artist render(template:"album", model:[artist:artist, album:album]) } else { render "Album now not came across. " } } by way of including a little bit CSS magic to augment the glance of the _album. gsp template, abruptly you've album information being got through Ajax and rendered to the view. determine 8-2 exhibits the results of your exertions. determine 8-2. exhibiting albums utilizing Ajax unfortunately, inspite of the CSS improvements, Album information are taking a look a section bland with all that textual content. Wouldn’t it's great with the intention to reveal the album artwork for every album? the place there's a will, there's a way—luckily, Apple has come to the rescue the following by way of supplying a REST-based net carrier that we could builders search for album paintings from its giant pool of resources. The carrier is out there at http://itunes. apple. com/search. Open that URL in an internet browser and also you may still see a reaction that appears anything like this: { "resultCount":0, "results": [] } That doesn’t glance very attention-grabbing. definitely it doesn’t seem like whatever that can assist you show album paintings in gTunes. what's proven there's the JSON reaction to our request.

    Download PDF sample

    Rated 4.20 of 5 – based on 19 votes