Skunkworks – Twitter Project – Integration with Mozilla JetPack
Posted by shaun on December 11th, 2009
Overview
This first round of 76design Skunkworks gave us (Jordan Boesch and Shaun Scanlon, both web developers) the opportunity to utilize the Twitter API to create a fun project.
We decided to try to integrate Twitter with Mozilla Jetpack. According to the Jetpack website, Jetpack is “a newly formed experiment in using open Web technologies to enhance the browser, with the goal of allowing anyone who can build a Web site to participate in making the Web a better place to work, communicate and play.”
What this means is that Jetpack is an API which allows the average web developer to develop add-ons for the Mozilla Firefox browser using languages they already use on an every day basis. This was an attractive feature of Jetpack as web developers.
Project Phases
Concept Development / Brainstorm
After some brainstorming we decided to develop an unobtrusive twitter feed add-on in the style of a sports highlight ticker. This was to be a collapsible bar at the bottom of your Firefox browser which could display new tweets and past tweets. The tweets were to scroll in a manner similar to a sports or news ticker.
Design Concept
Jordan applied his design skills to develop a concept in Photoshop.

During this phase we came up with the idea of a news flash for new tweets.
Prototype
The work for this phase was shared between us. It involved taking the Photoshop mockup and converting it to a regular HTML/Javascript/CSS file to be used in a regular browser. We were able to get the basic logic done in creating the prototype.
Jetpack Integration / QA
We found this was the most difficult phase. Jetpack has specific JavaScript hooks that are used to set the status bar icon for the add-on and to handle the initial loading of the JavaScript.
Within the scope/context of Jetpack a few of JavaScript’s default variables (such as “window”) were not accessible so we had to look for alternatives. We also tried to extend the basic functionality of the prototype. The extension of functionality required a lot of additional quality assurance time.
Challenges
- Jetpack development must be tested in the browser
- The Jetpack plugin allows for development of the browser which is great because we can use common web development debugging tools
- All code must be entered within a tiny textarea box on a webpage
- This is very cumbersome because it is next to impossible to read an entire plugin within the box
- We had to essentially work in a separate text editor and copy and paste into the box on the website
- This makes for a frustrating debugging process
- Working on a single JavaScript file in a team environment
- A Jetpack plugin must be self contained within one JavaScript file
- The Jetpack library does allow access to the JQuery JavaScript library which allows for easy manipulation of HTML and CSS
- Even with the ability to use JQuery, this set up does not lend itself well to team development
- The fact that there is no separation of logic and visual layers into separate files makes it very difficult to contribute to the file without conflicting with teammates’ changes
- As well, Images must be hosted on a separate server and linked to from the JavaScript
- This makes for a cumbersome development process
- Jetpack is really only JavaScript-like, it’s not pure JavaScript
- Because of the scope of being within the Jetpack API we found out the hard way that not all of JavaScript’s built in variables (such as the “window” variable) are accessible
- This required us to revamp code to work around these unexpected roadblocks
What is next?
We could:
- Extend the current functionality to finish off the “news flashes” feature.
- Add some more spark to the animation and effects.
- Re-brand this type of concept to be used for client projects. Some clients may be interested in having a Firefox plugin to market their brand.
Conclusion
Jetpack while an excellent concept probably needs some work to allow for easier development. Editing a huge JavaScript file in a small textarea box on a webpage isn’t very realistic.
Other plug-ins, such as those created for Windows Sidebar or Google Desktop, are comprised of several files (similar to regular web development) and are then added to a Zip archive file. This concept is a much more realistic development scenario.
We would not recommend Jetpack development for group projects, but could be useful for single developer projects.








