(Or Derek’s Objects, depending on who you ask…)
DKOs are an ORM for people who hate ORMs.
ORMs are a pain. They promise a world of being free from your database where you just work with good ol’ Java. Your database server doesn’t matter. Your schema doesn’t matter. Tables and relationships can be abstracted away and changing them doesn’t have to affect your code. All you have are some object references and you can modify them willy-nilly and it’ll all just work.
Well that’s just nonsense. It may work for a 100 entry blog implementation, but you’re not going to process millions of new rows daily with it (or at least not without a world of pain getting there). Your database is a shared resource on a different machine, not an in-memory entity. And ignoring your schema is a great way to accidentally DOS your database with millions of “select * from x where id=35476753″ style queries.
Plus: SQL is not the devil! It’s one of computer science’s most successful languages! The devil is SQL built by string concatenation. And string identifiers. And a lack of typing. And a lack of streaming.
DKOs addresses all these issues:
- It’s fully typed.
- It’s streaming (by default).
- It embraces SQL (rather than replaces it).
- It doesn’t use string identifiers for tables/columns/etc.
- It doesn’t hide from you the fact that it’s hitting a database (or what SQL it’s running).
Much more information here: https://github.com/keredson/DKO