Understanding XML, Ajax, SNS, and tag.

Source: Internet
Author: User
What Is Ajax?

Ajax Definition

Ajax is not a technology. It is actually several technologies, each of which has its own unique characteristics. Together, Ajax becomes a powerful new technology. Ajax includes:

XHTML and CSS

Use Document Object Model for Dynamic Display and Interaction

Use XML and XSLT for Data Interaction and operations

Use XMLHttpRequest for asynchronous data receiving

Bind them together using JavaScript

The traditional web application model works like this: Most user actions on the Interface trigger an HTTP request connected to the Web server.

The server completes some processing-receiving data, processing computing, accessing other database systems, and finally returning an HTML page to the client. This is an old model. It has been used as a web application since hypertext was used. But readers who have read the elements of user experience must know that, what makes web interfaces easier to use than desktop software.

 


Figure 1: Comparison between the traditional web application model (left) and the Ajax model (right ).

This old approach makes us realize many technologies, but it will not produce a good user experience. What are users doing when the server is processing their own tasks? That's right. Wait. Users have to wait for every action.

Obviously, if we design Web applications according to the thinking of desktop programs, we don't want users to wait. When the interface is loaded, why do users need to spend another half of their time retrieving data from the service? In fact, why do we always let users see the program to fetch data from the server?

How Ajax is extraordinary

By introducing an Ajax engine between the user and the server, you can eliminate the interaction process such as starting, stopping, starting, and stopping the web. it is like adding a mechanism to the program to make it more responsive, and it does.

Unlike loading a page, the browser loads an Ajax engine at the beginning of a session-written in JavaScript and usually in a hidden frame. This engine is used to draw user interfaces and communicate with the server. The Ajax engine allows Asynchronous interaction between users and programs-without waiting for server communication. Therefore, you do not need to open a blank window and wait for the cursor to keep turning. Wait until the server completes and then respond.

 


Figure 2: Comparison between synchronous interaction process (I) of traditional web applications and Asynchronous interaction process of Ajax applications (II ).

The user action that usually generates an HTTP request is now replaced by calling the Ajax engine through JavaScript. the response of any user action is no longer required to be directly transmitted to the server-for example, simple data verification, data editing in the memory, or even some page navigation-the engine can process it by itself. if the engine needs to retrieve data from the server to respond to user actions-assuming that it submits the data to be processed, loads other interface code, or receives new data-the engine asynchronously performs these operations, XML is usually used to avoid mistaken User Interface interaction.

What is XML?

XML is the abbreviation of extensible markup language.

XML is a markup language similar to HTML.

XML is used to describe data.

XML tags are not pre-defined in XML. You must define your own tags.

XML uses document type definition (DTD) or schema to describe data.

After using DTD or schema, XML is a self-described language.

What are the main differences between XML and HTML?

XML is used to store data.

XML is not a substitute for HTML. xml and HTML are two different languages.

XML is designed to describe data, focusing on what is data and how to store data.

HTML is designed to display data. The focus is on displaying data and how to display data better.

HTML is related to display information, while XML is related to description information.

"XML" is a language used for data exchange on the network and is similar to the "html" language used to describe web pages. This language has the advantages of "data validation with Web browsers" and "easy to generate data". Therefore, it is mainly used between enterprises, or you can exchange and use data more conveniently within the enterprise. First, for ease of understanding, we suppose there is a situation where a book seller wants to establish its own site and send information such as the variety directories and inventory in the bookstore.

When managing books, you need to use table tags, etc, provide data such as "title", "Release Date", "inventory", "author", "publisher", and "pricing" in the form of a list. After summarizing data in this form, if you are a person, you can quickly learn what you need. However, even if a computer (or system) can understand the page structure or data layout, it cannot understand the meaning (attribute) of the data here ).

However, "XML" is a technology that allows computers to understand these data attributes.

If XML is used, for example, "How much inventory is there currently ?" And "How many books do a writer sell ?" The data can be automatically controlled by the computer and shared with the transaction object ". In this way, the publishing house will be able to refer to the data when developing future publishing plans, and it will be easier for the sales company to develop effective distribution plans. This will definitely help reduce personnel costs and improve management efficiency.

Of course, even if you do not use XML, for example, if you can create a standard database and define a name for each field, such as "name" and "pricing", the computer can understand it. However, it takes considerable manpower and cost to achieve this on the web. In this case, if XML is used, as "data can be validated using a Web browser", as long as you have a computer that can connect to the Internet and a browser that supports XML, no special investment is required.

