Re: GWT support for Grails/Groovy domain objects

2010-02-17 Thread donruby
I think the GWT - Hibernate impedance problem is solved nicely with
Gilead (http://gilead.sourceforge.net) but I would like to use Grails/
GORM instead of using Hibernate/JPA directly. The problem is Grails/
GORM domain objects are Groovy source, which neither GWT nor Gilead
currently support.

Regards,
Don

On Jan 27, 1:30 am, Jan Ehrhardt jan.ehrha...@googlemail.com wrote:
 The problem is the GWT RPC's serialization, which can't work with objects
 created by hibernate. You can use the DTO Grails plugin 
 (http://www.grails.org/plugin/dto) or you can use JSON / REST for
 communication.

 In the case of a Grails app, which comes with great support for REST / JSON,
 I would prefer the second way.

 Regards
 Jan Ehrhardt

 On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D 



 donald.r...@mindspring.com wrote:
  GWT is the obvious choice for UI. But if you want to use Grails/Groovy
  for server side, you have to either code messy DTOs or client side
  POJOs.  It would be nice if GWT would support using the Grails/Groovy
  domain objects directly on the client.  Any chance of that happening?

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Grails/Groovy domain objects

2010-01-28 Thread Johan Rydberg
Have you guys checked the http://github.com/chirino/resty-gwt project?  
It has a generator

that does pretty much all the awful things Roger talks about.

On 1/28/10 9:14 AM, Abdullah Shaikh wrote:

Hi Roger,

Then the only option left is xml, of course if we are not going 
GWT-RPC way.


So what do you think will be better JSON or XML ?

I have created a GWT application, the communication with server part 
is pending, the server side is java but its an already existing 
application, so I need to hook something in between the service side 
application  GWT to communicate, so I am looking out if it should be 
json or xml.



- Abdullah

On Wed, Jan 27, 2010 at 5:11 PM, Roger Studner rstud...@gmail.com 
mailto:rstud...@gmail.com wrote:


And to add one thing.

Using JSON w/ GWT is well.. awful.

The main reason for this, is that you get JSON back to the client,
and either use Overlay Types (can't use instanceof with there, and
about 500 other issues).. or you hve to take a simple
OverlayType and then re-instantiate all of your objects (i.e. you
do eval() once on the JSON, then for-loop etc to re-instantiate
objects from that JSONObject).

And then, the joy doesn't stop.  When you want to say, post JSON
back to the server, you have to redo this process, converting all
the java objects (which are of course actually javascript) into
JSON.

All in all, using JSON w/ GWT is a very (very) painful experience.

THe humor of course, is that you have to convert objects to and
from Java so that you can then use all the java API's etc that
GWT (just converts into Javascript).

Heh

Roger

On Jan 27, 2010, at 1:30 AM, Jan Ehrhardt wrote:


The problem is the GWT RPC's serialization, which can't work with
objects created by hibernate. You can use the DTO Grails plugin
(http://www.grails.org/plugin/dto) or you can use JSON / REST for
communication.

In the case of a Grails app, which comes with great support for
REST / JSON, I would prefer the second way.

Regards
Jan Ehrhardt

On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D
donald.r...@mindspring.com mailto:donald.r...@mindspring.com
wrote:

GWT is the obvious choice for UI. But if you want to use
Grails/Groovy
for server side, you have to either code messy DTOs or client
side
POJOs.  It would be nice if GWT would support using the
Grails/Groovy
domain objects directly on the client.  Any chance of that
happening?

--
You received this message because you are subscribed to the
Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the

Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google

Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google 
Groups Google Web Toolkit group.

To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups Google 
Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Grails/Groovy domain objects

2010-01-28 Thread Abdullah Shaikh
Hey Johan, thanks for the link, I will check it out.

On Thu, Jan 28, 2010 at 3:23 PM, Johan Rydberg johan.rydb...@edgeware.tvwrote:

 Have you guys checked the http://github.com/chirino/resty-gwt project?  It
 has a generator
 that does pretty much all the awful things Roger talks about.


 On 1/28/10 9:14 AM, Abdullah Shaikh wrote:

 Hi Roger,

 Then the only option left is xml, of course if we are not going GWT-RPC
 way.

 So what do you think will be better JSON or XML ?

 I have created a GWT application, the communication with server part is
 pending, the server side is java but its an already existing application, so
 I need to hook something in between the service side application  GWT to
 communicate, so I am looking out if it should be json or xml.


 - Abdullah

 On Wed, Jan 27, 2010 at 5:11 PM, Roger Studner rstud...@gmail.commailto:
 rstud...@gmail.com wrote:

And to add one thing.

Using JSON w/ GWT is well.. awful.

The main reason for this, is that you get JSON back to the client,
and either use Overlay Types (can't use instanceof with there, and
about 500 other issues).. or you hve to take a simple
OverlayType and then re-instantiate all of your objects (i.e. you
do eval() once on the JSON, then for-loop etc to re-instantiate
objects from that JSONObject).

And then, the joy doesn't stop.  When you want to say, post JSON
back to the server, you have to redo this process, converting all
the java objects (which are of course actually javascript) into
JSON.

All in all, using JSON w/ GWT is a very (very) painful experience.

THe humor of course, is that you have to convert objects to and
from Java so that you can then use all the java API's etc that
GWT (just converts into Javascript).

Heh

Roger

On Jan 27, 2010, at 1:30 AM, Jan Ehrhardt wrote:

 The problem is the GWT RPC's serialization, which can't work with
objects created by hibernate. You can use the DTO Grails plugin
(http://www.grails.org/plugin/dto) or you can use JSON / REST for
communication.

In the case of a Grails app, which comes with great support for
REST / JSON, I would prefer the second way.

Regards
Jan Ehrhardt

On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D
donald.r...@mindspring.com mailto:donald.r...@mindspring.com

wrote:

GWT is the obvious choice for UI. But if you want to use
Grails/Groovy
for server side, you have to either code messy DTOs or client
side
POJOs.  It would be nice if GWT would support using the
Grails/Groovy
domain objects directly on the client.  Any chance of that
happening?

--
You received this message because you are subscribed to the
Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.

To unsubscribe from this group, send email to

 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com

 mailto:google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com
 .

For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.



--You received this message because you are subscribed to the
Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.

To unsubscribe from this group, send email to

 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com

 mailto:google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .

For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.


--You received this message because you are subscribed to the
 Google
Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.

To unsubscribe from this group, send email to

 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com

 mailto:google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com
 .

For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.


 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 

Re: GWT support for Grails/Groovy domain objects

2010-01-28 Thread Roger Studner
Ooo.. will definitely check this out.

I'd gone to using semi-generic JavaScriptObjects on the client side, and 
closely matching server side objects.. and then had Spring 3.0 w/ Jackson 
handle the server side marshalling in 2 directions.

Thanks Johan

Roger

On Jan 28, 2010, at 4:53 AM, Johan Rydberg wrote:

 Have you guys checked the http://github.com/chirino/resty-gwt project?  It 
 has a generator
 that does pretty much all the awful things Roger talks about.
 
 On 1/28/10 9:14 AM, Abdullah Shaikh wrote:
 Hi Roger,
 
 Then the only option left is xml, of course if we are not going GWT-RPC way.
 
 So what do you think will be better JSON or XML ?
 
 I have created a GWT application, the communication with server part is 
 pending, the server side is java but its an already existing application, so 
 I need to hook something in between the service side application  GWT to 
 communicate, so I am looking out if it should be json or xml.
 
 
 - Abdullah
 
 On Wed, Jan 27, 2010 at 5:11 PM, Roger Studner rstud...@gmail.com 
 mailto:rstud...@gmail.com wrote:
 
And to add one thing.
 
Using JSON w/ GWT is well.. awful.
 
The main reason for this, is that you get JSON back to the client,
and either use Overlay Types (can't use instanceof with there, and
about 500 other issues).. or you hve to take a simple
OverlayType and then re-instantiate all of your objects (i.e. you
do eval() once on the JSON, then for-loop etc to re-instantiate
objects from that JSONObject).
 
And then, the joy doesn't stop.  When you want to say, post JSON
back to the server, you have to redo this process, converting all
the java objects (which are of course actually javascript) into
JSON.
 
All in all, using JSON w/ GWT is a very (very) painful experience.
 
THe humor of course, is that you have to convert objects to and
from Java so that you can then use all the java API's etc that
GWT (just converts into Javascript).
 
Heh
 
Roger
 
On Jan 27, 2010, at 1:30 AM, Jan Ehrhardt wrote:
 
The problem is the GWT RPC's serialization, which can't work with
objects created by hibernate. You can use the DTO Grails plugin
(http://www.grails.org/plugin/dto) or you can use JSON / REST for
communication.
 
In the case of a Grails app, which comes with great support for
REST / JSON, I would prefer the second way.
 
Regards
Jan Ehrhardt
 
On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D
donald.r...@mindspring.com mailto:donald.r...@mindspring.com
wrote:
 
GWT is the obvious choice for UI. But if you want to use
Grails/Groovy
for server side, you have to either code messy DTOs or client
side
POJOs.  It would be nice if GWT would support using the
Grails/Groovy
domain objects directly on the client.  Any chance of that
happening?
 
--
You received this message because you are subscribed to the
Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
 
 
 
-- You received this message because you are subscribed to the
Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
 
-- You received this message because you are subscribed to the Google
Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
 
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 

Re: GWT support for Grails/Groovy domain objects

2010-01-28 Thread Moayad Abu Jaber
Dear Abdallah,

if your server side is java, for sure will be Servlet. why you don't try to
used Asynchronous HTTP Requests technique instead of JSON or XML. I guess
the below link helpful for you :)

http://www.gwtapps.com/doc/html/com.google.gwt.http.client.html

 I hope that helpful for you .

Best Regards,
Moayad Abu Jaber
SCJP 1.5, SCWCD 1.4, SCBCD 1.5

On Thu, Jan 28, 2010 at 11:14 AM, Abdullah Shaikh 
abdullah.shaik...@gmail.com wrote:

 Hi Roger,

 Then the only option left is xml, of course if we are not going GWT-RPC
 way.

 So what do you think will be better JSON or XML ?

 I have created a GWT application, the communication with server part is
 pending, the server side is java but its an already existing application, so
 I need to hook something in between the service side application  GWT to
 communicate, so I am looking out if it should be json or xml.


 - Abdullah

 On Wed, Jan 27, 2010 at 5:11 PM, Roger Studner rstud...@gmail.com wrote:

 And to add one thing.

 Using JSON w/ GWT is well.. awful.

 The main reason for this, is that you get JSON back to the client, and
 either use Overlay Types (can't use instanceof with there, and about 500
 other issues).. or you hve to take a simple OverlayType and then
 re-instantiate all of your objects (i.e. you do eval() once on the JSON,
 then for-loop etc to re-instantiate objects from that JSONObject).

 And then, the joy doesn't stop.  When you want to say, post JSON back to
 the server, you have to redo this process, converting all the java objects
 (which are of course actually javascript) into JSON.

 All in all, using JSON w/ GWT is a very (very) painful experience.

 THe humor of course, is that you have to convert objects to and from
 Java so that you can then use all the java API's etc that GWT (just
 converts into Javascript).

 Heh

 Roger

 On Jan 27, 2010, at 1:30 AM, Jan Ehrhardt wrote:

 The problem is the GWT RPC's serialization, which can't work with objects
 created by hibernate. You can use the DTO Grails plugin (
 http://www.grails.org/plugin/dto) or you can use JSON / REST for
 communication.

 In the case of a Grails app, which comes with great support for REST /
 JSON, I would prefer the second way.

 Regards
 Jan Ehrhardt

 On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D 
 donald.r...@mindspring.com wrote:

 GWT is the obvious choice for UI. But if you want to use Grails/Groovy
 for server side, you have to either code messy DTOs or client side
 POJOs.  It would be nice if GWT would support using the Grails/Groovy
 domain objects directly on the client.  Any chance of that happening?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Grails/Groovy domain objects

2010-01-28 Thread Roger Studner
Just checked this out.. it still has I guess the one sort-of problem.

If you have a complex client side object.. that you have to marshall into 
JSON.. it is a pain point.

But hey, that is what coding is about :)

The reason I use a JavaScriptObject (btw, for me, it is a very large tree 
structure that represents a file system and has business logic). is so I can do

JSONObject jo = new JSONObject(myJavaScriptObject);
doPost(jo.toString());

The resty-gwt project doesn't address this client side JSON generation, it just 
handles making the server side endpoints (and since it uses JAX-RS, that means 
please include there 83 jars in your project).

Roger

On Jan 28, 2010, at 4:53 AM, Johan Rydberg wrote:

 Have you guys checked the http://github.com/chirino/resty-gwt project?  It 
 has a generator
 that does pretty much all the awful things Roger talks about.
 
 On 1/28/10 9:14 AM, Abdullah Shaikh wrote:
 Hi Roger,
 
 Then the only option left is xml, of course if we are not going GWT-RPC way.
 
 So what do you think will be better JSON or XML ?
 
 I have created a GWT application, the communication with server part is 
 pending, the server side is java but its an already existing application, so 
 I need to hook something in between the service side application  GWT to 
 communicate, so I am looking out if it should be json or xml.
 
 
 - Abdullah
 
 On Wed, Jan 27, 2010 at 5:11 PM, Roger Studner rstud...@gmail.com 
 mailto:rstud...@gmail.com wrote:
 
And to add one thing.
 
Using JSON w/ GWT is well.. awful.
 
The main reason for this, is that you get JSON back to the client,
and either use Overlay Types (can't use instanceof with there, and
about 500 other issues).. or you hve to take a simple
OverlayType and then re-instantiate all of your objects (i.e. you
do eval() once on the JSON, then for-loop etc to re-instantiate
objects from that JSONObject).
 
And then, the joy doesn't stop.  When you want to say, post JSON
back to the server, you have to redo this process, converting all
the java objects (which are of course actually javascript) into
JSON.
 
All in all, using JSON w/ GWT is a very (very) painful experience.
 
THe humor of course, is that you have to convert objects to and
from Java so that you can then use all the java API's etc that
GWT (just converts into Javascript).
 
Heh
 
Roger
 
On Jan 27, 2010, at 1:30 AM, Jan Ehrhardt wrote:
 
The problem is the GWT RPC's serialization, which can't work with
objects created by hibernate. You can use the DTO Grails plugin
(http://www.grails.org/plugin/dto) or you can use JSON / REST for
communication.
 
In the case of a Grails app, which comes with great support for
REST / JSON, I would prefer the second way.
 
Regards
Jan Ehrhardt
 
On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D
donald.r...@mindspring.com mailto:donald.r...@mindspring.com
wrote:
 
GWT is the obvious choice for UI. But if you want to use
Grails/Groovy
for server side, you have to either code messy DTOs or client
side
POJOs.  It would be nice if GWT would support using the
Grails/Groovy
domain objects directly on the client.  Any chance of that
happening?
 
--
You received this message because you are subscribed to the
Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
 
 
 
-- You received this message because you are subscribed to the
Google Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
 
-- You received this message because you are subscribed to the Google
Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
 
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Google 

Re: GWT support for Grails/Groovy domain objects

2010-01-27 Thread Roger Studner
And to add one thing.

Using JSON w/ GWT is well.. awful.

The main reason for this, is that you get JSON back to the client, and either 
use Overlay Types (can't use instanceof with there, and about 500 other 
issues).. or you hve to take a simple OverlayType and then re-instantiate all 
of your objects (i.e. you do eval() once on the JSON, then for-loop etc to 
re-instantiate objects from that JSONObject).

And then, the joy doesn't stop.  When you want to say, post JSON back to the 
server, you have to redo this process, converting all the java objects (which 
are of course actually javascript) into JSON.

All in all, using JSON w/ GWT is a very (very) painful experience.

THe humor of course, is that you have to convert objects to and from Java so 
that you can then use all the java API's etc that GWT (just converts into 
Javascript).

Heh

Roger

On Jan 27, 2010, at 1:30 AM, Jan Ehrhardt wrote:

 The problem is the GWT RPC's serialization, which can't work with objects 
 created by hibernate. You can use the DTO Grails plugin 
 (http://www.grails.org/plugin/dto) or you can use JSON / REST for 
 communication.
 
 In the case of a Grails app, which comes with great support for REST / JSON, 
 I would prefer the second way.
 
 Regards
 Jan Ehrhardt
 
 On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D 
 donald.r...@mindspring.com wrote:
 GWT is the obvious choice for UI. But if you want to use Grails/Groovy
 for server side, you have to either code messy DTOs or client side
 POJOs.  It would be nice if GWT would support using the Grails/Groovy
 domain objects directly on the client.  Any chance of that happening?
 
 --
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.
 
 
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Grails/Groovy domain objects

2010-01-27 Thread Matt Moriarity
I read that GWT 2.0 supports serializing enhanced objects from JDO or
JPA. So if they are hibernate objects, wouldn't the JPA support cover
that?

On Jan 27, 1:30 am, Jan Ehrhardt jan.ehrha...@googlemail.com wrote:
 The problem is the GWT RPC's serialization, which can't work with objects
 created by hibernate. You can use the DTO Grails plugin 
 (http://www.grails.org/plugin/dto) or you can use JSON / REST for
 communication.

 In the case of a Grails app, which comes with great support for REST / JSON,
 I would prefer the second way.

 Regards
 Jan Ehrhardt

 On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D 



 donald.r...@mindspring.com wrote:
  GWT is the obvious choice for UI. But if you want to use Grails/Groovy
  for server side, you have to either code messy DTOs or client side
  POJOs.  It would be nice if GWT would support using the Grails/Groovy
  domain objects directly on the client.  Any chance of that happening?

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Grails/Groovy domain objects

2010-01-27 Thread Jan Ehrhardt
Wow, I didn't recognize this feature. It's great, but it would only work, if
Hibernate is used as a JPA provider.

More on this:
http://code.google.com/intl/de/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes
Look at the 'Serializing Enhanced Classes' section.

Regards
Jan Ehrhardt

On Wed, Jan 27, 2010 at 5:55 PM, Matt Moriarity matt.moriar...@gmail.comwrote:

 I read that GWT 2.0 supports serializing enhanced objects from JDO or
 JPA. So if they are hibernate objects, wouldn't the JPA support cover
 that?

 On Jan 27, 1:30 am, Jan Ehrhardt jan.ehrha...@googlemail.com wrote:
  The problem is the GWT RPC's serialization, which can't work with objects
  created by hibernate. You can use the DTO Grails plugin (
 http://www.grails.org/plugin/dto) or you can use JSON / REST for
  communication.
 
  In the case of a Grails app, which comes with great support for REST /
 JSON,
  I would prefer the second way.
 
  Regards
  Jan Ehrhardt
 
  On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D 
 
 
 
  donald.r...@mindspring.com wrote:
   GWT is the obvious choice for UI. But if you want to use Grails/Groovy
   for server side, you have to either code messy DTOs or client side
   POJOs.  It would be nice if GWT would support using the Grails/Groovy
   domain objects directly on the client.  Any chance of that happening?
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Google Web Toolkit group.
   To post to this group, send email to
 google-web-tool...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs
 cr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Grails/Groovy domain objects

2010-01-27 Thread Jan Ehrhardt
Oh I forgot to say, that Grails support JPA through the GORM-JPA Plugin
http://www.grails.org/plugin/gorm-jpa.

Regards
Jan Ehrhardt

On Thu, Jan 28, 2010 at 7:51 AM, Jan Ehrhardt
jan.ehrha...@googlemail.comwrote:

 Wow, I didn't recognize this feature. It's great, but it would only work,
 if Hibernate is used as a JPA provider.

 More on this:
 http://code.google.com/intl/de/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes
 Look at the 'Serializing Enhanced Classes' section.

 Regards
 Jan Ehrhardt


 On Wed, Jan 27, 2010 at 5:55 PM, Matt Moriarity 
 matt.moriar...@gmail.comwrote:

 I read that GWT 2.0 supports serializing enhanced objects from JDO or
 JPA. So if they are hibernate objects, wouldn't the JPA support cover
 that?

 On Jan 27, 1:30 am, Jan Ehrhardt jan.ehrha...@googlemail.com wrote:
  The problem is the GWT RPC's serialization, which can't work with
 objects
  created by hibernate. You can use the DTO Grails plugin (
 http://www.grails.org/plugin/dto) or you can use JSON / REST for
  communication.
 
  In the case of a Grails app, which comes with great support for REST /
 JSON,
  I would prefer the second way.
 
  Regards
  Jan Ehrhardt
 
  On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D 
 
 
 
  donald.r...@mindspring.com wrote:
   GWT is the obvious choice for UI. But if you want to use Grails/Groovy
   for server side, you have to either code messy DTOs or client side
   POJOs.  It would be nice if GWT would support using the Grails/Groovy
   domain objects directly on the client.  Any chance of that happening?
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Google Web Toolkit group.
   To post to this group, send email to
 google-web-tool...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs
 cr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Grails/Groovy domain objects

2010-01-26 Thread Jan Ehrhardt
The problem is the GWT RPC's serialization, which can't work with objects
created by hibernate. You can use the DTO Grails plugin (
http://www.grails.org/plugin/dto) or you can use JSON / REST for
communication.

In the case of a Grails app, which comes with great support for REST / JSON,
I would prefer the second way.

Regards
Jan Ehrhardt

On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D 
donald.r...@mindspring.com wrote:

 GWT is the obvious choice for UI. But if you want to use Grails/Groovy
 for server side, you have to either code messy DTOs or client side
 POJOs.  It would be nice if GWT would support using the Grails/Groovy
 domain objects directly on the client.  Any chance of that happening?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.