This project is read-only.

Project Description
An alternative parser and view engine to Razor that does not depend on or .NET 4.5

The Razor syntax offers an excellent template for mixing codes and HTML. However, Razor heavily depends on and .Net 4.5. This prevents Razor from being cross-platform and also makes Razor suitable to MVC web rendering only.

This library is written from scratch. It is excellent for building your own MVC Server as well as using Razor for non-MVC web scenarios such as custom scripting within HTML template.


The following screenshots are taken from websites that employs Blade.

Blade in real-world screenshot

Another website that uses Blade


The second screenshot is taken from Hải's personal website. I'd be honored if you could visit me.


  • Compatible with Razor syntax: in the demo, you will find a Razor tutorial copied from Microsoft that Blade can render easily. (note: only the Razor syntax is compatible. Blade does not offer API because Blade is designed to be usable for many scenarios, not just a replacement of MVC. It is simple to support API, however. Please look at partial renderation example)
  • Enhancement upon Razor syntax: the Razor syntax by itself is quite nice. However, it relies too much on and C#. This makes it cumbersome in certain scenarios. Blade provides its own enhancement to Razor syntax. Please see the demo for this.
  • Direct render of *.cshtml without MVC: when browsed from a web server, if the URL points to a *.cshtml file, the file will be compiled and rendered directly without the need for the usual MVC approach found in Asp.Net. (note: the MVC is supported by default. You can also change the file extension if necessary)
  • Partial render: view renderation can be nested in unlimited scopes. This makes it easy to write layout template, content management system, etc.
  • Standalone parser: the parser itself is independent of the view engine. This means one can rip out the Blade parser for custom scenarios such as scripted HTML, scripted SVG, mixing codes with XML,...


The parser is independent. The view engine is a custom MVC module that depends on the following:


This library is written by software architect Nguyễn, M. Hải upon a request by THN Solutions LLC. in 2014. THN loves to foster the development of HTTP servers and HTTP modules for .Net . It hopes to bring productivity to developers around the world.

We hope this library is useful for you. We will be very happy to receive a message from you any time.

Last edited May 19, 2014 at 11:09 AM by minh_hai, version 11