Education/Projects/JetpackforLearning/DesignCamp/Agenda/JetpackDevProcess

From MozillaWiki
Jump to: navigation, search

Dev Process/ Best Practices

-Tools: Textmate, firebug, jslint (proactively check syntax), Venkman (JS debugger works somewhat with addons)


-No way to step through code of Jetpack with firebug (would be nice)


-When to best use console.log: if you’re doing a request and want to check the response or an error catch. Passing data to an object and not getting right behavior. Check value of variables. Be careful for over use, it can slow down your code.


-What’s the right IDE: personal preference. Komodo does object inspection and intellisense som. Flight Deck –web editor based on Bespin for future Jetpack SDK. No tools based on current add-ons because of no official Mozilla support. Jetpacks are seen as an opportunity to make that change.


-General process: Edit, save, refresh, reload.


Scopes: Global Jetpack scope, and then for each of the objects

onReady will be run for every new window- statusbar, slidebar are both new

(Looking to change this for new SDK)

Global scope: Objects and fxs only run when you call them. Outside, in the global namespace is run once. App startup and window load can be used to delay code for when everything is ready.

There seems to be no space to put code that runs with the Jetpack is all ready and the browser is available. Only place right now is in statusbar onReady.


Addons: to prevent clashes with fx names in the global namespace, Mozilla made an effort to avoid use of global namespace. Everything needs to be wrapped. Jetpack doesn’t have this problem because each Jetpack has its own namespace – sandboxed.


Speed optimization techniques-

Use dataurls to ‘cache’ images within the jetpack.

Will be a way to package images in the XPI.

Is there a way to check loading progress? Yes. Xml http request (XHOR) has progress feedback.

Hacks.mozilla.org ß hacks with canvas, geolocation, video. Tips and tricks.


Mozmill- new QA/user testing solution within Mozilla adding support for addons. Would be useful for Jetpacks as well.


If you are adding your Jetpack to the gallery don’t use the built-in editor (it will mess your sh*t up). Use the upload.