用于asp.net Web应用程序的架构和设计模式 [英] What architecture and design pattern to use for a asp.net web application

查看:89
本文介绍了用于asp.net Web应用程序的架构和设计模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须开发一个具有3层架构的asp.net C#应用程序。但在此之前,我想知道3层架构和设计模式之间有什么区别?这两者是一样的吗?有人告诉我两者都不一样,在三层架构中我们必须使用一种设计模式。这样对吗?如果是,那么如何?



请帮助!!



谢谢

Hi ALL,
I have to developed a asp.net C# application with 3-tier architecture. But Before that I want to know that What is the difference between a 3-tier architecture and a design pattern? Is that both are same? Some one told me that both are not same, and in 3-tier architecture we have to use a design pattern. Is it right? If yes then How?

Please Help!!

Thanks

推荐答案

除了Abhinav所说的:它完全取决于你的功能要求

没有设计模式本身就是好的。



三层架构不被视为设计模式或架构模式,因为它更多的是应用程序架构,设计模式更具技术性。

http://en.wikipedia.org/wiki/Design_pattern_(computer_science) [ ^ ]和 http://en.wikipedia.org/wiki/Architectural_pattern [ ^ ]。



-SA
In addition to what Abhinav says: it totally depends on your functional requirements.
No design pattern is good by itself.

Three-tiers architecture is not considered a design pattern or architectural pattern, as it's more of application architecture, and design patterns are more technological.
See http://en.wikipedia.org/wiki/Design_pattern_(computer_science)[^] and http://en.wikipedia.org/wiki/Architectural_pattern[^].

—SA


除了已发布的优秀链接:



架构是一个有点模糊的概念,但与高水平设计决策,以及后来变得昂贵的事情。 3层架构对于Web应用程序来说是传统的,它运行良好(尽管有人可能认为现代Web应用程序实际上是4层:数据库,业务逻辑,服务器端表示和客户端表示,即Ajax / Javascript) 。



设计模式本质上是可以在不同场景中重复使用的想法。它通常用于代码或模块级别的低级设计 - 例如MVC(以及MVP和MVVM以及任何其他变体),发布 - 订阅,枚举等。这些有时会内置到语言或至少语言社区中;例如.Net和Java集合的方式本质上是C ++程序员为他们使用的模式的形式化。



我没有听说过'建筑模式'这个术语之前,它是一个可重复使用的架构设计 - 所以3层,事件驱动,基于插件和任何其他常见架构都符合条件。



关于模式的重要事项是他们只是特定想法群体的名称。不要仅仅因为它是一个模式而使用模式,如果它封装的想法适合你的项目就使用它。
In addition to the excellent links already posted:

Architecture is a somewhat nebulous concept, but relates to high level design decisions, and things which become expensive to change later on. The '3 tier' architecture is traditional for web applications and it works well (though one might argue that a modern web app is actually 4 tier: database, business logic, server-side presentation, and client-side presentation i.e. Ajax/Javascript).

Design patterns are essentially ideas that can be re-used in different scenarios. It's normally used for lower level design, on the code or module level – for example MVC (and MVP and MVVM and any other variants), publish-subscribe, enumeration, etc. These sometimes get built into the language or at least the language community; for example the way .Net and Java do collections is essentially the formalisation of the patterns C++ programmers were using for them.

I've not heard the term 'architectural pattern' before but it is a reusable architectural design – so 3-tier, event driven, plugin-based and any other common architecture would qualify.

The important thing about patterns is that they're just names for particular groups of ideas. Don't use a pattern just because it's a pattern, use it if the ideas it encapsulates are appropriate for your project.


看看3层和设计模式定义这里 [ ^ ]。

MVC是一个很好的设计模式,可以在ASP.Net中使用。
Have a look at the 3-tier and design pattern definitions here[^].
MVC is a good design pattern to use in ASP.Net.


这篇关于用于asp.net Web应用程序的架构和设计模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