<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
	<title>Psalter Ego</title>
	<link>http://www.psalterego.com</link>
	<description>Thoughts on Faith, Life and Work</description>
	<pubDate>Tue, 14 Nov 2006 17:57:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>
	<language>en</language>

		<item>
		<title>Flex Data Services and Java JDKs</title>
		<link>http://www.psalterego.com/2006/11/14/flex-data-services-and-java-jdks/</link>
		<comments>http://www.psalterego.com/2006/11/14/flex-data-services-and-java-jdks/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 17:43:36 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
	<category>Flash</category>
	<category>Flex</category>
		<guid>http://www.psalterego.com/2006/11/14/flex-data-services-and-java-jdks/</guid>
		<description><![CDATA[	If you&#8217;re a newbie just starting on Flex Data Services 2.0 (FDS) and J2EE development, you will most likely go and download FDS from Adobe with the integrated JRun 4 application server immediately followed by a Java Development Kit (JDK) from Sun (if you don&#8217;t already have one).
	And if you&#8217;re one to always have the [...]]]></description>
			<content:encoded><![CDATA[	<p>If you&#8217;re a newbie just starting on Flex Data Services 2.0 (FDS) and J2EE development, you will most likely go and download FDS from Adobe with the integrated JRun 4 application server immediately followed by a <a href="http://java.sun.com/javase/downloads/index.jsp">Java Development Kit (JDK)</a> from Sun (if you don&#8217;t already have one).</p>
	<p>And if you&#8217;re one to always have the latest and greatest or are just following the first link that you see on Sun&#8217;s webpage like any newbie would, you&#8217;ll probably grab a JDK targetting Java 1.5 and think that you can compile some of your own classes and go merrily along.  Not quite so fast&#8211;you&#8217;ll actually need to tweak your JRun 4 installation if you plan on using the latest Java 1.5 JDK (it&#8217;s really pretty easy&#8211;see below the fold for more details).  If, rather, you just want to get going right out of the box with the default installation, however, what you really want is the older <a href="http://java.sun.com/j2se/1.4.2/download.html">Java 1.4.2 JDK</a>.</p>
	<p><a id="more-9"></a></p>
	<p>This is probably old hat for experienced J2EE developers, especially those with their own toolchain and J2EE server already configured before installing FDS, but I ended up learning this the hard way working through Marcel Boucher&#8217;s <a href="http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html">My First Hibernate Enabled Flex Application</a> tutorial on his blog.  Everything worked fine up until I tested my client-side Flex application upon which I received a rather cryptic error complaining about a failed NetConnection.  Replacing my files with Marcel&#8217;s fixed the problem&#8211;and I eventually narrowed it down to differences between his .class file and mine.  </p>
	<p>A closer reading of his blog shed some illumination on my misfortune, as I noted that my Java compiler was a different version than his.  Marcel was using the 1.4.2_12, whereas I had the newer 1.5.0_09.  Digging into my JRun 4 installation a bit more revealed that it comes out of the box with a Java 1.4.2 Runtime Environment as well.    Thinking that it was a version mismatch, I recompiled my Java class again with the source and target versions specified as 1.4 and got a working example application.</p>
	<p>Now, you&#8217;re probably wondering, what if I want to use the current Java 1.5 Runtime Environment with my JRun 4?  All of my Java-slinging friends tell me it has all these new features and that&#8217;s where the action is at in the local bookstore&#8217;s computer aisle.  Well, it&#8217;s actually not all that hard.  All that&#8217;s needed is to go into your JRun 4 <em>bin</em> directory and change the<em> java.home</em> line to direct it to your own Java 1.5 installation.</p>
	<p>This simple fix removes the need to specify source and target parameters when invoking the Java 1.5 compiler and allows you to follow along with all the latest and greatest in the Java world while starting out on your own Flex Data Services adventures.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.psalterego.com/2006/11/14/flex-data-services-and-java-jdks/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>FZip:  Zip Archives for ActionScript 3</title>
		<link>http://www.psalterego.com/2006/09/15/fzip-zip-archives-for-actionscript-3/</link>
		<comments>http://www.psalterego.com/2006/09/15/fzip-zip-archives-for-actionscript-3/#comments</comments>
		<pubDate>Fri, 15 Sep 2006 18:13:38 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
	<category>Flash</category>
		<guid>http://www.psalterego.com/2006/09/15/fzip-zip-archives-for-actionscript-3/</guid>
		<description><![CDATA[	Wow, Claus Wahlers and Max Herkender are quickly closing the gap between ActionScript 3 and other development platforms&#8217; libraries (read Java and .NET) with their newly-released FZip library.  If you haven&#8217;t already heard, FZip allows for progressively decompressing zip archives directly in the Flash Player.  What&#8217;s even better, it&#8217;s licensed under the free [...]]]></description>
			<content:encoded><![CDATA[	<p>Wow, <a href="http://wahlers.com.br/claus/blog/">Claus Wahlers</a> and <a href="http://blog.brokenfunction.com/">Max Herkender</a> are quickly closing the gap between ActionScript 3 and other development platforms&#8217; libraries (read Java and .NET) with their newly-released <a href="http://codeazur.com.br/lab/fzip/">FZip</a> library.  If you haven&#8217;t already heard, FZip allows for progressively decompressing zip archives directly in the Flash Player.  What&#8217;s even better, it&#8217;s licensed under the free and very unobstrusive zlib/libpng license and as such, is unencumbered for use in commercial products.</p>
	<p>While it does require a slight modification to zip files on the server-side to include Adler32 checksums for zlib compatibility, this can be readily managed with a few lines of server-side scripting and made to be almost invisible.  </p>
	<p>One immediately useful application for FZip is managing skins for icon and graphic heavy RIAs as suggested in Claus&#8217; <a href="http://codeazur.com.br/lab/fzip/demo/">demo</a>.  The small file size typical of icons makes downloading them one-by-one over HTTP extraordinarily inefficient, as the handshaking and headers needed for making each request are sometimes as large as the image itself.  Previously, the chief alternatives to this madness were either placing your icons and other graphical assets in the main application&#8217;s library itself (as Macromedia was wont to do with their component sets), or if dynamic skinning was desired, in a shared library SWF.    While SWF based approaches solved load time problems,  they created another:  modifying skins and icons now required the ability to edit and/or recompile SWFs.  This isn&#8217;t much of an issue for a professional Flash designer or developer, but effectively placed the ability to reskin a RIA outside the reach of most users.</p>
	<p>However, if you now place all of your skin icons in a FZip archive and load them into your application from there, not only can all of your icons and graphics be retrieved as a single request, making a new skin is now no more difficult than opening up a zip file and modifying some of the contents.  This makes life much easier for making changes to icons and seeing the results without having to recompile your entire application for each miniscule change.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.psalterego.com/2006/09/15/fzip-zip-archives-for-actionscript-3/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Array Extras for Actionscript</title>
		<link>http://www.psalterego.com/2006/05/19/array-extras-for-actionscript/</link>
		<comments>http://www.psalterego.com/2006/05/19/array-extras-for-actionscript/#comments</comments>
		<pubDate>Fri, 19 May 2006 14:22:29 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
	<category>Flash</category>
		<guid>http://www.psalterego.com/2006/05/19/array-extras-for-actionscript/</guid>
		<description><![CDATA[	Late last fall, with the advent of Firefox 1.5, Mozilla added a handful of new Array methods with the update of the Gecko browser engine to JavaScript 1.6.   Apparently, these have also found their way into ActionScript.  Sharp eyed Daniel Hai noted last month that these were silently added into Flex 2.0 [...]]]></description>
			<content:encoded><![CDATA[	<p>Late last fall, with the advent of Firefox 1.5, Mozilla added a handful of new Array methods with the update of the Gecko browser engine to <a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.6">JavaScript 1.6</a>.   Apparently, these have also found their way into ActionScript.  Sharp eyed <a href="http://www.danielhai.com/blog/?p=13">Daniel Hai</a> noted last month that these were silently added into Flex 2.0 Beta 2 as undocumented methods, and this past week, they&#8217;ve finally made their debut in the Beta 3&#8217;s <a href="http://livedocs.macromedia.com/labs/1/flex20beta3/langref/Array.html">Array documentation</a>.</p>
	<p>These new additions to the Array class bring a couple of item locator methods, <code>indexOf()</code> and <code>lastIndexOf()</code>, which behave much like their corresponding String analogues, and a set of more interesting iterative methods: <code>every()</code>, <code>filter( )</code> <code>forEach()</code>, <code>map()</code>, and <code>some()</code>.  Each of these latter methods take a callback function to be invoked on each item in the array, and collectively, allow arrays to be used much like lists in functional programming. </p>
	<p>While these new methods don&#8217;t add any new functionality that couldn&#8217;t be done in the past via relatively simple loops, they do make working with arrays quite a bit easier and help simplify the idioms used in array operations.  In the last few days, I&#8217;ve taken to them so much that I even threw together a quick <a href="http://dev.psalterego.com/ArrayExtras.zip">ArrayExtras</a> backport implementing these as mixin methods for ActionScript 2.0.</p>
	<p>With the significant retooling and polish that&#8217;s been going into ActionScript 3.0, it&#8217;s great to see that Adobe is leading the way with <acronym title="ECMAScript for XML">E4x</acronym> support and the incorporation of Mozilla&#8217;s Array extras as we move towards the 4th edition of ECMAScript.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.psalterego.com/2006/05/19/array-extras-for-actionscript/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Parsing Excel Files with ActionScript 3.0</title>
		<link>http://www.psalterego.com/2006/05/17/parsing-excel-files-with-actionscript-30/</link>
		<comments>http://www.psalterego.com/2006/05/17/parsing-excel-files-with-actionscript-30/#comments</comments>
		<pubDate>Thu, 18 May 2006 05:57:08 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
	<category>Flash</category>
		<guid>http://www.psalterego.com/2006/05/17/parsing-excel-files-with-actionscript-30/</guid>
		<description><![CDATA[	Back in January, I had started learning ActionScript 3.0 by picking a particularly interesting problem that had been dogging me since I first started building web-based applications in the late 1990s.  That problem is, how to build client-side programs that can parse and render binary file formats within a browser without the need to [...]]]></description>
			<content:encoded><![CDATA[	<p>Back in January, I had started learning ActionScript 3.0 by picking a particularly interesting problem that had been dogging me since I first started building web-based applications in the late 1990s.  That problem is, how to build client-side programs that can parse and render binary file formats within a browser without the need to download separate plugins or ActiveX controls for each one.  To do that, you need to able to parse binary data on the client.  And when I saw the ByteArray class in Flex 2.0, I smiled.</p>
	<p>I decided to go after Excel files.  Yes, many machines have Excel or comparable spreadsheet application already installed on them.  And Microsoft does offer a free downloadable <a href="http://office.microsoft.com/downloads/2000/xlviewer.aspx">viewer</a> for Excel files.  But wouldn&#8217;t it be just neat-o to be able to view Excel documents directly in the browser without needing anything but the Flash Player?  Or even better yet, import data straight from .xls files into a Flash RIA? </p>
	<p>After a few nights of work, I managed to import some basic .xls files and correctly parse out column and row data for strings and numbers.  That was January, and then a maelstrom of client work happened (including a particularly painful stretch of 12 consecutive 16-hour workdays at a remote site).  And the Flex 2.0 APIs changed.  And changed again with each new beta.  Not that I blame Adobe&#8211;each time it&#8217;s been for the better.  Seriously, does anyone like having to import <em>trace</em> in every single class that you&#8217;re debugging?   It was just that I hardly had time to sleep, let alone code anything fun.  Thankfully, my good friend <a href="http://www.darronschall.com/">Darron Schall</a> had been keeping my code updated to the latest versions of the Flex 2.0 beta in preparation for his recent presentation at Flash in the Can.</p>
	<p>However, I&#8217;ve finally managed to get back to working on it, updating it yet again to Beta 3, adding a couple new features, and preparing it for public consumption.  Next up is allowing for the file path to the .xls file to be specified programmatically (it&#8217;s currently hard-coded), and exposing the parser as a library that can be used by other projects.</p>
	<p>So, without further ado, here&#8217;s a couple of demos:  A very basic test, as both the  <a href="http://dev.psalterego.com/xls/samples/test.xls">Excel file</a> and loaded into my Flash-based <a href="http://dev.psalterego.com/xls/ExcelParser.html">viewer</a>.  And a slightly more complex example, with the data available as the <a href="http://dev.psalterego.com/xls/samples/tab04.xls">Excel file</a> and loaded into the <a href="http://dev.psalterego.com/xls/ExcelParser2.html">viewer</a> (requires Flash Player 9).</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.psalterego.com/2006/05/17/parsing-excel-files-with-actionscript-30/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
