Martin Heller
Contributing Writer

Google Gears: Standing the Smart Client on its Head

analysis
Jun 6, 20072 mins

You may have noticed by now that I'm not the go to guy for breaking news; I'm more the guy who takes it apart and figures out what what it means for developers. Even if I wasn't crazy busy last week when Google Gears was announced, and then away for a long weekend for my college reunion, it still would have taken me awhile to explore it enough to talk about it. I see Google Gears as a Smart Client stoo

I see Google Gears as a Smart Client stood on its head. What Microsoft calls a Smart Client is basically a desktop Windows application designed for intermittent connectivity to a server. Google Gears is basically a browser application designed for intermittent connectivity to a server. In both cases, you get full functionality when you’re connected, and may have reduced functionality when you’re disconnected. A Smart Client application is likely to have a richer interface and better performance than a Google Gears application, but it’s also likely to require more work to develop the Smart Client.

Google Gears is implemented as a browser add-on for Windows and Macintosh computers. In Internet Explorer, it installs as an ActiveX control, a Browser Helper Object (BHO), and a Browser Extension. In Firefox, it installs as a Firefox extension. It displays a menu item for settings in both browsers.

Gears has three major modules that you can call from JavaScript: LocalServer, Database, and WorkerPool. LocalServer gives you a local cache for resources that you’d otherwise serve from the Internet. Database gives you a local instance of SQLite with a full-text search extension. WorkerPool lets you run JavaScript in a separate worker process so that it doesn’t block the UI. A fourth module, the Factory, is used to instantiate all the other Google Gears objects.

Now, if you’re the sort of person who thinks that ActiveX controls, Java applets, and other forms of “mobile code” are a security risk, then you should avoid Google Gears as well: it’s just another ActiveX control and BHO. There is a certain amount of protection built into the system: for example, Gears does ask for opt-in permission before it lets a site write to your local hard disk. It also implements a same origin policy. But it can’t possibly have industrial-strength security, and I suspect that you shouldn’t use it for sensitive information without additional defensive layers of security.

The bottom line: Google Gears looks like a reasonable way for a developer to turn a pure Web application into a browser application that can also run disconnected from the Web. It’s clearly at a beta level, but in my brief examination it seems to be fairly solid.

Martin Heller

Martin Heller is a contributing writer at InfoWorld. Formerly a web and Windows programming consultant, he developed databases, software, and websites from his office in Andover, Massachusetts, from 1986 to 2010. From 2010 to August of 2012, Martin was vice president of technology and education at Alpha Software. From March 2013 to January 2014, he was chairman of Tubifi, maker of a cloud-based video editor, having previously served as CEO.

Martin is the author or co-author of nearly a dozen PC software packages and half a dozen Web applications. He is also the author of several books on Windows programming. As a consultant, Martin has worked with companies of all sizes to design, develop, improve, and/or debug Windows, web, and database applications, and has performed strategic business consulting for high-tech corporations ranging from tiny to Fortune 100 and from local to multinational.

Martin’s specialties include programming languages C++, Python, C#, JavaScript, and SQL, and databases PostgreSQL, MySQL, Microsoft SQL Server, Oracle Database, Google Cloud Spanner, CockroachDB, MongoDB, Cassandra, and Couchbase. He writes about software development, data management, analytics, AI, and machine learning, contributing technology analyses, explainers, how-to articles, and hands-on reviews of software development tools, data platforms, AI models, machine learning libraries, and much more.

More from this author