Table of contents
- 1 Web Forms View Engine
- 2 NVelocity View Engine
- 3 Brail
- 4 AspView
- 5 StringTemplate View Engine
View Engines Comparison
| Engine | Language | Compiled | Helpers | ViewComponents |
|---|---|---|---|---|
| WebForms | Any .net language | Yes | Yes | No |
| NVelocity | Velocity | No | Yes | Yes |
| Brail | boo | Yes | Yes | Yes |
| AspView (from Contrib) | C# | Yes | Yes | Yes |
| StringTemplate (from Contrib) | String Template | No | Partially | Yes |
Web Forms View Engine
Pros:
- Familiar .NET Syntax
- Set of useful Web Controls
Cons:
- Does not implement or support MVC logic, so it's easy to implement more logic than view logic on the web form, leading to scattered logic
- Limitations apply, see the WebForms View Engine documentation
- Although there is an open-source implementation of it, it is not patent-free and might be discontinued or become unsupported/incompatible in the long term.
NVelocity View Engine
Pros:
- Limited set of functions forces you to code only view logic (good for separation of concerns)
- Easy to learn template language
- Same syntax as Velocity (for Java), allowing view reuse among different platforms
- Reuse skills for people with Java experience
Cons:
- Interpreted
- Community seem very inactive. That forced Castle Project to fork NVelocity and work on improvements and bug fixes.
Brail
Pros:
- Use the wrist friendly and feature-rich Boo language for templates.
- Compiled (good performance!)
Cons:
- Requires additional assemblies
- Python syntax (which one can consider as a pro)
AspView
Pros:
- uses C# so it's easier to adopt
- Compiled (good performance!)
- supports a "PreCompiled" mode, so you can deploy all your views to production in a single DLL file
- Gives quite a good intellisense experience within Visual Studio 2005
Cons:
- since C# is stricter than velocity and boo, you must declare the properties your view is using. You can, however, use the DictionaryAdapter integration and then avoid property decleration on the view level
StringTemplate View Engine
Pros:
- ST template engine 'enforces' model-view separation.
- Simple but powerful syntax with good documentation and articles. See the C# StringTemplate docs.
- Same syntax as StringTemplate for Java, allowing view reuse among different platforms.
- Actively developed and supported with a healthy user community
Cons:
- Interpreted
- Strict model-view separation means ST can't use MonoRail's helpers directly
- Custom helpers must be written in StringTemplate language, instead of plain .NET classes
- Requires additional assemblies
- ViewEngine (integration with MonoRail) still in development