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

I need real help!

P: n/a
Hi All,

I am creating multi-tier app in vb.net using visual studio .net.

I create a invoice.vb class file with properties, events and methods. This
also has a line item collection class (lineitem.vb & lineitems.vb). I create
a form (form1.frm) and write the corresponding code to initialize an invoice
object, there are textboxes on the form to display the data, an update and
load button. My data is stored in an access database.

Q. How should my objects interact with the database? eg. When the user
enters in values for the required properties etc and clicks update (we
already have an instance of the invoice object), the code behind calls the
set method of the corresponding properties in the invoice class etc.
Q. Is this where the connection should be made to update the database, if so
how?

or

Q. Should I have a data object also that is initialized when a invoice
object is and update commands are passed through when properties are set?

I hope this makes sense to someone! any help would be cool.

Cheers
Nov 20 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
In most scenarios, you see something like the following:

DAL - Data Access Layer:
Generic layer to access the database. Idea is you can quickly switch out
databases by having a DAL. For an easy method of setting this up, you can
use the Microsoft Data Access Application Block.

NOTE: There is an error in one of the FillDataSet() methods. The line is:
tableName += tableName + (index + 1).ToString();
should be:
tableName = "Table" + (index + 1).ToString();

Data Layer:
If you use strongly typed datasets, this is where you store them.

Business Layer:
Business objects. If a person changes data, you should have a dirty flag, or
similar, that allows you to fire an update event. There are two options
here. The first is to have the class have CRUD methods. The second is a
helper class to fill the various business objects. There is also a unique
idea from Paul Sherriff, which I happen to like, that has the business
objects derive from DataSet. You can then use the DataAdapter that fills the
strongly typed DataSet call Update() to update the business object. You will
find that some, like Rockford Lhotka prefer more traditional business
objects. If you wish to head this direction, his book is well worth the
read.

UI layer:
Fairly self-explanatory.

Hope this helps as general guidelines.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"pcthug" <pc******@paradise.net.nz> wrote in message
news:zT********************@news02.tsnz.net...
Hi All,

I am creating multi-tier app in vb.net using visual studio .net.

I create a invoice.vb class file with properties, events and methods. This
also has a line item collection class (lineitem.vb & lineitems.vb). I create a form (form1.frm) and write the corresponding code to initialize an invoice object, there are textboxes on the form to display the data, an update and
load button. My data is stored in an access database.

Q. How should my objects interact with the database? eg. When the user
enters in values for the required properties etc and clicks update (we
already have an instance of the invoice object), the code behind calls the
set method of the corresponding properties in the invoice class etc.
Q. Is this where the connection should be made to update the database, if so how?

or

Q. Should I have a data object also that is initialized when a invoice
object is and update commands are passed through when properties are set?

I hope this makes sense to someone! any help would be cool.

Cheers

Nov 20 '05 #2

P: n/a
Cool, this is really interesting and a good start. Do you have any links to
online content, tutorials that are .net specific.

Thanks heaps

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:e4**************@TK2MSFTNGP10.phx.gbl...
In most scenarios, you see something like the following:

DAL - Data Access Layer:
Generic layer to access the database. Idea is you can quickly switch out
databases by having a DAL. For an easy method of setting this up, you can
use the Microsoft Data Access Application Block.

NOTE: There is an error in one of the FillDataSet() methods. The line is:
tableName += tableName + (index + 1).ToString();
should be:
tableName = "Table" + (index + 1).ToString();

Data Layer:
If you use strongly typed datasets, this is where you store them.

Business Layer:
Business objects. If a person changes data, you should have a dirty flag, or similar, that allows you to fire an update event. There are two options
here. The first is to have the class have CRUD methods. The second is a
helper class to fill the various business objects. There is also a unique
idea from Paul Sherriff, which I happen to like, that has the business
objects derive from DataSet. You can then use the DataAdapter that fills the strongly typed DataSet call Update() to update the business object. You will find that some, like Rockford Lhotka prefer more traditional business
objects. If you wish to head this direction, his book is well worth the
read.

