您的位置:首页 > Web前端 > Node.js

node template engine节点模板引擎

2012-10-05 16:28 465 查看
当我去看是否值得,或则说sparkview engine是否还在更新,是否具备市场的时候,又发现新东西了,node template engine

It's time for another minor release bump in Spark as we begin to support a different kind of syntax called Jade. You can read up more about Jade athttp://jade-lang.com/

To start using it, simply add a reference to Spark and start adding *.shade files to your project and as long as Spark is registered as a view engine, then it should automatically attempt Jade parsing to HTML. That of course, means that you can mix and match
.spark and .shade files and the parser will work just fine with both of them. You can even create .shade partials that can be consumed by .spark views.

http://jade-lang.com/ 这段代码很有趣的,但一个quick问题来了,这个会成为趋势么?当我们在ROI考量的时候,需要明白一个事情:

1。是否可控?2。是否持续?3。学习曲线如何?it's not just for you, for your guys

倘若后续无人使用,形成不了市场,failed! lose your time!



确定一个事情是不容易的,jade::可靠,优雅,富模板,nodejs,看起来美好的描述:Jade - robust, elegant, feature rich template engine for nodejs

看完https://github.com/visionmedia/jade可没发现说和.net mvc有啥关系啊



1. aspx和jade和spark可以同时存在

2。通过filter可以实现theme的过滤

var services = SparkEngineStarter.CreateContainer();

services.AddFilter(ThemeDescriptorFilter.For(GetTheme));

SparkEngineStarter.RegisterViewEngine(engines, services);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: