EView and such

So I've recently added some awesome things to EView. Well, awesome potential at least.

I've added a few very nifty keywords

{!if x==10!}
  X is 10 yay!

(including if, elseif, else, and foreach variants)

I've added the layout and layout_field keywords, which make masterpage-content crap hella awesome.

and most recently, I've revamped the helper support to actually be useful. For instance, an example for a hyper link is:

{?Hyperlink Location="http://google.com", CssClass=SomeFunction(), Text="foo bar"?}

And the hyper link helper is easy to create also, and is created from the EView T4 template.

One problem I've just thought of though is that when making a base template, you won't be able to have very good inheritance. This is because EViewRender currently does not call base.EViewRender(). To be honest, I'm pretty sure there is no way to have good inheritance for views. What would the relationship even mean? But nonetheless, you can create base classes so that for instance you could have

abstract class HtmlHelper : IEView{
  public string CssClass{get;set;}

so that you're not defining CssClass everywhere.

Only thing I need now is to implement some helper functions. I'm thinking of going through the basic HTML tag list. One of the more interesting ones will probably be <select> as that will take an enumerable of some sort. Meh, I'll figure it out when I get there :P

Posted: 3/12/2011 3:07:14 AM


Posting comments is currently disabled(probably due to spam)