ASP.NET MVC Spark 视图引擎
在 ASP.NET MVC 项目中使用 Spark 视图引擎有什么优点(积极的方面)。 为什么它比默认视图引擎更好?
What pros(positive sides) of using Spark view engine for ASP.NET MVC project. Why it better then default view engine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Spark View 引擎的一件重要事情是它的语法与 HTML 语法非常相似,这样您的视图将是干净的,并且您将避免 WebForms View 引擎中的“标签汤”。
这是一个示例:
Spark:
WebForms:
One important thing about Spark View engine is that its syntax is very similar to HTML syntax, that way your views will be clean and you will avoid "tag soup" that is in WebForms View engine.
here is an example:
Spark:
WebForms:
它避免了您经常看到的 HTML 标签汤。 考虑 Spark:
与经典的 html 标签汤变体相反:
Spark 语法更加简洁。
It avoids the HTML tag soup you see a lot. Consider Spark:
as opposed to the classic html tag soup variant:
The Spark syntax is much cleaner.
我真的很喜欢绑定功能。
您可以在绑定
中指定某些内容并使用漂亮的 xml 标记在你看来。
我们在视图中使用的所有 html 助手都有绑定,例如。
<文本框=“”/>
等等等等...I really like the Bindings features.
http://sparkviewengine.com/documentation/bindings
You can specify something in the bindings and use nice xml markup for it in your views.
We have bindings for all the html helpers we use in our views eg.
<textbox for=""/>
<dropdown for="" items=""/>
etc etc...