<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security Advancements at the Monastery &#187; Axiis</title>
	<atom:link href="http://blog.securitymonks.com/category/visualization/axiis/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.securitymonks.com</link>
	<description>Information about developments at the Monastery</description>
	<lastBuildDate>Fri, 03 Sep 2010 05:41:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting Up Prefuse Flare Under Unix</title>
		<link>http://blog.securitymonks.com/2009/05/31/setting-up-prefuse-flare/</link>
		<comments>http://blog.securitymonks.com/2009/05/31/setting-up-prefuse-flare/#comments</comments>
		<pubDate>Sun, 31 May 2009 19:59:08 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Axiis]]></category>
		<category><![CDATA[BirdEye]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[JuiceKit]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[ant]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=1142</guid>
		<description><![CDATA[After working through the steps involved in &#8220;Setting Up Axiis for Security Visualization,&#8221; I became interested in taking a look at Prefuse Flare.  Flare is a visualization toolkit written for Flash in ActionScript.  It is a creation of the UC Berkeley Visualization Lab.  Sasha Dzeletovic, a person who has worked with Flare, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flare.prefuse.org/media/apps/dep-graph-teaser.gif"><img src="http://flare.prefuse.org/media/apps/dep-graph-teaser.gif" alt="" width=300 align="left" /></a>After working through the steps involved in &#8220;<a href="http://blog.securitymonks.com/2009/05/28/setting-up-axiis/">Setting Up Axiis for Security Visualization</a>,&#8221; I became interested in taking a look at <a href="http://flare.prefuse.org/">Prefuse Flare</a>.  Flare is a visualization toolkit written for Flash in ActionScript.  It is a creation of the UC Berkeley Visualization Lab.  Sasha Dzeletovic, a person who has worked with Flare, has done a very nice post comparing the two, &#8220;<a href="http://www.pathf.com/blogs/2009/05/flare-vs-axiis/">Flare vs. Axiis</a>.&#8221;  Both <a href="http://www.twgonzalez.com/">Tom Gonzalez</a>, one of the co-founders of Axiis, and Sasha seem to agree that one big difference between Flare and Axiis is that, to quote Tom, &#8220;Axiis allows you to describe complex layout algorithms in markup in a more concise, and I like to think, intuitive manner.&#8221;</p>
<p>
The <a href="http://flare.prefuse.org/tutorial">Flare tutorial</a> provides some useful links to resources intended to help with ActionScript 3:
</p>
<ul>
<li class="level1">
<div class="li"> Adobe provides an <a href="http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html" class="urlextern" title="http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html"  rel="nofollow">Overview of AS3</a>, with links to additional resources.</div>
</li>
<li class="level1">
<div class="li"> <a href="http://www.amazon.com/Essential-ActionScript-3-0-Colin-Moock/dp/0596526946" class="urlextern" title="http://www.amazon.com/Essential-ActionScript-3-0-Colin-Moock/dp/0596526946"  rel="nofollow">Essential ActionScript 3</a> by Colin Moock from O&#039;Reilly publishing is a great book to help you get started. You can <a href="http://proquest.safaribooksonline.com/0596526946" class="urlextern" title="http://proquest.safaribooksonline.com/0596526946"  rel="nofollow">access it online here</a> (some institutions, such as universities, provide access for free).</div>
</li>
<li class="level1">
<div class="li"> <a href="http://livedocs.adobe.com/flex/3/langref/" class="urlextern" title="http://livedocs.adobe.com/flex/3/langref/"  rel="nofollow">The Adobe Flex API Reference</a> is invaluable for understanding the different classes and methods available. We will be focused only on the classes in the <code>flash.*</code> packages. </div>
</li>
</ul>
<p>
Installation is very similar to Axiis.  Install Flex SDK and/or Adobe Flex Builder.  Installing Flex Builder is straight forward, but regrettably development for Adobe Flex Builder for Linux has been put on hold.  We will be using Flex SDK.  We will want Apache Ant.  Flare is package with a build.xml file, so all we need to do is change the first few lines to point to out Flex SDK installation, and we are ready to use ant to compile the libraries.
</p>
<p>
While I could duplicate the steps for installing Flex SDK and Apache ant, it is simpler to point to &#8220;<a href="http://blog.securitymonks.com/2009/05/28/setting-up-axiis/">Setting Up Axiis for Security Visualization</a>.&#8221;  Once you complete those steps, you are ready to install Flare.  Continuing from my previous post, let us make sure the required software is installed and our environmental variables are properly set:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# declare -x JAVA_HOME="/usr/java/latest"
root# declare -x PATH="${JAVA_HOME}/bin:${PATH}"
root# java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

root# declare -x ANT_HOME="/work/software/ant"
# ant -v
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml does not exist!
Build failed

root# declare -x PATH="${PATH}:${ANT_HOME}/bin"
root# export PATH=/work/software/flex/bin:${PATH}
root# mxmlc --version
Version 3.3.0 build 4852
</pre>
</td>
</table>
<p>
</p>
<p>
At this point, we are interested in downloading the Flare file and unzipping it.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd /work/software
/work/software root# mkdir flare
/work/software root# cd flare
/work/software/flare root# wget http://flare.prefuse.org/download
/work/software/flare root# unzip prefuse.flare-alpha-20090124.zip
/work/software/flare root# vi build.xml
</pre>
</td>
</table>
<p>
Now we need to modify the first few lines of the build.xml file that is part of the Flare zipped file.  We will want to adjust FLEX_HOME, asdoc.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;project name="flare" default="usage" basedir="."&gt;
  &lt;!-- ================================================ --&gt;
  &lt;!-- Import Flex Ant Tasks, Set Flex Home and asdoc   --&gt;
  &lt;!-- ================================================ --&gt;
  &lt;property name="LOCALE" value="en_US"/&gt;
  &lt;property name="FLEX_HOME" value="<strong>/work/software/flex/</strong>"/&gt;
  &lt;property name="asdoc" value="<strong>${FLEX_HOME}bin/asdoc</strong>"/&gt;
</pre>
</td>
</table>
<p>
At this point, build all Flare targets with ant.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/work/software/flare root# ant all
/work/software/flare root# ls build
DependencyGraph.swf  flare.swc        JobVoyager.swf
flare.demos.swf      flare.tests.swf  PackageMap.swf
</pre>
</td>
</table>
<p>
You can now use your favorite browser to open file /work/software/flare/build/flare.demos.swf.  The program will call the other Flash executables.
</p>
<p>
The <a href="http://flare.prefuse.org/tutorial">Flare tutorial</a> provides a great starting point in working with Flare.  The post &#8220;<a href="http://www.digitalobjects.org/2009/01/02/flex-and-flare-installation-kubuntu-810/">Flex and Flare Installation (K)Ubuntu 8.10</a>&#8221; will take you through building some of the examples from the tutorial.
</p>
<p>
Check out the different examples and start experimenting.  Two other projects that caught my attention and might be of interest:</p>
<ul>
<li><a href="http://www.juicekit.org/">JuiceKit</a>, which is  for building graphically rich and interactive information displays.  JuiceKit is particularly interesting because it is based on Flare.</li>
<li><a href="http://code.google.com/p/birdeye/">BirdEye</a>,  which states &#8220;the actionscript-based library enables users to create multi-dimensional data visualization interfaces for the analysis and presentation of information.&#8221;  BirdEye caught my attention because it was listed in the article &#8220;<a href="http://media.software.com.pl/sdj/pl/24_27_________okladka.pdf">Visualizing Relational Data Using Graph Theory</a>&#8221; by Jason Bellone and Daniel Lang.</li>
</ul>
<p>With Axiis and Prefuse Flare, you have some powerful tools to start visualizing your security data.
</p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2009/05/31/setting-up-prefuse-flare/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting Up Axiis for Security Visualization</title>
		<link>http://blog.securitymonks.com/2009/05/28/setting-up-axiis/</link>
		<comments>http://blog.securitymonks.com/2009/05/28/setting-up-axiis/#comments</comments>
		<pubDate>Thu, 28 May 2009 15:44:28 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Axiis]]></category>
		<category><![CDATA[Degrafa]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=1097</guid>
		<description><![CDATA[Last week Axiis, an open source data visualization framework, was released.  Axiis is built upon Degrafa, an open source declarative graphics framework, and Adobe Flex 3.  Thanks to Nathan Yau for pointing this out in his post &#8220;Open Source Data Visualization Framework &#8211; Axiis.&#8221;  There were also great comments to Nathan&#8217;s post, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.axiis.org/images/examples/wedge.jpg" align="left" width=120 />Last week <a href="http://www.axiis.org">Axiis</a>, an open source data visualization framework, was released.  Axiis is built upon <a href="http://www.degrafa.org/">Degrafa</a>, an open source declarative graphics framework, and <a href="http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK">Adobe Flex 3</a>.  Thanks to Nathan Yau for pointing this out in his post &#8220;<a href="http://flowingdata.com/2009/05/22/open-source-data-visualization-framework-axiis/">Open Source Data Visualization Framework &#8211; Axiis</a>.&#8221;  There were also great comments to Nathan&#8217;s post, including a comparison of Axiis to Berkley&#8217;s <a href="http://flare.prefuse.org/">Prefuse Flare</a>.  Flare is also a visualization toolkit, but it is written for Flash in ActionScript 3.  For a discussion of Flash, Flex, and ActionScript 3, check out Lee Brimelow post &#8220;<a href="http://theflashblog.com/?p=998">Flash Builder rebrand FAQ</a>.&#8221;</p>
<p>Today we are going to walk through the steps of setting up Axiis on a Linux platform.</p>
<h3>Install a Java JDK</h3>
<p>Get the Sun JDK 6 from <a href="http://java.sun.com/javase/downloads/index.jsp">Sun&#8217;s website</a>.  Sun requires you to agree to terms, so you&#8217;ll need to go there and agree.  Run the installer which gets downloaded.  Agree again to the terms.  The installer will install a few rpms and jars.</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# /bin/sh jdk-6u13-linux-i586-rpm.bin
root# ls /usr/java
default  jdk1.6.0_13  latest
root# declare -x JAVA_HOME="/usr/java/latest"
root# declare -x PATH="${JAVA_HOME}/bin:${PATH}"
root# java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)
</pre>
</td>
</table>
<p></p>
<h3>Install Another Neat Tool (ANT)</h3>
<p><strong>Apache Ant</strong> is a  free and open source tool for automating software build processes.  It is similar to <strong>make</strong> but is implemented using the Java language using XML configuration files.  It is platform-neutral.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /work/src/
/work/src root# wget http://www.uniontransit.com/\
apache/ant/binaries/apache-ant-1.7.1-bin.tar.gz
/work/src root# md5sum apache-ant-1.7.1-bin.tar.gz
cc5777c57c4e8269be5f3d1dc515301c  apache-ant-1.7.1-bin.tar.gz
/work/src root# tar xzf apache-ant-1.7.1-bin.tar.gz
/work/src root# mv apache-ant-1.7.1 /work/software
/work/src root# cd  /work/software
/work/software root# ln -s apache-ant-1.7.1 ant
/work/software root# declare -x ANT_HOME="/work/software/ant"
/work/software root# declare -x PATH="${PATH}:${ANT_HOME}/bin"
/work/software root# ant
Buildfile: build.xml does not exist!
Build failed
</pre>
</td>
</table>
<p>
</p>
<p>
The error above indicates that ant command is recognized by shell but it did not find build.xml file that needed to compile ant projects. So, it’s absolutely normal and the installation was successful.  We will be creating build.xml files below.
</p>
<p><h3>Install the Flex SDK</h3>
<p>The Adobe Flex 3.3 Software Development Kit (SDK) includes the Flex framework (component class library) and Flex compiler along with:</p>
<ul>
<li>Automated testing framework.</li>
<li>Memory/Performance profiler.</li>
<li>Certain components, such as the charting and the AdvancedDataGrid component (the code will work, but a watermark image is layered over it).</li>
</ul>
<p>Installation is fairly straight forward.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /work/software
/work/software root# mkdir flex
/work/software root# cd flex
/work/software/flex root# wget \

http://download.macromedia.com/pub/flex/sdk/flex_sdk_3.zip

/work/software/flex root# unzip flex_sdk_3.zip
/work/software/flex root# export PATH=/work/software/flex/bin:${PATH}
/work/software/flex root# mxmlc --version
Version 3.3.0 build 4852
</pre>
</td>
</table>
<p>
</p>
<p>
Test the installation out by creating the traditional &#8220;hello world&#8221; program.  First, under your favorite editor, create the file helloworld.mxml file:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/home/ger/flex root# vi helloworld.mxml
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    width="300" height="200"
    horizontalAlign="center" verticalAlign="middle"
    viewSourceURL="src/HandlingEventsEventHandler/index.html"
&gt;
&lt;mx:Panel title="My first Flex application" horizontalAlign="center" &gt;
    &lt;mx:Label fontSize="18" text="Hello, World." /&gt;
&lt;/mx:Panel&gt;
&lt;/mx:Application&gt;
</pre>
</td>
</table>
<p>
</p>
<p>
Compile the program:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/home/ger/flex root# mxmlc --strict=true helloworld.mxml
/home/ger/flex root# ls helloworld.swf
helloworld.swf
</pre>
</td>
</table>
<p>
</p>
<p>
Use your favorite browser to view the helloworld.swf flash file.  You now need to copy the flexTasks.jar file to the ant’s lib folder. The flexTasks.jar file contains the ant task definitions for compiling flex applications.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /work/software/flex
/work/software/flex root# cp /work/software/flex/ant/lib/flexTasks.jar \
/work/software/ant/lib
</pre>
</td>
</table>
<p>
</p>
<p>
Create a new file build.xml with the following content (make the appropriate changes to FLEX_HOME and APP_ROOT):
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/home/ger/flex root# vi build.xml
&lt;?xml version="1.0" ?&gt;
&lt;project name="helloworld" default="build" &gt;
    &lt;property name="FLEX_HOME" value="/work/software/flex/" /&gt;
    &lt;property name="APP_ROOT" value="/home/ger/flex/" /&gt;
    &lt;taskdef
        resource="flexTasks.tasks"
        classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" /&gt;
    &lt;target name="build"&gt;
        &lt;mxmlc file="${APP_ROOT}/helloworld.mxml"&gt;
            &lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/&gt;
            &lt;source-path path-element="${FLEX_HOME}/frameworks"/&gt;
        &lt;/mxmlc&gt;
    &lt;/target&gt;
&lt;/project&gt;
</pre>
</td>
</table>
<p>
</p>
<p>
From the directory where build.xml file exist, execute ant:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/home/ger/flex root# ant
Buildfile: build.xml

build:
    [mxmlc] Loading configuration file /work/software/flex/frameworks/flex-config.xml
    [mxmlc] /home/ger/flex/helloworld.swf (181669 bytes)

BUILD SUCCESSFUL
Total time: 7 seconds
</pre>
</td>
</table>
<p>
</p>
<p>
The flash file helloworld.swf was created when you ran the command ant.  As with the make command, you now have a way to specify build options within the build.xml file.  See &#8220;<a href="http://labs.adobe.com/wiki/index.php/Talk:Flex_Ant_Tasks">Talk:Flex Ant Tasks</a>&#8221; for a much more detail description of setting up ant to perform Flex tasks.</p>
<h3>Eclipse</h3>
<p>Eclipse is an open source plug-in—based editor and IDE framework.  It does a good job of code editing while allowing third parties to extend its capabilities through modules.  We are going to pull down the &#8220;Eclipse IDE for C/C++ Developers&#8221; bundle, which already contains the <a href="http://www.eclipse.org/cdt/">CDT</a> (C/C++ Development Tools).  Your Java version will need to be 1.5 or higher.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/home/ger/flex root# cd /work/src
/work/src  root# wget http://mirrors.med.harvard.edu/eclipse//technology/epp/downloads/\
release/ganymede/SR2/eclipse-cpp-ganymede-SR2-linux-gtk.tar.gz
/work/src root# tar xzf eclipse-cpp-ganymede-SR2-linux-gtk.tar.gz
/work/src root# mv eclipse /work/software
/work/src root# su - ger
[ger@loxias ~]$ declare -x JAVA_HOME="/usr/java/latest"
[ger@loxias ~]$ declare -x PATH="${JAVA_HOME}/bin:${PATH}"
[ger@loxias ~]$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)
[ger@loxias ~]$ /work/software/eclipse/eclipse
</pre>
</td>
</table>
<p>
</p>
<p>
Max Berger has written a great HOWTO &#8220;<a href="http://max.berger.name/howto/cdt/ar01s04.jsp">Setting up Eclipse</a>&#8221; that will walk you through using Eclipse.</p>
<h3>Aptana</h3>
<p>One Eclipse plug-in, Aptana Studio, comes in both commercial and <a href="http://www.aptana.com/studio/">Community Edition</a>.  Since you have already installed Eclipse, you can install Aptana as a plug-in directly into your current Eclipse configuration.  Follow the directions from the Aptana site.</p>
<ol>
<li>From the <b>Help</b> menu in Eclipse, select <b>Software Updates &#8230;</b>
</li>
<li>Select the <b>Available Software</b> tab
</li>
<li>Click the &#8220;Add Site&#8230;&#8221; button.
</li>
<li>Specify the <b>Location</b> Url update site: <a href="http://update.aptana.com/update/studio/3.4/" class="external free" title="http://update.aptana.com/update/studio/3.4/" rel="nofollow">http://update.aptana.com/update/studio/3.4/</a> and click <b>OK</b>
</li>
<li>Select the checkbox next to the added update site.
</li>
<li>Click the <b>Install..</b> button.
</li>
<li>Complete instruction to install from update site.
</li>
</ol>
<p>If you would like to use the Aptana perspective, navigate and select  Window > Open Perspective > Aptana.  You will also want to change the default editor.</p>
<h3>Flex Builder</h3>
<p>Using the Flex SDK is more complicated and involves more work than using Flex Builder.  Flex Builder comes with many nice features, such as tag completion, code hinting, built-in API reference manual, automatic importing of libraries, wizards, visual layout and styling, and automatic builds.  There is a Flex Builder version for Linux, though it is a plugin-only version and unfortunately development has been put on hold.  If you work in the education field, Adobe Flex Builder 3 Pro is <a href="https://freeriatools.adobe.com/flex/">available for free</a> under Microsoft Windows and Mac OS X.
</p>
<p>
To get Flex Builder running on your system is simple:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /work/src/
/work/src root# wget http://download.macromedia.com/pub/labs\
/flex/flexbuilder_linux/flexbuilder_linux_install_a4_081408.bin
/work/src root#  /bin/sh flexbuilder_linux_install_a4_081408.bin
</pre>
</td>
</table>
<p>
</p>
<p>
At which point, the installation program will walk you through the installation process asking for the Eclipse folder.  If you are following this document, the Eclipse directory would be <strong>/work/software/eclipse</strong>.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/work/src root#  su - ger
[ger@loxias ~]$ declare -x JAVA_HOME="/usr/java/latest"
[ger@loxias ~]$ declare -x PATH="${JAVA_HOME}/bin:${PATH}"
[ger@loxias ~]$ /bin/sh /work/software/Adobe_Flex_Builder_Linux/Adobe_Flex_builder.sh
</pre>
</td>
</table>
<p>
</p>
<p>
Once you are running Eclipse, yo may choose the traditional Flex Builder perspective by navigate and select  Window > Open Perspective > Other&#8230; > Flex Development to change it to the traditional Flex Builder look.  </p>
<h3>Degrafa</h3>
<p>Degrafa is a declarative graphics framework that allows you to draw shapes and objects in your Flex application using an MXML type syntax.  Degrafa is required for Axiis.  Juan Sanchez in the post &#8220;<a href="http://www.insideria.com/2008/05/an-introduction-to-degrafa-1.html">An Introduction to Degrafa</a>&#8221; provides a nice introduction.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /work/software/
/work/software root# mkdir  degrafa
/work/software root# cd degrafa
/work/software/degrafa root# wget http://degrafa.googlecode.com/files/Degrafa_Beta3.1_Flex3.zip
/work/software/degrafa root# unzip Degrafa_Beta3.1_Flex3.zip
/work/software/degrafa root# cp /work/software/degrafa/Degrafa_Beta3.1_Flex3.swc  \
/work/software/ant/lib
</pre>
</td>
</table>
<p>
</p>
<p>
I ran into memory problems with the Linux version of Flex Builder.  It may be due to the software being Alpha.  For the rest of this document, I will use ant to compile my programs with the idea that I am showing the more difficult method.  If Flex Builder is working well for you, the ideas below end up being the same.  It is always good to have an idea of what is going on behind a nice GUI application like Eclipse.
</p>
<p>
Below we walk through pulling down sample Degrafa code and compile the code.  Please note that I start using the compiler.include-libraries attribute to specify the Degrafa library needs to be used in compiling the DegrafaPieMenu.mxml program.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /home/ger/workspace
/home/ger/workspace root# mkdir ex3
/home/ger/workspace root# cd ex3
/home/ger/workspace/ex3 root# wget http://www.finflex.fi/projects/DegrafaPieMenu/srcview\
/DegrafaPieMenu.zip
/home/ger/workspace/ex3 root# unzip DegrafaPieMenu.zip
/home/ger/workspace/ex3 root# cd src
/home/ger/workspace/ex3/src root# vi build.xml
&lt;?xml version="1.0" ?&gt;
&lt;project name="DegrafaPieMenu" default="build" &gt;
    &lt;property name="FLEX_HOME" value="/work/software/flex/" /&gt;
    &lt;property name="APP_ROOT" value="/home/ger/workspace/ex3/src/" /&gt;
    &lt;taskdef
        resource="flexTasks.tasks"
        classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" /&gt;
    &lt;target name="build"&gt;
        &lt;mxmlc file="${APP_ROOT}/DegrafaPieMenu.mxml"&gt;
            &lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/&gt;
            &lt;source-path path-element="${FLEX_HOME}/frameworks"/&gt;
            &lt;compiler.include-libraries dir="${FLEX_HOME}/ant/lib/" append="true"&gt;
               &lt;include name="DegrafaLibrary.swc" /&gt;
            &lt;/compiler.include-libraries&gt;
        &lt;/mxmlc&gt;
    &lt;/target&gt;
&lt;/project&gt;
</pre>
</td>
</table>
<p>
</p>
<p>
At this point, use the command <strong>ant</strong> to compile the program.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/home/ger/workspace/ex3/src root# ant
Buildfile: build.xml

build:
    [mxmlc] Loading configuration file /work/software/flex/frameworks/flex-config.xml
    [mxmlc] /home/ger/workspace/ex3/src/DegrafaPieMenu.swf (247701 bytes)

BUILD SUCCESSFUL
Total time: 8 seconds
</pre>
</td>
</table>
<p>
</p>
<p>
Use your favorite web browser top open the file <strong>DegrafaPieMenu.swf</strong>.  With the necessary software and libraries installed, we are finally ready for Axiis.</p>
<h3>Axiis</h3>
<p>We are going to pull down the Axiis libraries, place them with the Ant libraries, pull down sample Axiis code, setup a build.xml file, run ant, and view the results.  We do everything the same as what we have done before.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /home/ger/workspace
/work/software root# mkdir  axiis
/work/software root# cd axiis
/work/software/axiis root# wget http://axiis.googlecode.com/files/Axiis_Library.zip
/work/software/axiis root# unzip Axiis_Library.zip
/work/software/axiis root#  cp libs/* /work/software/ant/lib
/work/software/axiis root# cd /home/ger/workspace
/home/ger/workspace root# mkdir axiis
/home/ger/workspace root# cd axiis
/home/ger/workspace/axiis root# wget http://axiis.googlecode.com/files/Axiis_Examples.zip
/home/ger/workspace/axiis root# unzip Axiis_Examples.zip
/home/ger/workspace/axiis root# cd src
/home/ger/workspace/axiis/src root# vi build.xml
&lt;?xml version="1.0" ?&gt;
&lt;project name="LineAreaSeriesExample" default="build" &gt;
    &lt;property name="FLEX_HOME" value="/work/software/flex/" /&gt;
    &lt;property name="APP_ROOT" value="/home/ger/workspace/axiis/src/" /&gt;
    &lt;taskdef
        resource="flexTasks.tasks"
        classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" /&gt;
    &lt;target name="build"&gt;
        &lt;mxmlc file="${APP_ROOT}/LineAreaSeriesExample.mxml"&gt;
            &lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/&gt;
            &lt;source-path path-element="${FLEX_HOME}/frameworks"/&gt;
            &lt;compiler.include-libraries dir="${FLEX_HOME}/ant/lib/" append="true"&gt;
               &lt;include name="DegrafaLibrary.swc" /&gt;
               &lt;include name="Axiis_Library.swc" /&gt;
            &lt;/compiler.include-libraries&gt;
        &lt;/mxmlc&gt;
    &lt;/target&gt;
&lt;/project&gt;
</pre>
</td>
</table>
<p>
</p>
<p>
Trying to compile this with ant/mxmlc, produces an error message stating &#8220;<strong>/home/ger/workspace/axiis/src/Examples/ExampleBackground.mxml(40): Error: unable to resolve &#8216;Examples/axiis_logo_shadow.png&#8217; for transcoding</strong>&#8220;.  This is because ExampleBackground.mxml is in the same directory as axiis_logo_shadow.png, but the program specifies it is in &#8220;Examples/axiis_logo_shadow.png.&#8221;  Modify ExampleBackground.mxml to just have embedded in line 40 &#8220;source=&#8217;axiis_logo_shadow.png&#8217;&#8221;.  In other words, do not include the &#8220;Examples/&#8221; path.
</p>
<p>
Compile with the <strong>ant</strong> command:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/home/ger/workspace/axiis/src root# ant
Buildfile: build.xml

build:
    [mxmlc] Loading configuration file /work/software/flex/frameworks/flex-config.xml
    [mxmlc] /home/ger/workspace/axiis/src/LineAreaSeriesExample.swf (547707 bytes)

BUILD SUCCESSFUL
Total time: 10 seconds
</pre>
</td>
</table>
<p>
</p>
<p>
From your favorite web browser, open the file LineAreaSeriesExample.swf to see:
</p>
<p>
<img src="http://flowingdata.com/wp-content/uploads/2009/05/axiis-line-area-545x254.png" width=500 alt="" />
</p>
<p><h3>Final Thoughts</h3>
<p>Examine the LineAreaSeriesExample.mxml file.  On line 40, the data used in plotting the graph is specified with &#8220;&lt;mx:String id=&#8221;payload&#8221; source=&#8221;data/LineSeriesData.csv&#8221;/&gt;.&#8221;  Examine the data/LineSeriesData.csv file.  This would be the data file that gets generated by your security program.  You could always modify the Flex program to access your favorite database.  Adobe has a &#8220;<a href="http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&#038;postId=5561&#038;productId=2">Simple MySQL to Flex</a>&#8221; example.  There is also <a href="http://code.google.com/p/as3flexdb/downloads/list/">AS3FlexDB</a>, which is an open source library that allows Adobe Flex applications to connect to a MySQL server.  Alessandro Crugnola has written &#8220;<a href="http://www.sephiroth.it/tutorials/flashPHP/as3flexdb/">Connect to MySQL in Adobe Flex using AS3FlexDB</a>&#8221; to step you through the process.  The point is, there are many possibilities.  Play around with the different examples and start experimenting with different ways to visualize your security data.  It is a great way to learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2009/05/28/setting-up-axiis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

