Its also like php^; whip stuff up quickly and easily, but keep your eye on the ball, or you get hit in the face by spaghetti code.
There's certainly something to be said for an easy way to get running quickly, when you can't be bothered with an SPA.
...but it doesn't scale. :)
(^ the comparison is more apt than you might imagine; razor pages are the 'one file per logical page' model for asp .net core, and very very reminiscent of webforms, and all the legacy that carries).
(... and don't even get me started on razor components, where every UI interaction (ie. every single browser event) involves a full round trip to the sevrer to rerender the component state, due in .net core 3.0.
I'm just saying: Microsoft have done some excellent work with .net core and kestrel but that doesn't mean every idea they have is a good one)
Sure, but... I suggest that it is a trade off in which functionality is exchanged for convention and simplicity...and perhaps not for good reasons, or in a way that encourages good outcomes by default.
If I was under the impression the ASP.NET team was on the ball and agreed with the decision they were making, I'd be more prepared to run with it... but I'm not.
For example, there's an open github issue discussing the concerns people have raised about the ASP.NET team suggesting that razor pages are better than MVC.
Read it yourself and you'll be extremely familiar with the various opinions on the matter:
well most of these concerns are from people that actually never tried to run with razor pages, which is really sad.
as said my background was basically 5 years or more working in mvc and even partially working on the framework itself. and I would say that Razor Pages is a good starting point for any application.
currently I think both, Razor Pages AND MVC is important, but it's so easy to use both, so there is no problem. If something grows to much you can easily split it into the old traditional MVC paradigma, but actually most of the time I migrate directly to a web api instead of dotnet core mvc.
(at the moment I have 2 mvc controllers, which are basically the same as web api 2 endpoints (no view/no model))
also razor pages is kind of MVVM which is common more (i mean in the javascript world more stuff is mvvm than mvc, not sure why java/c# can't follow that aswell?!) and more for UI related frameworks (which razor pages of course is) but most people didn't realized that on this github issue..
Exactly this, if you've got crazy logic going on it should be removed from the view and done in the controller. The only code in your view should aid displaying model data and defining the layout output. I usually do my best but of course there are exceptions, especially if using third party libraries for views.
There's certainly something to be said for an easy way to get running quickly, when you can't be bothered with an SPA.
...but it doesn't scale. :)
(^ the comparison is more apt than you might imagine; razor pages are the 'one file per logical page' model for asp .net core, and very very reminiscent of webforms, and all the legacy that carries).