ASP.NET Core 2.0 Razor vs Angular/React/etc

后端 未结 3 751
予麋鹿
予麋鹿 2021-01-29 18:52

My team and I have received funding to start developing an Enterprise level web application (won\'t go into details of what it does). The application will have many separate we

3条回答
  •  自闭症患者
    2021-01-29 19:49

    By using Angular/React with API on the server-side:

    • you eliminate the process of generating HTML on server-side and you save CPU
    • API produces a small payload (JSON) and Razor (HTML) of course would be much larger in size, the constant full page reloads, and postback round trip, so API and SPA save bandwidth
    • API and spa could have different versioning, scaling and deployment scenarios
    • By using API you can support mobile app too and if you start with Razor you may need API in future

    But by using Angular/React, you should be worried about clients:

    • client must enable javascript
    • client must have modern browsers
    • client must have enough powerful hardware
    • SEO

提交回复
热议问题