First use of Google Gears

Source: Internet
Author: User

ArticleSource: one read http://www.yiludu.cn/

After some years of web development, I have seen some innovations and advances in Web technology. As a person engaged in B/S Development, I am very pleased.
In the past, there was an Ajax technology which should be very innovative,
Ajax applicationsProgramAdvantages:
1. Improved user experience through asynchronous mode
2. optimized the transmission between the browser and the server, reduced unnecessary data round-trips, and reduced bandwidth usage
3. the Ajax engine runs on the client and undertakes part of the work originally undertaken by the server, thus reducing the server load for a large number of users.

Today I am talking about Google gears. I think it is also a technological innovation.

A problem occurred in the recent project. When using CDMA networks, You need to input a certain data to implement the function of fast and dynamic display like Google,
The amount of data is a little large, and it is almost impossible to connect quickly.

So we can only consider some new technologies. This is Google gears. Localize the database.

Http://code.google.com/apis/gears/sample.html

Here is a simple and detailed example. The trial is indeed good.

It contains three important modules.
1. The database module is local data and can be operated using standard SQL syntax, such as table creation, query, and deletion.
In this way, we can store a lot of common data locally, instead of downloading it from the server every time,
This improves user experience and reduces unnecessary data round-trips.
Especially for poor network environments. If the network is disconnected during operation, you can save the input data to the local database,
After the network is normal, it is synchronized.

2. localserver module is the local server. We all know that B/S files are stored on the server,
There are no clients. If something goes wrong with the network, the system will be inaccessible,
The localserver module is used to store some files on the server to a local machine when the network is disconnected.
For example, if we want to register a document, the system without B/S has been disconnected and cannot be entered and submitted to the server.
With the localserver module, we can open the input interface when the network is disconnected, input the interface, and then use the database module for storage,
When the network is ready, it is synchronized, and we do not always have to worry about not entering data in time so that we will not forget to enter the data later.
(This is not used for the time being. It has something to do with the interface design. It is not easy to use our system, and some interfaces cannot be localized for the time being)

3. workerpool module. Worker pool, which is the most important module. Anyone who has used pool technology knows that,
It means that the various subjects in the pool work independently. Here, the pool enables multiple js to run asynchronously in the background without mutual interference.
In this way, when you use the system, you cannot feel that JavaScript is running. In the past, when JavaScript was running, the interface was not operational,
Other operations can only be performed after JS is run out. This problem can be solved by using the workerpool module,
For example, in our system, it takes about one hour to localize the server database (a table,
If you use traditional Js for operations, the interface will have to run for an hour (maybe no response), and IE is basically white screen.
This is obviously not feasible. We can only use the workerpool module,
The server data is obtained through Ajax segmentation in the background, and then the workerpool module is started to write data. The effect is very good.

The above is a bit of experience after your own trial (which is officially used), and I will share it with you.

Web development is really fun. Thank you for your technical support.

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.