This weekend I spent some time playing around with the Google Chrome Extensions API (aka plugin API). I've been kicking some ideas around for a browser plugin, and I thought I would take a look to see how hard it would be to write a Chrome extension. I took a look at developing a Firefox plugin before, but the (apparently) steep learning curve caused me to turn my attention elsewhere.
Getting Started
The documentation for the Extensions API is very well written and well organized. They even have some good tutorial videos to explain some of the more complex parts.
It's really easy to start creating a plugin (hello world!). A minimal plugin requires only a directory containing three files: a simple manifest file in JSON format, an HTML page containing the plugin code, and an icon file. The exploded plugin directory can be loaded/reloaded directly from the Chrome extensions tab, and Chrome even has a built-in tool for signing and packaging the plugin.
APIs and development
Developing a Chrome extension is pretty straightforward; everything is written in HTML and JavaScript, just like an Ajax application. There's no XML configuration to mess around with like with Firefox. The manifest file contains metadata about the plugin; it tells Chrome what kind of plugin you have (there are several different types), lists the plugin's files, and also specifies the "permissions" needed for accessing remote sites via XHR. The plugin code itself is contained in one or more HTML files, and a special non-visible "background" page optionally maintains global (to the plugin) application data. Using callback functions, plugins can listen on various browser events (e.g. tab opening/closing, window focus). Plugins can also manipulate the browser directly; they can manipulate windows and tabs and can of course modify the DOM of loaded pages. There's too much functionality to describe here; the documentation can be found at the Google Chrome Extensions developer site.
Unfortunately, the APIs are still under heavy development and aren't as fully featured as in Firefox. The extension API doesn't have anything like XUL (in Firefox) where you can create native-looking GUI components like dialogs, so developers will have to develop RIA-style interfaces using JavaScript instead of developing interfaces that look and feel like actual UI components that are part of the browser.
Batteries Included
Since Chrome is built on top of WebKit, it includes the same suite of powerful developer tools already available in Safari. This includes a DOM inspector/editor, a JavaScript interactive console, and a JavaScript debugger. There is also a Storage Browser for browsing the embedded HTML 5 database (sqlite) and browser cookies and running SQL queries. There are also some nice tools for optimizing performance like a CPU and memory profiler. All these tools are integrated directly into the browser and don't require any additional setup.
Coming from a Java background, I'm pretty impressed by the easy availability and polish of these tools. In the Java world you need a full-blown IDE to get tools like this, and even then they don't always play nice together or are not that easy to get running. Of course they're not as sophisticated, but it's nice that these are available in every browser without having to tinker around with configurations or install any additional plugins. The polished look and feel of the tools probably comes from the influence of the Apple developers who originally created WebKit (from Konqueror).
The future
It's not clear to me how far authors of the API plan to go in supporting more hooks for interacting with the browser and creating native UI components, since Chrome by nature is fairly streamlined. It would be useful to open up more parts of the browser to the extension API, because otherwise people will have to resort to all kinds of JavaScript tricks and workarounds in order to implement common functionality. Judging by the number of plugins already in the Extension Gallery, it looks like the Chrome extension API has a pretty bright future.
well, looks pretty good, Come on Ken.
Posted by: Ice He | March 14, 2010 at 02:50 PM
One of the best ways to make a good first impression is to quell any .
welcome to attend ous!
http://www.yaahshoes.com/
Posted by: New Balance Shoes | August 03, 2010 at 04:09 AM
Thanks for sharing,Join us to start sharing your reviews, This is a news about air jordan
shoes, I want to recommend -- (http://www.bigtimekicks.com) this community here for everybody to use! I am a Air Jordan
fans,love to collect all kind of retro jordan shoes.
Posted by: air jordan shoes | August 09, 2010 at 05:38 AM
Thanks for sharing,Join us to start sharing your reviews, This is a news about air jordan
shoes, I want to recommend -- (http://www.bigtimekicks.com) this community here for everybody to use! I am a Air Jordan
fans,love to collect all kind of retro jordan shoes.
Posted by: air jordan shoes | August 09, 2010 at 05:38 AM
This is a good article, I like it very much
Posted by: michael jordan shoes | August 14, 2010 at 06:25 AM
Last winter UGG Classic Cardy Boots were the most popular sheepskin boots.The color and the design were really well, giving a very natural earthy appearance. In paticular,for this reason Chocolate color cold weather boots have become popular once more, I expect they will be very fashionable for quite some time to come.Just as the UGG Crochet Boots,be sure will be the next miracle in boots market.
http://www.emubootsoutlet.com
http://www.ukemuboots.com
http://www.emusheepskinbootsale.com
http://www.coachbagsoutlet.org
http://www.shoesonlinestores.org
Posted by: emu boots | October 25, 2010 at 04:49 AM
Interesting post!!! Hey Jackman, I don’t think you should give up your dancing dreams. Nothing happens, everything happens today and you need not to sacrifice anymore…
Posted by: Impotence causes | November 02, 2010 at 04:01 PM
"it looks like the Chrome extension API has a pretty bright future." I agree with you.
Posted by: Apple iBook Batteries | November 05, 2010 at 02:50 AM
If you attend a church meeting without fear of harassment, arrest, torture, or death, you are more blessed than almost three billion people in the world.
Posted by: Air Jordan 7 | November 08, 2010 at 02:42 AM
different types), lists the plugin's files, and also specifies the "permissions" needed for accessing remote sites via XHR. The plugin code itself is contained in one or more HTML files, and a special non-visible "background" page optionally maintains global (to the plugin) application data. Using callback functions, plugins can listen on various browser events (e.g. tab opening/closing, window focus). Plugins can also manipulate the browser directly; they can manipulate windows and tabs and can of course modify the DOM of loaded pages. There's too much functionality to describe here; the documentation can be found at the Google Chrome Extensions developer site.
Posted by: Shox R6 Shoes | November 12, 2010 at 03:08 AM
have (there are several different types), lists the plugin's files, and also specifies the "permissions" needed for accessing remote sites via XHR. The plugin code itself is contained in one or more HTML files, and a special non-visible "background" page optionally maintains global (to the plugin) application data. Using callback functions, plugins can listen on various browser events (e.g. tab opening
Posted by: Shox R6 Shoes | November 13, 2010 at 01:51 AM
Thank you for sharing!
http://www.emubootsmall.com
http:///.mbtshop.us
Posted by: lisa | November 13, 2010 at 02:00 AM
Knowledge is important for us!
Posted by: taobao agent | November 14, 2010 at 09:04 PM
i agree with you , good artcile here. we should paid more attention of this news
http://www.mbt-shoe.us http://www.emubootsonsale.com good for human healthy,up to 40% off
Posted by: tina | November 16, 2010 at 05:00 AM
There are also some nice tools for optimizing performance like a CPU and memory profiler.
Posted by: ClubPenguinCheats | March 23, 2011 at 10:11 PM
Hola,Ha hecho un trabajo muy bueno. Hay muchas personas en busca de eso ahora van a encontrar suficientes fuentes por tus consejos.espera para obtener más consejos acerca de que
Posted by: Generic Cialis | March 24, 2011 at 05:04 AM
Your article looks good, I like bits and pieces of daily life, like a movie.
Posted by: Nike Shox | April 07, 2011 at 09:57 PM
I've been kicking some ideas around for a browser plugin, and I thought I would take a look to see how hard it would be to write a Chrome extension. I took a look at developing a Firefox plugin before, but the (apparently) steep learning curve caused me to turn my attention elsewhere.
Posted by: cheap supra shoes | April 21, 2011 at 03:24 AM
Skönt att vara besöka din blogg igen, har det varit månader för mig. Väl här artikeln som jag har väntat så länge. Jag behöver den här artikeln för att slutföra mitt uppdrag i kollegiet, och den har samma tema med din artikel. Tack, bra aktie.@!@!
Posted by: Generic Viagra | April 23, 2011 at 08:56 AM
For years I thought what was good for our country was good for General Motors, and vice versa
Posted by: Fuchsia crazy lace agate | April 29, 2011 at 05:49 AM
Personally speaking, I seldom use Google Chrome.
Posted by: keylogger for Mac | May 20, 2011 at 02:56 AM
Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!..
Posted by: Careprost | June 06, 2011 at 08:28 AM
Is est vere interesting, tristique eget nulla ipsum. Lorem ipsum dolor sit amet quaeris ultra victum et tuos contulit vester iste stipes. Sed facilisis mi in amicabiliter networks dedi!
Posted by: Ranozex | June 20, 2011 at 06:58 AM
Grande informazione, hai un blog meraviglioso e un ottimo articolo!
Posted by: Generic Viagra | July 11, 2011 at 06:51 AM
It's so nice to have you do all of the research for us. It makes our decision making so much easier!! Thanks.
Posted by: MBT Shoes | July 16, 2011 at 03:51 AM