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" <rodchar@discussions.microsoft.com> wrote in message
news:5157D8A6-B497-4712-A092-8FFF87ED3D62@microsoft.com...[color=blue]
> I'm using these tables in a sample asp.net application i created. i've[/color]
read[color=blue]
> that in class design to make your classes from real entities so Customer[/color]
and[color=blue]
> Orders are classes I came up with.
>
> "Kevin Spencer" wrote:
>[color=green]
> > It's okay, rodchar. I'm just having a hard time figuring out what you're
> > asying, and how to help.
> >
> > For example:
> >[color=darkred]
> > > Regarding instantiating the Orders class I was wondering where does[/color][/color][/color]
"Dim o[color=blue][color=green][color=darkred]
> > > as new Orders" occur. Will it occur in a method in the Customers class[/color][/color][/color]
or[color=blue][color=green][color=darkred]
> > > would it occur in WebForm1.aspx.[/color]
> >
> > You've lost me already. I am not aware of any existing class named[/color][/color]
"Orders."[color=blue][color=green]
> > 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" <rodchar@discussions.microsoft.com> wrote in message
> > news:93CD93FD-8A97-4177-9D78-D80B27DF072F@microsoft.com...[color=darkred]
> > > I apologize for the confusion, I'm just taking the Northwind database[/color][/color][/color]
to[color=blue][color=green]
> > help[color=darkred]
> > > 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[/color][/color][/color]
"Dim o[color=blue][color=green][color=darkred]
> > > as new Orders" occur. Will it occur in a method in the Customers class[/color][/color][/color]
or[color=blue][color=green][color=darkred]
> > > 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[/color][/color][/color]
both[color=blue][color=green][color=darkred]
> > > tables at the start of the application. What happens when the Orders[/color][/color][/color]
class[color=blue][color=green][color=darkred]
> > > 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[/color][/color][/color]
make[color=blue][color=green][color=darkred]
> > > the dataset public so the Orders object can get to it? Or is there[/color][/color][/color]
another[color=blue][color=green][color=darkred]
> > > way?
> > >
> > > Sorry if I'm being confusing again,
> > > rodchar
> > >
> > > "Kevin Spencer" wrote:
> > >
> > > > Your question seems to mix business and interface logic in a way[/color][/color][/color]
that[color=blue][color=green]
> > makes[color=darkred]
> > > > it impossible to easily answer. For example, the phrase[/color][/color][/color]
"Master/Detail"[color=blue][color=green]
> > is[color=darkred]
> > > > referring to User Interface design, not business class design. but[/color][/color][/color]
your[color=blue][color=green][color=darkred]
> > > > first question is actually about using a DataSet, which is a[/color][/color][/color]
business[color=blue][color=green]
> > class.[color=darkred]
> > > >
> > > > Your second question ("What client is responsible for instantiating[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> > > > order class?") makes even less sense to me. What kind of "client"[/color][/color][/color]
are[color=blue][color=green]
> > you[color=darkred]
> > > > referring to? That is, what sense or definition of the word "client"[/color][/color][/color]
are[color=blue][color=green]
> > you[color=darkred]
> > > > trying to apply? You seem to define "client" as being a "layer" of[/color][/color][/color]
an[color=blue][color=green][color=darkred]
> > > > application, but that's a new one on me. And what is this "master[/color][/color][/color]
class"[color=blue][color=green]
> > you[color=darkred]
> > > > refer to? For that matter, what is the "orders class?"
> > > >
> > > > I will take a stab at helping you out, although I can't understand[/color][/color][/color]
or[color=blue][color=green][color=darkred]
> > > > therefore answer your questions. First of all, forget about VB.Net.[/color][/color][/color]
In[color=blue][color=green][color=darkred]
> > > > Mexico I would ask where "el bano" is. In the U.S., where we speak[/color]
> > English,[color=darkred]
> > > > I would ask where the bathroom is. However, regardless of the[/color][/color][/color]
language,[color=blue][color=green]
> > I[color=darkred]
> > > > 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[/color][/color][/color]
are[color=blue][color=green][color=darkred]
> > > > displayed separately, but in a connected way. For example, clicking[/color][/color][/color]
a[color=blue][color=green]
> > row in[color=darkred]
> > > > a DataGrid might display the details about the record selected in[/color]
> > another[color=darkred]
> > > > DataGrid or UI object of some kind. The data might be from the same[/color][/color][/color]
data[color=blue][color=green][color=darkred]
> > > > source, or different. All that is required is that the data sources[/color][/color][/color]
are[color=blue][color=green][color=darkred]
> > > > related, such as orders that are grouped by customer. There can be a[/color]
> > single[color=darkred]
> > > > data source for both interfaces, or 2 related data sources.
> > > >
> > > > Note that the talk so far has all been about UI, not business. The[/color][/color][/color]
UI[color=blue][color=green]
> > should[color=darkred]
> > > > be loosely coupled with the business objects it works with. Loose[/color]
> > coupling[color=darkred]
> > > > is one of the key elements of n-tiered architecture. How you[/color][/color][/color]
structure[color=blue][color=green]
> > your[color=darkred]
> > > > business objects is pretty much up to you, and dependent upon the
> > > > circumstances/requirements of your app. You just need to keep your[/color][/color][/color]
mind[color=blue][color=green]
> > on[color=darkred]
> > > > 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" <rodchar@discussions.microsoft.com> wrote in message
> > > > news:826DA29D-FAB0-46EB-B415-7730C63E26BF@microsoft.com...
> > > > > Hey all,
> > > > >
> > > > > I'm trying to understand Master/Detail concepts in VB.NET. If I do[/color][/color][/color]
a[color=blue][color=green]
> > data[color=darkred]
> > > > > adapter fill for both customer and orders from Northwind where[/color][/color][/color]
should[color=blue][color=green]
> > that[color=darkred]
> > > > > dataset live?
> > > > >
> > > > > What client is responsible for instantiating the orders class?[/color][/color][/color]
Would[color=blue][color=green]
> > it be[color=darkred]
> > > > > the ui layer or the master class in the business layer?
> > > > >
> > > > > thanks,
> > > > > rodchar
> > > >
> > > >
> > > >[/color]
> >
> >
> >[/color][/color]