Page 2 of 2

Posted: Mon Dec 18, 2006 9:16 am
by raghavan20
i think you have made things complex. It is good to use design patterns but it is very easy to misuse it. i am not good at design patterns but i am still sharing a word of caution.

i tried to model something simple and similar, may be you should have a look at this
logical model.

i have not filled in all attributes and methods but I know you can understand what I am trying to say from the model.

Thanks.

feyd | switched [img] to [url]: 1066×718 @ 65K.

Posted: Mon Dec 18, 2006 10:54 am
by Kieran Huggins
Premature optimization is the root of all evil!

Make it work before you worry too much about your database server load ;-)

If my suspicions are correct, your users won't be staring at past order summaries so often that those extra queries will matter a whole lot. Besides, if the case for optimization is strong once you've got it working, I would just buffer the results for each order, all but eliminating subsequent database expenses.

Cal Henderson has a really good section in Building Scalable Web Sites that deals specifically with this concept. The book is amazing, btw.

Cheers,
Kieran