none
MVC & Razor Engine RRS feed

  • Question

  • We are currently planning to upgrade our application architecture and have future plans to develop a Mobile app.

    1. The application database size is apprx 300 GB (SQL Server 2008 R2).

    2.  Automatic data loading, data validation & generation of reports done through windows services.

    3.  Web application for manual data entry, update & Search operations which is used by aprx 5000 users per day.

    We are thinking we could use the MVC 3 Framework with Razor View Engine & EF4. Can you please clarify the following questions?

    1. What are the advantage of using Razor in place of the ASPX?

    2. Which view engine is more extensible for the Mobile App Razor \ ASPX?

    3. Will the Razor Engine cause performance degrade?  

    Tuesday, March 27, 2012 4:44 PM

All replies

  • Hi,

       1> Advantage?

    Expressive,  Fluid and you will need less lines of code compare to ASPX. more over, people who have background of win based, can quickly get into this.

       2> For Mobile?

           In my opinion chosing view engine does not impact on Mobile App. 

      3> Performance? 

         Razor performance is good, here is the reply from scott on same question over  here 

    @James,

    >>>>>>>> Thanks Scott!  What can you tell us at this time about the performance of the Razor view engine compared to the WebForms view engine?

    Razor is fully compiled - so the performance should be great.

    Hope this helps,

    Scott

        Here is the one more will be useful,

        http://stackoverflow.com/questions/3828961/asp-net-mvc-3-razor-performance 

    Hope this helps you...


    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".

    • Proposed as answer by Y2KPRABU Thursday, September 20, 2012 1:10 PM
    Friday, March 30, 2012 7:28 AM
  • ASP.NET MVC is one of the most popular frameworks for these days and the term “View Engine” is belongs to that. I this section we are try to understand about Razor View Engine and ASPX View Engine.

    There are two types of view engine supported by ASP.NET MVC. In this Article we will go through the Razor and ASPX view engine View Engines are responsible for rendering the HTML from your views to the browser. The view engine template will have different syntax for implementation.

    Read Complete Article here

    http://www.dotnet-stuff.com/tutorials/aspnet-mvc/understand-aspx-and-razor-view-engine

    • Proposed as answer by Dot Net Stuff Friday, September 26, 2014 4:43 AM
    Friday, September 26, 2014 4:43 AM
  • I agree with Kris444 (sorry but the 'dot net stuff' isn't answering any of the questions). However, I'm not sure what you mean by Razor vs. aspx, do you mean Razor vs. non-Razor MVC or MVC vs. aspx webforms? I assume the former in which case they both have some overheads, primarily in start-up, and it depends on how much you allow the framework to go looking for its matches, e.g. when using scaffolding. Given those overheads I'd be surprised if there is substantial difference between the view engines themselves. So given there are different ways that the MVC framework works depending upon how you use it, the only real answer is to try it and gather comparative performance results for yourself.

    http://pauliom.wordpress.com

    Monday, September 29, 2014 7:10 AM
  • Razor is extremely powerful and fast.  But the problem I found is that non-view related logic ends up floating it's way into the razor views.  I commonly see views with multiple loops and other functionality that truly shouldn't be apart of the view.

    If you want to get protective over your views, you can write your own extension library to HtmlHelper, and write a template to add views that removes the default library.

    Tuesday, October 21, 2014 6:38 PM