objectify-appengine: schöne Abstraktion der Low-Level Datastore API

Die APIs JPA oder JDO sind auf einer NoSQL-Datenbank nicht optimal. Wer mit der Low-Level API programmiert, muss aber zu viel selbst machen. Das Projekt http://code.google.com/p/objectify-appengine/ ist dabei eine willkommene Vereinfachung.

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, and unindexed properties.
  • 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 does not impact application cold-start time, adding a few milliseconds at most.
  • Objectify can automatically cache your data in memcache for improved read performance.
  • 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. Just add objectify.jar to your project.
  • Objectify provides thorough documentation of concepts as well as use cases.

Das Projekt ist gut dokumentiert, siehe http://code.google.com/p/objectify-appengine/wiki/Concepts und http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify.

Ähnliche Beiträge

Ein Gedanke zu “objectify-appengine: schöne Abstraktion der Low-Level Datastore API

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert