Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Razor Pages for Small Business Application

$
0
0

I need some guidance on choosing between MVC and Razor Pages for a small business application.

I read a thread on reddit (link below) about using razor pages. There was quite a bit of disdain for razor pages; the comments were opinionated and unhelpful. I like the organizational benefits to Razor Pages, and would prefer to use it unless there is a clear reason why I shouldn't.

https://www.reddit.com/r/dotnet/comments/6vnpmy/aspnet_razor_pages_vs_mvc_how_do_razor_pages_fit/ 

Currently, I don't see why Razor Pages wouldn't be able to replace controllers for the following reasons...

  • Razor Pages are not hardwired to the UI elements within the view; they simply pass their properties (a model) to the view.
  • Duplicated code in razor page handlers could be abstracted into a service that is injected into the page model.

It still seems like there is still a pretty good separation between the model, view, and business logic when using Razor Pages. If anyone has a concrete example as to why Razor Pages wouldn't work for this use case, please let me know.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>