XML can also be used to convert data that is difficult to process in a previous database into a database.

The description of XML is the same as that of HTML. It is described by a string enclosed by parentheses. In HTML, layout and other information are defined in brackets. XML defines data attributes at the same time. For example, the books just mentioned are defined by means of <title>, <author>, and <publisher>. You can set a definition like this. Therefore, many enterprises even define their own XML and then use it for internal data exchange within the company. This high degree of freedom is also one of the reasons why XML has received great attention.

However, data exchange between enterprises is one of the focuses of XML. Therefore, the definitions of companies cannot be used in general if they are not standardized. Currently, Microsoft-based standardization groups biztalk.org and Rosetta net all hope to develop "widely available logos" for various industries and fields ", to reduce the trouble of defining XML.

If, as mentioned above, XML standards can be developed and widely used, data exchange between enterprises will become simpler, in addition, Speech data, dynamic image data, and other hard-to-process data in past databases will be easily converted into databases. This is also a huge advantage in terms of management.

What is SNS?

SNS is a next generation of personal-based network infrastructure software that uses distributed technology and P2P technology.

Through distributed software programming, SNS comprehensively arranges the CPU, hard disk, and bandwidth that are distributed on each individual's device, and gives these devices smaller than servers more powerful capabilities. These capabilities include computing speed, communication speed, and storage space.

The origin of SNS technology: in the Internet, PCs and smartphones do not have powerful computing and bandwidth resources. They rely on website servers to browse and publish information. If the computing and bandwidth resources of each device are re-allocated and shared, these devices may have more powerful capabilities than those of those servers. This is the root of the birth of Distributed Computing Theory and the theoretical basis for the birth of SNS technology.

SNS commercial space: What Will Internet companies that have invested a lot of servers do when ordinary people install SNS to have computing and communication resources comparable to website servers? What are their advantages? Will there be more new Internet companies, and Will their backend be completely different from the current Google, eBay, and Sina models? Even operators such as Shanda online game are proud of their powerful 30 thousand Server clusters. Is it their core competitiveness? When a cartoon author's home machine enables him to play his work through an SNS video, does he still need to manage a website? Maybe a housewife does not need to know HTML programming, but does not need to know the word "website". by publishing an SNS recipe program and a PC in the kitchen, millions of people can master her craft, in addition, all her steps on the kitchen stove are clearly visible. What do you think of at this time?

In the Internet, as a client, we are just like a dumb. We can only do something like slaves through servers, watch others' websites, play others' games, and send emails, in addition, we are not free. Now is the time to start the revolution! The task of the revolution center is to let more than 1 billion computers play their own roles and let users create and control their own information. In the middle, we don't need company servers to manipulate us.

1. What is a tag?

Tags are a more flexible and interesting classification method. You can add one or more tags for each log, every post, or every image ), you can see all the content on the website that uses the same tag as you, resulting in more contact with others. Tag reflects the strength of the group, greatly enhancing the relevance between the content and the interaction between users.

For example, if you add "read" and "tag" tags to a log, you can view other logs that are of the same interest to you through these two tags. Similarly, if you add different tags to your network bookmarks, you can easily find the desired information in the next search.

So what will happen if I paste a tag? First, the information will be organized. Second, when you accumulate a certain number of tags, you will find that you are most concerned about the topic. Google's "my search history" function uses tags. Each time you search for keywords, you can become tags. Then, you will understand what you are concerned about on this day.

Of course, you can also see who uses the same tag as yourself, and then find someone who shares your interests.

2. What are the differences between tags?

Tag is not a keyword, because a machine cannot extract the keywords of a photo, but one or more tags can be set for it. Tag is actually different in that you can use any word to mark a thing as long as it is convenient for you to find it. Therefore, this sign is an active, unordered, personalized, and rather self-marking method.

What will I say if I can make the mark I want for my own comments, instead of classifying them? What kind of articles and pictures will I find through this sign? Tag creates a new unordered but vibrant Network Consortium through which people find the content closest to themselves.

3. How to use tags?

Many websites now use the tag mode. As long as users open their own boundaries and comment tags on themselves as they wish, it's right not to be limited by old thinking. To put it simply, tag is a free label. When I read an article or read an image, I write what I want, which is not restricted by the original category, how to use it.

 

Related Article

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.