I like Asp.Net MVC and I want to use it in the upcoming project. However, part of the project is an emphasis on the ability to present the "Presentation" project to designers for such things as themes, etc. One of the problems I expect is that Asp.Net MVC views are pretty developer oriented. I really don't want to train designers about intrauterine relationships <% vs. <% = not to mention something like <% foreach ...
Take a typical MVC menu structure, for example.
<div id="menu">
<ul>
<li><%= Html.ActionLink("Home", "Index", "Main")%></li>
<li><%= Html.ActionLink("About", "About", "Main")%></li>
<li><% Html.RenderPartial("LogOnUserControl"); %></li>
</ul>
</div>
I would really like to tell the designers to go with something like
<div id="menu">
<ul>
<li>{ActionLink "Home", "Index", "Main"}</li>
<li>{ActionLink "About", "About", "Main"}</li>
<li>{Partial "LogOnUserControl"}</li>
</ul>
</div>
or
<div id="menu">
<ul>
<li><my:ActionLink text="Home" action="Index" controller="Main" /></li>
<li><my:ActionLink text="About" action="About" controller="Main" /></li>
<li><my:Partial name="LogOnUserControl" /></li>
</ul>
</div>
, , UserControls. UserControls , , ( ), -, MVC, , , .
, . , :
- ViewPage, - . ViewPage.RenderView ViewPage.Framework, , , .
- TextWriter ViewPage.CreateHtmlTextWriter, . , , , .
- IView ViewEngine. , , .
- UserControls, .
? ? ViewEngine ? ViewPage? UserControl ( )?