Re: HTML5 local object persistence for GWT

2011-09-07 Thread joergviola
Hi,

just a remark: You can now use direct object references in your
persistent class:
class A {
  long id;
  B b;
}
if A and B are Persistable. b will be put and get EAGER, so beware of
performance issues!
I plan to support a Lazy Annotation that instantiates only empty
objects with the ID and can be fetched later.
Also Collections of objects will be supported.
Circular references will also be handled properly.

Please use http://groups.google.com/group/mobile-objects-discuss for
further discussions.

On 30 Aug., 14:15, J.Ganesan j.gane...@datastoregwt.com wrote:
 Congratulations. The simplicity is striking. This library really gives
 an object orientation tinge to persistence. I believe this library is
 a natural extension to GWT programming model.
 It is useful for those projects not demanding a deep object graph. Of
 course, when this library is extended to take care of
 java.util.Collections and of circular references, it will be lot more
 useful.

 J.Ganesanwww.DataStoreGwt.com

 On Aug 29, 9:24 pm, joergviola joerg.vi...@googlemail.com wrote:







  Hello,
  I want to announce a new lib for HTML5 gwt apps:

 https://code.google.com/p/mobile-objects/

  Using it, you can directly persist objects to local HTML5 storage or
  database, whatever is available.
  Moreover, synchronisation to a server is possible, currently to GAE using
  objectify.

  GWT generators are used to generate class descriptors for the persistent
  classes.
  At runtime, these descriptors are used to create JSON for storage or an SQL
  for database persistence.

  The persistence model currently is quite simple and modelled after the
  objectify API.

  I would be happy if someone just could check the concept and tell whether
  this lib would be useful.

  Thanks a lot, Joerg

-- 
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: HTML5 local object persistence for GWT

2011-09-07 Thread joergviola
Yepp, something like that would work.
I am currently working on persisting object graphs eagerly.
When I come across the local storage I will take a look at piriti
again.

Please use http://groups.google.com/group/mobile-objects-discuss for
further discussions.

On 31 Aug., 11:20, Harald Pehl harald.p...@googlemail.com wrote:
 I started Piriti as an XML mapper for GWT back in January 2010. JSON mapping
 was introduced some months later. So it has no relation to AutoBeans. It's
 just an alternative way to (de)serialize POJOs. Although the output is very
 similar, Piriti is not based on marker interfaces, but real POJOs. See 
 alsohttp://code.google.com/p/piriti/wiki/Comparisonfor a comparison with other
 mappers.

 The idea off hooking into graph traversal is an interesting concept. I would
 suggest events and handlers to get notified when a model / property is
 written to JSON resp. read from JSON:

 public interface JsonWriterT {
    ...
    HandlerRegistration addWriteModelHandler(WriteModelHandlerT handler);
    HandlerRegistration addWritePropertyHandler(WritePropertyHandler?
 handler);
    ...

 }

 public interface WriteModelHandlerT extends EventHandler {
    void onBeforeWriteModel(WriteModelEventT event);
    void onAfterWriteModel(WriteModelEventT event);

 }

 public interface WritePropertyHandlerT extends EventHandler {
    void onBeforeWriteProperty(WritePropertyEventT event);
    void onAfterWriteProperty(WritePropertyEventT event);
    void onSkipProperty(WritePropertyEventT event);

 }

 What do you think?

 - Harald

-- 
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.



Aw: Re: HTML5 local object persistence for GWT

2011-08-31 Thread joergviola
Thanks Harald

Hey - Piriti is nice - if I only knew about it some months earlier, when I 
had to write a JSON-based API to a GWT App...
How does it compare to AutoBeans?

As of using Piriti for local storage: Each object instance in a graph has to 
be stored individually in the storage. So we would need some means of 
hooking into to piriti graph traversal to store the instance, right?

If that would be possible, use of pirity could make the job ob persisting 
whole graphs a lot easier.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/98_sQ6ioRFgJ.
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.



