473,594 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

just wondering how to design this...

Hello all,

Please allow me to revisit this topic once more it has hindered me for the
longest. Even after the great replies I got in the past. I guess they might
have been a bit over my head or my requirements weren't very clear. I’m
betting on the latter (not asking clear) so after several months of pondering
please allow me to rephrase my question. Ok, so I'll begin already

Given: Northwind Customers and Orders tables.
Goal1 I'd like to create a simple win app that I'm hoping will clear up
some architecture questions I'm challenged with.
Goal2 All I want to accomplish is to edit a customer's order.

For example, display a list of customers. I should be able select a customer
which then displays a list of orders for that customer. And finally select an
order to edit.

My understanding challenge:
I'm having class design issues. let me first ask my one question then I'll
maybe followup with the next after I'm clear on this one.
For instance:
I'm wondering if I want to get orders for a customer would I create a method
called GetOrders in the Customer's class or Order class?

Thanks,
rodchar

Nov 21 '05 #1
16 1069
Hi Rod,

First question first: in my mind, getorders() would logically be in the
customers class; the orders class would contain methods that deal with the
array of orders you 'get'.

HTH,

Bernie Yaeger

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:1F******** *************** ***********@mic rosoft.com...
Hello all,

Please allow me to revisit this topic once more it has hindered me for the
longest. Even after the great replies I got in the past. I guess they
might
have been a bit over my head or my requirements weren't very clear. I'm
betting on the latter (not asking clear) so after several months of
pondering
please allow me to rephrase my question. Ok, so I'll begin already

Given: Northwind Customers and Orders tables.
Goal1 I'd like to create a simple win app that I'm hoping will clear up
some architecture questions I'm challenged with.
Goal2 All I want to accomplish is to edit a customer's order.

For example, display a list of customers. I should be able select a
customer
which then displays a list of orders for that customer. And finally select
an
order to edit.

My understanding challenge:
I'm having class design issues. let me first ask my one question then I'll
maybe followup with the next after I'm clear on this one.
For instance:
I'm wondering if I want to get orders for a customer would I create a
method
called GetOrders in the Customer's class or Order class?

Thanks,
rodchar

Nov 21 '05 #2
Got it: my GetOrders method in my Customer class
Now: i'm using a typed dataset with both the customers and orders table in it.
my first guess is to dim a new dataset in the customer class and get a list
of all the customers. And then, once i retrieve one customer i'll use the
GetOrders method.

Inside my GetOrders method, do i dim a new Order object passing a reference
of the dataset so i can populate the Orders table?

"Bernie Yaeger" wrote:
Hi Rod,

First question first: in my mind, getorders() would logically be in the
customers class; the orders class would contain methods that deal with the
array of orders you 'get'.

HTH,

Bernie Yaeger

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:1F******** *************** ***********@mic rosoft.com...
Hello all,

Please allow me to revisit this topic once more it has hindered me for the
longest. Even after the great replies I got in the past. I guess they
might
have been a bit over my head or my requirements weren't very clear. I'm
betting on the latter (not asking clear) so after several months of
pondering
please allow me to rephrase my question. Ok, so I'll begin already

Given: Northwind Customers and Orders tables.
Goal1 I'd like to create a simple win app that I'm hoping will clear up
some architecture questions I'm challenged with.
Goal2 All I want to accomplish is to edit a customer's order.

For example, display a list of customers. I should be able select a
customer
which then displays a list of orders for that customer. And finally select
an
order to edit.

My understanding challenge:
I'm having class design issues. let me first ask my one question then I'll
maybe followup with the next after I'm clear on this one.
For instance:
I'm wondering if I want to get orders for a customer would I create a
method
called GetOrders in the Customer's class or Order class?

Thanks,
rodchar


Nov 21 '05 #3
Hi ROd,

Yep; sounds logical to me.

Bernie

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:D9******** *************** ***********@mic rosoft.com...
Got it: my GetOrders method in my Customer class
Now: i'm using a typed dataset with both the customers and orders table in
it.
my first guess is to dim a new dataset in the customer class and get a
list
of all the customers. And then, once i retrieve one customer i'll use the
GetOrders method.

Inside my GetOrders method, do i dim a new Order object passing a
reference
of the dataset so i can populate the Orders table?

"Bernie Yaeger" wrote:
Hi Rod,

First question first: in my mind, getorders() would logically be in the
customers class; the orders class would contain methods that deal with
the
array of orders you 'get'.

HTH,

