Categories
Apple Mozilla

Virtualization For Mac OS X?

Virtualization is a great way to improve reliability, take advantage of hardware and scale. For example Mozilla’s build team uses it to manage all the build instances that used to be on individual machines. These servers essentially compile code all day long. One problem with virtualization and cross platform building is that Mac OS X doesn’t run in any virtualization environment (because of Apple’s interest in selling hardware). This means while you can run Windows and Linux on the same boxes, you still need to have and maintain separate Xserve’s for the purpose of compiling for Mac OS X. Looks like Mac OS X Server 10.5 (and only server edition) now has a license that permits running virtual. While great, this makes it pretty expensive to do things like a build farm. You can’t just buy a Mac OS X client, even though that’s all you really need. You need to buy server.

Currently, there’s nothing other than PearPC that can run it (and PearPC is worthlessly slow). Hopefully VMWare will update at some point to support it. At that point, things can get interesting.

Categories
Mozilla

Mozilla Prism

Mozilla Prism is an interesting product. What I really like is that it requires no real extra work for your app to run in it. With some additional effort you can potentially add some great stuff (offline support for example). It’s too early to develop applications for it just yet, but it does show off some serious potential. I did two tests as an example:

Google Calendar

Url: http://calendar.google.com (SSL doesn't seem to work at this time)
Name: Calendar
[ ] Show location bar
[ ] Show status messages and progress
[x] Enable navigation keys

Create Shortcuts
[x] Desktop
[ ] Start Menu
[ ] Quick Launch Menu

CBSNews.com Video Player

Disclosure: My employer.

Url: http://www.cbsnews.com/sections/i_video/main500251.shtml
Name: CBSNews.com Video
[ ] Show location bar
[ ] Show status messages and progress
[x] Enable navigation keys

Create Shortcuts
[x] Desktop
[ ] Start Menu
[ ] Quick Launch Menu

Both worked nicely. It gave me a way to keep the app open independently of my browser. The second test proves the next thing I wanted to mention. Plugins are supported. No reason why you can’t use a Flash player for example. Of course you could also use <video/>. I wonder if Google Gears could be installed on it? You can use about:plugins as an application url to see what plugins are installed (I believe it should be the same as Firefox). There doesn’t seem to be an about:prism just yet.

There are however some security aspects that an application like this must take into account.

Improvements

There are a bunch of things I’d love to see. For example:

  • API for Interactions – For certain events such as minimized/maximized (or user-visible/user-hidden to make it more neutral in terms of meaning). Also one for for opening a file so that the OS could map a file to be handled by an Mozilla Prism Application. The event could be handled similar to that of an upload. Haven’t looked to see what WHATWG offers in regards to these two things.
  • Extensions Support – Think of this as an interface/vehicle for XULRunner. Full window apps like Calendar could be run in Prism. This provides a common runtime shared across multiple applications.
  • Install Mechanism – To share the two things I did I had to document my settings up above. The ability to pass those perhaps using a protocol would be really nice. For example:
    prism://url=calendar.google.com/&name=calendar&enableNavigationKeys=true&createShortcuts=prompt

    would then open prism who would then ask you if you want to “install” this application. Bonus points if it accepted a base64 encoded icon similar to a data:url and used it. Using an technique similar to what Apple does for iTunes and having a landing page would give the user the option to install Prism if they didn’t have it already.

Great stuff. I can’t wait to see where it goes from here.

Edit [10/29/07 @ 11:45 PM EST]: Fixed bad url in example.

Categories
Mozilla Personal

Broken

That sprained wrist… turns out it’s broken. So now (again) 100% one handed typing for the moment.

Speaking of broken… Bug 389131 could use a hand (pun intended). Same for 389128. Anyone want to assist? Both have patches, may need tweaks/cleanup still. I just can’t manage extra coding until I get patched myself.

Categories
Apple Mozilla

iPhone/iPod touch SDK On The Way

Readers know I’ve been big on Apple opening up the iPhone/iTouch to developers since the beginning. Apple finally came through announcing a SDK will be made available, though not until early next year. It specifically noted Apps will work on the iPod touch as well. About time. All of a sudden these devices went from being cool, but not really worthwhile to having massive potential. Still missing on the iPhone is 3G, but that’s coming, and likely in an ’08 refresh of the product line.

