I'm creating a set of helpers for rendering compatible Twitter Bootstrap html. As I see it, I have two options when it comes to how to group these methods together:
- Extend the HtmlHelper prefixing the methods with TB
- Create a new class
TBootHelper
which contains the methods
In the second case, to get the TBoot
helper available, the developer would add
<pages pageBaseType="Twitter.Bootstrap.Mvc.TBootViewPage">
To it's ~/Views/web.config
(as pointed by @darin)
Or instantiate the helper when it's needed
@using Twitter.Bootstrap.Mvc
var TBoot = new TBootHelper<TModel>(Html);
My question is, Should I create a TBootHelper
class or just add methods to the HtmlHelper
?