>> TORI: I am Andraz Tori, Co-Founder and CTO at Zemanta. I've been coding since I was
10 but always did other stuff too including being a TV host on National Television in
Slovenia. Naturally, the show was about consumer electronics. Zemanta is a Slovenian company
trying to change how text is being written on the web, worldwide. We want to make text
editor smart, making them understand what people are writing so that editors can help
us with additional images, links, text, and maybe someday even fact checking.
>> What is your extension about? >> TORI: Our extension makes text editors
of all major blogging platforms better and more interesting. When the extension sees
that you're trying to write a blog post, it extends the editor with additional functionality,
suggesting images, related articles, links, and text you can include in your post.
>> What are the challenges and benefits of embedding your UI on another site?
>> TORI: It's really hard to maintain an extension that integrates with UIs of various blogging
tools keeping compatibility with over 10 rich text editors. In exchange for that effort
on our site, the user gets seamless integration without needing to invoke any special comment,
site, or menu. Zemanta just works and that's how software should be. Chrome makes life
for this kind of extensions easier since the extension API is built on the paradigm that
extensions want to modify web pages and not just sit on the side. Generally, we'd like
to see more web standards that would make extensions like ours easier. For example,
a standard way to extend a rich text editor on the web would be nice.
>> What got you interested in Google Chrome extensions?
>> TORI: Our existing base of users was migrating to Chrome. So we naturally had to follow them.
Our first Chrome extension was developed as an internal company hack day project, in a
single day. The first time we tried developing an extension was in September '09. The documentation
was very sparse. We were wondering in the dark, but the open source nature of Chrome,
allowed us to create a functioning prototype. The second time around, it was one day before
the general availability of extensions in the beta channel. Luckily, with development
based in Slovenia and due to the time zone difference, we were able to get from prototype
to final extension while people here in the U.S. were sleeping and we had it ready by
morning U.S. time. >> How did your vision evolve as you were
working on your extension? >> TORI: We had to make a few compromises
to our extension because of our specific needs. A couple of things come to mind. We could
expose only one function from extension to the widget. We preferred to be able to expose
many of them so we had to reengineer the approach. We used window.name hack for making cross-domain
POST calls. We'd prefer using something non-hackish. Also based on our users' feedback, we changed
the browser action menu to page action with our second release. Toolbar space is precious,
and your extension really has to be used all the time to earn a permanent space there.
>> What did you enjoy the most about writing your extension?
>> TORI: The thing we enjoyed the most was that the extension is very much like creating
a webpage and the compactness of the API is also great. You can include any JavaScript
library you need and don't need to reinvent the wheel. The web-like environment also makes
it easy to include more people in development without having them to all learn a new environment
immediately, even though, it's easy. Also restarting a browser is a web version of compiling.
Not being forced to do so speeds up development immensely.
>> What were some challenges you faced when writing your extension?
>> TORI: Our biggest problem was and still is that our homepage widget needs to communicate
with our extension. But for security reasons, there is no support for that from the extensions
framework. We found a hack that works for now, but we're still looking for a better
way to solve this. Chrome is being developed for many different operating systems but not
with the same speed. So in the early days, it could happen that features described in
the documentation didn't work everywhere or at least not as described. This stopped being
a problem after we realized this and started to expect it. Lately, we don't see it anymore.
>> Was there a particular technical challenge you faced in which you gave an innovative
solution? >> TORI: We are proud of what we did but at
the same time we are building on knowledge freely shared within the web community. Hence,
it feels odd to take credits for it. For example, our widget needs two things, an API key from
our extension and the ability to communicate with our servers. We achieved the first by
using a hack by Aaron Boodman and the second by piggybacking on window.name as first described
by Chris Zipp. We still had to write a bunch of our code and I think we did a good job.
But glorious contribution wasn't really ours. >> What do you think about Google Chrome's
decision to use CSS, HTML and JavaScript as the basis of its extension framework?
>> TORI: Using HTML, JavaScript, and CSS to a variety of extensions lowers the barrier
to entry significantly. Existing skills can be used and even some code can be shared between
browsers. There is no need to hire external specialized developers since companies can
use a lot of internal expertise in standard web technologies.
>> What advice can you give someone before starting to work on a Google Chrome extension?
>> TORI: To start working on a Chrome extension, read the documentation first. Not scan it.
Really read it since it's really concise. It's highly likely that your answer is already
there. You will waste a lot of time, like we did, if you don't follow this simple advice.
>> Were you able to share code with the other browser extensions you released?
>> TORI: We tried to share as much code as possible between Chrome, Firefox, and Internet
Explorer extensions. And even with server site platforms like WordPress, Joomla, Movable
Type, and Drupal. Over the years, we noticed that browsers are becoming more and more compatible
with each other. Unfortunately, we are still far from having full cross-browser extensions.
But one can dream. >> Come meet the Zemanta team at the Google
IO conference.