Should I migrate an existing asp.net-mvc project with a web form viewer to a razor?

I have a large asp.net-mvc website. I recently upgraded to MVC 4, but the one thing I'm discussing is worth translating into a razor engine. I see that there are tools for "automatic" updates, but I'm trying to figure out whether it’s worth the pain. I have about 100 general ideas (both regular and partial). If this is the code base that I have to live with for a while, is it worth the effort?

I know this may seem a little subjective, but given the size of my project, I was looking for the expected cost of this migration and the expected benefits.

+5
source share
4 answers

, IMHO . Razor , (~ 5% ) , WebForms, . ​​ . , , webforms ( ASP.NET MVC 3 Razor) , WebForms.

, , WebForms. , WebForms , WebForms. .

- ? - . , Razor? , "" , .

, , , , . ViewEngine , . , .

PS - , .

+5

, . , , "" , .

, , - ( , mvc viewengine).

-, . , . , - , , ...

, (), , - , mvc. mvc 1 2 mvc 5.

, DLL, . mvc5, . , bundling, twitter-bootstrap .. - , , .

, , .

0

, , , , , .

MVC4 MVC3 MVC4, .

MVC 4 ( ):

MVC4 : http://www.asp.net/mvc/mvc4

: Specific,

- ,

protected void Application_Start() 
{ 
    ViewEngines.Engines.Clear(); 
    ViewEngines.Engines.Add(new RazorViewEngine()); 
}

, Partial View

<div class="news">
    <h3>News</h3>
    @Html.Partila("NewControl", Model.NewsItems)
</div>

:

public ActionResult News(){
    NewItemViewModel vm = new NewItemViewModel();
    vm.Items = repository.GetNews();
    return PartialView("NewsControl",vm);
}

10x

, .

.

0

, Razor, ASPX. , Razor ( ), . , , . , , ( , Razor , ASPX), , : " ".

0

All Articles