Skip navigation

Lost password? | Help

Hello World

Practical programming... and stuff...

What's with all the fuss over Google Gears?

Google Gears this, Google Gears that.

I don't see what's so great and revolutionary about it.

Google Gears (BETA) is an open source browser extension that enables web applications to provide offline functionality using following JavaScript APIs:

  • Store and serve application resources locally
  • Store data locally in a fully-searchable relational database
  • Run asynchronous Javascript to improve application responsiveness




Store and serve application resources locally


Why would you want to do that anyway? If your AJAXified application cannot access the web, what's it good for? Nothing. And you can already store and serve application resources locally with Opera's Widgets at least.
It's possible to store data in JavaScript, even if your connection goes down. It's not very persistent though, close the browser and that's it... but if it's a web application, why would it need to store data on the client too? Isn't the whole point of it being a web application that it gets its data from the server?

Google's pages say that you can store files in their LocalStorage class. Nothing new. You could've done that with data urls or such even before Gears.


Run asynchronous Javascript to improve application responsiveness


Since when wasn't this possible in JavaScript to begin with? I guess the coders at google who can't even write cross-browser JavaScript haven't ever heard of setTimeout and setInterval.
Also, the WorkerPool class can't access the DOM. This prevents you from, say, adding new rows to a table with this method. Additionally, you can't change global variables or call your functions from the workers either.


Store data locally in a fully-searchable relational database


Now this is the only thing that could be remotely useful in a JS app. But what for do you need a client-side DB anyway? Since the data is coming mostly from the server, it seems kind of redundant. Of course the DB could probably be used for better sorting and search of the current data, but that's been possible with "normal" JavaScript too. XPath, anyone?


Conclusion


There we have it. I don't see what's so new and amazing about all this. It seems to me that you could've done most of this with just plain JavaScript as well.

I think mostly larger applications would benefit from these features.. but then we get an another bottleneck: JavaScript performance.

We'll have to wait how developers will leverage Google Gears. So until I see something that truly benefits from all this, I can't really understand the hype.

Intresting feature in Windows Live MessengerEnhancing site navigation with JavaScript without sacrificing usability

Comments

DrLaunch 2. June 2007, 22:29

Damn it! :furious: This is the third time I've written a comment here, and it got lost twice because of a browser error, and my haunted mouse clicking the red X. Imagine how frustrated I must be now. :lol:

That aside, I'm going to try finish my comment properly this time.

I believe the Google Gears fuss is because it's OMG!!1 A NU GOOGAL SERVIS!!1!!one!!1 :lol:
Well. That and the fact that offline web applications have been discussed among web developers lately.

The Google Gears AJAX based applications do in fact access the web. They do so when they're downloaded and when they're synchronising data.
I'd say storing data locally in JavaScript is not a good idea if your intention is to not stay connected to the web. Then the app and its data would be lost if you closed it.
Google Gears is a good suggestion for a solution to this problem from Google.
I think you don't understand the purpose of Google Gears. Desktop PCs is not the intended usage of Google Gears. Rather laptops, and maybe smart-phones in the future. This is for people that bring their computers with them to places where there's no Internet access or connecting to the Internet would be expensive. Possible applications could be mail, news aggregators, productivity software and some more applications I haven't thought about now.

But Google Gears is far from revolutionary. I'd say what Google Gears is able to do is possible with Opera widgets too. Serving applications using web technologies and synchronising or downloading data, and presenting it dynamically.

I did throw some rather high flying idea out in #webapps on OperaNet earlier about people running local web servers instead of Google Gears to run offline web applications. But I realise that might be overkill. Google Gears acts kind of like a web server too, so maybe that's overkill too? Perhaps Opera widgets is the better implementation of offline web applications. Or maybe the widgets standard needs and addition that makes widgets suitable for running inside the browser chrome, like regular web applications too?

Offline web applications need more than just JavaScript to work and be user friendly (idiot friendly :lol: ). I have to agree that I think larger applications would be more suitable for this. But they have to be coded in simple, light and effective code.

I do understand the hype, but there aren't any good reasons for it. I think Widgets are a better solution to the problem.

Jani 3. June 2007, 00:19

