Research the Javascript framework called AngularJS.

Based upon your research respond to the following questions:

  1. What is a Framework?
  2. A framework is a file of predefined code to aid code reusability.

  3. Why would you use the AngularJS Framework for Javascript/JQuery?
    1. MVC done right
    2. Most frameworks implement MVC by asking you to split your app into MVC components, then require you to write code to string them up together again. That’s a lot of work. Angular implements MVC by asking you to split your app into MVC components, then just let Angular do the rest. Angular manages your components for you and also serves as the pipeline that connects them.

    3. A declarative user interface
    4. Angular uses HTML to define the app’s user interface. HTML is a declarative language which is more intuitive and less convoluted than defining the interface procedurally in JavaScript.

    5. Data models are POJO
    6. Data models in Angular are plain old JavaScript objects (POJO) and don’t require extraneous getter and setter functions. You can add and change properties directly on it and loop over objects and arrays at will. Your code will look much cleaner and more intuitive, the way mother nature intended.

    7. Behavior with directives
    8. Directives are Angular’s way of bringing additional functionality to HTML. Imagine a world where HTML has so many rich elements that we never have to manipulate the DOM to simulate them. All that our app needs to do is to assign attributes to elements to get any functionality out of the box.

    9. Flexibility with filters
    10. Filters filter the data before they reach the view and can involve something as simple as formatting decimal places on a number, reversing the order of an array, filtering an array based on a parameter, or implementing pagination. Filters are designed to be standalone functions that are separate from your app, similar to Directives, but are only concerned with data transformations.

    11. Write less code
    12. All the points up till now mean that you get to write less code. You don’t have to write your own MVC pipeline.

    13. DOM manipulations where they belong
    14. Traditionally, the view modifies the DOM to present data and manipulates the DOM (or invokes jQuery) to add behavior. With Angular, DOM manipulation code should be inside directives and not in the view. Angular sees the view as just another HTML page with placeholders for data. This way of looking at the view pairs nicely with user interface designers.

    15. Service providers where they belong
    16. Controllers in Angular are simple functions that have one job only, which is to manipulate the scope. For example, you can use it to prefill data into the scope from the server or implement business logic validations. Unlike other frameworks, controllers are not objects and don’t inherit from anything.

    17. Context aware communication
    18. The PubSub system in Angular is precisely that. broadcast() will send a message to all children controllers, while emit() will send a message to all ancestors.

    19. Unit testing ready
    20. The whole of Angular is linked together by Dependency Injection (DI). It’s what it uses to manage your controllers and scopes. Because all your controllers depend on DI to pass it information, Angular’s unit tests are able to usurp DI to perform unit testing by injecting mock data into your controller and measuring the output and behavior. In fact, Angular already has a mock HTTP provider to inject fake server responses into controllers.

    Resource
  4. What are some of the advantages of using a Framework?
  5. AngularJS, commonly referred to as Angular, is an open-source web application framework maintained by Google and a community of individual developers and corporations to address many of the challenges encountered in developing single-page applications. The library works by first reading the HTML page, which has embedded into it additional custom tag attributes. Those attributes are interpreted as directives telling Angular to bind input or output parts of the page to a model that is represented by standard JavaScript variables. The values of those JavaScript variables can be manually set within the code, or retrieved from static or dynamic JSON resources.

    The main Angular advantages over its closest rival, KnockoutJS, are:

    That effectively makes Angular the tool of choice for building Single Page Applications.

    Resource
  6. What are some of the disadvantages of using a Framework?
  7. Angular is not the silver bullet. Some of its disadvantages are backsides of its strong points, some are inherent to the JavaScript ineffectiveness that could not be overcome even with the best derivatives.

    The weaknesses are:

    Resource
  8. Define the key terms for AngularJS identified above.
  9. Describe two or three alternative Javscript Frameworks compared to AngularJS.