 Everybody hear me now? Okay. Um, you might have seen on the schedule and that Axel Hecht from Mozilla Corporation was supposed to speak in this slot But two days ago. He almost chopped off his finger. So unfortunately, he hadn't he can't make it So I'm standing in from Axel was originally going to talk about zoo runner So I'm going to take up on that topic a bit of my spell myself. My name is Brian King. I'm an independent consultant I'm one of the volunteers and admins at Mazdev.org, which is a Mozilla community site a free site for hosting Mozilla projects We provide tools for Mozilla developers. I also do some work for Mazdev group, which is a commercial software services company doing Mozilla applications and extensions Okay, let me see. I won't I've had enough technical problems. So I'm not going to fiddle around with anything else This is the unofficial logo for a zoo runner it was created by Ben Smedberg Benjamin Smedberg who's a modular owner and main developer of zoo runner and This is a quote from his blog It says Atlas was condemned to bear the heavens upon his shoulders by Zeus as punishment for leading the Titans in the war against the gods So he thought this was an apt analogy For a bootstrap application like zoo runner to hold up Firefox and other Mozilla products Would you agree with that or not? I don't know. Okay, what is zoo runner? The bootstrap's xp common zoo applications. It's a gecko runtime environment Sure, you want to know what gecko is at this stage gecko is the main rendering engine of the Mozilla platform What do you get with it? You get customizable executables icons profile You get your own profile process space Etc. It uses the latest toolkit So the the old Mozilla suite toolkit is now more or less obsolete It's still being used by the sea monkey project But most of the products have moved to the Firefox Thunderbird Sunbird toolkit It's still in development It has just been the first developer release based on the one-point-a-trunk of Mozilla You can download it today. It's maturing all the time Where can you get it? You can get binaries to two bills of binaries two types the one-point-a-trunk that I just mentioned at this URL If you don't feel like writing that down my slides will be available later You can just email me or you'll find it on my blog And if you want to live on the edge you can download nightly bills just like all of Mozilla projects Nightly bills are available You want to be a bit more adventurous if you want to tinker around with it If you want to contribute submit bugs submit patches you can build your own version of Zoolerunner It's a standard Mozilla build environment. I won't go into that here Downloaded from CVS the instructions are on developer.mozilla.org Be sure when you're checking it out To use the Moz CO project flag and specify the Zoolerunner project If you were checking out Firefox you would use browser if you were checking out Thunderbird you would use mail You can check out multiple Projects by just comma separating them. So if you want to If you already have a Firefox build tree and you want to add in Zoolerunner to it just do browser comma Zoolerunner You can't see it here You see if I can make this smaller for a moment Okay, just down to there you see In your Moz config file Before you build sure that option is in there The default config build config file is in the tree in Zoolerunner config directory You can add other configuration options if you want to build extensions If you want to build modules that aren't standard, etc. But just make sure that that particular Setting is in your config file. So how do you what is the structure of the Zoolerunner application? What exactly is it? What's the directory structure? What are the files, etc? It's flexible up to a point But this is this is a typical structure. I'll show you the directory structure in a minute to make it clearer But these are the things that you need the pieces that you need the application dot any file This is the I have an asterisk there because it's the only part that's compulsory This is the method data file that tells vendor name version app name, etc. I'll show you what it looks like in a minute Theoretically an application can chip without any of all the other ones you can have only components in your application You can have only chrome in your application You could take theoretically could only have preferences to what it wouldn't do much you can have other miscellaneous files Many Firefox extensions for example only ship chrome. This is the front-end CSS files JavaScript files Zool and Xpl files Components that goes would wear that would be where X become components would live So if you if you're familiar with Firefox extensions with the Mozilla Chrome structure, and this is not new to you, so Here's the here's the just The actual directory structure The application in the file that I mentioned chrome manifest file. I'll show you what that looks like Chrome components, so they're all on the same level in the tree if you remember back in the good old days The chrome manifest file for Mozilla application or for Mozilla Chrome was an or the F file And it was a little bit abstract, you know, you had to learn How to map your Chrome directories to use Chrome URLs internally in your extension, etc. It's a little bit more simpler now It's just a flat file called chrome dot manifest And You have three flags content locale and skin Marup is just a name of an extension that I'm working on So whatever your package name is that your files are bundled in the XPI file that is you would put there Where your content files are the content files are your Zool files your Xpl files and your JavaScript files typically So here I'm using a jar URL You're telling the Chrome registry to look for your content files in the jar file Marup dot jar in the content directory within that jar file Similarly for locale you specify a new E and us locale you can have multiple locale bundle with your extension Once you have multiple entries in this chrome manifest and the skin directory There you have the skin name identifier and where to find the skin files This is CSS files and images create the application.ini file your Zool runner application will not work if it doesn't find this file It's very simple Underneath the app heading there you have vendor so you put your company name for example Name for some reason. I don't know filled in there. That would be the name of your application What version it is build ID. There's no guidelines for what that should look like you can have any build ID Copyright etc. And then the bottom there. You'll see under the gecko heading min version and max version You should be careful of this because if you only want to target your application for trunk builds of Zool runner You would have min version of 1.9 If you wanted it to be compatible with just the 1.8 version of build runner You would have the max version of 1.8. So just be careful with versions at the moment They're the only two real versions. There are at the moment 1.8 is the 1.8 Mozilla branch and 1.9 is the trunk of Mozilla. Okay, so You've downloaded Zool runner. I'll talk about the deployment at the moment, but I just want to look inside The internals a little bit more for the moment. How does Zool runner know which window to start? How does it know how to bootstrap your application where to look for it? Well, I mentioned earlier in the structure in the defaults directory and in the preferences directory you put a Preferences file in there. This is just a .js file. It's the same structure as firefox preferences Thunderbird preferences if you go into your user profile in firefox you will see a prefs.js file If you look inside there, you will see the structure. So it's just pref the name of the pref and the value Okay, so the important pref here is toolkit default chrome URI This This tells Zool runner that they should load this file here first maru.zool We talked about chrome URLs a little bit earlier when I said that You use chrome.manifest to map directories within your jar file or within your application structure To particular chrome URLs that the application can understand to find files Do you want to allow multiple instances of your application to run? You can turn it on and off via this preference here toolkit single window type So if you leave that out multiple instances will be allowed. Okay, so we're still setting up The setup phase Registering Zool runner. So you've downloaded it. You've unpacked it. It's sitting somewhere in your hard disk You go to the Zool runner directory and you run this command here Zool runner register global So this registers it on your system if you only want to register for a particular user and not for all users You just use register user instead Okay I'm what does that do? It it writes to ETC This file here G or a dot D on Linux and it writes to the windows registry and windows I don't quite know what it does on Mac The question so far as clear as mud Okay, I was going to leave that to the end actually and this is just more like an introduction getting your Zool applications running You've only got 15 minutes. It's well, you'll see in a minute Yeah, okay. Well, yeah, perhaps I should have reversed things I was going to do demos and explain a bit more just bear with me for a minute. Okay, so You want to deploy your application? Download at Zool runner and you have your application the two things are quite separate. Okay, you've got you want to deploy it now It's at the moment. It's not quite sophisticated. It's very very cludgy For Firefox at the moment you can download an installer on Windows and download on Mac An archive and you on the Linux as well and it just Installs for you there's an installer on Linux too, but it's not quite so easy on For zoo runner at the moment to get things set up you can directly launch it from a flat chrome structure You can use the install app command and you can bundle Zool roller with your application in some sort of I don't know compressed archive and they can download everything together the user. I'll explain those just a little bit more Launch is from a flat file structure. That's if you don't put your chrome files in a jar file You just have the raw directories on disk It's useful for developing and testing. It's probably not useful for production deployment of Zool runner applications at the moment It's probably better to use jar files, especially if you've got larger applications So how do what do you do? You run the command? Here's the command here Zool runner And then you point it just to the application that any file and that will launch your application Okay, the install app command This is the command you run here Zool runner minus install app and then the path and not your application dot any but to your XBI file Typically applications are distributed as XBI files like Firefox extensions, but they can also be zip files. You can they can have any One sort of right format they can have any extension Zool runner would recognize them There's the same command for Mac and for Windows Also on that slide you'll notice. What does that command do? This installs the application it impacts it and then installs it to these locations So on Linux it's userlib vendor and name. You'll remember those values from a few slides back the application dot any file when you put your Vendor and your application name in that file. This is this is where you need them for installation Or you can bundle your own Zool runner Have your own installer. It can be a native platform installer. It can be just a compressed archive It has the Zool runner files and your application all together. It can be commercial our custom installer So an archive and free OS There is no Zool runner installer at the moment Maybe if you if you built your own Zool runner from source and you had to make core changes You have to give put patches to it to make your application to work or if you're bundling other libraries Third-party libraries with your application. This is probably a useful route to take Anybody heard of the songbird media player? I'll show you that in a minute. This bundles its own Zool runner at the moment, so You're wondering this is a Mozilla application and you can What can it do? What modules in the Mozilla tree? What functionality does it have? Well Zool runner ships with most of the standard gecko features xp-com networking Rendering engine you'll get Zool SVG XSLT xml extras etc history accessibility You get some UI features You get the extension manager fine tool bar, etc Obviously you won't probably might need all these things in your application, but some of them you might It has embedding API is cross-platform embedding to ixp-com These aren't all complete at the moment some of them are still the integration is still being worked on GTK Moz embed, which is a Linux only embedding API Maybe will be shipped The list isn't complete LDAP might be there spell checking might be there profile roaming Definites that are not shipped bookmarks and history UI x-forms you can get that as an extension and I put the kitchen sink in there because There are just some things that there are just some limitations of the Mozilla code base Which if you've ever used that you're probably aware of now You might have to use third your own libraries third-party libraries that you can either write an xp-com wrapper around it to interface into it or You can dynamically link to it or some other way. Okay So sorry if that seemed a bit extract. It was a good suggestion there by This gentleman here that I should have done things a little bit Backwards I should have told you a bit more what's over in a while showed you what it looks like what applications it runs But I'll get I'm getting to that now. Basically zoo runner enables the Mozilla platform Now many people know Mozilla as just a browser. It's just a male client You've got chatzilla as well. You've got other products. You've got calendaring but For many years now Nearly since The Mozilla project was founded Especially third-party developers have been taking the code base and doing imaginative things with it They've been building many many different types of applications with it. It's current incarnation is extensions Firefox and Thunderbird extensions there are some fabulous extensions out there that do lots of different things But this is the next step to enable the Mozilla platform Each application has its own user profile that runs in its own process space So if you want to have a complex extension and you don't you don't want to interfere with the browser if your extension freezes up Well, then the browser is gone too, right? If it crashes Firefox crashes, okay, so This is this is very useful it ensures peaceful coexistence of multiple Mozilla applications on your machine It enables the Mozilla platform. It's not all fun The Mozilla code base is very large and there's a perceived high barrier of entry a large and daunting code base this first documentation a Lot of people have been lamenting about this for many many years. It was very very hard to find developer information for Mozilla Now there is the the portal developer dot Mozilla dot org and this is Every every day there's new content going on there and it's getting much much better. That should be your first stop for developers I Won't say there's no tools because there are these things like the JavaScript console the DOM inspector, etc But there's no really integrated development environment. You have to patch things together to get a development environment To write the actual code itself. You just use your favorite text editor There are sketchy supports in some areas For example some web services soap is quite buggy And if you're if you're building an application and there's bugs You file them in bugzilla They don't really get as much attention as the browser or mail bugs which is understandable Because Mozilla corporation Mozilla foundation. They're not focusing on the platform like right now. It's not their number one goal They want Firefox to get more market share They want the broader user base with on the bird they're focusing on their core products What other people do with the code is up to them? They will help out when they can they will fix bugs They will answer your emails. They will go on IRC and chat with you the developers But if there's books to be fixed Probably better to write patches yourself and even when you do write patches To get them actually reviewed and into the tree. That's even more difficult in many respects But it's not all bad news. There are many advantages of the Mozilla platform over other platforms if we I'm not even going to try and compare it to Java platform or GDK Qt or I'm not going to compare it to Windows or Visual Studio because each has its own strengths and weaknesses But I will say this about the Mozilla platform Quick prototyping Zool Xpl. They're simple XML markup. We're all familiar with markup. We can You know once you know which widgets to use you can prototype very fast If you have a pet project that you want your boss to fund you want to spend more time on you can just spend an hour Making a nice user interface hooking up a few functions bring it to your boss and say hey isn't this great Within the Chrome structure itself, it's got great separation of content style and functionality So you can have multiple developers working on the project All doing different things and you can put it all together very easily Standard support Mozilla is very proud of its standard support and rightly so It contributes to standards it adopts standards. It's very strong in some areas What do you have access to with the Mozilla platform? There's over 2,000 xp-com interfaces File IO interfaces network interfaces web services security Anything to the web browser need anything that a male client need you have access to all this functionality It's all built in Yes, there are things that your application might need to do that you'll have to write yourself write your own xp-com components But I know If any of you were in the Mozilla developer room the last couple of days you would have seen a lot of great applications That are just written in in Zool Xpl and JavaScript You don't even need to interface with the xp-com components Okay, I mentioned the lack of an IDE but there are there is a growing tool set Boogzilla Alex or is the This is where you can view the Mozilla source code online and a DOM inspector JavaScript debugger and there's multiple Development tools on Mozdev.org and down at the bottom. I have written you can't see it an active and helpful developer community There's a new extension for Firefox called all peers and earlier today Matthew Gertner the one of the developers of all peers He said this was the best resource He started writing his Mozilla extension With no knowledge of Mozilla and he said he was stuck for two months until he went on IRC and talk to developers directly So maybe that's the best route Very very helpful. Okay so What's the next logical step to the Mozilla platform and then the Mozilla desktop? We already have it in many many respects. These are just some applications written on top of Mozilla N view HTML editor Got Thunderbird Firefox Mozilla calendar, this is the songbird media player But of those applications only one of them is written on top of Zool runner at the moment That's songbird I predict in a year that all of these applications will be running on top of Zool runner You will have one Zool runner on your machine and you will download Smaller application bundles for each of these applications The that's in the roadmap now on for Mozilla they want to port Firefox to Zool runner They want to port Thunderbird to Zool runner and if you're working on If you're working on multiple plans, so you spend 50% of your time on Linux and 50 on Windows like I do You can recreate the same desktop in the same environment very easily You can work with all the tools I Spend most of my day between browser and mail client and text editor. That's all I this three applications I have open most of the day my code editor and You can relate it very easily on the three platforms because Mozilla is cross-platform as you know But applications are currently running on Zool runner songbird. I mentioned chatzilla Zap this was a previewed in the Mozilla developer room earlier today Alex Fritze Is writing a completely open standard sip client on top of Zool runner? very very impressive stuff and There's many many more that we probably don't know about I've had a few emails from people who said they're writing Zool runner applications But they didn't quite tell me what they were some are in production some are Not quite sure if any are used our mission critical applications at this point, but It's getting to the point where it can be used for those type of applications. There are other traditional Mozilla applications I mentioned Firefox and Thunderbird in view Komodo Komodo is the scripting language ID that's Four or five years old now. That's not running on Zool runner yet As I mentioned porting these to Zool runner is on the roadmap for Mozilla products Might be trickier for other products depending on their needs So Zool runner If you have a Mozilla application right now Don't just say oh great here's Zool runner. I'll move it over. There are a lot of porting issues Not just even when you move from one version of the Mozilla code base to another There's a lot of porting APIs are not frozen yet Chrome restructuring Many incompatibilities. So if you want to consider to move to Zool runner do a bit of research first Do some prototyping do some testing So we're ready goals for Zool runner Stabilize the API's so between versions your application doesn't break Have an installer for it. We need more developer tools Anybody wants to donate pots of money to somebody to create a brilliant IDE from Mozilla development We will happily take your money Versioning system. This is something that's still being worked on. It's kind of tricky If you have your Zool runner application that only works on 1.8 and then somebody downloads an application that only works on 1.9 What happens? Does the person upgrade and your extension breaks and doesn't work? Do you have two versions running on your machine? This sort of thing these sort of issues haven't been resolved yet I'll hold off with questions for the moment because I want to give you a little demo. Okay, so Can't see that very well. Okay, so this is Let me see what we have in here. So here I've downloaded the Zool runner 1.8 binary and I've installed it here Okay Just there. Here's a quick peek of what's inside Okay, I have some of your standard the Zool runner libraries You have your Chrome directory your components directory, but don't miss for the chrome and components of Of your application. This is the Zool runner Chrome and the Zool runner components. Okay If you're from it looks very similar to what's inside the Firefox install directory for example, okay, so I Have a modified chat as chatzilla xpi that runs on Zool runner, so I'm going to install it now and we'll see what happens Okay So you remember we talked about install app. So you have your so there's the chatzilla xpi So I'm just gonna install it. So as I said, it's very primitive. You've no fancy Dialog box that pops up and said, oh, would you like to install this application? Here's a shiny icon Oh, you have a chance to cancel etc. No, I don't want to install it. There's no feedback at all There's absolutely no feedback. It's all command driven. It's most people in this room are very Familiar with installing applications from the from the shell, but many users are not It needs to be prettied up a little bit. It needs a UI, etc So I have to install the app. So can anybody remember where the install app Installs it exactly Okay, so let's go there. Okay The vendor name I just called it Zool runner tests for now There we go. And the product name is chatzilla So what it did is it extracted the files from chatzilla xpi and it slotted them in here Let's see what is slotted in so there's your application.ini that we talked about Actually don't know what's in the chatzilla directory is your Chrome and your components and your defaults actually Chapsilla is the launcher. So before if you've ever used chatzilla It was either part of the Mozilla application suite or it was a Firefox extension So it relied on other applications to run This is a standalone application. This is a standalone Zool runner Okay so it's running in its own process and We talked about profiles and preferences. Where does the profile and preferences go? Whatever you have your user directory set up and logged in is rude at the moment. So So there we are it uses the vendor name for your profile directory And inside you have your application name So this looks very similar to a Typical Mozilla profile What you've got inside? Okay, got your extensions directory. So if your application has an extension system That's where they would be installed per user prefs.js file firefox in the location bar if you Type about config you can have access to the preferences via there Or you can directly edit the prefs file So there you are you have your own user profile Somebody blows away their firefox profile at a Mozilla profile. They'd also blow away Your preferences your settings Your extensions when in this system you have your own it's independent. Okay. I'll just One more application Okay, this is a little extension that I originally wrote for firefox It's called a morella uploader and it's a picture uploader for a picture hosting site It's specifically uses their API, but I was thinking of porting it to other public sites like Flickr to make it more useful And more accessible. It's it's only it's a Slovenian language site So I just installed the app there let's go to Yeah, I forgot the vendor name for this application. That's great Okay, I'm running out of time and I don't want to waste your time. I Won't am I that application, but you've got the general idea of all the power of Mozilla to create your own applications Does anybody have any questions that will firefox 2.0 be a zulu runner application? I think the goal is is within one year for it to be so firefox 2.0 comes out before one year It might not be I don't quite know 2.0 will make it probably not because there's a lot of work to be done What are these a user interface for example an installer? Yeah Question was do you need to write all your applications in JavaScript? No the Mozilla code base the components are written in C++ And you can write C++ components in your application There's pyx.com as well. You can write Python components, but it's a bit trickier to hook that up the Theoretically the xp.com architecture is language agnostic. You can hook in any compile language But there's only bindings currently for Python and for C++ Yes, another question up here. Could you just be quiet for a moment, please? Sorry Say that again Yeah Yeah, it took five seconds to start because it was the first time that the application was run It was loading all the xp.com components. It was creating the profile and subsequent startups. It would be about one second So it's animals in the application even firefox the first time you run it. It takes longer because it's registering all the components And whatever the minimum requirements are for firefox that we should be the minimum requirements for a zoo runner application to Or if you've added added extra features, it might be more. I think it's 512 megabytes of RAM. I Don't know about hard disk space or processor speed Any more questions you don't have any guarantees right now I mentioned that if you are upgrading to a different version put aside a bit of time first Because there will be a longer the time period since you've upgraded The more likely it will be broken But as it comes closer to release time full release public release things will stabilize a bit more It's still in developer stages