UI layer:
Fairly self-explanatory.

Hope this helps as general guidelines.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"pcthug" <pc******@paradise.net.nz> wrote in message
news:zT********************@news02.tsnz.net...
Hi All,

I am creating multi-tier app in vb.net using visual studio .net.

I create a invoice.vb class file with properties, events and methods. This also has a line item collection class (lineitem.vb & lineitems.vb). I create
a form (form1.frm) and write the corresponding code to initialize an

invoice
object, there are textboxes on the form to display the data, an update and load button. My data is stored in an access database.

Q. How should my objects interact with the database? eg. When the user
enters in values for the required properties etc and clicks update (we
already have an instance of the invoice object), the code behind calls the set method of the corresponding properties in the invoice class etc.
Q. Is this where the connection should be made to update the database, if so
how?

or

Q. Should I have a data object also that is initialized when a invoice
object is and update commands are passed through when properties are

set?
I hope this makes sense to someone! any help would be cool.

Cheers


Nov 20 '05 #3

P: n/a
If you like the Paul Sherriff method, here is a link to a webcast. You will
have to install the software to run it (not spyware, so it is okay), but it
is a great presentation:

http://www.microsoft.com/usa/webcasts/ondemand/1791.asp

This presentation shows the DAL, Data (strongly typed datasets) and Business
layer (derived from DataSet). You can download the sample code from
www.pdsa.com.

There are some things I am not completely sure of in this architecture, but
the main benefit is I can send anyone to this presentation to understand it.
That is worth quite a bit in maintainability.

Microsoft also has plenty of 'best practices' eBooks at
http://msdn.microsoft.com/architecture - go to the "Patterns and Practices"
section.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:Wq********************@news02.tsnz.net...
Cool, this is really interesting and a good start. Do you have any links to online content, tutorials that are .net specific.

Thanks heaps

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:e4**************@TK2MSFTNGP10.phx.gbl...
In most scenarios, you see something like the following:

DAL - Data Access Layer:
Generic layer to access the database. Idea is you can quickly switch out
databases by having a DAL. For an easy method of setting this up, you can
use the Microsoft Data Access Application Block.

NOTE: There is an error in one of the FillDataSet() methods. The line is: tableName += tableName + (index + 1).ToString();
should be:
tableName = "Table" + (index + 1).ToString();

Data Layer:
If you use strongly typed datasets, this is where you store them.

Business Layer:
Business objects. If a person changes data, you should have a dirty flag,
or
similar, that allows you to fire an update event. There are two options
here. The first is to have the class have CRUD methods. The second is a
helper class to fill the various business objects. There is also a

unique idea from Paul Sherriff, which I happen to like, that has the business
objects derive from DataSet. You can then use the DataAdapter that fills

the
strongly typed DataSet call Update() to update the business object. You

will
find that some, like Rockford Lhotka prefer more traditional business
objects. If you wish to head this direction, his book is well worth the
read.

UI layer:
Fairly self-explanatory.

Hope this helps as general guidelines.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"pcthug" <pc******@paradise.net.nz> wrote in message
news:zT********************@news02.tsnz.net...
Hi All,

I am creating multi-tier app in vb.net using visual studio .net.

I create a invoice.vb class file with properties, events and methods.

This also has a line item collection class (lineitem.vb & lineitems.vb). I

create
a form (form1.frm) and write the corresponding code to initialize an

invoice
object, there are textboxes on the form to display the data, an update and load button. My data is stored in an access database.

Q. How should my objects interact with the database? eg. When the user
enters in values for the required properties etc and clicks update (we
already have an instance of the invoice object), the code behind calls the set method of the corresponding properties in the invoice class etc.
Q. Is this where the connection should be made to update the database, if
so
how?

or

Q. Should I have a data object also that is initialized when a invoice
object is and update commands are passed through when properties are

