3 ms·
"the new kid on the block, Razor Pages" I'm not sure that's actually true? I thought I did cshtml pages without all the MVC bits around MVC 3 or 4. Is this pe
by james-skemp 9y ago
"the new kid on the block, Razor Pages"
I'm not sure that's actually true? I thought I did cshtml pages without all the MVC bits around MVC 3 or 4.
Is this perhaps just a branding/naming thing?
Update: Haven't found a good reference yet, but it seems to have been around when WebMatrix was still supported, but I don't think I actually had to use it to develop the site that was cshtml files.
Update 2: ASP.NET Web Pages with Razor Syntax was what it was called. https://docs.microsoft.com/en-us/aspnet/web-pages/overview/getting-started/introducing-aspnet-web-pages-2/getting-started https://docs.microsoft.com/en-us/aspnet/web-pages/overview/g...
I'm not going crazy!
- nhebb 9y agoRazor pages != razor syntax. I think Microsoft screwed up with the naming of them because, even within the .NET community, I see a lot of developers that conflate them. Microsoft should have named razor pages something different to avoid this confusion. It's just a simplified MVC model where the controller boils down to OnGet()and OnPost() methods in a code-behind file. The code-behind file, in turn, reminds developers of web forms, but razor pages are really not similar at all. ASP.NET Core has a lot of flexibility. You can go Web Api / SPA, classic MVC, or razor pages. Each has a sweet spot.
- james-skemp 9y agoYeah, I know the syntax is different, and I think you're right across the board. But I guess I kind of see it as just the next iteration of the old Web Pages w/ Razor functionality, just with better support for external models/code-behind, but also more package dependencies. .NET Core definitely seems to be off to a great start, and once the tooling gets better I think I'll use it much more (EF support via VS is lacking, especially if you're trying to update a model going db-first). So if the future of .NET is .NET Core first, I look forward to continuing to be a .NET developer.