Introduction to SharperHTML

SharperHTML is a C# library to generate well formed HTML documents using C#. It can be used everywhere, where you need to generate HTML.

Special focus has been put on ASP.NET MVC 1.0, because we experienced some issues with ASP-Views in larger projects.

What is a View in ASP.NET MVC? Its just a way to produce an HTML instance out of your Model. Or speaking lambda: Model => HTML

With SharperHTML you get
  • your views (= C# classes for ASP.NET and ASP.NET MVC) compiled at compile time, not at runtime, so you get a compile error for a typo and not a run time exception
  • your views can be tested with the same testing tools you use for the rest of your code.
    • don't you test your views, folks?
    • no Code Covererage, no NCover? really nothing? Very confidently! )
  • Full Intellisense - it is just C#
  • Never ever have encoding problems! You never encode anything, so you cannot make mistakes.
    • there is no blank text in views, which can be malformed
    • all the inline scripts will be enclosed in cdata, if necessary
    • No <code>Response.Write()</code>, so no errors

Last edited Nov 30, 2009 at 5:17 PM by woithe, version 1

Comments

No comments yet.