-
Notifications
You must be signed in to change notification settings - Fork 20
Why TinyORM?
sdrapkin edited this page Jan 5, 2017
·
5 revisions
TinyORM follows the "T-SQL is king" philosophy and provides simple, developer-friendly, transaction-enforcing API.
TinyORM improves on Dapper
in the following areas:
- Connection-management ceremony & boilerplate
-
Dapper
used to require an open connection to do anything. How that connection came to exist was outside ofDapper
's scope. Newer versions can open-close a connection if closed, or keep it open if already-open. However, connections still have to be created and disposed, all of which adds boilerplate and developer burden. - TinyORM automates and hides all connection management burden, cutting down the code noise.
- Transaction awareness & automation
-
Dapper
requires manual transaction management. Many developers are not aware of importance of transactions, or do not know how to correctly start and manage transactions even when they want to write transaction-aware code. We have seen plenty ofDapper
code that was very fast and very wrong. -
TinyORM automatically creates and manages ambient transactions, and auto-enlists all participating connections. Even when no transaction scope is created by developers, all operations will execute in independent
READ COMMITTED
transactions. Transactions can be suppressed, but they are seamlessly enforced by default without any developer effort.
- API simplicity, ease-of-use, and ease-of-correct-use
- Design & focus
-
Dapper
fuses data-mapping with data-fetching. This leads to nontrivial API surface and complexity. -
TinyORM focuses on untyped
dynamic
data-fetching which can be consumed directly, or materialized into strongly-typed objects via a 2nd stage – with negligible performance cost!
- Solutions to common problems
-
TinyORM provides solutions for:
- Batched bulk
CUD
queries. - Streaming BLOBs.
- Auditing (ex. caller identity tracking, callsite tracking).
-
UPDATE
statement creation based on change-tracking/snapshots. - Clustering on
UNIQUEIDENTIFIER
(decentralized, disconnected, secure, and fragmentation-free).
- Batched bulk
Copyright (c) 2016-2022 Stan Drapkin