IMPORTANT CONCEPT OF ANGULARJS

IMPORTANT CONCEPT OF ANGULARJS

ANGULARJS IMPORTANT CONCEPTS

There are a few important concepts you need to understand before you build your own AngularJS app. I’ll give a brief overview and some links to more detailed information.

MODEL-VIEW-CONTROLLER (MVC)

No alt text provided for this image

MVC is a design pattern for implementing user interfaces. It helps us separate the logic in our code from how it is displayed. By doing this, we end up with a much neater, more testable application. If you aren’t familiar with MVC, check out this interesting explanation using lego.

General Features

  • The general features of AngularJS are as follows: AngularJS is a efficient framework that can create Rich Internet Applications (RIA).
  • AngularJS provides developers an options to write client side applications using JavaScript in a clean Model View Controller (MVC) way.
  • Applications written in AngularJS are cross-browser compliant. AngularJS automatically handles JavaScript code suitable for each browser.
  • AngularJS is open source, completely free, and used by thousands of developers around the world. It is licensed under the Apache license version 2.0.
  • Overall, AngularJS is a framework to build large scale, high-performance, and easyto-maintain web applications.

 Core Features.

 The core features of AngularJS are as follows: 

  • Data-binding: It is the automatic synchronization of data between model and view components.
  • Scope: These are objects that refer to the model. They act as a glue between controller and view.
  • Controller: These are JavaScript functions bound to a particular scope.
  • Services: AngularJS comes with several built-in services such as $http to make a XMLHttpRequests. These are singleton objects which are instantiated only once in app.
  • Filters: These select a subset of items from an array and returns a new array.
  • Directives: Directives are markers on DOM elements such as elements, attributes, css, and more. These can be used to create custom HTML tags that serve as new, custom widgets. AngularJS has built-in directives such as ngBind, ngModel, etc.
  • Templates: These are the rendered view with information from the controller and model. These can be a single file (such as index.html) or multiple views in one page using partials.
  • Routing: It is concept of switching views.
  • Model View Whatever: MVW is a design pattern for dividing an application into different parts called Model, View, and Controller, each with distinct responsibilities. AngularJS does not implement MVC in the traditional sense, but rather something closer to MVVM (Model-View-ViewModel). The Angular JS team refers it humorously as Model View Whatever.
  • Deep Linking: Deep linking allows to encode the state of application in the URL so that it can be bookmarked. The application can then be restored from the URL to the same state.
  • Dependency Injection: AngularJS has a built-in dependency injection subsystem that helps the developer to create, understand, and test the applications easily.

Concepts:

       The following diagram depicts some important parts of AngularJS which we will discuss in detail in the subsequent chapters.

No alt text provided for this image

Advantages and disadvantages of AngularJS:

 The advantages of AngularJS :

  • It provides the capability to create Single Page Application in a very clean and maintainable way. 
  • It provides data binding capability to HTML. Thus, it gives user a rich and responsive experience.
  • AngularJS code is unit testable.
  • AngularJS uses dependency injection and make use of separation of concerns.
  • AngularJS provides reusable components.
  • AngularJS viii With AngularJS, the developers can achieve more functionality with short code.
  • ·        In AngularJS, views are pure html pages, and controllers written in JavaScript· do the business processing.
  • On the top of everything, AngularJS applications can run on all major browsers and smart phones, including Android and iOS based phones/tablets.

Disadvantages of AngularJS :

Though AngularJS comes with a lot of merits, here are some points of concern:

  • Not secure : Being JavaScript only framework, application written in AngularJS are not safe. Server side authentication and authorization is must to keep an application secure. 
  • Not degradable: If the user of your application disables JavaScript, then nothing would be visible, except the basic page.

要查看或添加评论,请登录

Benish Ben的更多文章

  • How Python Programming Can make You Happy

    How Python Programming Can make You Happy

    Why Learn Python In this article we're about why you should learn python right now. 1) Python is Great for Beginners…

  • This Is Why People Love Python

    This Is Why People Love Python

    Why do you love Python? Python is Easy to Learn One of the biggest advantages of Python is that it is easy to read…

  • 10 Things To Know About Python.

    10 Things To Know About Python.

    let’s discuss ten of some of the important concepts that Python programmers should know. 1.

  • where-can-I-learn-Python-easily

    where-can-I-learn-Python-easily

    What is python ? There are two primary factors why we have to use Python? is software quality and developer…

  • Python-programming-language

    Python-programming-language

    Introduction to Python Programming Python is developed by Guido van Rossum. Guido van Rossum started implementing…

  • Python an easy language to learn

    Python an easy language to learn

    What is Python? Python is an Object oriented, high level and multi purpose language. Python is very easy to learn and…

  • Programming with Python: Hands-On Introduction for Beginners

    Programming with Python: Hands-On Introduction for Beginners

    Programming with Python: Hands-On Introduction for Beginners Introduction : This course is specially designed for…

  • Python Language Introduction

    Python Language Introduction

    Python is a widely used general-purpose, high level programming language. It was initially designed by Guido van Rossum…

  • ANGULARJS

    ANGULARJS

    Angular JS - The robust Java Script Platform with New Features and Updates Angularjs is a popular JavaScript-based open…

  • ANGULARJS

    ANGULARJS

    BASIC AngularJS I have planned to start writing about AngularJS. I have begun to learn AngularJS a few months back…

社区洞察

其他会员也浏览了