Firefox: The Path to the browser's built-in Database

Source: Internet
Author: User
Document directory
  • SQL? What SQL?
  • Advantages and disadvantages of SQLite
  • Aesthetics and web developers

Indexeddb is a Web standard that is being developed for storing large amounts of structured data in browsers and for high-performance indexing and query of such data. Mozilla has already submitted a large number of unique
Provide feedback. We plan to implement this specification in Firefox 4. We tell outstanding web developers that we need to develop an excellent structured data storage API on the web. At the same time, several versions of safari, chrome, and Opera support a technology called Web SQL database, which uses SQL statements as string parameters to pass in to JavaScript APIs, we believe that,Developers' aesthetic stanceIt is an important consideration, so it is an ugly solution for the Web applications on the client. We gave feedback from developers to the editor of The indexeddb specification.
Microsoft discussed this and they agreed that indexeddb is a good choice for the web. As the Chrome browser team is about to implement this specification,
It is necessary to explain our design decisions here and why we think that for the Web, indexeddb is
Database is a better solution.

Web applications running on IE 8 +, Safari 4 +, chrome 4 +, opera 10.5 +, and Firefox 2 + can uselocalStorage
AndsessionStorageStore data in the key-value format through simple JavaScript APIs. This widely-implemented web storage standard (includinglocalStorageAndsessionStorage) Only appliesSmall Data VolumeForLarge data volumeOfStructured DataStorage is insufficient. Although many server-side databases use SQL
Structured Data and targeted data query. However, the use of SQL in Javascript APIs on the client is controversial.

SQL? What SQL?

Many Web developers are very familiar with SQL
Because they both deal with the client code (such as JavaScript, CSS, and Markup Language), but also with the server code (such as PHP and database operations ).
However, despite the widespread use of popular SQL, we do not have a uniform SQL specification to define this technology. Particularly, SQLite although supports most of the SQL-92
Standards, but there are also many obvious deficiencies, and webdatabase API is based on it. SQLite itself is not a standard-it is a developed technology!
The best definition document for which SQL subsets are supported by SQLite is the SQLite user manual.
. To make Web SQL database develop in the correct direction, we must first define a meaningful SQL subset for Web applications.
When JavaScript already has many excellent solutions, why should we define another language?

Advantages and disadvantages of SQLite

We believe that SQLite is a very useful technology and has become an effective extension component and trusted software for Firefox. However, we do not think it is a suitable basic program for making public the API for generating web content. It is totally unsuitable, because we do not have a trusted and widely accepted standard to regulate SQL subsets correctly. In addition, we do not want to influence the entire web due to changes in SQLite in the future, nor consider the various browsers (and web standards) it is wise to restrict all data to SQLite. Indexeddb does not have these problems. We can even implement the underlying implementation of indexeddb Based on SQLite. By releasing APIs that do not rely on SQLite syntax semantics, we can isolate developers from SQLite.

Aesthetics and web developers

Last year, we held a summit on the Mozilla campus to discuss web storage. We invite web developers to tell us what their ideal structured data storage API looks like on the web. Many people say they have reserved SQLite-Based APIS because they have used Web SQL databases in Some browsers, they think that some things "have" are always better than "no", and they are more than just some concepts. Of course, all voices enthusiastically hope for a better design scheme and a simpler model that is easier to handle. We watched programmers draw a simple btree API on the whiteboard and add the requirements for data storage on the applications they encountered, which inspired us to pay attention to their opinions. We agreed that the use of strings to indicate that SQL statements lack the elegance of JavaScript APIs as "Web native", and we should look for a replacement design. We asked for feedback on the indexeddb proposal with Microsoft, and we were lucky enough to become an activist for this standard.

In another article, we will
Indexeddb and web SQL database are compared. It is noted that the former provides a simpler syntax than the latter. Indexeddb provides full space for third-party developers to develop JavaScript code libraries, so that they can use the btree API to fully control the underlying layer. We look forward to the process like browsercouch
This is the result of the pioneering spirit built on indexeddb. Developers who are steadfast and fearless can actually develop an SQL API on indexeddb.
WeSpecial expectationIt is a Web SQL database API implementation based on indexeddb. We believe this can be achieved technically. Using the SQL-based API in a browser is basically not a proper way to start, but the SQL-based APIs on indexeddb still has space for it.

We hope to continue to discuss with Web developers about data storage on the web, which will help us sort out ideas about product features and future Web standards. We expect the next generation of web applications to perform high-performance queries on indexed data, and expect the web applications to run more vigorously in the airplane mode.

Original post address: http://docman.javaeye.com/blog/692756

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.