支持 aspx 语法的 Template 引擎
March 28th, 2005
最近需要一个 .NET 下的 Template 引擎来支持自定义网页模版。一般如 Velocity(java), Smarty(php) 等 Template 引擎都自带一套语法。而 CodeSmith 的概念是用 ASPX 语法。这个概念卖点不仅仅在于能直接用已经熟悉了的ASPX 语法,还在于能嵌入 inline code,并且能用 server control,例如 DataGrid DataList 和 Repeater。Template 本身可以用 WebMatrix 来编辑。所以是很酷的设计。
在 m3rlin 中找到了 hosting the ASP.NET runtime 的办法,包括创建新的 AppDomain 和 通过 HttpContext 传递数据等等。这样我有了能用在 windows forms 程序中的支持 ASPX 语法的 Template 引擎。
ps. Template 引擎通常可以用来做代码生成工具的核心。
Entry Filed under: Programming
1 Comment Add your own
1. yysun 的网ç»&hellip | March 28th, 2005 at 5:26 pm
[...] binding 的妙处
Filed under: 程åºè®¾è®¡ — yysun @ 12:26 pm
æžå®š æ”¯æŒ aspx è¯æ³•çš„ Template 引擎 åŽå³å¼€å§‹ç¼–写 template以åŠè¯•验从 windows forms 程åºä¼ [...]
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed