J
jehugaleahsa
Hello:
Do any of you ever feel stupid for creating a business object? I have
this business object that is pretty much just a wrapper around
whatever the database returns. The properties just have backing fields
of the same type.
The class does nothing special. It is essentially a storage location
for what gets returned by the database.
Worse than that, I usually use the BO directly, immediately using it
in an insert or update. Most of the processing involved is in creating
this BO.
Why am I creating a business object when the data is in the result
set? What is being gained? A little structure?
My biggest problem is that my current project involves pulling data
out of the database from one table, doing just enough modification
that an insert-select would be impractical, and then sending it to
another table. The process is not complicated. I just wish I knew a
way to make it less bulky, get the benefits of working with a business
object and have code that I can read.
How do I keep the data and the logic from mingling too much? I am out
of ideas.
Do any of you ever feel stupid for creating a business object? I have
this business object that is pretty much just a wrapper around
whatever the database returns. The properties just have backing fields
of the same type.
The class does nothing special. It is essentially a storage location
for what gets returned by the database.
Worse than that, I usually use the BO directly, immediately using it
in an insert or update. Most of the processing involved is in creating
this BO.
Why am I creating a business object when the data is in the result
set? What is being gained? A little structure?
My biggest problem is that my current project involves pulling data
out of the database from one table, doing just enough modification
that an insert-select would be impractical, and then sending it to
another table. The process is not complicated. I just wish I knew a
way to make it less bulky, get the benefits of working with a business
object and have code that I can read.
How do I keep the data and the logic from mingling too much? I am out
of ideas.