search

Home  >  Q&A  >  body text

angular.js - Is AngularJS helpful for development?

After reading the documentation of AngularJS, some people on the Internet said how powerful this is and how many advantages it has.
I don't feel that he can do anything very troublesome. There are some small improvements, but they are not obvious.
Is it because I didn't study carefully and didn't notice it?

習慣沉默習慣沉默2774 days ago1283

reply all(11)I'll reply

  • 大家讲道理

    大家讲道理2017-05-15 16:52:55

    • AngularJS非常合适 API fisrt的开发思路,如果有现成的RESTfulThe interface would be even better, as there is no need for back-end code

    • AngularJSIt is also suitable for situations where the logic of a single page is relatively complex. It is very simple to dynamically load and delete content

    reply
    0
  • PHPz

    PHPz2017-05-15 16:52:55

    Suggest additional routes

    jQuery => Ember => Backbone => Knockoutjs => Angular

    For developers who understand front-end development, the basic process of SPA development, common problems, pain points, performance tuning, etc., angularJS is a powerful tool. For those who lack the above experience, it is difficult to understand without the guidance of an experienced driver. The logic and purpose behind Angular’s ​​complex design can easily overlook the DOM foundation

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-15 16:52:55

    If the original jQuery basis is used, the code will be reduced by 2/3 or more after switching to angular.

    There are two learning routes.
    If you have the basics of jQuery, you must first forget all about jQuery, then the learning route should be jQuery -> Forget jQuery -> backbone (model and view, routing router does not need to be learned) - angularjs

    If you don’t have any basic knowledge, it is recommended to use Angular directly, and you will find that you can learn it faster than those who have basic knowledge of jQuery,

    The worst thing is that the angular code is mixed with a lot of jQuery code. It’s over, there’s no way to save it

    http://blog.csdn.net/postd_cn/article/details/38405833
    http://damoqiongqiu.iteye.com/blog/1926475

    reply
    0
  • ringa_lee

    ringa_lee2017-05-15 16:52:55

    All frameworks are extracted from actual engineering environments and then slowly improved. So if you don’t have enough development experience, it’s actually difficult for you to compare whether to use Backbone, Ember, React or Angular.

    But I think if you are interested in any framework, then use it. Gradually, if you use it more, you will know how long it will take to write it if you use jQuery yourself. Sometimes you also feel that it is better to write a framework yourself. Well, of course, if you are writing general applications, you will also think that it is better to use frameworks like Mao or handwriting.

    reply
    0
  • 迷茫

    迷茫2017-05-15 16:52:55

    jquery just controls the dom. . .
    The most awesome thing about angluarjs is two-way data binding. It is suitable for pages with very complex interactions.

    reply
    0
  • ringa_lee

    ringa_lee2017-05-15 16:52:55

    Although another classmate mentioned it, the benefits of this kind of thing can only be reflected when you accumulate project experience to a certain extent. However, for advertising purposes, I will briefly talk about it.

    Just like if the questioner has just come into contact with programming and is not familiar with functions yet, when he sees OOP, he may ask, what are the benefits of this? Even if he later masters the relevant syntax sugar, he still has doubts about their practical value. This It’s very understandable.

    Back to MVC/MVVM frameworks such as AngularJS, what is the value of their existence? The answer is also very simple. In fact, just like OOP, it is to reduce code coupling, reduce logic difficulty, and improve reliability. So why is it more straightforward? The method doesn’t work?

    Let’s talk about the more “direct” method first, which is event driven. To give a simple example, the state of an element on the interface may change due to user interactions in several different places, and the order in which these interactions occur, Frequency, etc. may be related to the state of the element. Anywhere that may trigger a change in the state of the element requires a judgment mechanism to determine the latest state of the element.

    Is it okay to write like this? Of course it is, but is it reliable? This is the time to test whether your logic is tight or not. A slight problem with your logic, or even a slight negligence, such as changing here and forgetting there, etc., may cause problems.

    MVC is data driven, adding a layer of data between the UI and interaction. The UI only cares about the status of one or more of these data, and no longer cares about whether various events have occurred, while interaction We only care about updating these data, and no longer care about changes in the UI. In this way, the originally complicated logic has been greatly simplified, which on the one hand reduces the difficulty of thinking for developers, and on the other hand also objectively reduces The probability of the problem occurring.

    The next step is advertising time~

    Because learning AngularJS/Ember all has costs, just mastering the API is actually not enough. If you don’t understand the implementation details, you will have no confidence when writing, because you don’t know the cost of each operation, so you are decisive I built the wheel and used it in project development. However, because it is a new wheel, I also found some problems in the design. I will rewrite it in the future, but you are welcome to star it.

    https://github.com/vilic/drop

    reply
    0
  • 高洛峰

    高洛峰2017-05-15 16:52:55

    angularjs is a framework
    jquery is a class library

    It is something on two levels

    Using angularjs essentially organizes code to develop applications based on its ideas. The framework helps you do a lot of things, including two-way data binding, module injection, etc. However, the flexibility is correspondingly reduced, and it is not suitable for large-scale front-end systems.

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-15 16:52:55

    How to define helpful? Make the program more logical, easier to maintain, and reduce code?
    Development must be combined with scenarios.
    I think Augular is most suitable for application-level development, most commonly for backend tools within an enterprise. In this case, it is definitely helpful.
    But for some fast-iteration active pages (which are only used for a period of time), Angular is really not helpful.

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-15 16:52:55

    To summarize from the big picture: It has greatly improved the "reusability", "maintainability" and "testability" of our code

    1. Testing: Especially foreign companies have very high requirements for testing. It is easy to write tests for projects developed in Angular. Even in China, if there is a guarantee of testing, at least it is not a confused programmer.
    2. Code modularization for easy maintenance
    3. For hybrid mobile development, you can use ionic, the golden partner of angular, to easily develop a mobile web page or package it into an app
    4. angular’s ​​filters and directives are still very powerful
    5. The overall community is relatively mature, there are many ready-made things available, and it provides not a little bit of development efficiency
    6. Everyone who has actually used it says it’s good

    Getting started with angular is quick, but there are still quite a lot of complicated things in it

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-15 16:52:55

    The goal of high concurrency is mainly back-end web services.
    In the past, when everything was a back-end template, because a page involved a large number of back-end DB reads, it was easy to slow down the rendering of the page.
    Except for the main business entity data, most other pages currently rely on front-end JS to be loaded asynchronously. Some people even make absolutely static pages, and all back-end data relies on asynchronous loading. However, these two methods are not absolute. For example, things that cannot be seen on the first screen of the page can be loaded asynchronously. The current asynchronous loading request is the same as CSS and JS. Also started to take the asynchronous request merging route. Therefore, in actual projects, the first thing is to analyze the specific situation, and the second thing is to have a good grasp of the degree.

    reply
    0
  • Cancelreply