开发者

Can anyone suggest some good links about ASP.net based n-tier architecture

开发者 https://www.devze.com 2023-04-05 14:23 出处:网络
In my Visual Studio solution I m having following types of project: Class Library - BusinessLogicLayer

In my Visual Studio solution I m having following types of project:

Class Library - BusinessLogicLayer

(I m in doubt how to seperate functionality in BLL)

Class Library - DataAccessLayer

(I m in doubt how to seperate functioanlity in DAL)

Class Library - DataModels

(Contains various models like User,TimeTable,Address, etc.)

WCF Service App - To create common WCF service which can be consumed from jQuery(Web App) and WPF App

ASP.net WebForms Project - Web Pages

WPF Project - Windows application for same (As it is the requirement)

Setup project - Septup project to create installer for Windows app

UnitTest project - Project to make NUnit basd test cases

Can u please tell me whether or not I m going right way?

This is my first n-tier based application.

I m actually not clear to seperate functionality in layers even in my very first screen that is login screen.

It could be like this way from code behind file login.aspx.cs in OnClick_submit event I should create instance of UserBLL class and then I should call obj.validate(username,password) which returns a model of UserInfo. While that BLL class should itself call UserDB.Validate(username,password) method which returns model back to PersonBLL class.

If I use this scenario then every operation needs a seperate db conenction. I also want to a开发者_开发技巧sks whether or not creating applications in this layered approach results in any extra memory consumption.

Please explain the scenario to me if you are familiar with this.


I don't know about others but I find working code to be a far better way of getting a handle on best practices. Therefore , I'd strongly recommend downloading the Patterns and Practices Data Access drop on Codeplex. It's a little old now but will provide you with a comprehensive reference sample for a Web (albeit MVC), WPF and tiered Services application.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号