Aw: Re: HTML5 local object persistence for GWT

2011-08-31 Thread Harald Pehl
I started Piriti as an XML mapper for GWT back in January 2010. JSON mapping 
was introduced some months later. So it has no relation to AutoBeans. It's 
just an alternative way to (de)serialize POJOs. Although the output is very 
similar, Piriti is not based on marker interfaces, but real POJOs. See also 
http://code.google.com/p/piriti/wiki/Comparison for a comparison with other 
mappers.

The idea off hooking into graph traversal is an interesting concept. I would 
suggest events and handlers to get notified when a model / property is 
written to JSON resp. read from JSON:

public interface JsonWriterT {
   ...
   HandlerRegistration addWriteModelHandler(WriteModelHandlerT handler);
   HandlerRegistration addWritePropertyHandler(WritePropertyHandler? 
handler);
   ...
}

public interface WriteModelHandlerT extends EventHandler {
   void onBeforeWriteModel(WriteModelEventT event);
   void onAfterWriteModel(WriteModelEventT event);
}

public interface WritePropertyHandlerT extends EventHandler {
   void onBeforeWriteProperty(WritePropertyEventT event);
   void onAfterWriteProperty(WritePropertyEventT event);
   void onSkipProperty(WritePropertyEventT event);
}

What do you think? 

- Harald

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/YtYiFPLwe28J.
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: HTML5 local object persistence for GWT

2011-08-30 Thread J.Ganesan
Congratulations. The simplicity is striking. This library really gives
an object orientation tinge to persistence. I believe this library is
a natural extension to GWT programming model.
It is useful for those projects not demanding a deep object graph. Of
course, when this library is extended to take care of
java.util.Collections and of circular references, it will be lot more
useful.

J.Ganesan
www.DataStoreGwt.com

On Aug 29, 9:24 pm, joergviola joerg.vi...@googlemail.com wrote:
 Hello,
 I want to announce a new lib for HTML5 gwt apps:

 https://code.google.com/p/mobile-objects/

 Using it, you can directly persist objects to local HTML5 storage or
 database, whatever is available.
 Moreover, synchronisation to a server is possible, currently to GAE using
 objectify.

 GWT generators are used to generate class descriptors for the persistent
 classes.
 At runtime, these descriptors are used to create JSON for storage or an SQL
 for database persistence.

 The persistence model currently is quite simple and modelled after the
 objectify API.

 I would be happy if someone just could check the concept and tell whether
 this lib would be useful.

 Thanks a lot, Joerg

-- 
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: HTML5 local object persistence for GWT

2011-08-30 Thread joergviola
Thank you for this review.
Indeed, the coverage of usually used object reference semantics is
crucial.
On the other hand, this is a long way to go...
Consider for example the complex semantics to eager and lazy loading
of references.

My direction would be:
Try allowing List and arrays as to-many field types.
Follow objectify in that Keys as values mean lazy loading (which then
has to be done manually).
Try allowing real references, but only with eager semantics - then
taking properly care of circular references.

On Aug 30, 2:15 pm, J.Ganesan j.gane...@datastoregwt.com wrote:
 Congratulations. The simplicity is striking. This library really gives
 an object orientation tinge to persistence. I believe this library is
 a natural extension to GWT programming model.
 It is useful for those projects not demanding a deep object graph. Of
 course, when this library is extended to take care of
 java.util.Collections and of circular references, it will be lot more
 useful.

 J.Ganesanwww.DataStoreGwt.com

 On Aug 29, 9:24 pm, joergviola joerg.vi...@googlemail.com wrote:







  Hello,
  I want to announce a new lib for HTML5 gwt apps:

 https://code.google.com/p/mobile-objects/

  Using it, you can directly persist objects to local HTML5 storage or
  database, whatever is available.
  Moreover, synchronisation to a server is possible, currently to GAE using
  objectify.

  GWT generators are used to generate class descriptors for the persistent
  classes.
  At runtime, these descriptors are used to create JSON for storage or an SQL
  for database persistence.

  The persistence model currently is quite simple and modelled after the
  objectify API.

  I would be happy if someone just could check the concept and tell whether
  this lib would be useful.

  Thanks a lot, Joerg

