Re: Architetural Decisions
- From: "SP" <egatsecneserp(reverse)@hotmail.com>
- Date: Sun, 10 Apr 2005 22:36:29 -0400
"Bruno Rodrigues" <BrunoRodrigues@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:377A4C2C-8E60-42F8-B26D-FC599E7701BD@xxxxxxxxxxxxxxxx
> Hi,
>
> I'm on my way to my first OOP-for-real project in C#, and having some big
> trouble with code architeture.
<snip>
> A snapshot from my database:
Did you just say OOP-for-real and then describe the design problem by
telling us about your database structure?
<snip>
> What I need, is to compute the total of an individual OrderDetail, and of
> the entire order. I create this total fields with sum in sql, the fastest
> way, and it's working nice.
>
> But... This calc is bussiness logic, and it should be in my "Classes"
> namespace, isn't that right? Cause if I have some special discount to
> apply,
> for example, I'm in trouble. But, the only way to do this logic in the
> "Classes" namespace, is looping through each object of the collection I
> have
> already created - this sucks.
If looping through a collection sucks then there are a lot of sucky
applications out there. And when an order item changes and you have still
not persisted this change back to the database, how were you planning on
getting the updated order total?
> What concept I am misleading? What should I do?
OOP like you said you were doing
SP
.
- References:
- Architetural Decisions
- From: Bruno Rodrigues
- Architetural Decisions
- Prev by Date: Trouble trying to display integer values
- Next by Date: Re: Trouble trying to display integer values
- Previous by thread: Architetural Decisions
- Next by thread: Re: Architetural Decisions
- Index(es):
Relevant Pages
|