Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Same number of options.

Razor is still the "default" and "Razor Pages" has a different brand name, but just means "Razor with more things in the main .razor file and fewer code-behind .razor.cs files and less of an MVC approach".

Blazor mostly only matters if you want your frontend to also be Razor. At that point you've got the fork between Blazor using SignalR for HTML pipes from Razor files to the client versus Blazor running client-side in WASM with a Virtual DOM renderer based on Razor.

Blazor seems popular among some groups that want everything in C# rather than needing as much of a Typescript frontend. Blazor WASM bundles a full version of the CLR into WASM so mostly only popular in places where you don't need to optimize the initial web bundle.





Thanks! Its clear..

.razor is blazor, razor pages is .cshtml

In my brief testing just now, both extensions seem to be purely synonyms. Microsoft's documentation suggests that .razor is for Blazor components and .cshtml is for Pages, but even Microsoft's own templates are inconsistent on this and seem to use them interchangeably. The view engine doesn't seem to care what you call it and doesn't really seem to change its behavior. It really mostly just seems to underscore the difference between Razor Pages and Blazor "Server-Side Only" is real blurry to nonexistent. Obviously Blazor Hybrid and Blazor WASM have very different behavior from just Razor Pages.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: