locked
ASP.NET MVC with Visual Studio 2015 RRS feed

  • Question

  • User-163542604 posted

    Hi Guys 

    Very newbie question - I am starting an ASP.NET MVC project using Visual Studio 2015 - The main requirement is the web site should run and be viewed on any device especially IPads. 

    I d like to know if I can create an MVC project using ASP.NET Core with VS2015?  if not what version of MVC is recommended that is compatible with VS 2015. 

    Thank you and apologies if I have some concepts wrong - would love some good links to MVC / Web Development tutorials with SQL Server backend and device friendly UI s. 

    Wednesday, October 24, 2018 5:47 PM

Answers

All replies

  • User1120430333 posted

    Yes VS2015 supports .NET Core 1.0 that is outdated now. You should go to VS2017 and Core 2.0

    You  should keep this in mind about ASP.NET MVC using the MVC UI design pattern.

    https://www.c-sharpcorner.com/UploadFile/56fb14/understanding-separation-of-concern-and-Asp-Net-mvc/

    https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/overview/understanding-models-views-and-controllers-cs

    <copied>

    An MVC model contains all of your application logic that is not contained in a view or a controller. The model should contain all of your application business logic, validation logic, and database access logic. For example, if you are using the Microsoft Entity Framework to access your database, then you would create your Entity Framework classes (your .edmx file) in the Models folder.

    A view should contain only logic related to generating the user interface. A controller should only contain the bare minimum of logic required to return the right view or redirect the user to another action (flow control). Everything else should be contained in the model.

    In general, you should strive for fat models and skinny controllers. Your controller methods should contain only a few lines of code. If a controller action gets too fat, then you should consider moving the logic out to a new class in the Models folder.

    <end>

    You may want to look into AngularJS and ASP.NET MVC that allow orientation for browser base applications used on various devices.

    You may also want to look into SPA.

    https://msdn.microsoft.com/en-us/magazine/dn463786.aspx

    Wednesday, October 24, 2018 7:51 PM
  • User-271186128 posted

    Hi archer2018,

    I am starting an ASP.NET MVC project using Visual Studio 2015 - The main requirement is the web site should run and be viewed on any device especially IPads. 

    I d like to know if I can create an MVC project using ASP.NET Core with VS2015?  if not what version of MVC is recommended that is compatible with VS 2015. 

    If you want to create Asp.net core mvc project, please refer to the following articles:

    Create a web app with ASP.NET Core MVC on Windows with Visual Studio

    ASP.NET Core MVC with EF Core - tutorial series

    If you want to create a traditional Asp.net MVC application, please check these articles:

    Getting started with ASP.NET MVC 5

    Getting Started with Entity Framework 6 Code First using MVC 5

    Since, you want to view the site on different devices, you could try to use the Bootstrap CSS style to create responsive site.

    Best regards,
    Dillion

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 25, 2018 3:24 AM
  • User-163542604 posted

    Thanks a lot for the info. I have asked my IT org to install VS2017 in my system and will explore Razor Pages , ASP.NET Core and Bootstrap. This was very helpful. 

    Thursday, October 25, 2018 6:20 PM
  • User-163542604 posted

    Thanks a lot for the info. I have VS2017 now installed in my system and will explore Razor Pages , ASP.NET Core and Bootstrap with the links you provided. This was very helpful. Thanks again. 

    Thursday, October 25, 2018 6:22 PM
  • User-163542604 posted

    Hi Dillon

    While I was reading all the links  - The tutorials seem to encourage Razor pages over ASP.NET Core 2.0 MVC  - What are your thoughts on this ? 

    Tuesday, October 30, 2018 6:41 PM
  • User-271186128 posted

    Hi archer2018,

    While I was reading all the links  - The tutorials seem to encourage Razor pages over ASP.NET Core 2.0 MVC  - What are your thoughts on this ?

    Please refer to this blog:

    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.

    Best regards,
    Dillion

    Wednesday, October 31, 2018 2:27 AM