Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

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.


Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
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.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}