I am a new developer that started a project to build a rock group fansite using C# and ASP.net. I have a few questions on how to proceed with the project. Most of my database tables have been designed and looking to possibly follow Marco Belinaso's multi-tier design in his ASP.NET 2.0 book but I don't really see any information on ensuring accurate db transactions.
1) Should I use datasets or custom classes to contain data from the DAL?
2) Should I use stored procedures? If so, how do I ensure accurate database transactions that rollback in case there are problems with the transaction? I have limited experience with T-SQL.
3) How are multi-tier web applications usually developed (sprocs, ado.net, datasets, custom classes, etc)?
Thanks and I apologize for such a basic question.
Loading
Mahesh ChandPosted Jun 26, 2007, 4:44 PM
If you don't have a complex application, you may want to stay away with custom classes and use DataTable and DataSets instead.
I suggest use Stored Procs instead of inline SQL.
I think you are more interested in multi-layer applicaiton than multi-tier. Multi-tier means you will have several network boundaries between your Web application and data? A multi-layer application simply have 3 or 4 layers/projects. Data layer has all code related to data access. It has two parts - A generic class with database functions like executing SPs etc and second class (helper class) with the methods your business layer will call.
Business Layer has all methods being called from UI layer and they have business logic and also talk to Data layer.
UI layer should have all code related to UI pages only and talk to Business Layer to do any thing else.
Hope it helps.