ANGULARJS best Practices One----ANGULARJS Foundation

Source: Internet
Author: User

Blog post with this client seems to have no summary, confused.

How does a browser get a Web page?

Let's think of the Internet as a post office, when you want to send a letter to your friend, first you have to write down a piece of paper, and then write your friend's address on the envelope and load it into the envelope. Then to the Post Office, the mailbox Division will be based on the ZIP code and address to find your friend's place to live. If he lives in a large community, the Post Office service staff will send the letter to the front desk by the community staff according to the apartment classification.

The internet works in a similar way, but is no longer a street-connected house or apartment, but a group of computers connected by routing and cabling, each with a unique address to tell the network how to get there.

Just as many apartment buildings share an address, the computer can exist on the same network or route (connected to the same wifi), in which case your computer and the other computers have the same external IP address, of course, through the internal IP (like the apartment number), routing is like Community personnel.

IP stands for Internet Protocol, an IP address is a numeric token that is held by each device involved in the network activity. such as computers, printers, and even mobile phones have an IP address. There are currently two types of IP addresses: IPv4 and IPv6, today we use the most IPv4, such as 192.168.1.10,ipv6 looks fe80:0000:0000:0000:aaaa:0000:00c2:0002. When we open the browser input/HTTP/ Www.baidu.com, your browser goes back and asks where the address of DNS:baidu.com is, if DNS knows the IP address you are looking for, it will respond directly to you, otherwise this request will be forwarded to other DNS until the IP address you are looking for is found. Once the IP address you are looking for is responding, DNS will also send a message to that address to request the Web page you requested, each with a path, such as access to http://www.baidu.com and http://www.baidu.com/duty/show different content. Once the remote server sends back this HTML, our browser renders it.

Whatever the browser, the core work is to extract the Web page and display it to the user. Your browser will parse it into structure layout and content based on HTML text, and display it to the user before styling it, which is the work behind the browser.

With angular, we not only construct structures, but also build interactions between users and Web applications. The official description of ANGULAJS is that Angularjs, as a client-side technology, is written entirely on JavaScript, and it works with Web technologies Html/css/javascript make our web development faster and easier than ever before. It is a framework for creating single-page applications, which the ANGULARJS team calls a structural framework for dynamic Web applications, and ANGULARJS handles the advanced features that users commonly use in modern web development:

    • Application logic, data model, view separation
    • Ajax Services
    • Dependency Injection
    • Browser history (bookmarks ' forward/back buttons work properly)
    • Can be tested
    • Other

Instead of extending custom JavaScript objects and handling the DOM, such as jquery, to add a button to the DOM, we need to know where the element is and insert it into place, compared to other JavaScript frameworks.


var btn = $ ("hi");

Btn.on (' click ', Function (evt) {Console.log ("clicked Button!")});

$ ("#checkoutHolder"). Append (BTN);

While this may not seem complicated, it requires developers to have knowledge of the DOM and force us to put complex logic into JavaScript code that handles external DOM.

Angularjs gives HTML native MVC the ability to build client applications quickly and enjoy it. Developers can angularjs part of the content as an application, and do not force you to completely complete the entire page, which is especially useful for existing programs if other JavaScript frameworks are used. In addition, the Angularjs compressed only 9KB small, this feature is very beneficial to the construction of prototype function.

Protocol: Based on MIT, the source code is hosted on GitHub, and of course you can contribute your own power to help the framework get better. Please refer to the official website for specific details.

Chrysanthemum Zi Yue: My favorite microblogging client

ANGULARJS best Practices One----ANGULARJS Foundation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.