Hello
I am planning to develop an application that will be N-Tier (3-Tier} using Visual Basic in Visual Studio 2008 (VS 2008).
By 3 tier I mean:
Tier 1) Handles User Interface/Presentation,
Tier 2) Applies Business Rules/Logic (Validation of data etc) and
Tier 3) Data management (retrieve, store etc).
Previously in VS 2005 I have created 3 tier applications. However, with VS 2005 I have never used data binding of the form fields to the datasource because:
a) I considered it was not flexible enough and
b) I could not easily keep the business logic in Tier 2 separate from the tier 1 presentaion or tier 3 data access.
BUT in VS2008 after viewing the video from Beth Massi on 'How Do I: Use Datasets in an N-Tier Application' refer:
it appeared that Data Binding is much better catered for in VS2008 and that it seemed the best way to go when developing applications as it reduced coding etc and visual designers could be used to improve productivity etc when working with DataSources. Aslo Data binding appears much improved.
In VS2005 I would create the 3 Tiers as separate projects in the one solution (the same as in the video on VS2008]. I would create a refererence from Tier 1 to Tier 2 so I can access the business logic. In tier 2 (Business logic) I created a reference to Tier 3 (the Data Management tier) so that the business logic tier can action a data save or retrieve apply business rules to data before handing it to the tier 1 for presentation. NB: The way I set up my references was different to the video on VS2008 N-Tier.
[Red]OK so this gets me to my problem.[/Red]
In the VS2008 How to video from Beth Massi a reference is set up from Tier 1 to Tier 2. Then when in the Tier 3 (Data management Tier) a datasource can be added via a designer.
VS2008 allows for N-Tier in the designer through a feature called N-Tier Datasets which basically allow you to specify in the Dataset designer a place where the data access code should be generated and where the dataset structure and validation code should be put. This allows you to physically separate these classes and allows you to share only the data validation code on the client whilst leaving the data acess code (the table adaptor code etc) on the server. In the Video the N-Tier solution uses a WCF Service to access the Tier 3 DAL (to retrieve, save data etc). The Tier 3 has a reference to Tier 2 to apply business logic to returned dataset.
[Red]My problem with this is that I don't want to use a 'WCF service' in my application to action data retrieves or saves etc.[/Red] I must admit that I don't really understand WCF services and also are reluctant to introduce another variable in my applications that could cause problems (like service not setup or running etc. I would rather action the Retrieve dataset from the form_load event in the Tier 1 without using the WCF Service.
Because the solution on the video uses the WCF service i.e. the Tier 1 Client/Presentation tier includes a reference to the WCF Service, and also a reference to Tier 2. Tier 3 has a reference to Tier 2. Tier 2 has no reference to Tier 3 (and I can't create one because it would create a circular reference), hence I can't action for example a retrieve of a dataset in the form_load event without using the WCF Service. (NB: Previously I would have written the code in Tier 2 which called a retrive of the data from Tier 3 then applied any busines rules to the data and handed it to Tier 1 for presentation, but using VS2008 designers and data binding I can't do this without using the WCF service).
I would like to use data binding now in VS2008 as it appears to have matured somewhat. Also, I embrace N-Tier in all new applications I design as I have found them to be much more maintainable and logical to develop.
I want to know if anyone else has experience with N-Tier particularly considering the VS2008 improvements?
Does any one have a way of using the VS2008 designers etc and developing without using a WCF Service? or is it not possible to do when using the VS2008 datasource designers?
Any comments or advice or clarification would be appreciated. Also any advice on WCF service would be appreciated.
regards
Kieran777
I am planning to develop an application that will be N-Tier (3-Tier} using Visual Basic in Visual Studio 2008 (VS 2008).
By 3 tier I mean:
Tier 1) Handles User Interface/Presentation,
Tier 2) Applies Business Rules/Logic (Validation of data etc) and
Tier 3) Data management (retrieve, store etc).
Previously in VS 2005 I have created 3 tier applications. However, with VS 2005 I have never used data binding of the form fields to the datasource because:
a) I considered it was not flexible enough and
b) I could not easily keep the business logic in Tier 2 separate from the tier 1 presentaion or tier 3 data access.
BUT in VS2008 after viewing the video from Beth Massi on 'How Do I: Use Datasets in an N-Tier Application' refer:
it appeared that Data Binding is much better catered for in VS2008 and that it seemed the best way to go when developing applications as it reduced coding etc and visual designers could be used to improve productivity etc when working with DataSources. Aslo Data binding appears much improved.
In VS2005 I would create the 3 Tiers as separate projects in the one solution (the same as in the video on VS2008]. I would create a refererence from Tier 1 to Tier 2 so I can access the business logic. In tier 2 (Business logic) I created a reference to Tier 3 (the Data Management tier) so that the business logic tier can action a data save or retrieve apply business rules to data before handing it to the tier 1 for presentation. NB: The way I set up my references was different to the video on VS2008 N-Tier.
[Red]OK so this gets me to my problem.[/Red]
In the VS2008 How to video from Beth Massi a reference is set up from Tier 1 to Tier 2. Then when in the Tier 3 (Data management Tier) a datasource can be added via a designer.
VS2008 allows for N-Tier in the designer through a feature called N-Tier Datasets which basically allow you to specify in the Dataset designer a place where the data access code should be generated and where the dataset structure and validation code should be put. This allows you to physically separate these classes and allows you to share only the data validation code on the client whilst leaving the data acess code (the table adaptor code etc) on the server. In the Video the N-Tier solution uses a WCF Service to access the Tier 3 DAL (to retrieve, save data etc). The Tier 3 has a reference to Tier 2 to apply business logic to returned dataset.
[Red]My problem with this is that I don't want to use a 'WCF service' in my application to action data retrieves or saves etc.[/Red] I must admit that I don't really understand WCF services and also are reluctant to introduce another variable in my applications that could cause problems (like service not setup or running etc. I would rather action the Retrieve dataset from the form_load event in the Tier 1 without using the WCF Service.
Because the solution on the video uses the WCF service i.e. the Tier 1 Client/Presentation tier includes a reference to the WCF Service, and also a reference to Tier 2. Tier 3 has a reference to Tier 2. Tier 2 has no reference to Tier 3 (and I can't create one because it would create a circular reference), hence I can't action for example a retrieve of a dataset in the form_load event without using the WCF Service. (NB: Previously I would have written the code in Tier 2 which called a retrive of the data from Tier 3 then applied any busines rules to the data and handed it to Tier 1 for presentation, but using VS2008 designers and data binding I can't do this without using the WCF service).
I would like to use data binding now in VS2008 as it appears to have matured somewhat. Also, I embrace N-Tier in all new applications I design as I have found them to be much more maintainable and logical to develop.
I want to know if anyone else has experience with N-Tier particularly considering the VS2008 improvements?
Does any one have a way of using the VS2008 designers etc and developing without using a WCF Service? or is it not possible to do when using the VS2008 datasource designers?
Any comments or advice or clarification would be appreciated. Also any advice on WCF service would be appreciated.
regards
Kieran777