473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

I need real help!

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
10 1459
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris | last post by:
Below is my code for the mandelbrot set. This takes a long time to run about a minute and a 1/2. I was wondering if anyone had any ideas on improving the pixval function as this where most of the...
6
by: Rafael | last post by:
Hi Everyone, I need some help with my calculator program. I need my program to do 2 arguments and a 3rd, but the 3rd with different operators. Any help would be great. Here is my code.... ...
6
by: Joey Liang via DotNetMonster.com | last post by:
Hi all, I have a drop down list which store all the different brands of product.When i selected the particular brand from the drop down list, it will display all the products with the selected...
10
by: Mark | last post by:
Hello, I need a some help. I am not a java programmer. I mostly do VB and C#. Here is my problem I have sever side text boxes and when a user tabs off or presses enter I need to have the...
2
by: bryan | last post by:
I have a situation that's pretty delicate that I need some help on. I've been stumped for awhile I just need some advice on the best possible solution. The problem: I have a site I'm making...
3
by: federico_bertola | last post by:
I have this code: int RESULT_OF_BLACKLIST = 0; int BlackListMethod( { FILE *blacklist; char String = "I.am.a.dotted.string"; char Word; if ((blacklist = fopen("blacklist.dat", "r")) == NULL)...
0
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need ...
2
by: XML Beginner | last post by:
I have an XML file that contains values that my application needs, so it knows which database to connect to. It also contains a configuration option so that I can specify which node to return...
1
by: redgrL86 | last post by:
Hi, I am trying to create an XSL file that can be applied to numerous XML files (all XML files have similar structure but varying length). The XSL and abbreviated XML codes are below. Within the XSL...
5
by: sparks | last post by:
I just talked to some big shot analysis people. They want the data....ok do you want the database, you already have access don't you. NO we want the data. Tables? NO we want the data. What do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.