ASP.NET Core MVC: How To Fix The Architecture Of An MVC Application

preview_player
Показать описание
In this ASP.NET Core How To Fix The Architecture Of An MVC Application, host Steve Bishop describes why switching to a feature folder structure is better than the default MVC folder structure. You will also understand how a feature folder structure makes it easier to find places in your code, as well as how much easier it is to map the client requirements to the actual code.

This ASP.NET Core tutorial is part of a series on how to perform certain tasks within the ASP.NET Core library and building ASP.NET Core applications. By watching this series you will gain insight into some of the more complex issues surrounding ASP.NET Core and how to solve some of those issue. You will also learn more about how to build better ASP.NET Core applications.

Рекомендации по теме
Комментарии
Автор

I have only watched 12 minutes so far but I totally agree with you. I'm currently trying to learn ASP.NET Core MVC and it found it super weird that the about page would be at /Home/About. I mean, that doesn't make any sense at all!

Also, the fact that the URL has uppercase letters in it and can be accessed in several different ways:
/Home/About
/Home/About/
/Home/About/Index

Is just terrible for SEO.

Preferrably it would only be accessible at /about and if you got to /AbOUt or something it would redirect to /about.

WorstDeveloper
Автор

Hi, how this new feature organization plays with areas concept in mvc?

orlandosanchez
Автор

What do you think about rename all the views (about, contact, error etc..) in Index.cshtml so the url will be very user friendly something like  "sitename/about", "sitename/contact" etc..?

Thank you for your tutorials, they are very usefull.

paolorossi
Автор

Hello at first thanks for help it is really good video but I have question. I have app build with asp.net web forms and I have 3 layers ( Data access layer, Domain layer and logic layer) then, I want to change this app to asp.net core MVC. Now how can I representation this layer in the asp.net core

mohanaddabool
Автор

I'm always intimidated when I open an existing MVC project. Your new architect of the project makes it so easy to understand it, explore it and modify it without the fear of missing things up.

aymanhamdan
Автор

Where do I begin? First of all, Agile is a software development process, not a Software architecture. Tying your architecture tightly to a development process is bound to cause greater complexity and will most certainly introduce exceptions to the architecture that will mitigate the so-called benefits of fixing your MVC application to fit your development process. Case in point, this new architecture assumes that models should be kept in Feature silos. What happens when I have a model whose usefulness spans multiple features? Oh, I’ll have to re-introduce an upper level Models folder again. The idea of defining models as a child of a given feature silo violates the very principle of MVC in that models are always independent of the View and Controller. As for the About and Contact views being part of the Home page, well it is as obvious to me that this is the proper approach as it is somehow obvious to you that it isn’t. The difference in my approach is that I am concerned with the Domain’s business goals and not with forcing those business concern’s to adhere with my chosen software development process. The Home controller in my world is about defining the Business Domain to the user and allowing the user to contact that Business Domain. The Home page, in an ASP.Net MVC application is about explaining the business of the site including not only the reason for the business but also about the business’ principles and contacting those principles. That is the “FEATURE” as I would define it. The main User story would include viewing the general explanation of what the business of the business is. Another User story would be describing the principles of the business (the About Page) and providing the user a way to contact the principles of the business (Contact Page). These all comprise a single FEATURE of which the single Home Controller manages. If you want to add that these additional views, About and Contact are additional concerns because they are different views, then you could also argue that the Index, Add, Update and Delete views are also separate concerns. It does not wash.
Going back to my opening point, Agile is a Software Development Process, not a Software Architecture or even a Software Pattern. What if a Waterfall approach is being used? Are you suggesting that the MVC Architecture be modified according to Actors and Use Cases???
That’s my opinion anyway.

ibrahimym
Автор

What's your Expirience in asp mvc development, I think this approach is bound to fail once you have few 100 features. You can always use Areas.

jermanyificationify
Автор

I loved this video. Thank you Steve for sharing with all of us such a simple and useful technique. Very intuitive! I wish that Microsoft would have done this same type of organizational approach right out of the box.

schmidtlach
Автор

Do you have video to do all these view patterns in the config? I feel like it's not good to hardcode them.

jerryjeremy
Автор

Excellent video, i was ever searching for. Hats off to you steve sir.

alihameed
Автор

Hi Steve, can you add a advance video on how to add a notification service in MVC Core. Also are you going to add more ASPNET CORE 1.0 past the 50 excellent videos you have posted.

akl
Автор

Great and awesome, thanks again for your great tutorials.

sherdilnoori
Автор

This makes totals sense. Thanks for the demo. I was wondering about the VS 2017 slowdown though. I am having the same issue and it's really frustrating. Have you found a solution? If so it would be much appreciated

andremcgruder
Автор

Hi, how does this apply to Asp.Net Core 2.0 file structure? The file structure has completely changed.

everyonesview