替代asp.net MVC视图引擎 [英] alternative asp.net MVC view engines

查看:149
本文介绍了替代asp.net MVC视图引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有对asp.net MVC最好的另一种观点引擎的普遍共识。到目前为止,我知道星火,抄网,NHaml的但对于其他人呢?

I was wondering if there was a general consensus on the "best" alternative view engine for asp.net MVC. So far I know of Spark, Brail, NHaml but what about others?

推荐答案

我建议您采取上述每个视图引擎,写一个视图,看看哪个最适合你的。您可能会发现,对于不同的应用,甚至为不同的类型的观点,即视图引擎的选择而改变。

I would suggest that you take each of the above View Engines, write a view, and see which works best for you. You might find that for different applications or even for differnt types of view that the choice of View Engine changes.

如果您在返回的HTML到客户端然后像火花引擎可能是适当的。但是,如果你返回conent是XML或其他标记(JSON例如),那么星火不会有太大的帮助。 NHaml也集中在XHTML的一代。

If you're returning HTML to your client then an engine like Spark might be appropriate. However, if the conent you're returning is XML or some other markup (JSON for example) then Spark won't be much help. NHaml is also focused on XHTML generation.

考虑如何想测试你的意见,技能的工程师(包括开发人员和测试人员),支持你希望从你的视图引擎作家获得(如果你发现的bug级别,你怎么想的bug修复部署)和您的客户是否有preference。

Consider how you want to test your views, the skill set of your engineers (both developers and testers), the level of support you're hoping to get from your View Engine writer (if you find bugs, how you want those bug fixes deployed) and whether your customer has any preference.

基本上 - 尝试一些,看你喜欢什么,用它们的混合物,如果你发现这是有道理的。

Basically - try a few, see what you like, use a mixture of them if you find that makes sense.

哦,这里是一个很好的职位,列出4替代引擎...

Oh, and here's a good post that lists 4 alternative engines...

<一个href=\"http://$c$cbetter.com/blogs/jeffrey.palermo/archive/2008/01/27/mvccontrib-now-offers-four-4-alternative-view-engines-for-asp-net-mvc.aspx\" rel=\"nofollow\">http://$c$cbetter.com/blogs/jeffrey.palermo/archive/2008/01/27/mvccontrib-now-offers-four-4-alternative-view-engines-for-asp-net-mvc.aspx

...它提到,如果你正在寻找生成XML可能是适当的XSLT引擎。

... it mentions an XSLT engine that might be appropriate if you're looking to generate XML.

这篇关于替代asp.net MVC视图引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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