谷歌AngularJS框架 - 值得冒风险? [英] Google AngularJS Framework - Worth the risk?

查看:101
本文介绍了谷歌AngularJS框架 - 值得冒风险?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被要求为我们的一个客户构建一个小型Web应用程序,并认为这可能是尝试构建Web应用程序的不同框架的好机会。我们构建的大多数应用程序都基于asp.net Web表单,我们还没有在MVC架构中做任何事情,但我渴望用更合理的工具以更有条理的方式开始构建Web应用程序。

I have been asked to build a small web application for one of our clients and think it might be a good opportunity to try out a different framework for building web applications. Most of the applications we build are based on asp.net web forms and we have no yet done anything in an MVC architecture but I am eager to start building web applications in a more structured manner with the right tools.

我一直在研究像asp.net MVC这样的东西看起来相当不错,但我想知道有什么可以说使用像Google AngularJS Framework这样的东西。

I have been researching things like asp.net MVC and the likes which look quite good but I am wondering is there anything to be said for using something like the Google AngularJS Framework.

如果可能,我仍然希望能够使用c#编写我的服务器端代码,并且我还没有研究过AngularJS,知道这是否可行,尽管我假设我可以使用Web服务。

If possible I would still like to be able to write my server side code using c# and I have not researched AngularJS enough to know if this is even possible, although I assume I could use web services.

有没有人有过使用AngularJS开发应用程序的经验,如果有的话,它是怎么做的,你能指出我正确的方向进行一些教程吗?

Has anyone had any experience with developing an app using AngularJS and if so, how was it and can you point me in the right direction for some tutorials?

推荐答案

过去几个月我们一直在AngularJS开发一个Swing胖客户端应用程序的端口,我认为值得推荐。关于学习资源,请查看官方项目网站(并确保阅读教程)和邮件列表(作者非常有帮助)。

We have been developing a port of a Swing fat-client application in AngularJS for the last couple of months and I think it is worth recommending. As far as learning resources go, check out the official project site (and be sure to read the tutorial) and the mailing list (the authors are very helpful).

好东西:


  • 极佳的可测试性

  • 双向数据绑定是一个非常强大的功能,一旦你得到它它就会非常有用。

  • IMO AngularJS模板比使用数据属性或特殊CSS类来标记做某事的元素要脆弱得多
  • li>
  • 它大大减少了使用jquery插件的需要,因为在AngularJS中实现该功能非常容易(像树,标签,手风琴等等)。

  • great testability
  • the two-way data binding is a very powerful feature, and it can be extremely helpful once you "get it"
  • IMO the AngularJS templates are much less brittle than using data- attributes or "special" CSS classes to mark elements that do something
  • it greatly reduces the need for using jquery plugins, because implementing that functionality in AngularJS is very easy (stuff like trees, tabs, accordions, etc.)

坏东西:


  • 学习曲线似乎很陡(我没有有很多问题,但我看到有些人在努力解决这个问题。)

  • 目前AngularJS中的验证很糟糕(新的实施正在进行中)

  • 不是所有的库/ jquery插件都可以很好地与Angular一起使用,通常你必须将它们包装好

  • API仍在被抛光,所以期待重大变化(频繁发布和非常好的更改日志不是一个大问题)但是,

  • 在页面上有几千个绑定之前,性能还可以 - 大部分时间这不是限制,但有时这可能是个问题。

  • the learning curve seems pretty steep (I didn't have much of a problem, but I've seen some people struggle with it)
  • validations in AngularJS suck for the time being (a new implementation is on the way)
  • not all libraries/jquery plugins play nicely with Angular and usually you have to wrap them
  • the API is still being polished, so expect breaking changes (not a big problem with frequent releases and very good changelog, though)
  • performance is OK up until several thousand bindings on a page - most of the time this is not a limitation, but there are cases when this could be a problem.

一些指针(如果您决定学习AngularJS):

Some pointers (if you ever decide to learn AngularJS):


  • 有些人真的过度使用小部件。根据我的经验,使用HTMLpartials+服务并且只是零星地使用小部件会好得多。

  • 阅读库的源代码 - 这是学习有关角度的东西的最佳位置

  • 服务/控制器中没有DOM操作

  • 如果你使用css类来绑定事件,你做错了

  • some people really overuse widgets. In my experience, it's much better to use HTML "partials" + services, and only use widgets sporadically.
  • read source code of the library - it's the best place to learn stuff about angular
  • no DOM manipulation in services/controllers
  • if you use css classes to bind to events, you are doing it wrong

这篇关于谷歌AngularJS框架 - 值得冒风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