<?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>Luminis Software Development &#187; air</title>
	<atom:link href="http://lsd.luminis.nl/tag/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://lsd.luminis.nl</link>
	<description></description>
	<lastBuildDate>Mon, 19 Jul 2010 06:45:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>nl</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Developing a Flex AIR application</title>
		<link>http://lsd.luminis.nl/developing-a-flex-air-application/</link>
		<comments>http://lsd.luminis.nl/developing-a-flex-air-application/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 22:15:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://lsd.luminis.net/?p=177</guid>
		<description><![CDATA[<p>Luminis had already developed a Web application for Nedap Healthcare, and we would like to know if a desktop variant with an offline scenario could be possible. The web application displayed your worksheet, planning, news, weather, birthdays of colleagues.</p>]]></description>
			<content:encoded><![CDATA[<h1>Project description</h1>
<p>During the last few weeks, we&#8217;ve been working on setting up a sample application using Adobe Flex / ActionScript (working with Adobe Flex Builder 3).</p>
<p>Luminis had already developed a Web application for Nedap Healthcare, and we would like to know whether a desktop variant with an offline scenario would be possible. The web application displays items such as a worksheet, planning, news, weather and birthdays of colleagues.</p>
<p>The desktop application does not include all functionality of the Web application, but focuses on the worksheet. The existing functionality will be rebuilt in Flex and Air. The focus of our assignment was on modifying times in the worksheet and implementing an online / offline scenario.</p>
<h1>User Interface</h1>
<p>Web applications have set a new trend in interface design. The rules of interface design are no longer bound by the rules of the Operating System, and also no longer bound by the rules of the developer. The design for Web applications is usually defined by a designer, and implemented by the developer.  For example the Gmail look and feel differs from a standard desktop application, but works in a familiar way. Buttons remain buttons, and input fields look like input fields, but there is the freedom to create a completely new interaction model and design.</p>
<p>The web application we were to base our desktop application on was designed by one of our team members which also did the interaction model. A specific design for a software application can help the customer to recognize the product and get a better feeling about the application. Don&#8217;t think of it as your corporate style embedded in the software, but also as user-friendly since it is targeted toward the end user.</p>
<p>The desktop application is a simple, familiar, user-friendly version of the Web application to be used by the target audience: women aged 40-50 years with little to no computer experience.</p>
<p><img src="http://blog.luminis.nl/roller/luminis/resource/pklein/webtodesktop.png" /></p>
<p>The interface is a direct derivative of the Web application and has the same look and feel.<br />
The desktop application provides the same functionality as the web application, adding the possibility of changing times and the control of the application when it is offline.</p>
<h1>Flex</h1>
<p>Flex makes it easy and fast to build applications. This is especially due to the many standard components. Much can be modified in Flex, such as colors and properties such as shadows and corners. Also refer to the<br />
<a href="http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html">Flex 3 Style Explorer</a></p>
<p>The same functionality of our Flex application could be built quickly if we would use standard Flex. The challenge was to make no concessions to our design. In this process in  which we were responsible for design and implementation, it was occasionally hard to make a balance between adjusting the design or features in Flex to match original design.</p>
<h1>The implementation</h1>
<p>The most common approach building software appliances, is to build it with the standard components and skin it later on. This not only affects the design, but also does not involve the end user in the process.</p>
<p>The implementation chosen here is the same as implementing a design in HTML. From the existing design, slice the PSD and create a grid in Flex. Put the images into the grid and translate component design to Flex where necessary.</p>
<p>In Flex, the possibilities are extensive and there are minimal restrictions. Also covered are a lot of design possibilities like rounded corners, drop shadows and glows. This makes building your application very flexible. But also means you rebuild your original (Photoshop) design in Flex. So adjusting your original design could mean rebuilding your Flex implementation.</p>
<p>For example, when using the application, we noticed that there were indicators missing in the design. These were:</p>
<ul>
<li>Feedback to notify the user what the application was doing.</li>
<li>An indication of whether the application was online or offline.</li>
</ul>
<p>Not wanting to create a new, more complex design (adding items such as a status bar or an online/offline indicator [on/off light bulb]), we chose to show the online and offline situation turning the colors of the application to black and white, and displayed the status at the place where it is triggered on the button. The button is not useful when the application is busy.</p>
<p><img src="http://blog.luminis.nl/roller/luminis/resource/pklein/werkstaatofflinestatus.png" /></p>
<h1>Technologies</h1>
<p>
This should give an overview of the issues we ran into and how we solved them in the context of using the mentioned technologies to setup an AIR application. To get a bit of an overview of the possibilities of Flex / get familiar with the subject, a good first step would be to check out <a href="http://flex.org/tour">Tour de Flex</a>. Since that application includes all (re)sources, it&#8217;s also very convenient as a reference / to get basic samples up-and-running quickly.
</p>
<p>
Now, moving on to the issues encountered and how we tackled them. Please note that the sample code below includes only non-standard import statements and is taken from an Adobe AIR application that uses AIR-only functionality!
</p>
<h1>XML</h1>
<p>It took a while to get a bit of a feeling for creating and handling XML type objects. To illustrate, a number of relevant subtleties are incorporated in the following bit of code:</p>
<pre>
    var i:int = 2;
    var s:String = 'green';

    // Convert a String value to an XML object to create the first element:
    var e1:XML = XML("&lt;element attr1='1'&gt;&lt;label&gt;first label&lt;/label&gt;" +
                     "&lt;color&gt;blue&lt;/color&gt;&lt;/element&gt;");

    // Create the second XML element using the values of variables 'i' and 's':
    var e2:XML =
        &lt;element attr1={i}&gt;
            &lt;label&gt;second label&lt;/label&gt;
            &lt;color&gt;{s}&lt;/color&gt;
        &lt;/element&gt;;

    // Now create the final XML object using the 2 elements that were created:
    var x1:XML = &lt;main&gt;{e1}{e2}&lt;/main&gt;;

    // And query it for a specific attribute value ('attr1', be sure not to forget the '@'!)
    // and element value (color) to determine the label value of a specific element:
    var result:String = x1.element.(@attr1 == 2).(color == 'green').label;
    // The value of the 'result' variable now is "second label". It would've been an empty
    // string ("") in case no matching element was found.
</pre>
<h1>HTTP POST</h1>
<p>The application started out using only the HTTP GET method, which was easily achieved by using the <a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/http/HTTPService.html">HTTPService</a>. However it was soon necessary to post data as well and getting the HTTPService to do this properly / finding some good examples (or even debuggin the (https) requests that were created properly) turned out to be a bit of a hassle. When we stumbled upon the <a href="http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequest.html">URLRequest</a> we got things up-and-running fairly easily:</p>
<pre>
    import flash.net.*;

    private function onPostComplete(event:Event):void {
    }

    private function doPost():void {
        var dataToPost:XML = x1; // Posting the XML object from the previous example.
        var urlLoader:URLLoader = new URLLoader();

        // Define a handler in which actions can be defined for when the post is complete.
        urlLoader.addEventListener(Event.COMPLETE, onPostComplete);

        var urlToPostTo:String = "https://fillinyourhosthere.net/post.xml"
        var urlRequest:URLRequest = new URLRequest(urlToPostTo);
        urlRequest.data = dataToPost.toXMLString();
        urlRequest.method = URLRequestMethod.POST;
        urlLoader.load(urlRequest);
    }
</pre>
<h1>Online / Offline</h1>
<p>Another requirement of the application was that it should be usable even if the target server went down or the client using the application is offline. As it turns out, this functionality is readily provided through using the <a href="http://livedocs.adobe.com/flex/3/langref/air/net/URLMonitor.html">URLMonitor</a>:</p>
<pre>
    // This code assumes a 'mx:WindowedApplication' with 'initialize="onWindowInitialized(event)"'.

    import air.net.URLMonitor;

    private var m_monitor:URLMonitor;

    private function onWindowInitialized(e:Event):void {
        var serviceURL:String = "https://fillinyourhosthere.net";
        var serviceToMonitor:URLRequest = new URLRequest(serviceURL);
        m_monitor = new URLMonitor(serviceToMonitor);
        m_monitor.addEventListener(StatusEvent.STATUS, announceStatus);
        m_monitor.start();
    }

    private function announceStatus(e:StatusEvent):void {
        if (m_monitor.available) {
            // Possibly update work that was done if previously offline.
        } else {
            // The application is (now) offline.
        }
    }
</pre>
<h1>Updating DataProvider data</h1>
<p>When using e.g. an array of data objects as a dataprovider for a TileList (or a DataGrid/AdvancedDataGrid) and changing (the value of) an item in the array, the view isn&#8217;t (always) updated immediately. If you want to see the changes immediately, you should use the <i>invalidateList()</i> method:</p>
<pre>
    &lt;mx:TileList
        id="tl"
        dataProvider="myDataProvider"
    &lt;!-- ...rest of the declaration... --&gt;

    // Do something that updates myDataProvider data.
    tl.invalidateList();
</pre>
<h1>Conclusion</h1>
<p>There are still some things that could be improved on.</p>
<p>It would be preferable that the hours could be entered only through the use of keyboard, or mouse. Now you have to use both, and that makes it less intuitive. And corrupted/invalid data could be entered as the input fields are not masked.</p>
<p>Using Flex as a RIA developer kit can be fun, especially for designer who already know a bit of HTML/CSS and Javascript. Creating a skinned application in Flex is easy to do but still takes more time time than using the original components.</p>
<p>Patrick de Klein &#038; Jaap Vriend</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.nl/developing-a-flex-air-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR brings RIA to the desktop</title>
		<link>http://lsd.luminis.nl/air-brings-ria-to-the-desktop/</link>
		<comments>http://lsd.luminis.nl/air-brings-ria-to-the-desktop/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 13:39:25 +0000</pubDate>
		<dc:creator>Jeroen Bouvrie</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[apollo]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ria]]></category>

		<guid isPermaLink="false">http://lsd.luminis.net/?p=124</guid>
		<description><![CDATA[<img class="thumbnail" src="http://blog.luminis.nl/luminis/resource/thumbnails/air-100x100.png" alt="AIR brings RIA to the destop" />

Adobe's AIR, Adobe Integrated Runtime, offers a way to bring existing and new rich internet applications to the desktop. This is the first entry I post starting with an overview of the AIR capabilities.]]></description>
			<content:encoded><![CDATA[<p>When I was visiting the Adobe Live event in Amsterdam (May 2007) the session of Mike Downey about Apollo caught my attention. Adobe Integrated Runtime, code name Apollo,  (see also <a href="http://labs.adobe.com/technologies/air/">AIR</a>) is the runtime environment that brings rich internet applications to the desktop. This &#8216;desktop&#8217; can exist on any platform where a runtime is available. At the moment of writing this blog entry, only Windows and Mac are supported but work is in progress to support linux as well as mobile phone platforms.</p>
<p>
The idea is to use existing web technologies (HTML, Flash, Flex, Ajax) to create a RIA that runs in the AIR runtime and is able to use the AIR API, e.g. for caching purposes. This API is available through JavaScript or ActionScript. It is possible to manipulate entire HTML pages using DOM and subclassing the HTMLControl class. By doing so JavaScript actions can be manipulated or a submit can be intercepted. The AIR API offers functionality to detect if the application is online, to manipulate the window chrome (with transparency), clipboard, drag&#038;drop, network functionality and local storage. JavaScript can call ActionScript and vice versa.<br />
The deployable unit is a .AIR file that needs to be installed the first time. The API contains update functionality to get a latest version of an application.</p>
<p>
When looking for cool AIR applications on the web it becomes clear that it is a challenge for developers to use cool graphics that make your rich internet application intuitive and really look good. From this perspective it does not matter if you use Flex 3 or e.g. Ajax. Flex 3 has some cool new animations (mx.effects package) but as a developer you better find a good interaction designer to cover that part. With AIR you can combine different RIA technologies and extend them with powerful desktop functionality. It is also interesting to see how fast we are able to build new applications based on the scripting environment(s) that AIR supports. More interesting AIR developer details with examples I will post in next entries in this blog.</p>
<p>
Some applications start to show the real value of AIR; at this moment Adobe launched a <a href="http://labs.adobe.com/showcase/special/airderby/">contest</a> to create the most unique Adobe AIR application. With actually some real cool prices; may we have your votes!</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.nl/air-brings-ria-to-the-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