Gizmodo has an interesting banner on top of their coverage of the announcement. Notice the positioning of the Firefox logo. This comes pretty soon after the announcement of the Firefox Mobile effort. Provided the SDK provided is good enough, I think there’s a pretty good chance we will see a Gecko product on the iPhone in the not too distant future. For quite some time it will likely be Minimo based and very simple, not the more robust plans which require Mozilla 2.

On a side note, I’m surprised nobody has managed to get Linux running on the iPod touch yet. I thought that would have happened by now. The iPhone would be somewhat pointless since getting the phone functionality to work would be a real battle.

Some sort of simulator/emulator to aid development would also be interesting, though I don’t think that’s very likely.

Overall it’s great news. Lets see that SDK already!

Below is what was posted on Apple’s site today

Categories
Mozilla

Blocking Firefox

There’s recently been a lot of buzz about a list of sites that make Firefox sad. Having written reporter, I’ve done a fair amount of monitoring in this area over the past few years. Overall I think the scope of sites that still block certain browsers/OS is declining. By scope I mean quantity of sites/popularity of sites. More and more often the sites are less and less popular sites. Often they are either financial institutions (known for being the last to update their tech) or media related (and dependent on Microsoft Windows Media DRM). That’s not to say the landscape doesn’t need to improve. From where I sit, it says the landscape is improving. More and more websites are realizing the need to work anywhere. No site is happy with a 5% drop in traffic. That means they can’t afford to ignore a browser with even more market share.

Things are looking a little brighter. While it’s still not good for the web, Silverlight and Flash seem to encourage much more compatibility across browsers/platforms than Windows Media Player ever has. Flash has been a major win for Firefox. Flash is rather consistent across browsers making it a popular choice for media (think YouTube). It’s leveled the playing field, since lets face it, Windows Media historically has been lacking in Firefox, though recently improving. On Mac OS X it is awful at best. h.264 support will make Flash even more attractive to content providers in the near future who are still holding out because of quality.

An interesting point made by that list is a lot of sites are “IE only” because of buggy navigation menu’s, typically due to flyout and drop down menu’s. It really is too bad. Most of those implementations aren’t even search engine friendly (they often store the entire navigation in a JS array). You’d think that would be incentive enough to change.

So those are my somewhat random thoughts on the topic for the moment.

On a sidenote, other content of the site includes a how to on Firefox pencils that look pretty cool.

Categories
Funny

Chimpanzee On A Skateboard

Chimp on a Skateboard

Can he be any cooler? I think not. Click the thumbnail for the video.

On a sidenote: I may have to put together a category on this blog for just linking to the best monkey content on the web. Could be fun.

Categories
Open Source Web Development

Snoopy’s Relative Redirect Bug

Snoopy is a PHP class that automates many common web browsing functions making it easier to fetch and navigate the web using PHP. It’s pretty handy. I found an interesting bug recently and diagnosed it this afternoon.

If you navigate to a 301 or 302 redirect in a subdirectory you can get something like this:

HTTP/1.1 302
Date: Sat, 13 Oct 2007 20:26:46 GMT
Server: Apache/1.3.33 (Unix)
Location: destination.xml
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

The key thing to pay attention to here is Location: destination.xml. Say your initial request was to:

http://somesite.tld/directory/request.xml

Our next request based on the redirect should be to:

http://somesite.tld/directory/desination.xml

Instead what Snoopy is doing is appending to the hostname, resulting in an incorrect request:

http://somesite.tld/request.xml

This is correct in cases where the first character of a redirect location contains a “/”. In this case it does not, which makes it incorrect. The following patch I wrote corrects this behavior. As far as I can tell (I haven’t read every word of the spec, but many chunks over the years) the HTTP 1.1 specs RFC 2616 only dictate that URI be provided, it doesn’t seem to require full url’s. See comments for follow up discussion on the specs. My conclusion is that it’s best practice but not required to use absolute uri’s). I wouldn’t call this a very common practice, but it does exist in the wild.