Bernie Yaeger

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:1F******** *************** ***********@mic rosoft.com...
> Hello all,
>
> Please allow me to revisit this topic once more it has hindered me for
> the
> longest. Even after the great replies I got in the past. I guess they
> might
> have been a bit over my head or my requirements weren't very clear. I'm
> betting on the latter (not asking clear) so after several months of
> pondering
> please allow me to rephrase my question. Ok, so I'll begin already
>
> Given: Northwind Customers and Orders tables.
> Goal1 I'd like to create a simple win app that I'm hoping will clear up
> some architecture questions I'm challenged with.
> Goal2 All I want to accomplish is to edit a customer's order.
>
> For example, display a list of customers. I should be able select a
> customer
> which then displays a list of orders for that customer. And finally
> select
> an
> order to edit.
>
> My understanding challenge:
> I'm having class design issues. let me first ask my one question then
> I'll
> maybe followup with the next after I'm clear on this one.
> For instance:
> I'm wondering if I want to get orders for a customer would I create a
> method
> called GetOrders in the Customer's class or Order class?
>
> Thanks,
> rodchar
>


Nov 21 '05 #4
thanks for the feedback.

"Bernie Yaeger" wrote:
Hi ROd,

Yep; sounds logical to me.

Bernie

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:D9******** *************** ***********@mic rosoft.com...
Got it: my GetOrders method in my Customer class
Now: i'm using a typed dataset with both the customers and orders table in
it.
my first guess is to dim a new dataset in the customer class and get a
list
of all the customers. And then, once i retrieve one customer i'll use the
GetOrders method.

Inside my GetOrders method, do i dim a new Order object passing a
reference
of the dataset so i can populate the Orders table?

"Bernie Yaeger" wrote:
Hi Rod,

First question first: in my mind, getorders() would logically be in the
customers class; the orders class would contain methods that deal with
the
array of orders you 'get'.

HTH,

Bernie Yaeger

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:1F******** *************** ***********@mic rosoft.com...
> Hello all,
>
> Please allow me to revisit this topic once more it has hindered me for
> the
> longest. Even after the great replies I got in the past. I guess they
> might
> have been a bit over my head or my requirements weren't very clear. I'm
> betting on the latter (not asking clear) so after several months of
> pondering
> please allow me to rephrase my question. Ok, so I'll begin already
>
> Given: Northwind Customers and Orders tables.
> Goal1 I'd like to create a simple win app that I'm hoping will clear up
> some architecture questions I'm challenged with.
> Goal2 All I want to accomplish is to edit a customer's order.
>
> For example, display a list of customers. I should be able select a
> customer
> which then displays a list of orders for that customer. And finally
> select
> an
> order to edit.
>
> My understanding challenge:
> I'm having class design issues. let me first ask my one question then
> I'll
> maybe followup with the next after I'm clear on this one.
> For instance:
> I'm wondering if I want to get orders for a customer would I create a
> method
> called GetOrders in the Customer's class or Order class?
>
> Thanks,
> rodchar
>


Nov 21 '05 #5
are there some other ways to achieve this which would also be acceptable? if
so, could please give me 1 or 2 other examples.

thanks,
rodchar

"Bernie Yaeger" wrote:
Hi ROd,

Yep; sounds logical to me.

Bernie

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:D9******** *************** ***********@mic rosoft.com...
Got it: my GetOrders method in my Customer class
Now: i'm using a typed dataset with both the customers and orders table in
it.
my first guess is to dim a new dataset in the customer class and get a
list
of all the customers. And then, once i retrieve one customer i'll use the
GetOrders method.

Inside my GetOrders method, do i dim a new Order object passing a
reference
of the dataset so i can populate the Orders table?

"Bernie Yaeger" wrote:
Hi Rod,

First question first: in my mind, getorders() would logically be in the
customers class; the orders class would contain methods that deal with
the
array of orders you 'get'.

HTH,

Bernie Yaeger

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:1F******** *************** ***********@mic rosoft.com...
> Hello all,
>
> Please allow me to revisit this topic once more it has hindered me for
> the
> longest. Even after the great replies I got in the past. I guess they
> might
> have been a bit over my head or my requirements weren't very clear. I'm
> betting on the latter (not asking clear) so after several months of
> pondering
> please allow me to rephrase my question. Ok, so I'll begin already
>
> Given: Northwind Customers and Orders tables.
> Goal1 I'd like to create a simple win app that I'm hoping will clear up
> some architecture questions I'm challenged with.
> Goal2 All I want to accomplish is to edit a customer's order.
>
> For example, display a list of customers. I should be able select a
> customer
> which then displays a list of orders for that customer. And finally
> select
> an
> order to edit.
>
> My understanding challenge:
> I'm having class design issues. let me first ask my one question then
> I'll
> maybe followup with the next after I'm clear on this one.
> For instance:
> I'm wondering if I want to get orders for a customer would I create a
> method
> called GetOrders in the Customer's class or Order class?
>
> Thanks,
> rodchar
>


