Technology behind web 2.0/Ajax

Source: Internet
Author: User
Tags ruby on rails

Since 2.0, Web was officially proposed. Focuses on business models and models. Web 2.0 applications spring up. It is even more popular than SOA, which has been a hot topic in the past few years. I googled the web 2.0 result 20 times that of SOA. In the technical field, even if the development tool does not support web 2.0, It is very outdated. I recently listened to a delphi lecture. delphi 2007 was launched soon. He even said that he would support web2.0. From the technical point of view.
1. Packaging and implementation of Javascript/Ajax/DOM
Web 2.0 technology is actually divided into three parts: script language, Browser display model, asynchronous call. For scripting languages, Sys. Serialization. Javajavascript and javascript do not have any security types, OO features, and namespaces in this province. Some third-party libraries will help you encapsulate them to help you with the use of javascrip OO. For example, you can extend the String method to implement some common tool classes.
Microsoft atlas client library (http://ajax.asp.net/docs/ClientReference/default.aspx) has this feature
For example, you can write OOScriptSerializer serialize code.

Sys. Serialization. JavaScriptSerializer. serialize (yourobject)

The object sequence can be hashed into Json format.

In addition, Ajax is supported. A major feature of Ajax is asynchronous calling. If it is expanded, different browsers have different asynchronous call components. When calling, you need to know the url to be called. What is the content returned by the other party, javascript? Is it an object (in json format) or xml? What is Callback? For this reason, almost all ajax frameworks will encapsulate this feature. Make your browser compatible and program transparent. The following is a call to Dojo.
The client calls a method on the server, and the server returns an object in Json format. For. net, there are also some third-party libraries responsible for converting your serial objects to the json format. Like http://www.newtonsoft.com/products/json/
You only need to write it on the client to call a simple method. The vast majority of operations can be completed.

Var bindArgs = {
Url: "http: // youserver/yourapp. aspx ",
Mimetype: "text/json ",
Sync: true,
Error: function (type, errObj ){
Alert ("error ");
},
Load: function (type, data, evt ){
// Handle successful response here
Dojo. byId ("result"). innerHTML = data. FullName;
}
};
 
Dojo. io. bind (bindArgs );


It is not enough for javascript to support asynchronous calls. Can I use Dom to make some ready-made components or controls? For example, can you give me an automatically completed combox like google sugesst? Can you give me a treeview to asynchronously capture data from the background? Can there be a drag-and-drop effect?
Many libraries also support this requirement. For example, YahooUI (YUI), Dojo, and MochiKit. These three libraries are client libraries, that is, they are completely based on the javascript + browser model.
 
2. extend existing programming systems to support Ajax.
Two typical examples are Microsoft's Atlas server-side. You only need to drag and drop an UpdatePanel control to partially refresh it with a slight configuration. While Atalas helps you make automatic render into JS Code, js Code is responsible for displaying, background asynchronous calls and dom operations. Visual debugging is also supported.
 
Of course, Delphi 2007's support for web20 is also in this category. There are some VCL for web Components that allow you to use the delphi syntax to operate objects. The objects automatically have asynchronous events. The generated code is transparent. Of course it is very confusing. Therefore, very large websites are rarely used in this way. Cause 1: The number of generated JavaScript files is too large, which affects the loading speed. 2. Too much uncontrollable. Because of these features, it is easy to develop and implement by yourself.
 
3. Implementation Technology of web 2.0. Out of the traditional Ajax, you can also use machomedia's Flex to achieve strong presentation and user experience. There are also some fast-developed technologies, such as Ruby on Rails. I watched a video today and he could make a blog in 15 minutes...


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.