In ASP.NET Core, I see that there is now Razor Pages and I also noticed that there is now Content Pages in Service Stack. In regards to ServiceStack.NET...
- What would be the guidelines / recommendations for when to use
Content Pages, Razor Pages, or Razor Views?
- Are there any limitations?
- Is one better than the other? Performance? JIT?
There are no guidelines, use what you prefer. My preference is to use Single Page Apps instead of server HTML rendering with Razor and if I needed server HTML generation I’d use ServiceStack Templates instead of Razor.
ServiceStack Razor pages are more portable given they can run on all AppHost’s. But in .NET Core the implementation uses MVC APIs behind the scenes for all compilation/rendering so perf should be similar. It’s ultimately the same language but MS Razor Pages would be better documented.
It really comes down to your preference, e.g. mine isn’t to use Razor at all.
Unfortunately, the public part of the website needs to server side rendered (SSR) to meet marketing's SEO requirements. So we'll need to choose one of them. Hopefully .NET Blazor using Web Assembly picks up steam, assuming that would have a SSR feature plus client.