Nov 21 '05 #6
are there some other ways to achieve this which would also be acceptable? if
so, could please give me 1 or 2 other examples.

thanks,
rodchar

"Bernie Yaeger" wrote:
Hi ROd,

Yep; sounds logical to me.

Bernie

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:D9******** *************** ***********@mic rosoft.com...
Got it: my GetOrders method in my Customer class
Now: i'm using a typed dataset with both the customers and orders table in
it.
my first guess is to dim a new dataset in the customer class and get a
list
of all the customers. And then, once i retrieve one customer i'll use the
GetOrders method.

Inside my GetOrders method, do i dim a new Order object passing a
reference
of the dataset so i can populate the Orders table?

"Bernie Yaeger" wrote:
Hi Rod,

First question first: in my mind, getorders() would logically be in the
customers class; the orders class would contain methods that deal with
the
array of orders you 'get'.

HTH,

Bernie Yaeger

"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:1F******** *************** ***********@mic rosoft.com...
> Hello all,
>
> Please allow me to revisit this topic once more it has hindered me for
> the
> longest. Even after the great replies I got in the past. I guess they
> might
> have been a bit over my head or my requirements weren't very clear. I'm
> betting on the latter (not asking clear) so after several months of
> pondering
> please allow me to rephrase my question. Ok, so I'll begin already
>
> Given: Northwind Customers and Orders tables.
> Goal1 I'd like to create a simple win app that I'm hoping will clear up
> some architecture questions I'm challenged with.
> Goal2 All I want to accomplish is to edit a customer's order.
>
> For example, display a list of customers. I should be able select a
> customer
> which then displays a list of orders for that customer. And finally
> select
> an
> order to edit.
>
> My understanding challenge:
> I'm having class design issues. let me first ask my one question then
> I'll
> maybe followup with the next after I'm clear on this one.
> For instance:
> I'm wondering if I want to get orders for a customer would I create a
> method
> called GetOrders in the Customer's class or Order class?
>
> Thanks,
> rodchar
>


Nov 21 '05 #7
"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:DD******** *************** ***********@mic rosoft.com...
are there some other ways to achieve this which would also be acceptable?
if
so, could please give me 1 or 2 other examples.

Years of development have made me cynical.
Maybe I'm a jaded dinosaur.
I look at different ways of doing stuff and I look at what the benefits are.
I don't find OO actually returns the pluses claimed.
Or at least the sort of OO you're describing.
You already probably realise that you're taking longer.

The only real world benefit (IMO) of using the approach is if you're
re-using objects.

I would suggest you decide whether you have some other reason for doing the
OO thing beyond efficiency of development.
Will your objects will really be re-used?
Often they are not.
That customer logic bit is often only used in the customer maintenance
screen.

Oh... Use stored procedures though.
Stored procedures are arguably another
layer/object/whatever-flavour-of-month-calls-it.
They're also a hell of a lot easier to get your head round than full on OO
so they're quicker to write.
What you do find is that the customer-to-orders data is used in a coupla
reports and maybe maintenance screens.
One stored procedure can be used for the lot.

Anyhow, that's my view.
--
Regards,
Andy O'Neill
Nov 21 '05 #8
"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:DD******** *************** ***********@mic rosoft.com...
are there some other ways to achieve this which would also be acceptable?
if
so, could please give me 1 or 2 other examples.

Years of development have made me cynical.
Maybe I'm a jaded dinosaur.
I look at different ways of doing stuff and I look at what the benefits are.
I don't find OO actually returns the pluses claimed.
Or at least the sort of OO you're describing.
You already probably realise that you're taking longer.

The only real world benefit (IMO) of using the approach is if you're
re-using objects.

I would suggest you decide whether you have some other reason for doing the
OO thing beyond efficiency of development.
Will your objects will really be re-used?
Often they are not.
That customer logic bit is often only used in the customer maintenance
screen.