-- 
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: HTML5 local object persistence for GWT

2011-08-30 Thread Alain Ekambi
Really impressive work.
Well done pal :)

2011/8/30 joergviola joerg.vi...@googlemail.com

 Thank you for this review.
 Indeed, the coverage of usually used object reference semantics is
 crucial.
 On the other hand, this is a long way to go...
 Consider for example the complex semantics to eager and lazy loading
 of references.

 My direction would be:
 Try allowing List and arrays as to-many field types.
 Follow objectify in that Keys as values mean lazy loading (which then
 has to be done manually).
 Try allowing real references, but only with eager semantics - then
 taking properly care of circular references.

 On Aug 30, 2:15 pm, J.Ganesan j.gane...@datastoregwt.com wrote:
  Congratulations. The simplicity is striking. This library really gives
  an object orientation tinge to persistence. I believe this library is
  a natural extension to GWT programming model.
  It is useful for those projects not demanding a deep object graph. Of
  course, when this library is extended to take care of
  java.util.Collections and of circular references, it will be lot more
  useful.
 
  J.Ganesanwww.DataStoreGwt.com
 
  On Aug 29, 9:24 pm, joergviola joerg.vi...@googlemail.com wrote:
 
 
 
 
 
 
 
   Hello,
   I want to announce a new lib for HTML5 gwt apps:
 
  https://code.google.com/p/mobile-objects/
 
   Using it, you can directly persist objects to local HTML5 storage or
   database, whatever is available.
   Moreover, synchronisation to a server is possible, currently to GAE
 using
   objectify.
 
   GWT generators are used to generate class descriptors for the
 persistent
   classes.
   At runtime, these descriptors are used to create JSON for storage or an
 SQL
   for database persistence.
 
   The persistence model currently is quite simple and modelled after the
   objectify API.
 
   I would be happy if someone just could check the concept and tell
 whether
   this lib would be useful.
 
   Thanks a lot, Joerg

 --
 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.




-- 

GWT API for  non Java based platforms
http://code.google.com/p/gwt4air/
http://www.gwt4air.appspot.com/

-- 
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.



Aw: Re: HTML5 local object persistence for GWT

2011-08-30 Thread Harald Pehl
Well doe Joerg! The API is straightforward but very powerful.

I noticed in JSONEntityWriter and JSONEntityReader you (de)serialize the 
entites using the GWT JSON API. I'm the author of Piriti a JSON / XML mapper 
for GWT: http://code.google.com/p/piriti/. Piriti is able to (de)serialize 
whole object graphs from/to JSON. References, collections, arrays, primitive 
and basic data types are supported (see 
http://code.google.com/p/piriti/wiki/SupportedTypes for a full list).

Maybe we can join forces and add something like a PiritiEntityWriter 
/ PiritiEntityReader? What do you think?

- Harald

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ST5pTUGiRvUJ.
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.



HTML5 local object persistence for GWT

2011-08-29 Thread joergviola
Hello,
I want to announce a new lib for HTML5 gwt apps:

https://code.google.com/p/mobile-objects/

Using it, you can directly persist objects to local HTML5 storage or 
database, whatever is available.
Moreover, synchronisation to a server is possible, currently to GAE using 
objectify.

GWT generators are used to generate class descriptors for the persistent 
classes.
At runtime, these descriptors are used to create JSON for storage or an SQL 
for database persistence.

The persistence model currently is quite simple and modelled after the 
objectify API.

I would be happy if someone just could check the concept and tell whether 
this lib would be useful.

Thanks a lot, Joerg

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/kcbaGOW8wxgJ.
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.