Angularjs + ASP。净MVC + ASP。净Web API

时间:2021-11-06 03:20:54

I am planning to build my new web application. I am good at ASP.NET MVC and jQuery and have working knowledge of Web API too. I am new to Angularjs but I want to use it on client side for complex pages which requires DOM manipulations. I have the following concerns:

我正在计划构建我的新web应用程序。我擅长ASP。NET MVC和jQuery,并具有Web API的工作知识。我是Angularjs的新手,但是我想在客户端使用它来处理需要DOM操作的复杂页面。我有以下担忧:

  1. Should I still consider Single Page Application framework after knowing that it would be a medium scale application with many pages and complex logic/algorithms.
  2. 在知道它将是一个具有许多页面和复杂逻辑/算法的中型应用程序之后,我还应该考虑使用单页应用程序框架吗?
  3. I heard people talking about replacing ASP.NET MVC + jQuery completely with ASP.NET Web API + Angularjs. Is it really a better choice for medium or large scale web applications with complex logic. If yes then what is the alternate for session, authentication etc.
  4. 我听到人们在谈论替换ASP。NET MVC + jQuery完全使用ASP。NET Web API + Angularjs。对于逻辑复杂的中型或大型web应用程序来说,这真的是一个更好的选择吗?如果是,那么会话的替代是什么,身份验证等等。
  5. Would it be a wise decision to use ASP.NET Web API, ASP.NET MVC and Angularjs together.
  6. 使用ASP会是一个明智的决定吗?净Web API,ASP。NET MVC和Angularjs一起。
  7. What is the compatibility between latest versions of jQuery, Bootstrap and Angularjs.
  8. 最新版本的jQuery、Bootstrap和Angularjs之间的兼容性如何?
  9. Would the development time/cost increase with using Angularjs + SPA instead of ASP.NET MVC + jQuery (Non-SPA).
  10. 使用Angularjs + SPA而不是ASP会增加开发时间和成本吗?NET MVC + jQuery(非spa)。

Has any body written a medium/large scale complex web application using Angularjs?

是否有任何机构使用Angularjs编写了一个中/大型复杂的web应用程序?

2 个解决方案

#1


15  

Should I still consider Single Page Application framework after knowing that it would be a medium scale application with many pages and complex logic/algorithms.

在知道它将是一个具有许多页面和复杂逻辑/算法的中型应用程序之后,我还应该考虑使用单页应用程序框架吗?

I don't have much experience with SPA. MVC isn't really designed to solve the problem, but AngularJS would work very well with the approach. You won't have any difficulties here that I can see.

我对SPA没有太多的经验。MVC并不是为解决这个问题而设计的,但是AngularJS可以很好地解决这个问题。在这里你不会有任何困难,我可以看到。

I heard people talking about replacing ASP.NET MVC + jQuery completely with ASP.NET Web API + Angularjs. Is it really a better choice for medium or large scale web applications with complex logic. If yes then what is the alternate for session, authentication etc.

我听到人们在谈论替换ASP。NET MVC + jQuery完全使用ASP。NET Web API + Angularjs。对于逻辑复杂的中型或大型web应用程序来说,这真的是一个更好的选择吗?如果是,那么会话的替代是什么,身份验证等等。

Replace jQuery with AngularJS except for those rare times where jQuery does something that Angular cannot. In my experience I only use jQuery for rare DOM selection situations.

将jQuery替换为AngularJS,除非是jQuery做了一些有棱角的事情。在我的经验中,我只在很少的DOM选择情况下使用jQuery。

Angular JS is very good at seperating concerns, data-binding, seamless UI updating and encouraging good programming practices such as IOC/dependency injection and SOLID.

角度JS非常擅长分离关注点、数据绑定、无缝的UI更新和鼓励良好的编程实践,如IOC/依赖注入和SOLID。

WebApi doesn't replace MVC as such; but what you should be doing is using WebApi where it makes sense. That is, any time you're making asynchronous (AJAX) calls with Angular, it should interact with a WebApi back-end. Simple Get/Post stuff.

WebApi并不能取代MVC;但是你应该做的是在有意义的地方使用WebApi。也就是说,当您使用角度进行异步(AJAX)调用时,它应该与WebApi后端进行交互。简单的Get / Post的东西。

Would it be a wise decision to use ASP.NET Web API, ASP.NET MVC and Angularjs together.

使用ASP会是一个明智的决定吗?净Web API,ASP。NET MVC和Angularjs一起。

Absolutely. I encourage it.

绝对的。我鼓励它。

What is the compatibility between latest versions of jQuery, Bootstrap and Angularjs.

最新版本的jQuery、Bootstrap和Angularjs之间的兼容性如何?

Bootstrap depends on jQuery. Angular doesn't. They all work flawlessly with each other. I use them all (but I don't directly interact with jQuery much).

引导取决于jQuery。角不。他们彼此完美地合作。我全部使用它们(但我不太直接与jQuery交互)。

Would the development time/cost increase with using Angularjs + SPA instead of ASP.NET MVC + jQuery (Non-SPA).

使用Angularjs + SPA而不是ASP会增加开发时间和成本吗?NET MVC + jQuery(非spa)。

AngularJs has a learning curve and isn't as simple as jQuery. That is, it isn't quite as pick-up-and-go as jQuery.

AngularJs有一个学习曲线,没有jQuery那么简单。也就是说,它并不像jQuery那样具有可选性。

It is more time consuming at first but I think over time the ease of debugging, forced code separation and better practises means that Angular is more robust, more flexible, less code, more code reuse, and so on.

它在开始时更耗时,但我认为随着时间的推移,调试、强制代码分离和更好的实践的便利意味着,角度更健壮,更灵活,更少的代码,更多的代码重用,等等。

