Open Source

HowTo: Reduce the size of your Flex app

Flex 2 added a neat little feature which allows you to load Runtime Shared Libraries, from other domains. And since the browser caches these libraries in theory we could all point to a central set of Flex 2 Framework RSLs and users of your application would only have to download the RSLs the first time they went to an application which used them. Before I show you how to make this work, lets talk about the caveats… First and most important, THIS IS UNSUPPORTED BY ADOBE. While the Flex team is working on a better, more permanent solution to this problem, this is really a hack and despite the fact that I am using this in my applications, neither I or Adobe warranty or support the use of this in any way. Second, since there is no failover mechanism, until we find a better home for the RSLs, if you choose to point to my hosted RSLs, your application will be at the mercy of my web server. Third, if someone hacks my web server and uploads new cracked malware RSLs, or uses a man-in-the-middle attack to replace the RSLs in flight, then you (and I) have been p0wned. Fourth, I, James Ward, may have included modified Flex framework files which do bad things, like track user behavior/input and report them back to my server. While I promise I have not done this, if you choose to use these RSLs, you are putting your trust in my promise.

So despite the caveats, I still think this hack is sufficient enough for many applications. Flex engineering is really working hard to make this work for everyone. In the mean time what is outlined here may likely help you to dramatically reduce SWF size. Read on to find out how.

Flex Paint – Flex Display Object to PNG

UPDATE - I’ve created a new version of Flex Paint which doesn’t require the server roundtrip.

Flex allows you to easily create beautiful UIs. But what if you want to take a piece of the UI and save it as an image? Well, using Tinic’s AS3 PNG Encoder, Remote Object, and Flash’s BitmapData and ByteArray API it’s very easy. To show how this is done, I created a simple application called Flex Paint.

Building Mozilla Firefox 0.9 rc1 From Source on Gentoo

Yesterday Mozilla released Firefox 0.9 rc1 and I just couldn’t wait any longer for the ebuild, so I figured out how to get it built from the cvs source. The instructions are posted on the Gentoo Forums. Not a big deal, but I thought this was blog worthy since it was fun and exciting. I guess that makes me a nerd. :)

Enterprise PHP?

PHP is no doubt a great web programming platform. It is simple and fairly robust. About 90% of the time I want to find an open source web app for something, there are at least 5 written in php. It seems to have become the de-facto standard for simple web apps. Currently I spend most of my time writing php because the contract I am currently on started with php as their web platform.

The JCP And Java Standards

My friend Mike came across an interesting wiki on Struts/JSF by Craig McClanahan himself… Struts - More About JSF It’s an interesting wiki post… One comment I found interesting is: Every technology goes through a lifecycle of innovation, followed by popularization, followed (often, but quite often in the Java world) by standardization, followed by commoditization. As always, there are two sides. And since I am the rebelous one, I’ll post the other: Howard Lewis Ship’s View on JSF