Oh... Use stored procedures though.
Stored procedures are arguably another
layer/object/whatever-flavour-of-month-calls-it.
They're also a hell of a lot easier to get your head round than full on OO
so they're quicker to write.
What you do find is that the customer-to-orders data is used in a coupla
reports and maybe maintenance screens.
One stored procedure can be used for the lot.

Anyhow, that's my view.
--
Regards,
Andy O'Neill
Nov 21 '05 #9
alright: now to select an individual order how would that work?
would have a method in the Order class called GetOrder and call it from the
Customer class?

"Andy O'Neill" wrote:
"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:DD******** *************** ***********@mic rosoft.com...
are there some other ways to achieve this which would also be acceptable?
if
so, could please give me 1 or 2 other examples.

Years of development have made me cynical.
Maybe I'm a jaded dinosaur.
I look at different ways of doing stuff and I look at what the benefits are.
I don't find OO actually returns the pluses claimed.
Or at least the sort of OO you're describing.
You already probably realise that you're taking longer.

The only real world benefit (IMO) of using the approach is if you're
re-using objects.

I would suggest you decide whether you have some other reason for doing the
OO thing beyond efficiency of development.
Will your objects will really be re-used?
Often they are not.
That customer logic bit is often only used in the customer maintenance
screen.

Oh... Use stored procedures though.
Stored procedures are arguably another
layer/object/whatever-flavour-of-month-calls-it.
They're also a hell of a lot easier to get your head round than full on OO
so they're quicker to write.
What you do find is that the customer-to-orders data is used in a coupla
reports and maybe maintenance screens.
One stored procedure can be used for the lot.

Anyhow, that's my view.
--
Regards,
Andy O'Neill

Nov 21 '05 #10

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

Similar topics

11
2209
by: Steven Burn | last post by:
Just wondering if it would be possible to convert an existing e-mail form to; 1. Send the e-mail (as it does now...without problems) 2. Copy one folder on the server, to another new folder Using the username from the e-mail form, as the new foldername? --
40
3094
by: komone | last post by:
"Now is the time for all good web developers to use stylesheets". Hmm OK, so I start this commercial site design with the express intent of using CSS entirely. (Something I haven't attempted in about 3 years since I last wasted my time trying to get it to work). The site layout is intended to look (nearly precisely) like this from the CSS-2 spec: http://www.w3.org/TR/REC-CSS2/visuren.html#fixed-positioning
2
1972
by: KevinGPO | last post by:
Just wondering if anyone knows if there are converters to convert from: MS Visual C++ 6.0 or MS Visual Studio 2003 project files into UNIX autogen/configure/make files?
3
1170
by: James | last post by:
Hi I'm James Newbie I'm going to use some xml from a previous posters because it's similiar to mine <Store> <Name> My Book Store</Name> <Phone> 555-555-5555 </Phone> <Book id="1" > <Title>Thermodynamics Unleashed</Title>
1
950
by: suresh | last post by:
Hi! Guys, I am using a base class and I am inheriting it into derived class page instead of using System.Web.UI.Page. which is giving the following error. "The file could not be loaded into the Web Forms designer. Please correct the following error and then try loading it again: An exception occurred while trying to create an instance of
5
4044
by: cj | last post by:
I'm testing some code I typed in from an example program I was given. It works with F5. When I try to run the exe from an icon on the desktop I'm given a form that says: Just-In-Time Debugging An exception 'System.IO.FileNotFoundException' has occured in WindowsApplication19.exe. Possible Debuggers: Microsoft Development Environment-Form1.vb*;Visu
8
1459
by: subrato | last post by:
Hi, I dont know if this is the right forum for this question but I hope someone is able to answer this for me. I know a lot of information can be retrieved using IIS Log files. But there seems to be something that my boss wants me to do. Find a way to implant a cookie on user and get more information than just the information that is retrieved by those log files. He says one can get more information like browser resolution and stuff(which...
18
2318
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before. Here's the scenario: We have a base class with all virtual functions. We'll call this the Animal class. We then make two classes Fish and Bird that both inherit from Animal. In the program, we have a single array of Animal pointers that will...
19
3149
by: neelsmail | last post by:
Hi, I have been working on C++ for some time now, and I think I have a flair for design (which just might be only my imagination over- stretched.. :) ). So, I tried to find a design certification, possibly that involves C++, but, if not, C++ and UML. All I could find was Java + UML design certifications (one such is detailed on http://www.objectsbydesign.com/tools/certification.html). Although UML is expected to be language independent,...
0
7947
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7880
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8255
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8242
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6665
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.