Hi,
My application is logically divided into server, which contain my Grails domain objects and controllers; and client, where I have my Ext GWT classes that build all the UI pages.
For UI requests, I am using an AJAX call to a controller method that returns, for instance, a list of domain objects as a JSON structure.
Following the DRY principle, I wouldn't like to "serialize" the domain data to a JSON string on the server then de-serialize it on the client to another structure - I'd like to take advantage of the Domain object I already have, this I don't have to change multiple places when I add, change or remove a new field.
Question is: is that a good way to go?
If yes, how would be the best way to make .groovy domain objects available on the "client-side" Ext GWT Java classes?
If no, why is it bad and what would you advice instead?