— Snoopy.class.php    200511-08 01:55:33.000000000 -0500
+++ Snoopy-patched.class.php    2007-10-13 16:10:38.000000000 -0400
@@ -871,8 +871,18 @@
                                // look for :// in the Location header to see if hostname is included
                                if(!preg_match("|\:\/\/|",$matches[2]))
                                {
                                        // no host in the path, so prepend
                                        $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+                                       // START patch by Robert Accettura
+                                       // Make sure to keep the directory if it doesn’t start with a ‘/’
+                                       if($matches[2]{0} != ‘/’)
+                                       {
+                                               list($urlPath, $urlParams) = explode(‘?’, $url);
+                                               $urlDirPath = substr($urlPath, 0, strrpos($urlPath, ‘/’)+1);
+                                               $this->_redirectaddr .= $urlDirPath;
+                                       }
+                                       // END patch by Robert Accettura
+
                                        // eliminate double slash
                                        if(!preg_match("|^/|",$matches[2]))
                                                        $this->_redirectaddr .= "/".$matches[2];

Code provided in this post is released under the same license as Snoopy itself (GNU Lesser General Public License).

Hopefully that solves this problem for anyone else who runs across it. It also teaches a good lesson about redirects. I bet this isn’t the only code out there that incorrectly handles this. Most redirects don’t do this, but there are a few out there that will.

Categories
Mozilla

Firefox Mobile

I am really glad to see the new Mozilla Mobile initiative. Mozilla 2 is a great time to undertake most of these changes. The thing that really sucks about developing for mobile devices is the browsers are pathetic at best (with the notable exception of the iPhone). Wireless speed is still an issue in some cases, but with 3G coming about, it’s not the biggest concern if you can manage to keep things slim. XUL on mobile will be very interesting. If done right, it would allow for client side applications that don’t suck, yet have the lowest barrier to entry (JS+XML = Easy). Not to mention you can target a bunch of devices with one download and code base. Don’t forget you’d still be able to do rather realistic debugging on your desktop.

Hopefully by the time this all comes around, data charges for mobile will drop significantly. The iPhone is still $60 for the cheapest plan. If you need more than 450 minutes of voice, you’ll be spending even more. While interest in the iPhone is high, between hardware and plan costs, I think it’s still to high to attract the masses. There’s still time. Firefox 3 isn’t even out yet. Mozilla 2 is still a little while away. I suspect these prices will be dropping as other providers try to compete with the iPhone. A price war is very likely.

One question remains: will it run on the gPhone?

Categories
Mozilla

Thunderbird In Crisis? No

There’s some FUD going around that Thunderbird is in crisis (is Slashdot going to morph into a tabloid?). This is a bit over the top. Yes it’s true Scott and David announced they are leaving and moving on to something else. It’s a slightly different setup than was used for Firefox, but it’s just as promising. I’ve got confidence to say things will continue. There will be a transition period (just like there was when the Mozilla Foundation was formed). Different doesn’t mean something is dead. Remember the Netscape layoffs and the Death of Mozilla? Didn’t really harm the project. I’d say it helped. I won’t say anything more on the topic for the moment.

Categories
Apple Mozilla Software

Mac Email Showdown

ComputerWorld has a rather good showdown of email clients on Mac OS X. The best breakdown of features I’ve seen on the Mac side in some time.

That said, I think they were slightly unfair to Thunderbird. For example, Thunderbird does have calendar support via Lightning which wasn’t mentioned (though it does indicate webmail support via extension). I’ve been using it with Google Calendar and it’s been working very well for me. It also says that Thunderbird can’t read from the Mac OS X Address book, though it should be noted that’s now fixed for the next release. It does however in another part of the breakdown briefly discuss Apple’s upcoming Mail release.

Another interesting note is that there doesn’t seem to be any mention of Entourage still not being available as a Universal Binary, meaning it’s very slow on Intel based Mac’s as I’ve mentioned before. We won’t see it as a Universal Binary until 2008. As someone who uses it daily at work, I’m counting down the days. IMHO this problem alone makes Thunderbird a much better mail client (minus the lack of Exchange support).

Does anyone know if Mail supports exchange? The review seems to think so (see the chart), though I thought that was only over IMAP. Apple seems to agree with me (emphasis mine):

Mail works with the following account types: POP, IMAP, .Mac, and Exchange (only if configured as an IMAP server). You can’t log in directly to Hotmail, AOL, or any service that does not support POP or IMAP access, and retrieve email using Mail.

I wouldn’t really call that support.

Other than those things which I believe aren’t quite accurate, I actually liked the review. I though it was a decent breakdown on a level I haven’t seen before. It exposes features that few really look at (search for example), but really matter in terms of user experience.