Search code examples
jquerygrailscsssproutcore

More interactive Grails app (like Sproutcore)


There are some questions I have.

I'm currently writing webapps using Grails. Now i played a bit with Sproutcore and there are some advantages as the beautiful ui and the easy data binding with automatic ajax/javascript updates.

Is it possible to use grails' domain and service logic from Sproutcore (rather than only the database model for the backend) when I use Sproutcore with Grails?

Are there other "desktop feeling", userfriendly web frameworks outside that can be used with grails (or some other framework and language - as long as it pays back the effort)? I know there is Cappuccino, Vaadin, ZK and Dojo. But all except cappuccino lacks the beautiful ui widgets. The rest seem to work good for intra-business projects, but not for beauty cloudapps.

Is it (without too much effort) possible to enhance Grails standard templates with CSS3/HTML5/jQuery to reach the same feeling as in Sproutcore apps (in principle it should be possible to build something like Things)? Where is a good starting point? Are there opensource apps to look at? Or good tutorials?

Maybe it would have been best to separate this into smaller questions, but I think the fit together...

Thx in advance..


Solution

  • I think a good fit to the architecture you described is to expose your grails components as services.

    Grails has fairly good REST support to bind scaffolded controller actions to REST services,

    static mappings = {
       "/product/$id?"(resource:"product")
    }
    

    You might have to edit the templates used, but it's probably easier to change them to output JSON or SOAP responses and use the support for this with your favorite ajax-friendly framework.

    http://grails.org/doc/latest/guide/webServices.html#REST

    I imagine there are a few more considerations to a cloud friendly architecture, and would suggest spending a couple of hours watching these 2 screencast that expand on this type of architecture:

    http://skillsmatter.com/podcast/home/change-grails

    http://www.youtube.com/watch?v=axOPJbrIjkY