什么是MVC的替代? [英] What's an alternative to MVC?

查看:346
本文介绍了什么是MVC的替代?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好像每一个项目我在使用模型视图控制器架构,这就是我的风格我自己的项目。是否有其他选择吗?如何将一个其他人创建具有持久性存储和用户界面的应用程序?

Seems like every project I'm on uses a Model View Controller architecture, and that's how I roll my own projects. Is there an alternative? How else would one create an application that has persistent storage and a user interface?

推荐答案

MVC 已经有一段时间。这是测试和验证模式时间。许多框架利用<一个href=\"http://en.wikipedia.org/wiki/Model-view-controller#Implementations%5Fof%5FMVC%5Fas%5Fweb-based%5Fframeworks\"相对=nofollow> MVC模式。马丁·福勒已经解构了MVC分为:监督presenter 并的被动视图

MVC has been around for a while. It's a time tested and proven pattern. Many frameworks leverage the MVC Pattern. Martin Fowler has deconstructed the MVC into: Supervising Presenter and Passive View.

克里斯托弗·亚历山大说得好:

每个模式描述了一个问题,
  再次发生一遍又一遍在我们
  环境,然后描述
  在解决这一问题的核心,
  以这样的方式,可以使用此
  解决方案一百万次以上,无
  永远做同样的方式两次。

Each pattern describes a problem which occurs over and over again in our environment and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.

我不知道你为什么会想从MVC移动。有没有您遇到MVC不雄辩地解决问题?要给你一个更好的答案:我们需要更多地了解您的问题域

I'm not sure why you would want to move from MVC. Is there a problem you are encountering that MVC does not eloquently solve? To give you a better answer we need to know more about your problem domain.

在考虑事情的时候要考虑到的模式/架构的:如果你正在建设的东西用 MySpace的类型的架构,你需要一个健壮的体系结构(MVC)。如果您是通过网络建立一个简单的CRUD界面 - 几乎所有的东西都行

Things to take into account when considering patterns/architecture: If you are building something with a Myspace type architecture you'll need a robust architecture (MVC). If you are creating a simple crud interface via the web - almost anything will do.

对于.NET Web表单(我假设的网络,因为你没说厚或Web客户端),这是不是MVC,这是一场噩梦维护它们。住那更多的几年趋于泥的大球Web窗体应用程序。即使如此,开发商发现的方式来使用 MVC的Web窗体的。

For .Net Web forms (I am assuming web, since you didn't say thick or web client) which is not MVC, it was a nightmare maintaining them. Web Forms applications that lived more that a couple years tended to become big balls of mud. Even then developers discovered ways to use MVC with web forms.

讽刺的是,在缺乏ASP.NET Web表单MVC架构是驾驶投诉导致的 ASP.Net MVC框架

Ironically, the lack of MVC architecture in ASP.NET web forms was one of the driving complaints that lead to the development of ASP.Net MVC framework.

从,如果你不使用一些MVCesk方法的经验,你的解决方案变得难以维护和臃肿。这些应用程序会死一个缓慢痛苦的死亡。

From experience if you don't use some MVCesk approach, your solutions become hard to maintain and bloated. These applications will die a slow painful death.

如果您的解决方案是小的一次性项目,通过各种手段扔东​​西在一起。赫克有,将产生一切从屏幕到数据访问层的工具。无论工程完成工作。

If your solutions are small one-off projects, the by all means throw something together. Heck there are tools that will generate everything from the screens to the data access layer. Whatever works to get the job done.

这篇关于什么是MVC的替代?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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