set?
I hope this makes sense to someone! any help would be cool.

Cheers



Nov 20 '05 #4

P: n/a
Cheers Gregory. I went to MS last night and read the Data Application Block
documentation and a few other bits that returned on the search. I have
finally figured out where it is all going. I have been programming for a wee
while now and have always been unsure of the correct methodology and it
seems I was along the right lines as several DAL's I have written implement
the same way as the Data App Block. This has been a major stumbling block
for me and a few others so this helps alot. I really like the sound of the
Paul Sherrif method, and I need some source code to show the implementation
of bus objects, so I will go check it out.

Thanks alot
Jodie Rapson
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:#L**************@TK2MSFTNGP11.phx.gbl...
If you like the Paul Sherriff method, here is a link to a webcast. You will have to install the software to run it (not spyware, so it is okay), but it is a great presentation:

http://www.microsoft.com/usa/webcasts/ondemand/1791.asp

This presentation shows the DAL, Data (strongly typed datasets) and Business layer (derived from DataSet). You can download the sample code from
www.pdsa.com.

There are some things I am not completely sure of in this architecture, but the main benefit is I can send anyone to this presentation to understand it. That is worth quite a bit in maintainability.

Microsoft also has plenty of 'best practices' eBooks at
http://msdn.microsoft.com/architecture - go to the "Patterns and Practices" section.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:Wq********************@news02.tsnz.net...
Cool, this is really interesting and a good start. Do you have any links

to
online content, tutorials that are .net specific.

Thanks heaps

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:e4**************@TK2MSFTNGP10.phx.gbl...
In most scenarios, you see something like the following:

DAL - Data Access Layer:
Generic layer to access the database. Idea is you can quickly switch out databases by having a DAL. For an easy method of setting this up, you can use the Microsoft Data Access Application Block.

NOTE: There is an error in one of the FillDataSet() methods. The line is: tableName += tableName + (index + 1).ToString();
should be:
tableName = "Table" + (index + 1).ToString();

Data Layer:
If you use strongly typed datasets, this is where you store them.

Business Layer:
Business objects. If a person changes data, you should have a dirty flag,
or
similar, that allows you to fire an update event. There are two options here. The first is to have the class have CRUD methods. The second is a helper class to fill the various business objects. There is also a

unique idea from Paul Sherriff, which I happen to like, that has the business
objects derive from DataSet. You can then use the DataAdapter that fills the
strongly typed DataSet call Update() to update the business object.
You will
find that some, like Rockford Lhotka prefer more traditional business
objects. If you wish to head this direction, his book is well worth
the read.

UI layer:
Fairly self-explanatory.

Hope this helps as general guidelines.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"pcthug" <pc******@paradise.net.nz> wrote in message
news:zT********************@news02.tsnz.net...
> Hi All,
>
> I am creating multi-tier app in vb.net using visual studio .net.
>
> I create a invoice.vb class file with properties, events and methods. This
> also has a line item collection class (lineitem.vb & lineitems.vb).
I create
> a form (form1.frm) and write the corresponding code to initialize an
invoice
> object, there are textboxes on the form to display the data, an update and
> load button. My data is stored in an access database.
>
> Q. How should my objects interact with the database? eg. When the
user > enters in values for the required properties etc and clicks update (we > already have an instance of the invoice object), the code behind calls the
> set method of the corresponding properties in the invoice class etc.
> Q. Is this where the connection should be made to update the
database, if
so
> how?
>
> or
>
> Q. Should I have a data object also that is initialized when a

invoice > object is and update commands are passed through when properties are

set?
>
> I hope this makes sense to someone! any help would be cool.
>
> Cheers
>
>



Nov 20 '05 #5

P: n/a
TPS
Jodie.

Check out Rocky Lhotka's CSLA business object framework

http://www.lhotka.net/ArticleIndex.a...ea=CSLA%20.NET

The MSN discussion group at

