473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Architetural Decisions

Hi,

I'm on my way to my first OOP-for-real project in C#, and having some big
trouble with code architeture.

I have four namespaces:
- Layout
- Info - Where I hold empty structs with business objects
- DB - Where I fill my Info objects
- Classes - Where I do all the business stuff with the return from DB

A snapshot from my database:

- Table Orders, Fields: ID, Date, ClientID
- Table OrdersDetails, Fields: OrderID, ProductID, Price, Quant, Discount

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.

What concept I am misleading? What should I do?

Thanks in advance
Bruno Rodrigues.
Jul 21 '05 #1
1 1106
Bruno,


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.


I dont believe that this is the fastest while you can easily add to your
class where in are your orderdetais a method to get the sum of those. In
memory goes forever faster than any roundtrip to your database.

Just my thought,

Cor
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Sabolik | last post by:
After developing my entire applications around printing via the Crystal Decisions engine in .net, I was shocked to find out that a report that printed fine in Adobe 5.0 reader now prints garbled...
7
by: Alf P. Steinbach | last post by:
The fourth part of my attempted Correct C++ tutorial is now available, although for now only in Word format (use free Open Office if no Word), and also, it's not yet been reviewed at all -- ...
3
by: Bruno Rodrigues | last post by:
Hi all I'm using the following code standart in class libraries. I will not split this function in more layers, but I want to know if there are some architetural improvement to do in my code....
0
by: lollypop3_14 | last post by:
"File or assembly Crystal.Decisions.Web, or one of it's dependencies was not found." This is a parser error I get when I try to start my application. And I already imported...
2
by: Rich | last post by:
Hi, I've created an application in VS 2002 using vb.net. My application contain a Crystal Decisions report and when I run it on my development PC with VS installed it works fine. However, when...
2
by: Scott Gunn | last post by:
Hello All I have seen many references to crystal decisions on the internet however I cannot find it on my machine? Is this because I have VB.Net 2003 and not VS.Net 2003? Kind Regards Scott
5
by: tommytx | last post by:
Is there any capability of decisions in htaccess. I know you can use in special situations, but I need something like: If a then b etc like in php. In other words I want to redirect the...
0
by: shan | last post by:
*** ERROR: Module load completed but symbols could not be loaded for crystaldecisions.web.dll *** ERROR: Module load completed but symbols could not be loaded for crystalenterpriselib.dll ***...
36
by: anon.asdf | last post by:
Hello! Can the proprocessor make conditional decisions. Here's an example of the functionality (not standard C!) #define PUT_BYTE(const_index, val) \ #preprocessor_if (const_index ==...
6
by: Robin Becker | last post by:
I have a couple of business decisions to make that essentially use 6 binary input variables. After the business users have gone back and forth for two weeks trying to build special case rules I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.