locked
ASP.NET Core 2.0 MVC Vs Razor Pages RRS feed

  • Question

  • User-163542604 posted

    Hi Guys 

    I am starting a new asp.net core 2.0 project - I am building a reporting application that generates monthly reports. I am a newbie. 

    Based on research - the msdn tutorial for MVC encourage using Razor Pages instead. What will you recommend for a newbie as a stage by stage increment of learning and implementation. 

    My thought process currently is : 

    1. Figure out the tables i need for storing data
    2. Integrate Entity Framework to create the context classes for CRUD operations 
    3. Use ASP.NET Core 2.0 MVC 
    4. Use Bootstrap to create the frontend with Telerik (what this company already uses to create the report template) - needed maily to create device (ipad) friendly web app. 

    It is huge learning curve so i really appreciate any help I can get. Thanks in advance. 

    Tuesday, October 30, 2018 6:50 PM

All replies

  • User475983607 posted

    Based on research - the msdn tutorial for MVC encourage using Razor Pages instead. What will you recommend for a newbie as a stage by stage increment of learning and implementation. 

    I recommend following the recommendation and go with Razor Pages.

    Use ASP.NET Core 2.0 MVC 

    The latest framework is 2.1 with 2.2 coming soon.   I recommend going with 2.1 as it has quite a few updates form 2.0.  I also recommend looking into the the new stuff in 2.2.

    Use Bootstrap to create the frontend with Telerik (what this company already uses to create the report template) - needed maily to create device (ipad) friendly web app

    You'll need to consult Telerik and BootStrap reference docs.

    Tuesday, October 30, 2018 7:05 PM
  • User-271186128 posted

    Hi archer2018,

    Please refer to this blog to know more about Asp.net Core MVC and Razor Pages.

    Razor Pages are a new feature in ASP.NET Core 2.0. They provide a simpler way to organize code within ASP.NET Core applications, keeping implementation logic and view models closer to the view implementation code. They also offer a simpler way to get started developing ASP.NET Core apps, but that doesn’t mean you should dismiss them if you’re an experienced .NET developer. You can also use Razor Pages to improve the organization of larger and more complex ASP.NET Core apps.

    The Model-View-Controller (MVC) pattern is a mature UI pattern that Microsoft has supported for developing ASP.NET applications since 2009. It offers a number of benefits that can help application developers achieve a separation of concerns, resulting in more maintainable software. Unfortunately, the pattern as implemented in the default project templates often results in a lot of files and folders, which can add friction to development, especially as an application grows. In my September 2016 article, I wrote about using Feature Slices as one approach to address this issue (msdn.com/magazine/mt763233). Razor Pages offer a new and different way to tackle this same problem, especially for scenarios that are conceptually page-based. This approach is especially useful when all you have is a nearly static view, or a simple form that just needs to perform a POST-Redirect-GET. These scenarios are the sweet spot for Razor Pages, which avoid a great deal of the convention required by MVC apps.

    According to your requirement, I suggest you could use Razor pages

    Best regards,
    Dillion

    Wednesday, October 31, 2018 2:38 AM