开发者

Web application / program design architecture [closed]

开发者 https://www.devze.com 2023-03-18 09:15 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

we are planning to upgrade our web site and use the N-TIER design. i have read this article which is quite good in my opinion.

My questions are:

1) is this architecture still valid for designing an application ?

2) should we use other architecture like the onion , 3 layer , ddd and so on?

3) in the Service Layers the article suggest that we divide th开发者_如何转开发e data messages and the commands, is the best implementation is to create two services one for data and one for commands ?

Thanks


The architecture depends on what kind of project you need to create, complexity of project and business logic, scalability, maintainability, any way you should implement your project in the way that you can easily change your code and the tiers and classes should be much more decoupled you should use ASP.NET MVC for application layer, and I suggest to use IoC-contaners for dependency injection, you can start with 3 layer architecture with Repositories data access layer, Services classes business logic layer, ASP.NET MVC application layer and another thing you should use ORM like Nhibernate or Entity Framework If you have a complex domain you should look at the DDD


  1. Yes this article is still a good article
  2. This really depends on your technical and functional requirements. You can not start with an architecture and assume the implementation will fit any application.
  3. see 2


It really depends on the applications requirements.

I tend to prefer the 4 tier design in that i have:

  1. Data access
  2. Entities
  3. Facades
  4. UI

However i have worked with developers who prefer to use pure business objects. That is the objects themselves arent truely representations of the records in the data store and they themselves contain all functionality necessary to perform the actions they need to perform. This includes data access. One example of this is approach is CSLA.NET.

I do feel this discussion is a bottomless pit of opinions based on upon experience though :)

0

精彩评论

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