http://groups.msn.com/CSLANET/messages.msnw

or the search site at

http://www.searchCSLA.com

This framework has many good things that you should learn if you are going
to be doing serious web/database development.

HTH,
Terrence
Nov 20 '05 #6

P: n/a
Cheers, this looks really interesting. Do you know of any Win forms
examples?
"TPS" <tp*@tps.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
Jodie.

Check out Rocky Lhotka's CSLA business object framework

http://www.lhotka.net/ArticleIndex.a...ea=CSLA%20.NET

The MSN discussion group at

http://groups.msn.com/CSLANET/messages.msnw

or the search site at

http://www.searchCSLA.com

This framework has many good things that you should learn if you are going
to be doing serious web/database development.

HTH,
Terrence

Nov 20 '05 #7

P: n/a
Jodie,

Rocky's book has rudimentary WinForms examples. It shows how to use CSLA in
WinForms. The book is worth a read just to understand scalable architectures
better.

Kathleen

"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:w2********************@news02.tsnz.net...
Cheers, this looks really interesting. Do you know of any Win forms
examples?
"TPS" <tp*@tps.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
Jodie.

Check out Rocky Lhotka's CSLA business object framework

http://www.lhotka.net/ArticleIndex.a...ea=CSLA%20.NET

The MSN discussion group at

http://groups.msn.com/CSLANET/messages.msnw

or the search site at

http://www.searchCSLA.com

This framework has many good things that you should learn if you are going to be doing serious web/database development.

HTH,
Terrence


Nov 20 '05 #8

P: n/a
Like I said, I am not 100% sure of everything he is doing, but it is a sound
and easy to train architecture.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:5i********************@news02.tsnz.net...
Cheers Gregory. I went to MS last night and read the Data Application Block documentation and a few other bits that returned on the search. I have
finally figured out where it is all going. I have been programming for a wee while now and have always been unsure of the correct methodology and it
seems I was along the right lines as several DAL's I have written implement the same way as the Data App Block. This has been a major stumbling block
for me and a few others so this helps alot. I really like the sound of the
Paul Sherrif method, and I need some source code to show the implementation of bus objects, so I will go check it out.

Thanks alot
Jodie Rapson
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:#L**************@TK2MSFTNGP11.phx.gbl...
If you like the Paul Sherriff method, here is a link to a webcast. You will
have to install the software to run it (not spyware, so it is okay), but

it
is a great presentation:

http://www.microsoft.com/usa/webcasts/ondemand/1791.asp

This presentation shows the DAL, Data (strongly typed datasets) and

Business
layer (derived from DataSet). You can download the sample code from
www.pdsa.com.

There are some things I am not completely sure of in this architecture,

but
the main benefit is I can send anyone to this presentation to understand

it.
That is worth quite a bit in maintainability.

Microsoft also has plenty of 'best practices' eBooks at
http://msdn.microsoft.com/architecture - go to the "Patterns and

Practices"
section.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:Wq********************@news02.tsnz.net...
Cool, this is really interesting and a good start. Do you have any links
to
online content, tutorials that are .net specific.

Thanks heaps

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in message news:e4**************@TK2MSFTNGP10.phx.gbl...
> In most scenarios, you see something like the following:
>
> DAL - Data Access Layer:
> Generic layer to access the database. Idea is you can quickly switch out > databases by having a DAL. For an easy method of setting this up,
you
can
> use the Microsoft Data Access Application Block.
>
> NOTE: There is an error in one of the FillDataSet() methods. The
line is:
> tableName += tableName + (index + 1).ToString();
> should be:
> tableName = "Table" + (index + 1).ToString();
>
> Data Layer:
> If you use strongly typed datasets, this is where you store them.
>
> Business Layer:
> Business objects. If a person changes data, you should have a dirty

flag,
or
> similar, that allows you to fire an update event. There are two

