热门标签 | 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(和许多其他类型)应用程序的开发中的用途。


推荐阅读
  • Explore how Matterverse is redefining the metaverse experience, creating immersive and meaningful virtual environments that foster genuine connections and economic opportunities. ... [详细]
  • 前言--页数多了以后需要指定到某一页(只做了功能,样式没有细调)html ... [详细]
  • 深入解析 Apache Shiro 安全框架架构
    本文详细介绍了 Apache Shiro,一个强大且灵活的开源安全框架。Shiro 专注于简化身份验证、授权、会话管理和加密等复杂的安全操作,使开发者能够更轻松地保护应用程序。其核心目标是提供易于使用和理解的API,同时确保高度的安全性和灵活性。 ... [详细]
  • Redux入门指南
    本文介绍Redux的基本概念和工作原理,帮助初学者理解如何使用Redux管理应用程序的状态。Redux是一个用于JavaScript应用的状态管理库,特别适用于React项目。 ... [详细]
  • 深入解析SpringMVC核心组件:DispatcherServlet的工作原理
    本文详细探讨了SpringMVC的核心组件——DispatcherServlet的运作机制,旨在帮助有一定Java和Spring基础的开发人员理解HTTP请求是如何被映射到Controller并执行的。文章将解答以下问题:1. HTTP请求如何映射到Controller;2. Controller是如何被执行的。 ... [详细]
  • 本文详细介绍了如何在Android 4.4及以上版本中配置WebView以实现内容的自动高度调整和屏幕适配,确保中文显示正常,并提供代码示例。 ... [详细]
  • 本文详细介绍了如何使用 HTML 和 CSS 对文件上传按钮进行样式美化,使用户界面更加友好和美观。 ... [详细]
  • 在寻找轻量级Ruby Web框架的过程中,您可能会遇到Sinatra和Ramaze。两者都以简洁、轻便著称,但它们之间存在一些关键区别。本文将探讨这些差异,并提供详细的分析,帮助您做出最佳选择。 ... [详细]
  • 一个登陆界面
    预览截图html部分123456789101112用户登入1314邮箱名称邮箱为空15密码密码为空16登 ... [详细]
  • Docker的安全基准
    nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd ... [详细]
  • 1.如何在运行状态查看源代码?查看函数的源代码,我们通常会使用IDE来完成。比如在PyCharm中,你可以Ctrl+鼠标点击进入函数的源代码。那如果没有IDE呢?当我们想使用一个函 ... [详细]
  • Java项目分层架构设计与实践
    本文探讨了Java项目中应用分层的最佳实践,不仅介绍了常见的三层架构(Controller、Service、DAO),还深入分析了各层的职责划分及优化建议。通过合理的分层设计,可以提高代码的可维护性、扩展性和团队协作效率。 ... [详细]
  • 深入理解Vue.js:从入门到精通
    本文详细介绍了Vue.js的基础知识、安装方法、核心概念及实战案例,帮助开发者全面掌握这一流行的前端框架。 ... [详细]
  • springMVC JRS303验证 ... [详细]
  • 本文探讨了2019年前端技术的发展趋势,包括工具化、配置化和泛前端化等方面,并提供了详细的学习路线和职业规划建议。 ... [详细]
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社区 版权所有