What's with all the fuss over Google Gears?
Saturday, 2. June 2007, 19:41:14
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.







DrLaunch # 2. June 2007, 22:29
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
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
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:
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
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
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
'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
Jani # 4. June 2007, 18:36
Originally posted by jp10558:
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:
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
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
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
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
jp10558 # 7. June 2007, 01:00
Stefan Schneider-Kennedy # 21. June 2007, 13:47
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
I have one little questuion: Have you ever written a JS-code?
Anonymous # 14. June 2008, 17:16
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