options > here. The first is to have the class have CRUD methods. The second
is a > helper class to fill the various business objects. There is also a unique
> idea from Paul Sherriff, which I happen to like, that has the
business > objects derive from DataSet. You can then use the DataAdapter that

fills the
> strongly typed DataSet call Update() to update the business object. You will
> find that some, like Rockford Lhotka prefer more traditional business > objects. If you wish to head this direction, his book is well worth the > read.
>
> UI layer:
> Fairly self-explanatory.
>
> Hope this helps as general guidelines.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ************************************************** ******************** > Think Outside the Box!
> ************************************************** ******************** > "pcthug" <pc******@paradise.net.nz> wrote in message
> news:zT********************@news02.tsnz.net...
> > Hi All,
> >
> > I am creating multi-tier app in vb.net using visual studio .net.
> >
> > I create a invoice.vb class file with properties, events and methods. This
> > also has a line item collection class (lineitem.vb & lineitems.vb). I
> create
> > a form (form1.frm) and write the corresponding code to initialize
an > invoice
> > object, there are textboxes on the form to display the data, an

update and
> > load button. My data is stored in an access database.
> >
> > Q. How should my objects interact with the database? eg. When the user > > enters in values for the required properties etc and clicks update (we > > already have an instance of the invoice object), the code behind calls the
> > set method of the corresponding properties in the invoice class etc. > > Q. Is this where the connection should be made to update the database, if
> so
> > how?
> >
> > or
> >
> > Q. Should I have a data object also that is initialized when a invoice > > object is and update commands are passed through when properties are set?
> >
> > I hope this makes sense to someone! any help would be cool.
> >
> > Cheers
> >
> >
>
>



Nov 20 '05 #9

P: n/a
Gregory,

Is Paul currently using stored procedures or dynamic SQL?

--
Kathleen Dollard
Microsoft MVP
Author "Code Generation in Microsoft .NET"
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:uz**************@TK2MSFTNGP09.phx.gbl...
Like I said, I am not 100% sure of everything he is doing, but it is a sound and easy to train architecture.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:5i********************@news02.tsnz.net...
Cheers Gregory. I went to MS last night and read the Data Application Block
documentation and a few other bits that returned on the search. I have
finally figured out where it is all going. I have been programming for a

wee
while now and have always been unsure of the correct methodology and it
seems I was along the right lines as several DAL's I have written

implement
the same way as the Data App Block. This has been a major stumbling block
for me and a few others so this helps alot. I really like the sound of the Paul Sherrif method, and I need some source code to show the

implementation
of bus objects, so I will go check it out.

Thanks alot
Jodie Rapson
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in message news:#L**************@TK2MSFTNGP11.phx.gbl...
If you like the Paul Sherriff method, here is a link to a webcast. You

will
have to install the software to run it (not spyware, so it is okay), but
it
is a great presentation:

http://www.microsoft.com/usa/webcasts/ondemand/1791.asp

This presentation shows the DAL, Data (strongly typed datasets) and

Business
layer (derived from DataSet). You can download the sample code from
www.pdsa.com.

There are some things I am not completely sure of in this
architecture, but
the main benefit is I can send anyone to this presentation to
understand it.
That is worth quite a bit in maintainability.

Microsoft also has plenty of 'best practices' eBooks at
http://msdn.microsoft.com/architecture - go to the "Patterns and

Practices"
section.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:Wq********************@news02.tsnz.net...
> Cool, this is really interesting and a good start. Do you have any links to
> online content, tutorials that are .net specific.
>
> Thanks heaps
>
> "Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM>
wrote in
> message news:e4**************@TK2MSFTNGP10.phx.gbl...
> > In most scenarios, you see something like the following:
> >
> > DAL - Data Access Layer:
> > Generic layer to access the database. Idea is you can quickly
switch out
> > databases by having a DAL. For an easy method of setting this up, you can
> > use the Microsoft Data Access Application Block.
> >
> > NOTE: There is an error in one of the FillDataSet() methods. The line is:
> > tableName += tableName + (index + 1).ToString();
> > should be:
> > tableName = "Table" + (index + 1).ToString();
> >
> > Data Layer:
> > If you use strongly typed datasets, this is where you store them.
> >
> > Business Layer:
> > Business objects. If a person changes data, you should have a
dirty flag,
> or
> > similar, that allows you to fire an update event. There are two