Please note that while I'm a fan of AngularJS, other javascript frameworks such as Ember, Backbone, Knockout and so on are, I'm sure, just as great. Personal preference/experience.

请注意,虽然我是AngularJS的粉丝,但其他javascript框架,如Ember、主干、Knockout等,我相信,也一样好。个人偏好/经验。

#2


1  

Im in a similar situation, but Ive started see the way through the "fog" with using these newer frameworks such as AngularJS when used together with MVC. Ive been going through several online tutorials on Pluralsight and have come to agree with one of the authors, Shawn Wildermuth who recommends using a "combined" approach when considering the SPA concept. Basically, limit the "SPA pages" to only those that warrant it, otherwise use MVC views etc.

我也遇到过类似的情况,但我开始了解如何在与MVC一起使用AngularJS等更新的框架时,克服“迷雾”。我一直在浏览有关Pluralsight的一些在线教程,并与作者之一Shawn Wildermuth达成了一致,他建议在考虑SPA概念时使用“组合”方法。基本上,将“SPA页面”限制在那些需要的页面上,否则使用MVC视图等等。

#1


15  

Should I still consider Single Page Application framework after knowing that it would be a medium scale application with many pages and complex logic/algorithms.

在知道它将是一个具有许多页面和复杂逻辑/算法的中型应用程序之后,我还应该考虑使用单页应用程序框架吗?

I don't have much experience with SPA. MVC isn't really designed to solve the problem, but AngularJS would work very well with the approach. You won't have any difficulties here that I can see.

我对SPA没有太多的经验。MVC并不是为解决这个问题而设计的,但是AngularJS可以很好地解决这个问题。在这里你不会有任何困难,我可以看到。

I heard people talking about replacing ASP.NET MVC + jQuery completely with ASP.NET Web API + Angularjs. Is it really a better choice for medium or large scale web applications with complex logic. If yes then what is the alternate for session, authentication etc.

我听到人们在谈论替换ASP。NET MVC + jQuery完全使用ASP。NET Web API + Angularjs。对于逻辑复杂的中型或大型web应用程序来说,这真的是一个更好的选择吗?如果是,那么会话的替代是什么,身份验证等等。

Replace jQuery with AngularJS except for those rare times where jQuery does something that Angular cannot. In my experience I only use jQuery for rare DOM selection situations.

将jQuery替换为AngularJS,除非是jQuery做了一些有棱角的事情。在我的经验中,我只在很少的DOM选择情况下使用jQuery。

Angular JS is very good at seperating concerns, data-binding, seamless UI updating and encouraging good programming practices such as IOC/dependency injection and SOLID.

角度JS非常擅长分离关注点、数据绑定、无缝的UI更新和鼓励良好的编程实践,如IOC/依赖注入和SOLID。

WebApi doesn't replace MVC as such; but what you should be doing is using WebApi where it makes sense. That is, any time you're making asynchronous (AJAX) calls with Angular, it should interact with a WebApi back-end. Simple Get/Post stuff.

WebApi并不能取代MVC;但是你应该做的是在有意义的地方使用WebApi。也就是说,当您使用角度进行异步(AJAX)调用时,它应该与WebApi后端进行交互。简单的Get / Post的东西。

Would it be a wise decision to use ASP.NET Web API, ASP.NET MVC and Angularjs together.

使用ASP会是一个明智的决定吗?净Web API,ASP。NET MVC和Angularjs一起。

Absolutely. I encourage it.

绝对的。我鼓励它。

What is the compatibility between latest versions of jQuery, Bootstrap and Angularjs.

最新版本的jQuery、Bootstrap和Angularjs之间的兼容性如何?

Bootstrap depends on jQuery. Angular doesn't. They all work flawlessly with each other. I use them all (but I don't directly interact with jQuery much).

引导取决于jQuery。角不。他们彼此完美地合作。我全部使用它们(但我不太直接与jQuery交互)。

Would the development time/cost increase with using Angularjs + SPA instead of ASP.NET MVC + jQuery (Non-SPA).

使用Angularjs + SPA而不是ASP会增加开发时间和成本吗?NET MVC + jQuery(非spa)。

AngularJs has a learning curve and isn't as simple as jQuery. That is, it isn't quite as pick-up-and-go as jQuery.

AngularJs有一个学习曲线,没有jQuery那么简单。也就是说,它并不像jQuery那样具有可选性。

It is more time consuming at first but I think over time the ease of debugging, forced code separation and better practises means that Angular is more robust, more flexible, less code, more code reuse, and so on.

它在开始时更耗时,但我认为随着时间的推移,调试、强制代码分离和更好的实践的便利意味着,角度更健壮,更灵活,更少的代码,更多的代码重用,等等。

Please note that while I'm a fan of AngularJS, other javascript frameworks such as Ember, Backbone, Knockout and so on are, I'm sure, just as great. Personal preference/experience.

请注意,虽然我是AngularJS的粉丝,但其他javascript框架,如Ember、主干、Knockout等,我相信,也一样好。个人偏好/经验。

#2


1  

Im in a similar situation, but Ive started see the way through the "fog" with using these newer frameworks such as AngularJS when used together with MVC. Ive been going through several online tutorials on Pluralsight and have come to agree with one of the authors, Shawn Wildermuth who recommends using a "combined" approach when considering the SPA concept. Basically, limit the "SPA pages" to only those that warrant it, otherwise use MVC views etc.

我也遇到过类似的情况,但我开始了解如何在与MVC一起使用AngularJS等更新的框架时,克服“迷雾”。我一直在浏览有关Pluralsight的一些在线教程,并与作者之一Shawn Wildermuth达成了一致,他建议在考虑SPA概念时使用“组合”方法。基本上,将“SPA页面”限制在那些需要的页面上,否则使用MVC视图等等。