Over a million developers have joined DZone.

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

Learn how our document data model can map directly to how you program your app, and native database features like secondary indexes, geospatial and text search give you full access to your data. Brought to you in partnership with MongoDB.

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.

Discover when your data grows or your application performance demands increase, MongoDB Atlas allows you to scale out your deployment with an automated sharding process that ensures zero application downtime. Brought to you in partnership with MongoDB.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

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 }}