Re: When to avoid a data abstraction layer
- From: "Adam Maass" <adam.nospam.maass@xxxxxxxxxxx>
- Date: Sat, 29 Apr 2006 22:14:03 -0700
"anon" <anon@xxxxxxxxxxxxxxxx> wrote:
If I'm writing a fairly simple desktop application, can somebody
suggest what a logical breakpoint is between writing my own classes to
get/set information in a relational database (such as a MySQL database
on the same machine) and using an abstraction layer like Hibernate?
Is there a super-simple data abstraction layer out there that I've
missed?
It seems like Hibernate would be overkill because it is just not
likely that data storage will change, so persistency through direct
manipulation doesn't sound that bad to me.
But I have a feeling I'm missing something. Maybe it is my
unfamiliarity with data abstraction layers that is holding me back.
It isn't so much that using an abstraction layer lets you change the backend
store easily; it's that it lets you avoid writing (and maintaining) a bunch
of 'bubblegum' code -- code that solves a problem that has been solved
before, and that is tedious, repetitious, and somewhat error-prone as a
result.
Of course, if you have a really simple app that really is about looking at a
few tables in a relational database and that needs to support a fair number
of different permutations of queries against that data, then direct to JDBC
is probably a better answer to the requirements.
IMHO, the breakpoint is how you perceive the database: is it the core of the
application, with your Java code merely presenting a pretty UI around it (in
which case you probably want to go to raw JDBC for maximum flexibility); or
is the database merely a back-end transactional store for sophisticated data
that is heavily manipulated by business rules expressed in Java (in which
case you probably want to use something like Hibernate)?
-- Adam Maass
.
- References:
- When to avoid a data abstraction layer
- From: anon
- When to avoid a data abstraction layer
- Prev by Date: When to avoid a data abstraction layer
- Next by Date: Re: When to avoid a data abstraction layer
- Previous by thread: When to avoid a data abstraction layer
- Next by thread: Re: When to avoid a data abstraction layer
- Index(es):
Relevant Pages
|
|