热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

我应该遵循哪种设计模式来开发asp.net应用程序?-whichdesignpatternishouldfollowtodevelopeasp.netapplication?

Therearelotsofdesignpatternsareavailablefordevelopingtheasp.netsite.Everyonedesignpa

There are lots of design patterns are available for developing the asp.net site. Every one design patterns are having their pros and cons. I want to develop high performance application using asp.net. Which pattern i should follow?

有很多设计模式可用于开发asp.net网站。每一种设计模式都有其优点和缺点。我想用asp.net开发高性能应用程序。我应该遵循哪种模式?

5 个解决方案

#1


The best practice that I've seen today separates all of the business logic from the presentation layer. Classic ASP.NET Webforms tend to make this a bit more difficult and encourage lazy programming because you can use all of the events off of the page rather than forcing good code separation and single responsibility principle.

我今天看到的最佳实践将所有业务逻辑与表示层分开。经典的ASP.NET Webforms倾向于使这一点变得更加困难并鼓励延迟编程,因为您可以使用页面外的所有事件而不是强制实现良好的代码分离和单一责任原则。

If you were to utilize the ASP.NET MVC framework, you will most likely have a structure in place that would lend towards better coding practices. However, you can still find ways to fall back to the webforms style of coding.

如果您要使用ASP.NET MVC框架,您很可能会有一个适合更好的编码实践的结构。但是,您仍然可以找到回归webforms样式的方法。

If you focus on the single responsibility principle and ASP.NET MVC, you're going to be off to a great start. Domain Driven Design may also be worth looking at.

如果您专注于单一责任原则和ASP.NET MVC,那么您将有一个良好的开端。域驱动设计也值得一看。

#2


I would go with ASP.NET MVC.

我会选择ASP.NET MVC。

#3


It can depend on the applications aims and goals. Is it going to be user-centric? Pretty/Ajaxy? SOAP Service?

它可以取决于应用程序的目标和目标。它会以用户为中心吗?漂亮/ Ajaxy? SOAP服务?

Design patters are there to make life simpler. If you get it wrong, then it may well make life harder. Architectural patterns, behavioural patters, Structural Patterns and Data Semantics can only be decided in the context of the application's functionality, which form, in the end, is a slave to.

设计模式可以让生活更简单。如果你弄错了,那么它可能会让生活变得更艰难。架构模式,行为模式,结构模式和数据语义只能在应用程序功能的上下文中决定,最终形成一个从属。

#4


Model–view–controller (MVC) is a popular one used to develop this sort of things

模型 - 视图 - 控制器(MVC)是用于开发此类事物的流行模型

#5


There's a really good, free architecture guide book available from patterns & practices. It discusses in some detail many of the different patterns and where they can be used in the development of an ASP.NET (and many other types of) application.

有一个非常好的,免费的建筑指南,可以从模式和实践中获得。它详细讨论了许多不同的模式以及它们在ASP.NET(和许多其他类型)应用程序的开发中的用途。


推荐阅读
author-avatar
所谓-旧
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有