Over a million developers have joined DZone.

ObjectiveSync: A Thin Java Object Persistence Layer for JDBC

· Java Zone

Learn more about the advantages of moving from a monolithic to microservices architecture.  Brought to you in partnership with IBM.

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.

From Idea to Application gives you the architecture to quickly build, manage and run a range of applications (web, mobile, big data, new smart devices, etc.) on an open-standard, cloud-based platform. See why developers are using IBM Bluemix. Brought to you in partnership with IBM.


The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}