Re: App engine data types

2009-07-18 Thread bryce cottam

Juraj,
Thanks for using the lib  :)  I'm glad it's useful.
The way I came to develop that is basically to take apart another
lib/module I was using (I think it was gwt-math).  So, I basically
just followed what I deduced from reading that module.  I also tracked
down a book that had some mention of the Xyz_CustomFieldSerializer
idea, but really didn't give sufficient details to use it.  I found
that the gwt.xml was in both the server and client jars in modules
I've imported, so I simply did the same thing, if there's a more
efficient way to get around that, I'd love to hear about it, but it
seems to work for my purposes  :)

The client jar has some source files that aren't compiled by javac,
but are evaluated by the gwt compiler.  The server jar has classes
that are compiled by the javac compiler.  Basically the reason for
that is 'cause I had to "emulate" the
com.google.appengine.api.datastore.* classes by putting them in the
folder com/resmarksystems/emul/com/google/appengine/api/datastore/
(which gets ignored by the javac compiler) but I also needed classes
that got compiled to byte code in the
com/google/appengine/api/datastore folder, and those classes can't go
in the client code ('cause they're in the wrong package) but the ones
in the com/resmarksystems/emul/* folder can go in the client code.
So, they get separated accordingly.

Again, I'm sure there's gotta be a better way to do this, but it seems
that modules made by google follow this pattern and I couldn't find
very good documentation on how to do it.  So, sorry for the confusion.

please let me know if you run into issues with the library
thanks!
-bryce


On Sat, Jul 18, 2009 at 8:57 AM, Juraj Vitko wrote:
>
> Thanks man! Saved me a few hours for sure.
>
> Can't believe nobody needed this yet - should be a part of GWT.
>
> It's not that I want to send a Text or a Blob via RPC - but I
> definitelly want my data classes to be usable at the client side
> (translatable).
>
> The Text I'm going to put in a String in a JDO load callback function,
> so that it can be RPC'ed to client and used in a standard string-ish
> way, and similarly in the other direction.
>
> The separation of the jars into client and server was a bit confusing
> to me, however I've added both into my project's classpath and then
> included the gwt.xml, and it seems to work.
> Btw. the gwt.xml (same contente) is in both of these jars - is that a
> bug or am I doing something wrong?
>
> thanks again,
> J.
>
>
> On Jun 12, 7:48 am, bcottam  wrote:
>> okay, so I dug into this a bit and figured out how to port existing
>> code to GWT compliant standards.  I also included
>> _CustomFieldSerializers.  I am currently only using Key andTextin my
>> test code, but I ported  Key,Text, Blob, ShortBlob, Link and User
>> however I haven't tested much beyond the Key andTextclasses.
>>
>> here is a link to the jars and some notes about 
>> them:www.resmarksystems.com/code
>>
>> I hope it is helpful  :)
>> -bryce
>>
>> On May 14, 11:22 am, bcottam  wrote:
>>
>> > yeah, I actually posted there 
>> > first:http://groups.google.com/group/google-appengine-java/browse_thread/th...
>> > and they suggested that I cross-post here  :)
>>
>> > I actually started using the persisteddataclasses and sending them
>> > across the gwt rpc channel, and that was fine until the datanucleus
>> > JDO started putting fields on my classes that were instances of Object
>> > [] (which don't serialize all that well).  That, and I know there is
>> > going to be a performance hit with sending a lot ofdataover the
>> > channel.  So, I am thinking that doing a lite DTO just for transport
>> > would possibly be my best option.
>>
>> > I will check out Ray Cromwells posts, mainly I guess what I am looking
>> > for at this point is a good reference for using the "super-source" tag
>> > and how to make custom wrappers for non GWT classes (in the same
>> > manner that the java.util api is wrapped with com.google.emul etc.
>> > Any pointers in that direction would be great.
>>
>> > thanks!
>>
>> > On May 13, 7:59 pm, Alyxandor 
>> > wrote:
>>
>> > > I'm really not sure, but I'd recommend checking out theAppengine
>> > > google group 
>> > > first...http://groups.google.com/group/google-appengine-java?hl=en
>>
>> > > There's over a hundred posts a day there, so I'm sure someone there
>> > > with a little more expertise than yours truly will be of more help.
>>
>> > > Out of curiosity, have you already tried sending your persistentdata
>> > > classes down the wire?  Cos  There's a lot of discussion about it,
>> > > and some workarounds {basically, the only ways I could do it was with
>> > > Ray Cromwell's various hacks, or a drop-in called Gilead}.  You might
>> > > find that using the same beans to be nigh impossible without making
>> > > them non-detachable {read: you can send an object to the client,
>> > > modify it and send it back to the server to save without copying the
>> > > object, or manually copying thedatafrom e

Re: App engine data types

2009-07-18 Thread Juraj Vitko

Thanks man! Saved me a few hours for sure.

Can't believe nobody needed this yet - should be a part of GWT.

It's not that I want to send a Text or a Blob via RPC - but I
definitelly want my data classes to be usable at the client side
(translatable).

The Text I'm going to put in a String in a JDO load callback function,
so that it can be RPC'ed to client and used in a standard string-ish
way, and similarly in the other direction.

The separation of the jars into client and server was a bit confusing
to me, however I've added both into my project's classpath and then
included the gwt.xml, and it seems to work.
Btw. the gwt.xml (same contente) is in both of these jars - is that a
bug or am I doing something wrong?

thanks again,
J.


On Jun 12, 7:48 am, bcottam  wrote:
> okay, so I dug into this a bit and figured out how to port existing
> code to GWT compliant standards.  I also included
> _CustomFieldSerializers.  I am currently only using Key andTextin my
> test code, but I ported  Key,Text, Blob, ShortBlob, Link and User
> however I haven't tested much beyond the Key andTextclasses.
>
> here is a link to the jars and some notes about 
> them:www.resmarksystems.com/code
>
> I hope it is helpful  :)
> -bryce
>
> On May 14, 11:22 am, bcottam  wrote:
>
> > yeah, I actually posted there 
> > first:http://groups.google.com/group/google-appengine-java/browse_thread/th...
> > and they suggested that I cross-post here  :)
>
> > I actually started using the persisteddataclasses and sending them
> > across the gwt rpc channel, and that was fine until the datanucleus
> > JDO started putting fields on my classes that were instances of Object
> > [] (which don't serialize all that well).  That, and I know there is
> > going to be a performance hit with sending a lot ofdataover the
> > channel.  So, I am thinking that doing a lite DTO just for transport
> > would possibly be my best option.
>
> > I will check out Ray Cromwells posts, mainly I guess what I am looking
> > for at this point is a good reference for using the "super-source" tag
> > and how to make custom wrappers for non GWT classes (in the same
> > manner that the java.util api is wrapped with com.google.emul etc.
> > Any pointers in that direction would be great.
>
> > thanks!
>
> > On May 13, 7:59 pm, Alyxandor 
> > wrote:
>
> > > I'm really not sure, but I'd recommend checking out theAppengine
> > > google group 
> > > first...http://groups.google.com/group/google-appengine-java?hl=en
>
> > > There's over a hundred posts a day there, so I'm sure someone there
> > > with a little more expertise than yours truly will be of more help.
>
> > > Out of curiosity, have you already tried sending your persistentdata
> > > classes down the wire?  Cos  There's a lot of discussion about it,
> > > and some workarounds {basically, the only ways I could do it was with
> > > Ray Cromwell's various hacks, or a drop-in called Gilead}.  You might
> > > find that using the same beans to be nigh impossible without making
> > > them non-detachable {read: you can send an object to the client,
> > > modify it and send it back to the server to save without copying the
> > > object, or manually copying thedatafrom every field}.
>
> > > ...Check the other group, like I said...  I'm no expert.
>
> > > Of course, Ray Cromwell IS, so if you can find his Google-Groups
> > > profile, try clicking on some of the threads he posts on...  You'll be
> > > glad you did!
>
>
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: App engine data types

2009-06-11 Thread bcottam

okay, so I dug into this a bit and figured out how to port existing
code to GWT compliant standards.  I also included
_CustomFieldSerializers.  I am currently only using Key and Text in my
test code, but I ported  Key, Text, Blob, ShortBlob, Link and User
however I haven't tested much beyond the Key and Text classes.

here is a link to the jars and some notes about them:
www.resmarksystems.com/code

I hope it is helpful  :)
-bryce

On May 14, 11:22 am, bcottam  wrote:
> yeah, I actually posted there 
> first:http://groups.google.com/group/google-appengine-java/browse_thread/th...
> and they suggested that I cross-post here  :)
>
> I actually started using the persisteddataclasses and sending them
> across the gwt rpc channel, and that was fine until the datanucleus
> JDO started putting fields on my classes that were instances of Object
> [] (which don't serialize all that well).  That, and I know there is
> going to be a performance hit with sending a lot ofdataover the
> channel.  So, I am thinking that doing a lite DTO just for transport
> would possibly be my best option.
>
> I will check out Ray Cromwells posts, mainly I guess what I am looking
> for at this point is a good reference for using the "super-source" tag
> and how to make custom wrappers for non GWT classes (in the same
> manner that the java.util api is wrapped with com.google.emul etc.
> Any pointers in that direction would be great.
>
> thanks!
>
> On May 13, 7:59 pm, Alyxandor 
> wrote:
>
> > I'm really not sure, but I'd recommend checking out theAppengine
> > google group 
> > first...http://groups.google.com/group/google-appengine-java?hl=en
>
> > There's over a hundred posts a day there, so I'm sure someone there
> > with a little more expertise than yours truly will be of more help.
>
> > Out of curiosity, have you already tried sending your persistentdata
> > classes down the wire?  Cos  There's a lot of discussion about it,
> > and some workarounds {basically, the only ways I could do it was with
> > Ray Cromwell's various hacks, or a drop-in called Gilead}.  You might
> > find that using the same beans to be nigh impossible without making
> > them non-detachable {read: you can send an object to the client,
> > modify it and send it back to the server to save without copying the
> > object, or manually copying thedatafrom every field}.
>
> > ...Check the other group, like I said...  I'm no expert.
>
> > Of course, Ray Cromwell IS, so if you can find his Google-Groups
> > profile, try clicking on some of the threads he posts on...  You'll be
> > glad you did!
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: App engine data types

2009-05-14 Thread bcottam

yeah, I actually posted there first:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/c255df153aef6df1/c7ad9827c9c4b72d?lnk=gst&q=data+types#c7ad9827c9c4b72d
and they suggested that I cross-post here  :)

I actually started using the persisted data classes and sending them
across the gwt rpc channel, and that was fine until the datanucleus
JDO started putting fields on my classes that were instances of Object
[] (which don't serialize all that well).  That, and I know there is
going to be a performance hit with sending a lot of data over the
channel.  So, I am thinking that doing a lite DTO just for transport
would possibly be my best option.

I will check out Ray Cromwells posts, mainly I guess what I am looking
for at this point is a good reference for using the "super-source" tag
and how to make custom wrappers for non GWT classes (in the same
manner that the java.util api is wrapped with com.google.emul etc.
Any pointers in that direction would be great.

thanks!


On May 13, 7:59 pm, Alyxandor 
wrote:
> I'm really not sure, but I'd recommend checking out the Appengine
> google group 
> first...http://groups.google.com/group/google-appengine-java?hl=en
>
> There's over a hundred posts a day there, so I'm sure someone there
> with a little more expertise than yours truly will be of more help.
>
> Out of curiosity, have you already tried sending your persistent data
> classes down the wire?  Cos  There's a lot of discussion about it,
> and some workarounds {basically, the only ways I could do it was with
> Ray Cromwell's various hacks, or a drop-in called Gilead}.  You might
> find that using the same beans to be nigh impossible without making
> them non-detachable {read: you can send an object to the client,
> modify it and send it back to the server to save without copying the
> object, or manually copying the data from every field}.
>
> ...Check the other group, like I said...  I'm no expert.
>
> Of course, Ray Cromwell IS, so if you can find his Google-Groups
> profile, try clicking on some of the threads he posts on...  You'll be
> glad you did!
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: App engine data types

2009-05-13 Thread Alyxandor

I'm really not sure, but I'd recommend checking out the Appengine
google group first... http://groups.google.com/group/google-appengine-java?hl=en

There's over a hundred posts a day there, so I'm sure someone there
with a little more expertise than yours truly will be of more help.

Out of curiosity, have you already tried sending your persistent data
classes down the wire?  Cos  There's a lot of discussion about it,
and some workarounds {basically, the only ways I could do it was with
Ray Cromwell's various hacks, or a drop-in called Gilead}.  You might
find that using the same beans to be nigh impossible without making
them non-detachable {read: you can send an object to the client,
modify it and send it back to the server to save without copying the
object, or manually copying the data from every field}.

...Check the other group, like I said...  I'm no expert.

Of course, Ray Cromwell IS, so if you can find his Google-Groups
profile, try clicking on some of the threads he posts on...  You'll be
glad you did!
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



App engine data types

2009-05-13 Thread bcottam

Does anyone know if there is a gwt library that emulates the core app
engine data types (Text, Key, Blob, ShortBlob etc.)?  I know these
types of extensions exist for other data types (like BigDecimal etc.)
but I haven't been able to find one for the app engine specific data
types.  I would really like to use the same beans on the server as I
do on the client and it seems that I need to be able to use classes
that reference these data types in GWT code.  I am perfectly willing
to write such an extension, but just not sure where to start.

Any suggestions?
thanks in advance!!
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---