Originally posted by drlaunch:

This is for people that bring their computers with them to places where there's no Internet access or connecting to the Internet would be expensive. Possible applications could be mail, news aggregators, productivity software and some more applications I haven't thought about now.


Maybe, but how does Gears help this? Most email and RSS clients for example can work offline as well, but you obviously won't be receiving any new email/feeds. Same applies to Gears apps.


These features will probably be useful in larger applications, but right now the problem with those would be JavaScript performance.

We had a discussion at #webapps some hours ago with robodesign about the future of JavaScript, and he told me JavaScript 2 should be compilable and therefore faster. This may allow for bigger JS apps to work faster. When and if this will happen remains to be seen.

jp10558 4. June 2007, 11:21

It seems like this is an extension of the (stupid IMHO) idea that everything is better if it runs in a browser. I just can't see what a webapp does for e-mail that Opera or Thunderbird won't do, and in general better. I mean, the big deal for webmail was you don't have to take your PC with you - but then what would this gears or widgets do for you either? If you're taking the device with you - run a real e-mail client IMHO, or use IMAP and multiple clients... This is a solved problem IMO.

Then again, I'm one of the people who can't see the point in Webmail for anything more than emergency access to e-mail when away from your machine(s). And all I ever see is how this or that will make webmail better... Just use a program designed for e-mail.

It's stupid to try and make everything run in the browser IMHO.

gasara 4. June 2007, 11:29

setTimeout and setInterval do not create threads, just delay execution. See my comment here: http://my.opera.com/community/forums/topic.dml?id=191752

Also this isn't just about webmail, it's about any application that runs in a browser. I agree completely that many applications are best run locally, I don't even use webmail or any of those useless Google Office-clone applications, but I do use other browser applications and even write one of my own that would benefit greatly from something like this. Just because you won't use it doesn't mean it's useless, it may just mean you haven't found a use for it which you like yet.

Stefan Schneider-Kennedy 4. June 2007, 12:35

Java (webstart), Flash, Opera widgets, they all come under the philosophy of write once, run anywhere. It's a nice idea, and this is essentially going down the same track I think. So what makes it better than what has already been tried? I don't really thing it is. Personally I think either Java webstart or Opera widgets are a bit more viable.

'Infinite' storage for web-apps already exists in a hackish kind of way, check out dojo.storage for one implementation. As you can see by the number of comments, it doesn't really seem that popular. Also, there's a local storage specification as a suggestion for HTML 5.

gasara 4. June 2007, 14:01

Part of the reason these things aren't particularly popular is because they are necessarily horrible hacks, that dojo thing throws huge errors attempting to use it in Opera and obviously relies on Flash for its workaround. While there are similar ideas perhaps behind a lot of the things you mention, each have entirely different domains of use. You don't run a Java application on top of a website to provide navigation features and so forth. Flash? Not really, since it's designed mainly to do its work inside its object window, not manipulate the external DOM. Widgets provide standalone utility functions unrelated to whatever you're browsing at the time. Javascript, on the other hand, is ideal for providing enhanced navigation on top of an HTML site, and as of now there's really no good way to get adequate client-side storage for that sort of application.

Jani 4. June 2007, 18:36

Originally posted by jp10558:

Then again, I'm one of the people who can't see the point in Webmail for anything more than emergency access to e-mail when away from your machine(s). And all I ever see is how this or that will make webmail better... Just use a program designed for e-mail.
It's stupid to try and make everything run in the browser IMHO.


I agree. At least until they can solve the performance problems and unstability issues with JavaScript and such, it's not a very good idea. A native Windows/Linux application will always be faster and easier to use than a browser app.


Originally posted by gasara:

setTimeout and setInterval do not create threads, just delay execution. See my comment here: http://my.opera.com/community/forums/topic.dml?id=191752


Well, I haven't researched that, but they do act at least similar to "proper" threading. You may be right.

As for your comment in the post about local storage, you can actually store things locally in variables, but as you probably know, they are destroyed when you close the page where the script runs.

jp10558 4. June 2007, 23:09

gasara - why would navigation need to store stuff locally? It's a good question, why would a browser based app be better than a java webstart app if you really need local storage and database features?

