本文介绍了ASP.NET MVC(Razor)与Angular 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在考虑从ASP.NET MVC迁移到Angular 5,主要是因为它似乎是最好的最新框架.但是,对于Angular为何比MVC(Razor)更好,我们所有人似乎都无法提出严格的理由.

We are currently considering moving from ASP.NET MVC to Angular 5, mostly because it seems like the best and latest framework. However none of us seems to be able to come up with hard reasons on why Angular is better than MVC (Razor).

SPA与MPA似乎是不同的方法,两者都不是更好的方法-只是在不同的情况下更胜一筹.

SPA vs MPA seems like different approaches with neither really being better - just better at different things.

两者之间是否有任何可带来硬性收益的资源/比较?

Are there any resources/comparisons with hard benefits between the two?

更新:升级到Angular 4(目前为Angular 4)近两年了,我可以说这是一个伟大的决定. Angular使编写非常复杂的前端应用程序变得非常容易,并且围绕Angular本身的工具,TypeScript,Karma + Jasmine(单元测试框架)非常棒.我认为SPA比MPA迈出了一大步-我们终于可以拥有流畅的Web体验.我从未真正喜欢过Razor和ajax/jquery周围的所有混乱,但是我可以轻松地说,我现在真的很享受我的时间! .NET CORE 3 + Angular 7为我们提供了我们所需要的一切!

Update: Almost 2 years after moving to Angular 4 (currently 7) I can say that it was a great decision. Angular makes it super easy to write quite complex front-end applications and the tooling around Angular itself, TypeScript, Karma + Jasmine (unit test frameworks) is fantastic. SPA is a huge step ahead of MPA in my opinion - we can finally have fluid web experience. I never really liked Razor and the whole mess around ajax/jquery, but I can comfortably say that I am really enjoying my time now! .NET CORE 3 + Angular 7 gives us everything we need!

对于任何想冒险尝试的人,我强烈建议Angular(最好从8或9开始,这在撰写本文时是最新的.)

To anyone thinking of taking the plunge, I would strongly recommend Angular (might as well start with 8 or 9, which is current at the time of writing this).

如果人们想要的话,很乐意添加更多详细信息:)

Happy to add more details if people want them :)

推荐答案

从ASP.NET MVC迁移到Angular 5(现在为6)已有6个月了,我们对此决定感到非常满意. .NET核心后端和Angular前端是完美的组合.创建可重用,强类型化,可测试且易于修改的UI组件更加干净,容易得多!

6 months on from moving from ASP.NET MVC to Angular 5 (now 6) and we are extremely happy with the decision. .NET core backend and Angular frontend is a fantastic combination. It is so much cleaner and easier to create re-usable, strongly-typed, testable and easy to modify UI components!

对于任何考虑是否值得尝试的人-我会说一个响亮的是"!

For anyone considering if it's worth taking the plunge - I would say a resounding 'yes'!

这篇关于ASP.NET MVC(Razor)与Angular 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 07:28
查看更多