By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,979 Members | 943 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,979 IT Pros & Developers. It's quick & easy.

class design question

P: n/a
Hey all,

I'm trying to understand Master/Detail concepts in VB.NET. If I do a data
adapter fill for both customer and orders from Northwind where should that
dataset live?

What client is responsible for instantiating the orders class? Would it be
the ui layer or the master class in the business layer?

thanks,
rodchar
Nov 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Your question seems to mix business and interface logic in a way that makes
it impossible to easily answer. For example, the phrase "Master/Detail" is
referring to User Interface design, not business class design. but your
first question is actually about using a DataSet, which is a business class.

Your second question ("What client is responsible for instantiating the
order class?") makes even less sense to me. What kind of "client" are you
referring to? That is, what sense or definition of the word "client" are you
trying to apply? You seem to define "client" as being a "layer" of an
application, but that's a new one on me. And what is this "master class" you
refer to? For that matter, what is the "orders class?"

I will take a stab at helping you out, although I can't understand or
therefore answer your questions. First of all, forget about VB.Net. In
Mexico I would ask where "el bano" is. In the U.S., where we speak English,
I would ask where the bathroom is. However, regardless of the language, I
would be asking the same thing. This isn't a VB.Net issue, it's a
design/architecture issue.

The Master/Detail concept is a UI concept, in which a set of data is
displayed, and details about individual members of that set of data are
displayed separately, but in a connected way. For example, clicking a row in
a DataGrid might display the details about the record selected in another
DataGrid or UI object of some kind. The data might be from the same data
source, or different. All that is required is that the data sources are
related, such as orders that are grouped by customer. There can be a single
data source for both interfaces, or 2 related data sources.

Note that the talk so far has all been about UI, not business. The UI should
be loosely coupled with the business objects it works with. Loose coupling
is one of the key elements of n-tiered architecture. How you structure your
business objects is pretty much up to you, and dependent upon the
circumstances/requirements of your app. You just need to keep your mind on
the principles, and the rest should fall into place.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hey all,

I'm trying to understand Master/Detail concepts in VB.NET. If I do a data
adapter fill for both customer and orders from Northwind where should that
dataset live?

What client is responsible for instantiating the orders class? Would it be
the ui layer or the master class in the business layer?

thanks,
rodchar

Nov 18 '05 #2

P: n/a
I apologize for the confusion, I'm just taking the Northwind database to help
relay my questions, so I'm using the Customers and Orders table as my
master/detail relationship.

Regarding instantiating the Orders class I was wondering where does "Dim o
as new Orders" occur. Will it occur in a method in the Customers class or
would it occur in WebForm1.aspx.

Regarding the dataset, where should "Dim ds as NEW dataset" occur?
My dataset has the Customers and Orders table in it. I want to load both
tables at the start of the application. What happens when the Orders class
gets instantiated, how would it get to the data in the dataset? If I
instantiate the dataset in the Customers class then I guess I need to make
the dataset public so the Orders object can get to it? Or is there another
way?

Sorry if I'm being confusing again,
rodchar

"Kevin Spencer" wrote:
Your question seems to mix business and interface logic in a way that makes
it impossible to easily answer. For example, the phrase "Master/Detail" is
referring to User Interface design, not business class design. but your
first question is actually about using a DataSet, which is a business class.

Your second question ("What client is responsible for instantiating the
order class?") makes even less sense to me. What kind of "client" are you
referring to? That is, what sense or definition of the word "client" are you
trying to apply? You seem to define "client" as being a "layer" of an
application, but that's a new one on me. And what is this "master class" you
refer to? For that matter, what is the "orders class?"

I will take a stab at helping you out, although I can't understand or
therefore answer your questions. First of all, forget about VB.Net. In
Mexico I would ask where "el bano" is. In the U.S., where we speak English,
I would ask where the bathroom is. However, regardless of the language, I
would be asking the same thing. This isn't a VB.Net issue, it's a
design/architecture issue.

The Master/Detail concept is a UI concept, in which a set of data is
displayed, and details about individual members of that set of data are
displayed separately, but in a connected way. For example, clicking a row in
a DataGrid might display the details about the record selected in another
DataGrid or UI object of some kind. The data might be from the same data
source, or different. All that is required is that the data sources are
related, such as orders that are grouped by customer. There can be a single
data source for both interfaces, or 2 related data sources.

Note that the talk so far has all been about UI, not business. The UI should
be loosely coupled with the business objects it works with. Loose coupling
is one of the key elements of n-tiered architecture. How you structure your
business objects is pretty much up to you, and dependent upon the
circumstances/requirements of your app. You just need to keep your mind on
the principles, and the rest should fall into place.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hey all,

I'm trying to understand Master/Detail concepts in VB.NET. If I do a data
adapter fill for both customer and orders from Northwind where should that
dataset live?

What client is responsible for instantiating the orders class? Would it be
the ui layer or the master class in the business layer?

thanks,
rodchar


Nov 18 '05 #3

P: n/a
It's okay, rodchar. I'm just having a hard time figuring out what you're
asying, and how to help.

For example:
Regarding instantiating the Orders class I was wondering where does "Dim o
as new Orders" occur. Will it occur in a method in the Customers class or
would it occur in WebForm1.aspx.
You've lost me already. I am not aware of any existing class named "Orders."
Neither am I aware of any existing class named "Customers." So, I'm at a
loss. Where are you getting these class names from?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com... I apologize for the confusion, I'm just taking the Northwind database to help relay my questions, so I'm using the Customers and Orders table as my
master/detail relationship.

Regarding instantiating the Orders class I was wondering where does "Dim o
as new Orders" occur. Will it occur in a method in the Customers class or
would it occur in WebForm1.aspx.

Regarding the dataset, where should "Dim ds as NEW dataset" occur?
My dataset has the Customers and Orders table in it. I want to load both
tables at the start of the application. What happens when the Orders class
gets instantiated, how would it get to the data in the dataset? If I
instantiate the dataset in the Customers class then I guess I need to make
the dataset public so the Orders object can get to it? Or is there another
way?

Sorry if I'm being confusing again,
rodchar

"Kevin Spencer" wrote:
Your question seems to mix business and interface logic in a way that makes it impossible to easily answer. For example, the phrase "Master/Detail" is referring to User Interface design, not business class design. but your
first question is actually about using a DataSet, which is a business class.
Your second question ("What client is responsible for instantiating the
order class?") makes even less sense to me. What kind of "client" are you referring to? That is, what sense or definition of the word "client" are you trying to apply? You seem to define "client" as being a "layer" of an
application, but that's a new one on me. And what is this "master class" you refer to? For that matter, what is the "orders class?"

I will take a stab at helping you out, although I can't understand or
therefore answer your questions. First of all, forget about VB.Net. In
Mexico I would ask where "el bano" is. In the U.S., where we speak English, I would ask where the bathroom is. However, regardless of the language, I would be asking the same thing. This isn't a VB.Net issue, it's a
design/architecture issue.

The Master/Detail concept is a UI concept, in which a set of data is
displayed, and details about individual members of that set of data are
displayed separately, but in a connected way. For example, clicking a row in a DataGrid might display the details about the record selected in another DataGrid or UI object of some kind. The data might be from the same data
source, or different. All that is required is that the data sources are
related, such as orders that are grouped by customer. There can be a single data source for both interfaces, or 2 related data sources.

Note that the talk so far has all been about UI, not business. The UI should be loosely coupled with the business objects it works with. Loose coupling is one of the key elements of n-tiered architecture. How you structure your business objects is pretty much up to you, and dependent upon the
circumstances/requirements of your app. You just need to keep your mind on the principles, and the rest should fall into place.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hey all,

I'm trying to understand Master/Detail concepts in VB.NET. If I do a data adapter fill for both customer and orders from Northwind where should that dataset live?

What client is responsible for instantiating the orders class? Would it be the ui layer or the master class in the business layer?

thanks,
rodchar


Nov 18 '05 #4

P: n/a
I'm using these tables in a sample asp.net application i created. i've read
that in class design to make your classes from real entities so Customer and
Orders are classes I came up with.

"Kevin Spencer" wrote:
It's okay, rodchar. I'm just having a hard time figuring out what you're
asying, and how to help.

For example:
Regarding instantiating the Orders class I was wondering where does "Dim o
as new Orders" occur. Will it occur in a method in the Customers class or
would it occur in WebForm1.aspx.


You've lost me already. I am not aware of any existing class named "Orders."
Neither am I aware of any existing class named "Customers." So, I'm at a
loss. Where are you getting these class names from?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
I apologize for the confusion, I'm just taking the Northwind database to

help
relay my questions, so I'm using the Customers and Orders table as my
master/detail relationship.

Regarding instantiating the Orders class I was wondering where does "Dim o
as new Orders" occur. Will it occur in a method in the Customers class or
would it occur in WebForm1.aspx.

Regarding the dataset, where should "Dim ds as NEW dataset" occur?
My dataset has the Customers and Orders table in it. I want to load both
tables at the start of the application. What happens when the Orders class
gets instantiated, how would it get to the data in the dataset? If I
instantiate the dataset in the Customers class then I guess I need to make
the dataset public so the Orders object can get to it? Or is there another
way?

Sorry if I'm being confusing again,
rodchar

"Kevin Spencer" wrote:
Your question seems to mix business and interface logic in a way that makes it impossible to easily answer. For example, the phrase "Master/Detail" is referring to User Interface design, not business class design. but your
first question is actually about using a DataSet, which is a business class.
Your second question ("What client is responsible for instantiating the
order class?") makes even less sense to me. What kind of "client" are you referring to? That is, what sense or definition of the word "client" are you trying to apply? You seem to define "client" as being a "layer" of an
application, but that's a new one on me. And what is this "master class" you refer to? For that matter, what is the "orders class?"

I will take a stab at helping you out, although I can't understand or
therefore answer your questions. First of all, forget about VB.Net. In
Mexico I would ask where "el bano" is. In the U.S., where we speak English, I would ask where the bathroom is. However, regardless of the language, I would be asking the same thing. This isn't a VB.Net issue, it's a
design/architecture issue.

The Master/Detail concept is a UI concept, in which a set of data is
displayed, and details about individual members of that set of data are
displayed separately, but in a connected way. For example, clicking a row in a DataGrid might display the details about the record selected in another DataGrid or UI object of some kind. The data might be from the same data
source, or different. All that is required is that the data sources are
related, such as orders that are grouped by customer. There can be a single data source for both interfaces, or 2 related data sources.

Note that the talk so far has all been about UI, not business. The UI should be loosely coupled with the business objects it works with. Loose coupling is one of the key elements of n-tiered architecture. How you structure your business objects is pretty much up to you, and dependent upon the
circumstances/requirements of your app. You just need to keep your mind on the principles, and the rest should fall into place.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
> Hey all,
>
> I'm trying to understand Master/Detail concepts in VB.NET. If I do a data > adapter fill for both customer and orders from Northwind where should that > dataset live?
>
> What client is responsible for instantiating the orders class? Would it be > the ui layer or the master class in the business layer?
>
> thanks,
> rodchar


Nov 18 '05 #5

P: n/a
I think we need to back up some here, rodchar, and here's why: Your question
involves a number of concepts, none of which you seem to have a very good
grasp on. Uncle Chutney sez "Big things are made up of lots of little
things." An application is made up of lots of classes. Classes are made up
of lots of fields, propreties and functions (somewhat simplified). Fields,
properties and functions are made up of lots of statements and expressions.
So, before you can ask the question "where does "Dim o as new Orders"
occur," you have to have a firm understanding of classes. In order to know
anything about classes, you need a firm understanding of object-orientation,
fields, properties, and functions. And in order to know anything about
fields, properties, and functions, you have to have a firm understanding of
expressions and statements.

In the world of programming, when you learn a new technology, you generally
start out with a simple program called "Hello World." All it does is output
the phrase "Hello World" to whatever output mechanism the technology uses.
It takes no input. It simply puts out "Hello World." There is a reason for
this (Big things are made up of lots of little things). By getting a firm
grasp of the bricks, the house appears without even thinking about it. How
do you write an elephant? One byte at a time.

I would suggest rather than making up your own self-tutorial, find some very
basic ready-made ones that you can use (the .Net SDK is full of them), and
do them. Study each one to get a full understanding of it. Once you've
mastered the concepts, move on to something that does a little more. You can
download the .Net SDK from the following URL (for free!):

http://www.microsoft.com/downloads/d...displaylang=en

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:51**********************************@microsof t.com...
I'm using these tables in a sample asp.net application i created. i've read that in class design to make your classes from real entities so Customer and Orders are classes I came up with.

"Kevin Spencer" wrote:
It's okay, rodchar. I'm just having a hard time figuring out what you're
asying, and how to help.

For example:
Regarding instantiating the Orders class I was wondering where does "Dim o as new Orders" occur. Will it occur in a method in the Customers class or would it occur in WebForm1.aspx.


You've lost me already. I am not aware of any existing class named "Orders." Neither am I aware of any existing class named "Customers." So, I'm at a
loss. Where are you getting these class names from?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
I apologize for the confusion, I'm just taking the Northwind database to
help
relay my questions, so I'm using the Customers and Orders table as my
master/detail relationship.

Regarding instantiating the Orders class I was wondering where does
"Dim o as new Orders" occur. Will it occur in a method in the Customers class or would it occur in WebForm1.aspx.

Regarding the dataset, where should "Dim ds as NEW dataset" occur?
My dataset has the Customers and Orders table in it. I want to load both tables at the start of the application. What happens when the Orders class gets instantiated, how would it get to the data in the dataset? If I
instantiate the dataset in the Customers class then I guess I need to make the dataset public so the Orders object can get to it? Or is there another way?

Sorry if I'm being confusing again,
rodchar

"Kevin Spencer" wrote:

> Your question seems to mix business and interface logic in a way that makes
> it impossible to easily answer. For example, the phrase
"Master/Detail" is
> referring to User Interface design, not business class design. but
your > first question is actually about using a DataSet, which is a business class.
>
> Your second question ("What client is responsible for instantiating
the > order class?") makes even less sense to me. What kind of "client" are you
> referring to? That is, what sense or definition of the word "client"
are you
> trying to apply? You seem to define "client" as being a "layer" of
an > application, but that's a new one on me. And what is this "master class" you
> refer to? For that matter, what is the "orders class?"
>
> I will take a stab at helping you out, although I can't understand
or > therefore answer your questions. First of all, forget about VB.Net. In > Mexico I would ask where "el bano" is. In the U.S., where we speak

English,
> I would ask where the bathroom is. However, regardless of the language, I
> would be asking the same thing. This isn't a VB.Net issue, it's a
> design/architecture issue.
>
> The Master/Detail concept is a UI concept, in which a set of data is
> displayed, and details about individual members of that set of data
are > displayed separately, but in a connected way. For example, clicking a row in
> a DataGrid might display the details about the record selected in

another
> DataGrid or UI object of some kind. The data might be from the same
data > source, or different. All that is required is that the data sources are > related, such as orders that are grouped by customer. There can be a

single
> data source for both interfaces, or 2 related data sources.
>
> Note that the talk so far has all been about UI, not business. The

UI should
> be loosely coupled with the business objects it works with. Loose

coupling
> is one of the key elements of n-tiered architecture. How you
structure your
> business objects is pretty much up to you, and dependent upon the
> circumstances/requirements of your app. You just need to keep your
mind on
> the principles, and the rest should fall into place.
>
> --
> HTH,
> Kevin Spencer
> ..Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "rodchar" <ro*****@discussions.microsoft.com> wrote in message
> news:82**********************************@microsof t.com...
> > Hey all,
> >
> > I'm trying to understand Master/Detail concepts in VB.NET. If I do
a data
> > adapter fill for both customer and orders from Northwind where
should that
> > dataset live?
> >
> > What client is responsible for instantiating the orders class?
Would it be
> > the ui layer or the master class in the business layer?
> >
> > thanks,
> > rodchar
>
>
>


Nov 18 '05 #6

P: n/a
10-4. Thanks.

"Kevin Spencer" wrote:
I think we need to back up some here, rodchar, and here's why: Your question
involves a number of concepts, none of which you seem to have a very good
grasp on. Uncle Chutney sez "Big things are made up of lots of little
things." An application is made up of lots of classes. Classes are made up
of lots of fields, propreties and functions (somewhat simplified). Fields,
properties and functions are made up of lots of statements and expressions.
So, before you can ask the question "where does "Dim o as new Orders"
occur," you have to have a firm understanding of classes. In order to know
anything about classes, you need a firm understanding of object-orientation,
fields, properties, and functions. And in order to know anything about
fields, properties, and functions, you have to have a firm understanding of
expressions and statements.

In the world of programming, when you learn a new technology, you generally
start out with a simple program called "Hello World." All it does is output
the phrase "Hello World" to whatever output mechanism the technology uses.
It takes no input. It simply puts out "Hello World." There is a reason for
this (Big things are made up of lots of little things). By getting a firm
grasp of the bricks, the house appears without even thinking about it. How
do you write an elephant? One byte at a time.

I would suggest rather than making up your own self-tutorial, find some very
basic ready-made ones that you can use (the .Net SDK is full of them), and
do them. Study each one to get a full understanding of it. Once you've
mastered the concepts, move on to something that does a little more. You can
download the .Net SDK from the following URL (for free!):

http://www.microsoft.com/downloads/d...displaylang=en

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:51**********************************@microsof t.com...
I'm using these tables in a sample asp.net application i created. i've

read
that in class design to make your classes from real entities so Customer

and
Orders are classes I came up with.

"Kevin Spencer" wrote:
It's okay, rodchar. I'm just having a hard time figuring out what you're
asying, and how to help.

For example:

> Regarding instantiating the Orders class I was wondering where does "Dim o > as new Orders" occur. Will it occur in a method in the Customers class or > would it occur in WebForm1.aspx.

You've lost me already. I am not aware of any existing class named "Orders." Neither am I aware of any existing class named "Customers." So, I'm at a
loss. Where are you getting these class names from?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
> I apologize for the confusion, I'm just taking the Northwind database to help
> relay my questions, so I'm using the Customers and Orders table as my
> master/detail relationship.
>
> Regarding instantiating the Orders class I was wondering where does "Dim o > as new Orders" occur. Will it occur in a method in the Customers class or > would it occur in WebForm1.aspx.
>
> Regarding the dataset, where should "Dim ds as NEW dataset" occur?
> My dataset has the Customers and Orders table in it. I want to load both > tables at the start of the application. What happens when the Orders class > gets instantiated, how would it get to the data in the dataset? If I
> instantiate the dataset in the Customers class then I guess I need to make > the dataset public so the Orders object can get to it? Or is there another > way?
>
> Sorry if I'm being confusing again,
> rodchar
>
> "Kevin Spencer" wrote:
>
> > Your question seems to mix business and interface logic in a way that makes
> > it impossible to easily answer. For example, the phrase "Master/Detail" is
> > referring to User Interface design, not business class design. but your > > first question is actually about using a DataSet, which is a business class.
> >
> > Your second question ("What client is responsible for instantiating the > > order class?") makes even less sense to me. What kind of "client" are you
> > referring to? That is, what sense or definition of the word "client" are you
> > trying to apply? You seem to define "client" as being a "layer" of an > > application, but that's a new one on me. And what is this "master class" you
> > refer to? For that matter, what is the "orders class?"
> >
> > I will take a stab at helping you out, although I can't understand or > > therefore answer your questions. First of all, forget about VB.Net. In > > Mexico I would ask where "el bano" is. In the U.S., where we speak
English,
> > I would ask where the bathroom is. However, regardless of the language, I
> > would be asking the same thing. This isn't a VB.Net issue, it's a
> > design/architecture issue.
> >
> > The Master/Detail concept is a UI concept, in which a set of data is
> > displayed, and details about individual members of that set of data are > > displayed separately, but in a connected way. For example, clicking a row in
> > a DataGrid might display the details about the record selected in
another
> > DataGrid or UI object of some kind. The data might be from the same data > > source, or different. All that is required is that the data sources are > > related, such as orders that are grouped by customer. There can be a
single
> > data source for both interfaces, or 2 related data sources.
> >
> > Note that the talk so far has all been about UI, not business. The UI should
> > be loosely coupled with the business objects it works with. Loose
coupling
> > is one of the key elements of n-tiered architecture. How you structure your
> > business objects is pretty much up to you, and dependent upon the
> > circumstances/requirements of your app. You just need to keep your mind on
> > the principles, and the rest should fall into place.
> >
> > --
> > HTH,
> > Kevin Spencer
> > ..Net Developer
> > Microsoft MVP
> > I get paid good money to
> > solve puzzles for a living
> >
> > "rodchar" <ro*****@discussions.microsoft.com> wrote in message
> > news:82**********************************@microsof t.com...
> > > Hey all,
> > >
> > > I'm trying to understand Master/Detail concepts in VB.NET. If I do a data
> > > adapter fill for both customer and orders from Northwind where should that
> > > dataset live?
> > >
> > > What client is responsible for instantiating the orders class? Would it be
> > > the ui layer or the master class in the business layer?
> > >
> > > thanks,
> > > rodchar
> >
> >
> >


Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.