ObjectiveSync: A Thin Java Object Persistence Layer for JDBC

DZone 's Guide to

ObjectiveSync: A Thin Java Object Persistence Layer for JDBC

· Java Zone ·
Free Resource

If you're looking for a Java object persistence layer for JDBC and an alternative to some of your usual tools - I'm looking at you, Hibernate - you might be interested in ObjectiveSync, created by GitHub user l3nz. If you need to be persuaded, the GitHub starts with a list of pros and cons when it comes to Hibernate, leaning fairly heavily in the direction of cons. The pros, for example, are as follows:

  • Association mapping
  • Database independence

While the cons, on the other hand, are much more substantial:

  • Complexity of configuration
  • Different query language
  • Slow to start
  • No reasonable shell to test queries

And quite a few more. Overall, though, it looks like an interesting tool focused on getting things done as efficiently as possible and with minimal extra trouble for the developer. While there isn't an explicit list of features, there is a set of "aims," suggesting the central ideas behind ObjectiveSync:

  • Minimal wrapper over JDBC.
  • Querying done in SQL. You should not be afraid of SQL. If you are, you should not be doing anything above the trivial CRUD.
  • Centralizing object marshaling and unmarshaling - each object should know how to sync itself and its descendents
  • Single syntax for inserting and updating
  • Ruby-like objectivized JDBC fetching with exception handling
  • User-definable deep fetching and updating (almost Hibernate-like).
  • Batch API to avoid round-trips when submitting multiple queries.
  • Stats collection and similar stuff.

You can also find downloading instructions and a fairly thorough set of "getting started" tips on the GitHub page. Check it out if you're interested in a thinner and simpler Hibernate alternative.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}