Besides, it just seems like another place you'd want to turn off local storage to prevent "tracking cookies", like you have to do with Flash.

I mean, yes - I can't imagine an app this is good for - please give me an example. I can't see why I'd want something more complex than javascript for navigating websites - javascript is bad enough. I want less of that, not more. I want my middle click to work etc...

gasara 4. June 2007, 23:58

Okay, sure, I'll give you an example: extending a remote application via local, entirely client-run Javascript. Take some site you use like eBay for example, you might write some locally run Javascript in UserJS that tracks auctions for you, remember bids and closing times, what auctions you're watching and other items they're related to, etc. This is just one contrived example, but the same could be done for tracking what music you've requested on an internet radio site, tracking what posts you've read on a forum, etc.

These could be trivial apps in complexity but they require enough storage as to make cookies ineffective: as soon as you've used any of these applications for a few days or a few months, you'll run out of storage and the whole time you'll be spamming eBay with cookies in HTTP headers that they never set.

If eBay themselves was making this application the response from people who view this as unnecessary woudl be clear: store it on the server side, feed it up via XMLHTTPRequest, and so on. In many cases the speed of client-side storage would be better, but you can always just cop the speed and transfer hit and put the data on the server. But in the examples above, when the Javascript client uses a third party program to extend a site, this is not an option: due to cross-site scripting restrictions, you simply need client side storage.

Maybe client-side functionality extensions to third party sites are a fresh industry and you don't use anything like this yet, but increasingly they do exist, and this is one of the major road-blocks they're hitting.

jp10558 5. June 2007, 12:39

I don't see why I'd want this in my browser? There are e-bay tracking tools you can install, and there are other web based sites that do sniping etc...

Do most forums fail to tell you what posts are not read/read? I haven't been on any that don't already do that?

So far, the examples aren't compelling. They sound like things that either are already being done, there is regular software to do it already, or they make me, at least, go huh? Why would I want to do that.

What good would tracking music I've requested do me? Am I somehow limited as to requesting the same song via radio more than once? What does a list of songs (not the music as it's radio, I'm not saving mp3's here) do me? If I've requested them, surely I know what they sound like, I asked to hear them!

I do do some extensions to sites via proxomitron. I add download links to youtube for instance, I inject thumbnails and links to google results. I don't see where any of this needs local storage.

To reiterate, more complex e-bay tracking seems like it exists in various applications you can download - like e-mail, I don't see why I'd want this in my browser.

Getting lists of songs that I knew and liked enough to request on radio seems pointless.

Maybe I'm not web 2.0 enough, but this still looks like a solution in search of a problem that no user I've ever met has, and another privacy and security risk to be dealt with. No thanks.

gasara 5. June 2007, 22:58

So in summary you don't want to use the software therefore the technology that enables the software is pointless. Just because there is some "other way" to do something doesn't mean it's better to do it that way, often cases it's worse. This isn't a solution in search of a problem, it's a real problem for an application I develop that already has users.

jp10558 7. June 2007, 01:00

Ok, I get it's a problem for you. But I question whether it (whatever you're doing) should be done in a web browser vs say a java applet/web start program...

Stefan Schneider-Kennedy 21. June 2007, 13:47

@gasara:
What about the html5 spec I linked to? I agree that it can be a bit inelegant transferring javascript variables between pages at the present, but I think the local storage spec will potenially solve this problem. I realise it's not going to solve your immediate problem, but generally speaking i'd say stick with the standards.

Regarding userjs, again I say wait for html5. In the mean time, there is a nice hack involving storing cookies on invalid domains and cross-domain messaging. This is Opera only, but FF already has the local storage spec, so you could use it for greasemonkey.

For everything else, I at least would prefer a webstart app/widget/desktop application.

Anonymous 3. April 2008, 07:20

Anonymous writes:

I have one little questuion: Have you ever written a JS-code?

Anonymous 14. June 2008, 17:16

Bigyan writes:

Here's an insightful read on Gears,
http://www.washingtonpost.com/wp-dyn/content/article/2008/06/13/AR2008061302657.html

DrLaunch 14. June 2008, 18:18

Time to get fuzzy about Gears again. Opera is going to support it.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies