Activity Not Available
0
I Use This!

Project Summary

Analyzed 5 months ago. based on code collected 5 months ago.

Twig - Making the Datastore more manageableTwig is an object persistence interface built on Google App Engine's low-level datastore which overcomes many of JDO-GAEs limitations including full support for inheritance, polymorphism and generic types. You can easily configure, modify or extend Twigs behaviour by implementing your own strategies or overriding extension points in pure Java code.

Twig is the only datastore interface to support:

Parallel Asynchronous Commands Plain old Java object data models with no datastore dependencies Merged OR queries on multiple properties

Read the documentation to get started

Visit the Twig Discussion Group

Show me some codeThe central interface you will use is ObjectDatastore which has an implementation AnnotationTypesafeDatastore

// stateful session configured with annotations
ObjectDatastore datastore = new AnnotationObjectDatastore();

// create a complex object graph
Band ledzep = createClassicRockband();

// store the instance and all other reachable instances
Key key = datastore.store(ledzep);

// converted into a query by kind with a key name
Band result = datastore.find(Band.class, "Led Zeppelin");

// the identical instance is always returned from same datastore
assert result == ledzep;

// modernize the classic rock band
ledzep.name = "White Stripes";

// call update on changed instances
datastore.update(ledzep);

// no need to deal with Keys
datastore.delete(ledzep);

// run a find command
Iterator punkBands = datastore.find()
.type(Band.class)
.addFilter("genre", EQUAL, Genre.PUNK)
.returnResultsNow();


A common sentimentA message from the App Engine Java group:

"It seems alarming to me that these basic relations are difficult to code. Lets face it, applications are full of these relations...it seems to me that too much developer time is required in the Persistence layer of GAE apps. The Persistence and Presentation layers needs to be a "no brainer", so more focus can be where it needs to be - the business layer. Does anyone feel the same?" - Diana Cruise

Twig is named after the super thin sixties model Twiggy - or it could be something like Typesafe Wrapper in GAE

Share

In a Nutshell, twig-persist...

Languages

Languages?height=75&width=75
Java
96%
2 Other
4%

Lines of Code

Activity

30 Day Summary

Apr 10 2016 — May 10 2016

12 Month Summary

May 10 2015 — May 10 2016

Community

Ratings

Be the first to rate this project
 
Click to add your rating
   Spinner f6ecff617ec2ba7f559e6f535cad9b70a3f91120737535dab4d4548a6c83576c
 
Review this Project!