Ajax|xml
What is Ajax?
Definition of Ajax
Ajax is not a technology, it is actually several technologies, each of which has its own uniqueness, and together it becomes a powerful new technology. Ajax includes:
XHTML and CSS
Dynamic display and interaction using the Document Object model
Data interaction and manipulation using XML and XSLT
Using XMLHttpRequest for asynchronous data reception
Use JavaScript to bind them together
The traditional Web application model works like this: Most user actions on the interface trigger an HTTP request that connects to a Web server.
The server completes some processing---receives the data, processes the computation, then accesses the other database system, finally returns an HTML page to the client. This is an old-fashioned pattern that has been used since hypertext has been used as a web use, but readers who have read the Elements of User experience must know what limits the Web interface's lack of desktop software.
Figure 1: Comparison of the traditional Web application model (left) with the Ajax model (right).
This old approach has made us realize a lot of technology, but it does not produce a very good user experience. What is the user doing when the server is working on its own business? Yes, wait. Every action, the user has to wait.
Obviously, if we design web apps according to the desktop program's thinking, we don't want users to always wait. When the interface is loaded, why do you want to let the user spend half the time to fetch data from the service each time? In fact, why do you always let users see the program go to the server to fetch data?
How Ajax is remarkable
By introducing an AJAX engine between the user and the server, you can eliminate the start of the web-stop-start-stop such an interaction process. It's like adding a layer of mechanism to the program to make it more responsive, and it does.
Unlike loading a page, at the beginning of a session, the browser loads an AJAX engine---is written in JavaScript and is usually in a hidden frame. This engine is responsible for drawing the user interface and communicating with the server side. The AJAX engine allows users to interact with the program in an asynchronous fashion-without waiting for the server to communicate. So the user does not need to open a blank window, see wait for the cursor constantly turn, wait for the server to complete and then respond.
Figure 2: Comparison of asynchronous interaction processes between traditional Web applications (above) and AJAX applications (lower).
Typically, the user action to produce an HTTP request is now invoked using JavaScript to invoke the Ajax engine instead. Any user action response no longer requires direct upload to the server---such as simple data validation, in-memory data editing, and even some page navigation---the engine can handle it itself. If the engine needs to fetch data from the server to respond to the user action---assume it submits the data to be processed, loads additional interface code, or receives new data---the engine makes the work asynchronous, usually using XML, without any further interaction with the user interface.
What is XML?
XML is the abbreviation for Extensible Markup language
XML is a markup language similar to HTML
XML is used to describe the data
The markup for XML is not predefined in XML, you must define your own markup
XML uses document type definition (DTD) or schema (schema) to describe data
XML is a self-describing language after using a DTD or schema
What are the main differences between XML and HTML?
XML is used for storing data.
XML is not an alternative to HTML, and XML and HTML are two different uses of languages.
XML is designed to describe data, focusing on what is data and how data is stored.
HTML is designed to display data, focusing on how to display data and how to display it better.
HTML is associated with displaying information, and XML is related to descriptive information.
"XML" is a language used for data interchange on a network and has a format similar to the HTML language that describes a Web page. The language has the advantages of "data validation by using a Web browser" and "easy to generate data", and is therefore used primarily to facilitate data exchange and utilization between enterprises or within the enterprise. First, for the sake of understanding, let's assume there is a situation: a book seller to set up their own site, and send the bookstore catalog and inventory information.
When managing books, you need to use table labels to provide data such as "title", "Release date", "Stock", "Author", "publisher" and "pricing" in the form of a list. After summarizing the data in this form, if you are a person, you will be able to quickly understand what you need. However, a computer (or system) cannot understand the meaning (attributes) of the data here, even if it can understand the structure of the page or the layout of the data.
However, "XML" is the technology that enables computers to understand these data attributes as well.
If you use XML, such as "How much inventory is currently available?" and "How many books did a writer sell?" Such data can be "automatically" mastered by the computer and able to "share" the data with the transaction object. As a result, publishers will be able to refer to this data in the development of future publishing plans, and the sales companies can make effective distribution plans easier. This will certainly contribute significantly to reducing personnel costs and improving management efficiency.
Of course, even if you do not use XML, for example, if you can build a canonical database and define a name for each field named "title" and "pricing", the computer will understand. But for this to happen on the web, it costs a considerable amount of manpower and cost. At this point, if it is XML, because it is "able to use a Web browser to validate data", there is no need for special investments as long as you have computers that connect to the Internet and browsers that support XML.
With XML, you can also convert data that is difficult to handle in a previous database into a database.
XML is described in the same way as HTML, and is described with a string enclosed by parentheses <>. In HTML, the parentheses are defined with information such as layout (Layout). XML also defines the attributes of the data, such as the books just mentioned, which are defined in terms of < title >, < author >, and < Press >. A definition like this can be set freely. As a result, there are even a number of enterprises that define XML themselves and then use it for data exchange within the company. Such a high degree of freedom is one of the reasons why XML is greatly concerned.
However, data exchange between enterprises is one of the focus of XML. Therefore, the definitions of each company cannot be generalized if they are not normalized. At present, the standard group "biztalk.org" and "Rosetta Net", which are mainly Microsoft, want to develop "widely used logos" for various industries and fields to reduce the trouble of defining XML.
If, as mentioned above, the standard of XML can be developed and widely used, then more than just the exchange of data between enterprises will become simpler, and voice data and dynamic image data, etc. in the past database difficult to handle data will be easily converted into a database. This can also be said to be a great merit in terms of management.
What is SNS?
SNS is a distributed technology, commonly used peer-to-peer technology, the construction of the next generation based on personal network infrastructure software.
SNS through the distributed software programming, will now spread on each person's device CPU, hard disk, bandwidth to arrange, and give these relatively small equipment relative to the server more powerful ability. These capabilities include: computational speed, communication speed, storage space.
SNS's technical Origin: In the Internet, the PC, the smartphone does not have the formidable computation and the bandwidth resource, they rely on the website server, can browse the dissemination information. If the computing and bandwidth resources of each device are redistributed and shared, these devices may have more power than those servers. This is the origin of the theory of distributed computing, is the theoretical basis for the birth of SNS technology.
SNS Commercial space: when ordinary people through the installation of SNS software can be comparable to the Web server computing and communications resources, those who invest in a large number of servers in the Internet companies will do? Where are their strengths? Will there be more new internet companies coming in, And their front end there is no possibility is not the current Google, EBAY, Sina mode it? Even including Shanda network games such as operators, they are cited as proud of the powerful 30,000 server cluster, is not their core competitiveness? When a comic author's home machine, Can let him play his work through SNS video device, he still need to manage a website? Perhaps a housewife does not need to understand the HTML programming, does not need to understand the website this word, only through the SNS recipe release program and a kitchen PC can let millions of people master her craft, And the way she was on the kitchen stove was clearly visible. What would you think of this time?
Now in the Internet, as the client we are like a fool, only through the server to do some slave-like things, watching others ' websites, playing other people's games, sending emails, in addition, we have no freedom. Now is the time to start a revolution! The central task of the revolution is how to make more than 1 billion computers play their own role, so that users can create and control their own information. There is no need for the company's servers to manipulate us in the middle.
1, what is tag?
Tag (tag) is a more flexible and interesting classification, you can add one or more tags to each log, each post or each picture, you can see all the site and you use the same tag content, so that with others to create more contact. Tag embodies the power of the group, so that the correlation between the content and the interaction between users greatly enhanced.
For example, if you add "read" and "tag" two tags to a journal, you can see the other journals that you are interested in by using the two tag. Similarly, if you put a different label on your Web bookmarks, you'll find the information you want the next time you look for it.
So what would happen if I put tag on it? First, the information will be organized. Second, when you accumulate a certain number of tags, you will find yourself the most concerned about the topic. Google's "My Search History" feature is the use of tags, your every search keyword can become tag, after that, you will understand what you care about this day.
Of course, you can also see who is using the same tag as yourself, and then find people who share your interests.
2, what is the difference between tag?
tag is not a keyword, because, a machine can not extract a picture of the keyword, but the person could give it to set one or more tag. What's really different about tag is that you can use any word to mark something as long as it's convenient for you to find it. Therefore, this symbol is an active, disorderly, personalized, rather self-marking way.
What am I going to say when I can make the mark I want for my own speech, rather than the sort that other people give me? What kind of articles and pictures do I find through this sign? Tag creates a new, disorderly but vibrant network of associations through which people find what is closest to them.
3. How to use tag?
Now many sites have used the tag mode, as long as the user opened the boundaries of their own, to give their own annotation label, not by the old thinking limited to live, right. Simply put, tag is an arbitrary label, when I read an article or look at a picture of what to write, not by the original classification of the shackles, how to use.