Cesar’s Vanilla Blog

White and creamy wtf

A MAR generator, release

I have received some comments on the MAR component patch. Most of it regarding a Interface change, which I am not prepared to do at the moment. There is also a bzip2 issue that still needs to be addressed.

So while wondering how to get that issue resolved, I decided to create a small (a little on the ugly side) XUL app that will generate a complete MAR file that is compatible (I believe that to be true right now, unless I overlooked something) with the Mozilla update system. That is, files are bzip2’d before being put inside the archive.

I haven’t done extensive testing yet. Though, its simple enough that it probably won’t break on you.

There are known issues with it right now that will be fixed with time :

  • Its not localized yet, as I hardcoded all the messages.
  • It’s one xul file with js in it, so the project still needs to be structured properly.
  • One thing you may have to change is the location of the bzip2 utility. Until the bzip2 issue is resolved, the xulapp calls an outside process to handle the compression. The default is /bin/bzip2. If your system has it in a different location, you will need set the appropriate setting in defaults/preferences/prefs.js (there are only two setting at the moment).
  • I don’t know how to properly use threads, from JS. I can’t create JS threads, and settimeout() won’t work for what I need to do.
    Until that is resolved, the xul window will appear to freeze until the MAR file has been created. This is normal.
  • Needs some documentation. But at this point, you can probably figure it out.
  • The MAR file should be created in a temporary environment. After you copied the mar file, feel free to delete the remaining files. You can’t specify where to save yet
  • It will recurse and copy all files from the root directory and above. There is no way to select certain files, yet.
  • You cannot extract MAR files yet.

If your feeling brave or just interested. You can grab a linux build

MAR_generator.tar.bz2 – version 0.1

Windows and MAC builds too someday. Hopefully soon! *hint hint, nudge nudge*

Advertisements

July 30, 2007 Posted by | Mozilla, Seneca | Leave a comment

A long overdue update

Just because I haven’t blogged in a while, doesn’t mean nothing has been going on. Hopefully, blogging isn’t any indication of how much work your doing (in fact, the people that tend to get the most done tend to blog the least!).

Personally, I’ve been keeping busy. I set up a Picasa photo album on Google (only 1 gig of space?) and put up a bunch of photos of all the interesting things I have done.

Professionally (yay), I’ve been working on creating a MAR component as a first step towards hopefully making it easier for xulapp developers to easily update their xulapps. It won’t get into the tree (as it probably shouldn’t), but there are several xul applications out there that don’t have the ability to update to the next version without completely reinstalling the application.

Of course, my work doesn’t solve the problem completely. There is still the question of developers uploading MARs and the infrastructure in place for users to get them (aus3 anyone?).

One step at a time.

July 24, 2007 Posted by | Mozilla, Seneca | Leave a comment

Thoughts on Javascript

In one of my courses at school, I had to do a project that involved a ton of web work. I have done enough web work before, using php/perl/asp, and I even had a course that explained a bit of javascript. After going through that, I came to the conclusion that php/asp are here to stay and perl/javascript are going to die soon enough (in fact, I was with two profs when they were talking about organizing one of the other diploma programs. They were thinking of replacing a perl course with python. AFAIK, they haven’t done it yet).

Right now, of course, I’m nose deep in javascript, and with that exposure I am beginning to think about it in a whole different way.

When I did server-side programming, I never thought of actually incorporating javascript into the application for anything else other than simple validation. That was what I was taught, do client side validation using javascript … then do it again on the server side in case they turned javascript off or something.

With such redundancy, it wasn’t even worth the effort, other than saving a call back to the server. Coming into Mozilla, I never understood the attraction to the language. It’s too simple, ugly, confusing, and just.. well, going back to the punch card. It seemed obsolete, and I wondered how far this joke of improving the language was going to last.

Then again, I was (and still am) completely ignorant about AJAX and the power of the language. The most exposure to AJAX I got pre-mozilla was when we incorporated a calendar and ajax popup into a web page. And that was so far off from client validation, that I didn’t even think of it as javascript.

With new libraries coming out like FUEL and jQuery, it seems worth it to take another look. Especially once you realized that javascript, and the Mozilla Platform has been even been used in some complex applications.

One of my favorite demos yet, and something that I was trying to reproduce is the image gallery javascript demo. I started a subproject (called photowheel), which sucks compared to the link. This started after a few people recklessly put up images using flash.

 

You know who you are.

 

Next you’ll be asking me to download Air to view your text-only document.

I don’t think javascript is perfect. Javascript heavy websites (zimbra, gmail) are pretty slow to load up. This may be for a number of different reasons, but its not pleasant to wait for your browser to respond to a new tab and take up >50% your CPU.

July 5, 2007 Posted by | Mozilla, Seneca | Leave a comment