jQuery - what benefits are there to using via the Grails Pluigin?

Chris Ward

New member
Hi,

I know this might sound like a strange question but what benefits are there to using jQuery as a Grails Plugin?

In my application I make extensive use of jQuery but I've managed to get by with just using it in "raw" form in my GSPs. By this I mean I've not installed the jQuery pluging (it's installed as standard on current versions of Grails I believe) - I simply add the JavaScript and CSS include statements in the GSP.

I suspect I am missing out on some "Grails Goodness" by doing this. Could someone give me a short summary?

Many thanks,
Chris
 

dave

Administrator
Staff member
I think it probably makes it more groovy in the sense of loading the javascript and also any jQuery plugins you additionally want to load but aside from that, I don't think you're missing out on anything. For somethings I personally prefer to have full control over what's happening so I too load the jQuery file and any jQuery plugins manually.

Although I do use Grails 'resources' to define sets of javascript resources and appropriate css stylesheets. But a plugin to load jQuery seems overkill. IMO.
 

Chris Ward

New member
I think it probably makes it more groovy in the sense of loading the javascript and also any jQuery plugins you additionally want to load but aside from that, I don't think you're missing out on anything. For somethings I personally prefer to have full control over what's happening so I too load the jQuery file and any jQuery plugins manually.

Although I do use Grails 'resources' to define sets of javascript resources and appropriate css stylesheets. But a plugin to load jQuery seems overkill. IMO.

Hi,

Thanks for that Dave. I was wondering if I risked angering the Grails Gods by not "doing the plugin thing" (or "pluging" as I appear to have written in my original post)

Cheers,
Chris
 
Top