options
> > here. The first is to have the class have CRUD methods. The second

is
a
> > helper class to fill the various business objects. There is also a
unique
> > idea from Paul Sherriff, which I happen to like, that has the

business > > objects derive from DataSet. You can then use the DataAdapter that

fills
> the
> > strongly typed DataSet call Update() to update the business
object. You
> will
> > find that some, like Rockford Lhotka prefer more traditional business > > objects. If you wish to head this direction, his book is well
worth the
> > read.
> >
> > UI layer:
> > Fairly self-explanatory.
> >
> > Hope this helps as general guidelines.
> >
> > --
> > Gregory A. Beamer
> > MVP; MCP: +I, SE, SD, DBA
> >
> > ************************************************** ******************** > > Think Outside the Box!
> > ************************************************** ******************** > > "pcthug" <pc******@paradise.net.nz> wrote in message
> > news:zT********************@news02.tsnz.net...
> > > Hi All,
> > >
> > > I am creating multi-tier app in vb.net using visual studio .net.
> > >
> > > I create a invoice.vb class file with properties, events and

methods.
> This
> > > also has a line item collection class (lineitem.vb & lineitems.vb).
I
> > create
> > > a form (form1.frm) and write the corresponding code to

initialize an > > invoice
> > > object, there are textboxes on the form to display the data, an

update
> and
> > > load button. My data is stored in an access database.
> > >
> > > Q. How should my objects interact with the database? eg. When
the user
> > > enters in values for the required properties etc and clicks
update (we
> > > already have an instance of the invoice object), the code behind

calls
> the
> > > set method of the corresponding properties in the invoice class

etc. > > > Q. Is this where the connection should be made to update the

database,
> if
> > so
> > > how?
> > >
> > > or
> > >
> > > Q. Should I have a data object also that is initialized when a

invoice
> > > object is and update commands are passed through when properties are > set?
> > >
> > > I hope this makes sense to someone! any help would be cool.
> > >
> > > Cheers
> > >
> > >
> >
> >
>
>



Nov 20 '05 #10

P: n/a
I believe the examples were embedded SQL, but moving to stored procedures is
a fairly simple matter. The main difference is the addition of Parameters to
your command object.

To simplify, in my addition to the architecture, I add the Data App Block
(free download from MS) and use it for the generic access part of the data
layer.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Kathleen Dollard" <Ka******@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Gregory,

Is Paul currently using stored procedures or dynamic SQL?

--
Kathleen Dollard
Microsoft MVP
Author "Code Generation in Microsoft .NET"
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:uz**************@TK2MSFTNGP09.phx.gbl...
Like I said, I am not 100% sure of everything he is doing, but it is a

sound
and easy to train architecture.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Jodie Rapson" <pc******@paradise.net.nz> wrote in message
news:5i********************@news02.tsnz.net...
Cheers Gregory. I went to MS last night and read the Data Application

Block
documentation and a few other bits that returned on the search. I have
finally figured out where it is all going. I have been programming for a
wee
while now and have always been unsure of the correct methodology and
it seems I was along the right lines as several DAL's I have written

implement
the same way as the Data App Block. This has been a major stumbling block for me and a few others so this helps alot. I really like the sound of the Paul Sherrif method, and I need some source code to show the

implementation
of bus objects, so I will go check it out.

