Tuesday, May 11th, 2010

Firefox 4: HTML5 and Native JSON Store

Category: Browsers, Firefox

>Mike Beltzner, Director of Firefox and all-round top chap, gave an open presentation on what is coming in Firefox 4:

The full video is also available which goes into detail on the main themes of the next release of Firefox (3.7 is dead, long live 4!)

  • Fast: making Firefox super-duper fast
  • Powerful: enabling new open, standard Web technologies (HTML5 and beyond!),
  • Empowering: putting users in full control of their browser, data, and Web experience.

What do developers get?

  • Bidirectionally connected apps (Web Sockets)
  • Better Ajax-y interactions (PushState)
  • New interactions (gesture + multi-touch)
  • Easier layout and styling (CSS3)
  • HTML5 Parser
  • Content creation (contentEditable, HTML5 forms)
  • Structured data storage (IndexedDB)

You would have guessed at most of these, but maybe not the WebSimpleDB/IndexedDB one. If a project has “simple” in the name, it normally isn’t…. just like when a project has “open” in the name. It is a strange name since we have simple storage through localStorage and friends.

IndexedDB is a better name, and it is interesting stuff. Instead of the SQL databases that require standardizing on a version of SQLite (which is insane) it is JSON native. You work with the data store like this:

and you can go native JSON with the object store:

Take a look at all of the low level cursor code and you may cry a little :)

Back to Firefox 4. The media loves a binary black vs. white view of the world. Flash is Dead. HTML5 is saviour. Chrome is “the winner”. IE is over. Regardless of any actual numbers.

Alpha geeks are big on Chrome these days, but Firefox has massive numbers and is still doing well, despite the fact that, in my opinion, better days are to come. Firefox will catch up on the technology side with multi-process and their new JagerMonkey VM work. Performance will become table stakes yet commodity. Where Firefox can shine is where no other browser will go. Mozilla is mission based and cares about users in a more holistic way. This is the empower goal. You should own your data. Your browser should do more for you (not just get out of the way). Firefox is uniquely positioned for this, and you can see the start of the work via the Contacts work from Mike Hansen.

Also note how the team is discussing Firefox 4. Totally in the open. What will Safari 5 have? Chrome 6 has platform status, IE9 is doing a better job…. but no one does it as well as Mozilla IMO.

I look forward to the continued browser competition. Great news for us developers!

Related Content:

Posted by Dion Almaer at 10:06 am
16 Comments

++---
2.7 rating from 3 votes

16 Comments »

Comments feed TrackBack URI

Dion, while the embedded gists are convenient for you, they get stripped out in the RSS. Would love to keep the full code available in the feed. <3

Comment by PaulIrish — May 11, 2010

The Gist JS snippets don’t appear in Google Reader (and probably other feed readers. Could we have the old code snippets back please? Thanks

Comment by dave1010 — May 11, 2010

Um, Chrome is currently on version 4, and 5 is in beta. I would say the information that’s been available for their plans has been just as or nearly as open as Mozilla’s.

Comment by Fyrd — May 11, 2010

And, in fact, the plans for Chrome 6 are mentioned here:

http://www.chromium.org/developers/web-platform-status

Comment by Fyrd — May 11, 2010

@PaulIrish, @dave1010

Good point. I wanted to experiment with using Gist’s to make things more alive (e.g. be able to point to a commit so it updates over time). Will revisit that thinking though.

@Fyrd,

Good point too.

Comment by Dion Almaer — May 11, 2010

Anyone know what will happen to the javascript engine improvements that were a part of 3.7? Are they going in 3.6.4?

Comment by chrismatic — May 11, 2010

Is it just me or does IndexedDB seem like it should be a javascript library on top of localStorage? It is also not very useful without a system for doing queries. People don’t want SQL per se, but they don’t want to give up query languages entirely.
.
Aside from that, FF4 is looking good.

Comment by Joeri — May 11, 2010

All sounds great except slide #21 called “Great Developer Tools”.

/start of rant/
From screenshots it looks like they are developing a new set of developer tools to be shipped directly with Firefox. It is NOT enhanced Firebug with new tools as one would expect. And I cannot believe these tools will be “great” since day 1. Web development tools suck in a big way. We don’t have javascript profilers, decent debuggers and memory inspectors common in “desktop world”. We have to deal with several browser runtimes/toolsets, ah … you know the story. We lack many tools and if Firebug haven’t been created by Joe Hewitt, we would be all still in the stone age. There has been put a lot of effort into Firebug during last few years. I don’t understand why Mozilla does not put engineering resources into extending Firebug and including it into default Firefox installation instead. WebKit/Chrome tools are getting better and better and some tools just got further than in Firebug, say SpeedTracer.

Please note that I’m biased, because I’m a developer of several Firebug plugins for developers (http://binaryage.com). And as far as I know, those “Great Developer Tools” are not being developed and consulted with current Firebug developers.
/end of rant/

Comment by drwin — May 11, 2010

How about upping the default 50mb browser cache?

Comment by cancelbubble — May 11, 2010

Great article – revealing, thnx.

I agree w cancelBubble more memory would be nice but the problems with allocating unlimited memory to extensions are obvious too.

Sockets-level sounds potentially powerful.

Many of us have compatibility concerns: I use XUL and I use anonymous content w/ XBL bindings for my extensions – can’t find any mention of these… Do you/anyone know if they are going away in ff4 or will they still be supported?

Comment by blindmurray — May 11, 2010

I see the stab at replacing Firebug (with something necessarily inferior) in the context of their stated intention to phase out overlay-based extensions in favor of Jetpack. There’s no way Firebug could be rewritten based on Jetpack, and it’s unlikely that the Jetpack API will ever be powerful enough for real extensions, i.e. extensions that are more than widgets.

They’re also targeting userscripts and mashups with CSP. They’re all about “giving users control”, but part of what they do goes in the opposite direction. This will come back to bite them. User control is what sets Firefox apart from other browsers. Take user control away and people could as well switch to something faster and more stable like Chrome.

Any idea what “video codec path under investigation” in slide 22 means?

Comment by bugme — May 12, 2010

bugme: – “their stated intention to phase out overlay-based extensions in favor of Jetpack” – do I read this to mean XUL overlays being phased out?

Comment by blindmurray — May 12, 2010

XUL and the power of the Mozilla platform js is still fully accessible in the Jetpack SDK. As we continue to build up Jetpack SDK’s portfolio of APIs, the power of Jetpack will increase. Additionally, when the Jetpack Builder IDE is release to the public in its later phases, it will have collaborative, generative coding at its core. You will see the number of APIs jump dramatically as developers begin to create their own and share them amongst the community.

Jetpack is not a replacement for XUL. Instead it should be classified as a well designed, coherent SDK with APIs that wrap XUL’s power in a way that will not break when Firefox is updated, all while letting developers create complex add-ons more easily than ever before.

Comment by csuwldcat — May 12, 2010

Hey FF developers, how about making your platform stable? my 3.6.3 keeps crashing on half the sites… it’s becoming very annoying.

Comment by gkatz — May 13, 2010

csuwldcat: thnx for the response and reassurance. i like working directly w/ XUL so hope we don’t lose direct access to XUL; agreed that overlays within overlays is awkward; the Anonymous Content on web-pages is very very useful too (hope it stays).
Will start playing w jetpack builds then – gotta love a good API… cheers

Comment by blindmurray — May 13, 2010

You can find an indexed db playground at http://tinyurl.com/ff-idxdb. It has examples for the APIs. Wrote it since I could not find documentation elsewhere. Hope it helps.

Comment by sri112233 — August 4, 2010

Leave a comment

You must be logged in to post a comment.