在ASP.net MVC Web表单视图引擎的缺点是什么? [英] Disadvantages of the ASP.net MVC Webforms View Engine?

查看:91
本文介绍了在ASP.net MVC Web表单视图引擎的缺点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划在目前一个新的项目,建在MVC。现在,有几个不同的视图引擎,我只是想知道的Web表单引擎的缺点是有正当理由的开关?有些人觉得反对它真正强大,我只是想知道为什么?

I'm planning a new project at the moment, built on MVC. Now, there are several different View Engines, and I just wonder what the disadvantages of the Webforms engine are that would justify a switch? Some people feel really strong against it, and I just wonder why?

我还可以保持像其他视图引擎的.ascx控件,说星火或的 StringTemplate的? (好吧,公平地说,这只是使用的RenderPartial并传递正确的ViewData,但它仍然在多个视图常见的块的模块化)

Can I still retain something like .ascx Controls with other View Engines, say Spark or StringTemplate? (Okay, to be fair, that's just using RenderPartial and passing in proper ViewData, but it's still modularization of common "blocks" on multiple views)

推荐答案

从我的经验的web表单引擎的唯一真正的缺点是冗长。 Spark是更加简洁,并且支持谐音(虽然不.ASCX)和母版页。

From my experience the only real disadvantage of the webforms engine is verbosity. Spark is much more terse and supports partials (not .ascx though) and master pages.

虽然因此,如果您遇到任何情况下,火花不会为你工作,你可以运行Spark和并排标准的web表单引擎方面,你仍然可以使用web表单(我不知道的方式共享母版页他们之间虽然)。

You can run Spark and the standard webforms engine side by side though so if you run into any cases where spark wouldn't work for you, you could still use webforms (I don't know of a way to share master pages between them though).

这篇关于在ASP.net MVC Web表单视图引擎的缺点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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