Open jonjensen opened 5 years ago
Thanks for the article. I'm researching Core 2.X and come from web forms and MVC. I've found just the lack of AJAX support to be the biggest pain point. Microsoft just doesn't understand the need for having lots of generated controls and submit buttons on a page doing different things asynchronously. MVC is terrible for this. I'm hoping Core maybe coupled with Angular will speed up our development. Razor Pages seems to make a lot more sense than hunting down controller files.
@ThatMouse Look to Unobtrusive Ajax, which is now part of ASP.NET Core 2x.
Unobtrusive Ajax is not scalable and not the direction to go. It needs to die in a big fire.
I've worked with Web Forms a lot, and I work with AngularJs/Angular a lot. In my eyes, Angular is almost just web forms on the client side. I don't see the need to show the http client to the developer and I never understood that argument (or any other arguments concerning the verbs etc...). I wrapped the Angular framework so that developers can simply have the feeling of a page and feel that server side controller will pass automatically it's data to the the client side controller init method (And it feels like WebForms). As a result new pages are developed in super fast speed and with a minimum number of bugs. All because it works just like the way people logic works. I won't use Reactive programming for example because - in my opinion- it is 100% unnatural thinking and feels forced in the majority of day to day scenarios.
Nice article. Frankly, as a longtime engineer who's worked a lot with MVC, I was very, very, extremely reluctant to give Razor Pages a try. Didn't until Core 3.1.
SoC was my main worry. That and I still have nightmares about the nightmare that was code-behind.
Turns out I was worried for nothing.
Razor Pages is a far different animal than code-behind. Too, I was surprised to find SoC is easier to come by with Razor Pages because it's closer to MVVM than is MVC. Overall, Razor Pages are cleaner and more succinct. I'm definitely a big fan and will likely only use MVC only when I need to develop an API. I never liked combining APIs with a website anyway.
Comments for https://www.endpointdev.com/blog/2018/11/whats-the-deal-with-asp-net-core-razor-pages/ By Kevin Campusano
To enter a comment: