Re: database drive code generated software architecture
- From: "Michael Gaab" <mike-g@xxxxxxxxxxx>
- Date: Fri, 16 Jun 2006 20:51:21 -0600
<timasmith@xxxxxxxxxxx> wrote in message
news:1150419796.980551.52890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
While I map db to business objects to populate data I *also*
encapsulate behaviour on the objects so yes it is quite OOP - its the
separation of concerns that is the issue.
The relational model and an OO model are two different animals.
I really don't see how you can claim that? Does your any of your
business objects have an abstract base class? Just how is that represented
in your database?
Just to be clear, I am not an expert. I am also learning (fresh out of
college). My statements above reflect, in part, how I see the problem.
My opinions are not written in stone but my opinions are mine.
If I am mistaken then I'll have to adjust.
An aside:
I am really having a battle with myself as to how to manage developing web
applications with OO and a relational db. I realize this problem has been
around for
years but I am new to the game so I have to rehash alot of this for myself
to find which
way works for me.
What I find *very* interesting is reading Hibernate in action where the
author indicates that to have the data layer map data objects to
business objects is an anti-pattern and they even applaud having the
web server accessing the data objects directly.
I've also read Hibernate In Action but missed that. I check it out.
I cant decide if it is persuasive or pervasive :-)
Not sure what you mean.
Mike
Michael Gaab wrote:
<timasmith@xxxxxxxxxxx> wrote in message
news:1149979248.598074.312410@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
While I agree to the concept of having a stable set of interfaces
between the business layer and data layer I have found that generating
business objects which directly map to database tables works for me.
I just finished a web-based project for a company that required me to do
just
that, map each business object to each table in the db. All of this was
done
manually, so each time a column changed in the db, I had to go through
and change the related business object and all of the related stored
procedures.
A time consuming and error prone activity.
This was my first project (and last) for this company so I just followed
what
they had already in place. At the time, my hunch was there must be a
better
way of doing this. (By the way,
I did mention this to others on the team but each time I they became very
defensive. So I just dropped the idea.) After finishing the project,
I have investigated a number of ORM tools. From what I have read, I would
*consider* using NHibernate the next time.
If you do map your business objects directly to each db table, I don't
think
you can claim to
be practicing object technology. Sure you are using objects but how do
you
take advantage of the features of OO in the business model. I guess you
could
say the program is object based at best.
Conclusion: The decision as to how to map your business objects to your
db
should be made on a project-by-project basis. Using ORM tools on some
projects may be overkill.
Anyway just my opinion.
Mike
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption
=----
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.
- Follow-Ups:
- Re: database drive code generated software architecture
- From: Michael Gaab
- Re: database drive code generated software architecture
- References:
- Re: database drive code generated software architecture
- From: Michael Gaab
- Re: database drive code generated software architecture
- From: timasmith
- Re: database drive code generated software architecture
- Prev by Date: Re: Visio instead of Rose for UML O-O design
- Next by Date: Re: database drive code generated software architecture
- Previous by thread: Re: database drive code generated software architecture
- Next by thread: Re: database drive code generated software architecture
- Index(es):
Relevant Pages
|