Использование чистого MVC кажется очень не удобным в реальных проектах. Если у меня есть дизайнер/верстальщик, который делает прототип (включая jQuery и т.д.), то потом перепахать это вот в такой код:
<%
.RowAttributes(row =>
.Columns(column =>
{
column.AutonamedFor(m => m.Year).Visible(filter.Year ==
.Attributes(width =>
column.For(m => m.WeekNumber).Named(
.Attributes(style =>
column.AutonamedFor(m => m.Project)
.Attributes(width =>
column.AutonamedFor(m => m.Manager).Visible(Page.User.IsAdministrator())
.Attributes(@class =>
column.AutonamedFor(m => m.GeneralState);
column.AutonamedFor(m => m.ResourcePlans).HeaderAttributes(@class =>
.Attributes(cell =>
column.AutonamedFor(m => m.QuestionsToIT).HeaderAttributes(@class =>
.Attributes(cell =>
column.AutonamedFor(m => m.Risks).HeaderAttributes(@class =>
.Attributes(cell =>
}).RenderGrid(header)
%>= Html.Grid(Model, header)new Hash(style => "height : 50px; background-color:" + row.Item.ProjectColor))null)"4%", style => "text-align: center").HeaderAttributes(width => "4%");"Week").Visible(filter.WeekNumber == null)"width: 5%; text-align: center").HeaderAttributes(width => "5%");"9%").HeaderAttributes(width => "9%");"width15").HeaderAttributes(@class => "width15");"width15")new Hash(@class => "width15"));"width15")new Hash(@class => "width15"));"width15")new Hash(@class => "width15"));
Весьма затруднительно. И наоборот - попробуйте дизайнера или верстальщика попросить пофиксить тут стили... В результитующем HTML он конечно пофиксит. А вот кто будет это обратно перетаскивать в код... В общем не нравится. Хочется чтобы код разметки был максимально близок коду HTML-прототипа. Может razor спасет...
Update: может это не MVC грид...
No comments:
Post a Comment