Erubis嵌入式 Ruby
Erubis 是一个快速、安全和具备高可扩展性的 eRuby 的实现,主要特征如下:
- 快速,几乎是 ERB 的三倍,比用C开发的eRuby还要快10%
- File caching of converted Ruby script support.
- Auto escaping (sanitizing) support, it means that '<%= %>' can be escaped in default. It is desirable for web application.
- Spaces around '<% %>' are trimmed automatically only when '<%' is at the beginning of line and '%>' is at the end of line.
- Embedded pattern changeable (default '<% %>'), for example '[% %]' or '<? ?>' are available.
- Enable to handle Processing Instructions (PI) as embedded pattern (ex. '<?rb ... ?>'). This is desirable for XML/HTML than '<% .. %>' because the latter breaks HTML design but the former doesn't.
- Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript).
- Context object available and easy to combine eRuby template with YAML datafile (see the below example).
- Print statement available.
- Easy to expand and customize in subclass
- Print statement support
- Lines starting with percent character ('%') support
- Another embedded pattern support
- etc...
- Ruby on Rails support.
- Mod_ruby support.
下图是几个嵌入式 Ruby 的性能比较:
评论
eRuby嵌入式Ruby
eRuby是一个Ruby的标准,也是一个程序的名字。eRuby让Ruby可以像PHP和ASP那样嵌入到HTML当中,很多程序都实现了eRuby标准,其中最常用的有Ruby默认捆绑的erb和eruby,
eRuby嵌入式Ruby
0
Ruby/LDAP
Ruby/LDAP是一个Ruby扩张模块。它提供一些LDAP的操作界面。支持OpenLDAP、UMichLDAP、NetscapeSDK和ActiveDirectory。
Ruby/LDAP
0
Ruby/Tk
Ruby/Tk是一个重要的Ruby扩展,它为开发人员使用Ruby进行Tk程序开发提供了接口。Ruby的主发行包中包含Ruby/Tk,也就是说,您不需要安装额外的Ruby扩展就可以进行Ruby/Tk程序
Ruby/Tk
0