Thanks alot
Jodie Rapson
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in message news:#L**************@TK2MSFTNGP11.phx.gbl...
> If you like the Paul Sherriff method, here is a link to a webcast. You will
> have to install the software to run it (not spyware, so it is okay), but it
> is a great presentation:
>
> http://www.microsoft.com/usa/webcasts/ondemand/1791.asp
>
> This presentation shows the DAL, Data (strongly typed datasets) and
Business
> layer (derived from DataSet). You can download the sample code from
> www.pdsa.com.
>
> There are some things I am not completely sure of in this architecture, but
> the main benefit is I can send anyone to this presentation to understand it.
> That is worth quite a bit in maintainability.
>
> Microsoft also has plenty of 'best practices' eBooks at
> http://msdn.microsoft.com/architecture - go to the "Patterns and
Practices"
> section.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ************************************************** ******************** > Think Outside the Box!
> ************************************************** ******************** > "Jodie Rapson" <pc******@paradise.net.nz> wrote in message
> news:Wq********************@news02.tsnz.net...
> > Cool, this is really interesting and a good start. Do you have any

links
> to
> > online content, tutorials that are .net specific.
> >
> > Thanks heaps
> >
> > "Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
> > message news:e4**************@TK2MSFTNGP10.phx.gbl...
> > > In most scenarios, you see something like the following:
> > >
> > > DAL - Data Access Layer:
> > > Generic layer to access the database. Idea is you can quickly switch out
> > > databases by having a DAL. For an easy method of setting this up, you
> can
> > > use the Microsoft Data Access Application Block.
> > >
> > > NOTE: There is an error in one of the FillDataSet() methods. The

line
> is:
> > > tableName += tableName + (index + 1).ToString();
> > > should be:
> > > tableName = "Table" + (index + 1).ToString();
> > >
> > > Data Layer:
> > > If you use strongly typed datasets, this is where you store
them. > > >
> > > Business Layer:
> > > Business objects. If a person changes data, you should have a dirty > flag,
> > or
> > > similar, that allows you to fire an update event. There are two
options
> > > here. The first is to have the class have CRUD methods. The second is
a
> > > helper class to fill the various business objects. There is also
a > unique
> > > idea from Paul Sherriff, which I happen to like, that has the

business
> > > objects derive from DataSet. You can then use the DataAdapter that fills
> > the
> > > strongly typed DataSet call Update() to update the business object. You
> > will
> > > find that some, like Rockford Lhotka prefer more traditional

business
> > > objects. If you wish to head this direction, his book is well worth the
> > > read.
> > >
> > > UI layer:
> > > Fairly self-explanatory.
> > >
> > > Hope this helps as general guidelines.
> > >
> > > --
> > > Gregory A. Beamer
> > > MVP; MCP: +I, SE, SD, DBA
> > >
> > >

************************************************** ********************
> > > Think Outside the Box!
> > >

************************************************** ********************
> > > "pcthug" <pc******@paradise.net.nz> wrote in message
> > > news:zT********************@news02.tsnz.net...
> > > > Hi All,
> > > >
> > > > I am creating multi-tier app in vb.net using visual studio ..net. > > > >
> > > > I create a invoice.vb class file with properties, events and
methods.
> > This
> > > > also has a line item collection class (lineitem.vb &

lineitems.vb).
I
> > > create
> > > > a form (form1.frm) and write the corresponding code to initialize
an
> > > invoice
> > > > object, there are textboxes on the form to display the data, an update
> > and
> > > > load button. My data is stored in an access database.
> > > >
> > > > Q. How should my objects interact with the database? eg. When

the user
> > > > enters in values for the required properties etc and clicks update (we
> > > > already have an instance of the invoice object), the code behind calls
> > the
> > > > set method of the corresponding properties in the invoice

class etc.
> > > > Q. Is this where the connection should be made to update the
database,
> > if
> > > so
> > > > how?
> > > >
> > > > or
> > > >
> > > > Q. Should I have a data object also that is initialized when a
invoice
> > > > object is and update commands are passed through when
properties are
> > set?
> > > >
> > > > I hope this makes sense to someone! any help would be cool.
> > > >
> > > > Cheers
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.