|
Project Information
-
Activity
High
-
Project feeds
- Code license
-
MIT License
-
Labels
java,
appengine,
persistence,
datastore,
entity,
data,
store,
app,
engine,
cache,
memcache,
objects,
gae,
gaej
Featured
Links
|
The Google App Engine/J low-level datastore API is simple and elegant, neatly reducing your data operations to four simple methods: get, put, delete, and query. However, it is not designed to be used by the average developer: - DatastoreService persists GAE-specific Entity objects rather than normal POJO classes.
- DatastoreService Keys are untyped and error-prone.
- DatastoreService has a machine-friendly but not human-friendly query interface.
- DatastoreService has an unnecessarily complicated transaction API.
Objectify-Appengine provides the thinnest convenient layer which addresses these issues, yet preserves the elegance of get, put, delete, and query. In short: - Objectify lets you persist, retrieve, delete, and query your own typed objects.
class Car {
@Id String vin; // Can be Long, long, or String
String color;
}
Objectify ofy = ObjectifyService.begin();
ofy.put(new Car("123123", "red"));
Car c = ofy.get(Car.class, "123123");
ofy.delete(c);Objectify surfaces all native datastore features, including batch operations, queries, entity groups, asynchronous operations, and partial indexes. Objectify provides type-safe key and query classes using Java generics. Objectify provides a human-friendly query interface based on GAE/Python's Query class. Objectify minimally impacts application cold-start time, typically adding only a few hundred milliseconds. Objectify can automatically cache your data in memcache for improved read performance. Objectify can store polymorphic entities and perform true polymorphic queries. Objectify provides a simple, easy-to-understand transaction model. Objectify provides built-in facilities to help migrate schema changes forward. Objectify entities can be used in GWT without the need for Data Transfer Objects. Objectify has no external jar dependencies beyond the GAE SDK. Just add objectify.jar to your project. Objectify provides thorough documentation of concepts as well as use cases. Objectify has an extensive test suite to prevent regressions. After you've banged your head against JDO and screamed "Why, Google, why??" enough times, read the Concepts and then the IntroductionToObjectify. You may also wish to read the IBM developerWorks article Twitter Mining with Objectify-Appengine, part 1 and part 2.
|