<?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>Platformability &#187; Flash</title>
	<atom:link href="http://blog.caplin.com/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.caplin.com</link>
	<description>SWIMMING WITH TECHNOLOGY</description>
	<lastBuildDate>Thu, 09 Sep 2010 09:20:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>HTML5 vs Flash &#8211; The Saga Continues</title>
		<link>http://blog.caplin.com/2010/04/30/html5-vs-flash-the-saga-continues/</link>
		<comments>http://blog.caplin.com/2010/04/30/html5-vs-flash-the-saga-continues/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 11:58:33 +0000</pubDate>
		<dc:creator>Ian Alderson</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[mobile web]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=2331</guid>
		<description><![CDATA[Yesterday there were a couple of important posts that have reignited the fire under the HTML5 vs Flash debate. The first was Thoughts On Flash from Apple CEO Steve Jobs. The second was the riposte from Adobe CEO Shantanu Narayen, via Alan Murray&#8217;s exclusive interview, Highlights: The Journal’s Exclusive Interview With Adobe CEO. Unsurprisingly these [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday there were a couple of important posts that have reignited the fire under the HTML5 vs Flash debate. The first was <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hcHBsZS5jb20vaG90bmV3cy90aG91Z2h0cy1vbi1mbGFzaC8=">Thoughts On Flash</a> from Apple CEO Steve Jobs. The second was the riposte from Adobe CEO Shantanu Narayen, via Alan Murray&#8217;s exclusive interview, <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2dzLndzai5jb20vZGlnaXRzLzIwMTAvMDQvMjkvbGl2ZS1ibG9nZ2luZy10aGUtam91cm5hbHMtaW50ZXJ2aWV3LXdpdGgtYWRvYmUtY2VvLw==">Highlights: The Journal’s Exclusive Interview With Adobe CEO</a>.</p>
<p>Unsurprisingly these views have propagated around the Internet like wildfire. For a long while there have been claims and counter claims about HTML5 signalling the death of Flash, however this is the first time that someone in Jobs&#8217; position has taken such a firm position.</p>
<p><span id="more-2331"></span></p>
<p><b>Apple won&#8217;t support Flash on its mobile devices</b></p>
<p>Jobs&#8217; post highlighted several of the shortcomings of Flash, most of which, if not all, have remarked on by others before. The crucial thing is the unequivocal statement that Apple won&#8217;t support Flash on its mobile devices because of these. This is interesting in its own right, however reading between the lines, where does this leave Apple with respect to the other main RIA, Microsoft&#8217;s Silverlight, since many of Jobs&#8217; criticisms of Flash apply to it too?</p>
<p><b>Two workflows, one for Apple devices and one for others?</b></p>
<p>The response from Narayen is interesting too. However I was left wondering if he had misunderstood part of the message that I believe Jobs&#8217; was delivering. Speaking to Alan Murray, Narayen had the following to say of Jobs&#8217; post:</p>
<blockquote><p>
He says that Apple&#8217;s restrictiveness is just going to make it &#8220;cumbersome&#8221; for developers who are trying to make products that work on many devices. They&#8217;re going to have to have &#8220;two workflows&#8221; &#8230;  one for Apple devices and one for others.
</p></blockquote>
<p>&nbsp;</p>
<blockquote><p>
Mr. Narayen poses a question to Alan Murray, asking him if the Journal would &#8220;want to have stovepipes&#8221; &#8212; or separate development processes &#8212; when it is creating content. Mr. Murray says that certainly &#8220;it would be better if you could use one set&#8221; of development tools.
</p></blockquote>
<p>Both of these statements make it clear that Narayen is, unsurprisingly, considering that developers will only ever build their applications in Flash. Given that Apple have prevented Flash from running on its mobile devices, those applications will need to be rewritten. This is true if the developer wants to write the application in Flash, but also wants it to work on the iPhone. My interpretation of Jobs&#8217; post was that if you want to write your multiple device application just once, there&#8217;s nothing stopping you; Apple devices all support HTML. That said, there is an obvious monetary incentive to write an iPhone application natively rather than as a webapp, and they get access to more of the phones features too.</p>
<p>As anyone who has worked with HTML knows there are differences between the browsers which can make it difficult to create an application that looks and works and exactly as intended across all of them. However I am optimistic about this. Over the last six months I have written two relatively complex webapps targeted at an iPhone (one of them demonstrating how we could run our Caplin Trader product on a mobile device), both of which appeared to work without any tweaks on an Android phone. The main problem with is adoption of HTML5 within browsers, especially on mobile devices. Fortunately Blackberry, which has been lagging behind with its browser, is introducing a new <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2dzLmJsYWNrYmVycnkuY29tLzIwMTAvMDQvYmxhY2tiZXJyeS02LXNuZWFrLXBlYWstdmlkZW8tYXQtd2VzLTIwMTAv">webkit based browser</a>.</p>
<p><b>Where do we go from here?</b></p>
<p>This is certainly not the end of the HTML5 vs Flash debate, however the statement from Jobs&#8217; is profound. Unless there is a major change of heart from Apple anyone looking to build applications that want to run across multiple devices will need to write them once in HTML, or at least twice in any other language. </p>
<p>The question is how will the web development community respond? A number of people have already nailed their colours to one of the particular masts, and the flame war will inevitably continue. Have you already chosen a side? Do you believe that there is still a place for HTML and Flash to exist in harmony? Or are you still sitting on the fence?</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2331" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2010/04/30/html5-vs-flash-the-saga-continues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Features in Flex 4, Flash Builder 4, Flash Catalyst and Mosaic (part 2)</title>
		<link>http://blog.caplin.com/2010/04/29/new-features-in-flex-4-flash-builder-4-flash-catalyst-and-mosaic-part-2/</link>
		<comments>http://blog.caplin.com/2010/04/29/new-features-in-flex-4-flash-builder-4-flash-catalyst-and-mosaic-part-2/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 15:30:40 +0000</pubDate>
		<dc:creator>Adam Shone</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[catalyst]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flashbuilder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[lcds]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=2251</guid>
		<description><![CDATA[In the first part of this blog I covered some of the new features in Flex 4 and Flash Builder 4 as described in a talk by Adobe Technical Evangelist Christophe Coenraets. This part will focus on LiveCycle Collaboration Service, Flash Catalyst, LiveCycle DataServices, and the relatively new LiveCycle Mosaic. We also saw an example [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS8yMDEwLzA0LzIxL25ldy1mZWF0dXJlcy1pbi1mbGV4LTQtZmxhc2gtYnVpbGRlci00LWZsYXNoLWNhdGFseXN0LWFuZC1tb3NhaWMtcGFydC0x">first part</a> of this blog I covered some of the new features in Flex 4 and Flash Builder 4 as described in a talk by Adobe Technical Evangelist <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZW5yYWV0cy5vcmcv">Christophe Coenraets</a>. </p>
<p>This part will focus on LiveCycle Collaboration Service, Flash Catalyst, LiveCycle DataServices, and the relatively new LiveCycle Mosaic. We also saw an example of what a Flex financial trading application could look like.</p>
<p><span id="more-2251"></span></p>
<h4>LiveCycle Collaboration Service</h4>
<p>The LiveCycle Collaboration Service (LCCS) is designed to allow developers to add collaboration tools like whiteboarding and chat to their applications. In Flash Builder 4 we see these new tools in the component palette.</p>
<p>To give us a quick look at LCCS Christophe dragged a component called the <b>Connect session container</b> into the existing Twitter search application, and then dragged in a couple of the built in collaboration components &#8211; <b>Webcam</b> (designed for webconferencing) and <b>SimpleChat</b>. There is a bit of work to do in the MXML view, it is necessary to declare an <b>AdobeAuthenticator</b> object with a username (hard-coded for the purpose of the example rather than retrieved from a text input) and set it as the authenticator for the Connect session container. The Connect session container must also be configured with a &#8220;room&#8221; URL, essentially the context for the collaboration.</p>
<p>When we ran the application the container authenticated with the server and the webcam started up. Of course there was nobody to collaborate with, but we saw that if the application was loaded in multiple browser windows the instances were able to chat to each other.</p>
<p>Summary:</p>
<ul>
<li>LiveCycle Collaboration Services is an SDK that provides ready-made social and collaboration components.</li>
</ul>
<h4>Flash Catalyst</h4>
<p>Catalyst is a tool for interaction design &#8211; it allows you to turn visual designs into working user interfaces. You generally start by importing assets from Photoshop or Illustrator, however I have been able to create an extremely attractive and professional UI using MS Paint:</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS93cC1jb250ZW50L3VwbG9hZHMvdWkxLnBuZw=="><img src="http://blog.caplin.com/wp-content/uploads/ui1.png" alt="" width="374" height="339" class="alignnone size-full wp-image-2296" /></a></p>
<p>When the design is initially imported into Catalyst it looks like the UI for a real application (not so much in my case) but at this point it is essentially just a drawing. You can then right click on the various parts of the design and use the right-click context menu to tell Catalyst what they are &#8211; this transforms them into components like buttons, scrollbars etc.</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS93cC1jb250ZW50L3VwbG9hZHMvdWkyLnBuZw=="><img src="http://blog.caplin.com/wp-content/uploads/ui2.png" alt="" width="524" height="339" class="alignnone size-full wp-image-2298" /></a></p>
<p>If you run the application from Catalyst you can actually interact with the design. The buttons will click and the scrollbar will actually work &#8211; not only will the &#8220;thumb&#8221; move up and down within the track when you click the up and down buttons but it will scroll the contents of the pane up and down as well. To complete the interaction design you can create states in much the same way as you would in the design view of Flash Builder and define transitions between the states. Transitions are defined by dropping effects on to a timeline, giving control over when and how the components disappear and reappear, slide around etc, and other components such as buttons can be set to trigger the transition.</p>
<p>Of course what this is doing in the background is creating MXML which will eventually be handed over to the developer. The developer can then import the MXML into Flash Builder and begin writing the code behind it. Interestingly Christophe mentioned that the full round trip is not guaranteed to work, in other words if the developer tweaks the MXML in Flash Builder and gives it back to the designer there is a chance that Catalyst won&#8217;t be able to open it. Apparently the round trip is being worked on at the moment.</p>
<p>My UI design doesn&#8217;t really do this justice, but I suggest watching the <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NraWxsc21hdHRlci5jb20vcG9kY2FzdC9ob21lL2NocmlzdG9waGUtY29lbnJhZXRzLWZsZXgtNC1mbGFzaC1idWlsZGVyLTQtYW5kLWZsYXNoLWNhdGFseXN0">video</a> from about 63:16 to see this in action.</p>
<p>Summary:</p>
<ul>
<li>Catalyst allows designers to turn static assets into MXML.</li>
<li>The designer can also use Catalyst to define how the interaction with the application will work.</li>
</ul>
<h4>LiveCycle DataServices</h4>
<p>When working with data services Flex 4 introduces the concept of <b>model driven development</b>, which is the idea of doing as much work as possible in the data model &#8211; defining relationships between entities, validation rules etc &#8211; so that you don&#8217;t have to do the work in code. To demonstrate this we created a simple UI with a data grid and used the &#8220;Connect to data service&#8221; wizard to connect to a remote LCDS database. The wizard uses data service introspection to find out which data services are defined in the application server &#8211; in this case a database of employee details.</p>
<p>Connecting to the data service brings up a new view in Flash Builder called the <b>modeller view</b> and an accompanying new perspective called the <b>data model perspective</b>. This view is able to understand the database schema and display the tables with lines connecting them representing the relationships.</p>
<p>The key point is that changes made in the model view affect the objects and methods available in code. By switching back to the Flash view we saw that there are now objects available representing each entity in the database and these objects are populated with appropriate methods. By dragging and dropping the <i>getAll()</i> method on to the data grid in the UI and running the application we saw that the table was automatically filled with employee data from the remote database. </p>
<p>When we tried to create a second data grid to show the employees relating to an account there was initially no <i>getEmployees()</i> method on the account object, that method only appeared after we switched to the data model view and made the relationship between the account table and employees table bi-directional.</p>
<p>Summary:</p>
<ul>
<li>There is a new view and perspective associated with data modelling in Flash Builder 4.</li>
<li>The goal is to do most of the work in the data modelling view, not code.</li>
<li>Database access is done using JPA under the hood, and Flex 4 ships with Hibernate as the default JPA implementation.</li>
</ul>
<h4>A trading application</h4>
<p>Christophe says that applications for high-volume financial trading with streaming market data have recently been increasingly built in Flex. This is something we have also noticed at Caplin, leading to the development of our StreamLink for Flex API. To demonstrate the potential in this area we saw a basic trading application consisting of a grid which was basically a benchmark console to show how performance has improved in the latest version of LCDS. For the purpose of the benchmark the server feed was set up to send 1,000 updates per second and the grid was configured to request 1,000 symbols &#8211; in other words each symbol in the grid should update approximately once per second.</p>
<p>After running the benchmark for one minute we saw that the client received 59,633 updates with an average latency (calculated by adding a timestamp to the update on the server and calculating the delta between the timestamp and the current time on the client) of 12 milliseconds. The update rate was then increased to 5 updates per symbol per second, and the values in the grid began to change more rapidly as expected.</p>
<p>This was fairly interesting but obviously it was only a very quick overview and we would have to do a lot more analysis to see how well Flex is suited to high-volume trading. The numbers demonstrated in the benchmark are good for one client (in fact probably overkill) but a more realistic problem is scalability &#8211; for example Liberator has been tested with 10,000 concurrent users receiving 100 updates per second. </p>
<p>The grid size used in the example is also not particularly heavy duty for a trading application and I&#8217;d be interested to know what the limits of the Flex data grid are. We are well acquainted with the challenges in this area having spent a lot of time developing grids that can hold tens of thousands of fixed income symbols while remaining fast and responsive. It would be interesting to compare the performance of the Flex DataGrid control with the Silverlight DataGrid control, particularly since Silverlight 4 boasts a &#8220;200% performance improvement&#8221; as Mike noted in <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS8yMDEwLzA0LzE5L3NpbHZlcmxpZ2h0LTQtaXMtaXQtd2hhdC1iYW5rcy13YW50Lw==">his blog</a> last week.</p>
<p>Christophe didn&#8217;t attempt to scroll the grid while it was updating &#8211; does it remain useable, and what is the effect on CPU? And what is the mechanism for sending messages in the other direction if the client wants to trade on a particular price in the grid?</p>
<h4>LiveCycle Mosaic</h4>
<p>The final product on display was LiveCycle Mosaic, which seems to be best described as a sort of container framework or shell that allows you to aggregate multiple application modules into one view, with built in layout management and communication between modules.</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS93cC1jb250ZW50L3VwbG9hZHMvbW9zYWljLmpwZw=="><img src="http://blog.caplin.com/wp-content/uploads/mosaic.jpg" alt="" width="585" height="400" class="aligncenter size-full wp-image-2311" /></a></p>
<p>Sticking with the Mosaic theme, the individual modules are called <b>tiles</b>. The idea of this product is to avoid creating monolithic applications and start creating modules that can easily be plugged in to the Mosaic shell. Although the tiles are independent they can communicate with each other because they share the same context, this works by modules setting attributes in the shell and registering as listeners for attributes they are interested in.</p>
<p>The demo application was a financial research screen with tiles containing grids, charts, videos and so on. Some of the tiles featured products and enhancements that we had seen earlier in the presentation, such as LiveCycle DataServices to display data and LiveCycle Collaboration Service to chat with traders. We also saw some rich interaction &#8211; dragging a tile containing company details onto a tile containing a chart caused a new line to appear on the chart representing the company stock price.</p>
<p>The Mosaic shell also provides some other nice features out of the box such as the ability to load and save layouts and an iTunes <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Db3Zlcl9GbG93">cover flow</a> style alt-tab navigator for switching between tiles.</p>
<h4>Conclusion</h4>
<p>I hope this recap has been useful and that it took less time to read than the 90 minutes it would take to just watch the video! We&#8217;ve been keeping an eye on Flex for a while at Caplin and it seems to be making some good strides forward, such that we now provide a fully featured Flex version of our <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5jYXBsaW4uY29tL1N0cmVhbUxpbmsucGhw">StreamLink</a> library for building client applications. If you&#8217;re thinking of using Flex for your front end then let us know.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2251" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2010/04/29/new-features-in-flex-4-flash-builder-4-flash-catalyst-and-mosaic-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Features in Flex 4, Flash Builder 4, Flash Catalyst and Mosaic (part 1)</title>
		<link>http://blog.caplin.com/2010/04/21/new-features-in-flex-4-flash-builder-4-flash-catalyst-and-mosaic-part-1/</link>
		<comments>http://blog.caplin.com/2010/04/21/new-features-in-flex-4-flash-builder-4-flash-catalyst-and-mosaic-part-1/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 14:47:25 +0000</pubDate>
		<dc:creator>Adam Shone</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[catalyst]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flashbuilder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[lcds]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=2062</guid>
		<description><![CDATA[Last week I attended a talk at Skills Matter by Adobe Technical Evangelist Christophe Coenraets in which he gave us a whirlwind tour of some of the new features available in the latest version of Flex and its ecosystem. There is a video of the event on the website but if you don&#8217;t have 90 [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I attended a talk at <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NraWxsc21hdHRlci5jb20v">Skills Matter</a> by Adobe Technical Evangelist <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZW5yYWV0cy5vcmcv">Christophe Coenraets</a> in which he gave us a whirlwind tour of some of the new features available in the latest version of Flex and its ecosystem. There is a <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NraWxsc21hdHRlci5jb20vcG9kY2FzdC9ob21lL2NocmlzdG9waGUtY29lbnJhZXRzLWZsZXgtNC1mbGFzaC1idWlsZGVyLTQtYW5kLWZsYXNoLWNhdGFseXN0L3p4LTg2OA==">video</a> of the event on the website but if you don&#8217;t have 90 minutes to spare then here is the first of a two part recap. There was plenty of interesting stuff for developers and UX designers &#8211; in this first part I will cover data service introspection, new state syntax, new transition syntax and skinning with the new UI control model. Part two will focus on trading, LiveCycle Data Services, LiveCycle Collaboration Services, Catalyst and Mosaic.</p>
<p><span id="more-2062"></span></p>
<h4>Flash Builder 4: Improved interaction with data services</h4>
<p>Christophe began by building a Twitter search application in order to showcase the improved way to communicate with data services in Flash Builder 4. Throughout the talk he did almost everything in the <strong>design view</strong> rather than writing any code, so to create the UI he just dragged in a control bar with a text area called <i>key</i> and search button, and a data grid to display results. It looked something like this:</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS93cC1jb250ZW50L3VwbG9hZHMvZmxleDEucG5n"><img class="alignnone size-full wp-image-2066" src="http://blog.caplin.com/wp-content/uploads/flex1.png" alt="" width="557" height="300" /></a></p>
<p>To perform a search we would use the Twitter API, for example <em><a  href="http://search.twitter.com/search.atom?q=flex4" rel="nofollow">http://search.twitter.com/search.atom?q=flex4</a></em> to search for &#8220;flex4&#8243;. The problem is that in Flex Builder 3 interacting with an HTTP service like this is very dynamic &#8211; you can create a WebService object but it cannot give you any code completion options and it will not fail to compile if you try to invoke an operation that doesn&#8217;t exist.</p>
<p>Flash Builder 4 includes a &#8220;Connect to data service&#8221; wizard that allows various types of data service to be configured, including HTTP and LiveCycle Data Services. In the HTTP wizard it was possible to paste in the base URL and then define a list of operations &#8211; in this case just <em>search.atom</em> &#8211; and a list of parameters for each operation, in this case <em>q</em>. This generates a service proxy object that you can give a custom name, for example TwitterService, and the proxy object is populated with methods for each of the operations you defined. Our proxy object included the method <em>TwitterService.search(String q)</em>.</p>
<p>The wizard also allows you to customise the return type using <strong>data service introspection</strong>. What this does is execute the operation and show you the returned XML as a tree. Christophe pointed out that the XML typically contains some boilerplate information at the top which is not important, the relevant part of a twitter search is the list of <em>&lt;entry&gt;</em> elements which represent tweets:</p>
<pre>
<pre class="brush: xml;">
  &lt;entry&gt;
    &lt;id&gt;tag:search.twitter.com,2005:12256129876&lt;/id&gt;
    &lt;published&gt;2010-04-16T01:23:52Z&lt;/published&gt;
    &lt;title&gt;getting #vs2010 iso takes a while. Oh, well, I'll play
with #Flex4 while I wait for .net and #SL4 downloads. It's good
to have options&lt;/title&gt;
    &lt;updated&gt;2010-04-16T01:23:52Z&lt;/updated&gt;
    &lt;twitter:lang&gt;en&lt;/twitter:lang&gt;
    &lt;author&gt;
      &lt;name&gt;TarasNovak (TarasNovak)&lt;/name&gt;
      &lt;uri&gt;http://twitter.com/TarasNovak&lt;/uri&gt;
    &lt;/author&gt;
  &lt;/entry&gt;
</pre>
</pre>
<p>You can select this list of <i>&lt;entry&gt;</i> elements in the XML tree and mark it as the return type of the search operation, filtering out all the other stuff. To add even more semantic meaning, you can rename &#8220;entry&#8221; to &#8220;Tweet&#8221; &#8211; the search method on our proxy object now returns an array of Tweet objects. If you want to access properties of the Tweet in your ActionScript (including nested elements) you use the normal dot notation:</p>
<pre>
<pre class="brush: as3;">
var myTweet:Tweet;

// returns &quot;2010-04-16T01:23:52Z&quot;
var publishedDate:String = myTweet.published;

// returns &quot;TarasNovak (TarasNovak)&quot;
var authorName:String = myTweet.author.name;
</pre>
</pre>
<p>Hooking everything up didn&#8217;t require any code to be written. You can now right click on a button and choose &#8220;generate service call&#8221; from the context menu, then select the TwitterService.search operation and bind <i>q</i> to <i>{key.text}</i>. Using the context menus you can also bind the data grid to the return value of the TwitterService.search operation &#8211; the data grid is automatically populated with a column for each of the attributes on a Tweet.</p>
<p>Summary:</p>
<ul>
<li>You can now define data services more easily using the new wizards.</li>
<li>By giving Flash Builder more information about what your data service does you can interact with it in a strongly typed way.</li>
<li>It is possible to build a working Twitter search app in about 10 minutes without writing any code.</li>
</ul>
<h4>Flex 4: Improved state syntax</h4>
<p>The next example used a similar application, only this time it displayed employee information from an LCDS data service. It was possible to automatically generate a form from the data grid of employees using the context menu. The application looked a bit like this:</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS93cC1jb250ZW50L3VwbG9hZHMvZmxleDIucG5n"><img src="http://blog.caplin.com/wp-content/uploads/flex2.png" alt="" width="562" height="301" class="alignnone size-full wp-image-2096" /></a></p>
<p>The goal was to make the &#8220;full screen&#8221; button remove the data grid so that the form fills all the available space. To do this, Christophe created a new state in the design view called <i>fullScreen</i>, deleted the data grid and adjusted the width of the form to 100%. He then switched to the generated MXML, which now has these states:</p>
<pre>
<pre class="brush: xml;">
  &lt;mx:states&gt;
    &lt;mx:State name=&quot;state1&quot; /&gt;
    &lt;mx:State name=&quot;fullScreen&quot; /&gt;
  &lt;/mx:states&gt;
</pre>
</pre>
<p>The key point is that states used to be unreadable because they contained so much information about how to transition into that state from the base state. Now the states themselves are kept simple and the differences are added to individual components in a &#8220;cleverer&#8221; way. </p>
<p>In the MXML view we saw that the data grid element now had an attribute <i>includeIn=&#8221;state1&#8243;</i> because Flash Builder had worked out that it only appears in that state. The form element had an attribute <i>left.fullScreen=&#8221;0&#8243;</i>, indicating that when the application is in the <i>fullScreen</i> state it should take up the whole area. This <b>attribute.state=value</b> syntax is new in Flex 4.</p>
<p>Summary:</p>
<ul>
<li>After adjusting the application in design view, the generated MXML is much cleaner.</li>
<li>There is a new syntax for defining how components behave in different states.</li>
</ul>
<h4>Flex 4: Improved transition syntax</h4>
<p>In order to make the change between normal and full screen states a little more attractive we added transitions to the MXML. Note that the snippet below is pseudo-code based on my scribbled notes and the syntax may not be 100% accurate.</p>
<pre>
<pre class="brush: xml;">
  &lt;mx:transitions&gt;
    &lt;mx:Transition toState=&quot;fullScreen&quot;&gt;
       &lt;Parallel&gt;
          &lt;Fade target=&quot;{dataGrid}&quot; duration=&quot;1000&quot; /&gt;
          &lt;Resize target=&quot;{myForm}&quot; duration=&quot;500&quot; startDelay=&quot;1000&quot; /&gt;
       &lt;/Parallel&gt;
    &lt;/mx:Transition&gt;
 &lt;/mx:transitions&gt;
</pre>
</pre>
<p>This created a nice effect where data grid fades away and when it is fully removed the form smoothly expands to fill the gap. The <b>startDelay</b> attribute, which ensures that the form doesn&#8217;t start expanding until the data grid has finished fading away, is new in Flex 4.</p>
<h4>Flex 4: Skinning</h4>
<p>If you take a look at the code for an old &#8220;Halo&#8221; style component such as Button (which you can do, because as Christophe pointed out they are open source) you can see that the Button class defines both the behaviour and the look-and-feel of the control. This is a bad thing, because in order to change something like the graphics or layout of the control you would need to subclass the Button and edit the ActionScript. This style of control also does not work with Catalyst, which we covered later.</p>
<p>Flex 4 introduces a new component model called Spark which splits the behaviour away from the look and feel. Spark controls consist of an ActionScript behaviour class and an MXML skin file. According to Christophe we should be comfortable creating skins for our custom controls because we already know how to lay out a UI in MXML, and skins are no different. Ideally the skins will be created by a UX Designer in Catalyst and the code will be written in Flash Builder by a developer. Skins for a control can then be seamlessly swapped in and out by changing the new <b>skinClass</b> attribute for the control.</p>
<p>To demonstrate this we were shown a Webcam class that enabled the user to take a photo and replace the existing photo in the employee application. Initially the webcam just appeared as a box above the existing photo, but by changing the <b>skinClass</b> to a different skin and refreshing the page the webcam box slid out from behind the existing photo and included a shutter sound effect when the new photo was taken, which is defined in the skin.</p>
<p>Summary:</p>
<ul>
<li>Splitting the behaviour away from the UI makes sense, and supports the idea of dividing work between the developer and designer &#8211; this is really just the same concept we see in Silverlight where developers use Visual Studio and designers use Expression Blend.
<li>You can now change the look of the application without touching any code or affecting how it behaves.</li>
</ul>
<h4>Conclusion</h4>
<p>We covered a lot more in the talk including improvements to LCDS, LiveCycle Collaboration Services, Catalyst and Mosaic. There was also a demo of a high-update low-latency financial trading application, which I was interested in for obvious reasons! All of this is covered in <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS8yMDEwLzA0LzI5L25ldy1mZWF0dXJlcy1pbi1mbGV4LTQtZmxhc2gtYnVpbGRlci00LWZsYXNoLWNhdGFseXN0LWFuZC1tb3NhaWMtcGFydC0yLw==">part two</a>.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2062" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2010/04/21/new-features-in-flex-4-flash-builder-4-flash-catalyst-and-mosaic-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling Flex for enterprise applications</title>
		<link>http://blog.caplin.com/2009/10/22/scaling-flex-for-enterprise-applications/</link>
		<comments>http://blog.caplin.com/2009/10/22/scaling-flex-for-enterprise-applications/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 15:32:37 +0000</pubDate>
		<dc:creator>Martin Tyler</dc:creator>
				<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[StreamLink]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=482</guid>
		<description><![CDATA[Last night Phil Leggetter and I attended a session on Scaling Flex applications run by Skillsmatter. The video of the event has now been posted. We found this interesting as we as a company have entered the world of Flex. Our product is a Flex library API, which is part of our Caplin Xaqua offering, whereas the session [...]]]></description>
			<content:encoded><![CDATA[<p>Last night <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS9hdXRob3IvcGhpbGxjYXBsaW5jb20v">Phil Leggetter</a> and I attended a session on <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NraWxsc21hdHRlci5jb20vcG9kY2FzdC9hamF4LXJpYS9tYXRyaXg=">Scaling Flex applications</a> run by <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NraWxsc21hdHRlci5jb20v">Skillsmatter</a>. The video of the event has now been <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NraWxsc21hdHRlci5jb20vcG9kY2FzdC9hamF4LXJpYS9tYXRyaXg=">posted</a>.</p>
<p>We found this interesting as we as a company have entered the world of <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hZG9iZS5jb20vcHJvZHVjdHMvZmxleC8=">Flex</a>. Our product is a Flex library API, which is part of our <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5jYXBsaW4uY29tL2NhcGxpbi14YXF1YS5waHA=">Caplin Xaqua</a> offering, whereas the session discussed creating a Flex GUI application. It was good to see that there are a number of powerful Flex application frameworks and that they could easily be leveraged to use our library. The talk covered frameworks, modularisation techniques and tools that have been used by <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2xhYjQ5LmNvbS8=">Lab49</a> in the various Flex projects they have been involved in.</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5ib3JyZXdlc3NlbC5jb20v">Borre Wessell</a> of Lab49, who gave the talk, also covered their agile development process, which sounds fairly similar to ours even though they do more consultancy and we do a mix of consultancy and product work.</p>
<p>It was also interesting that Borre recommended using <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2xhYnMuYWRvYmUuY29tL3RlY2hub2xvZ2llcy9mbGFzaGJ1aWxkZXI0Lw==">Flash Builder 4</a> beta as we also found that was better with its integrated unit testing and <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hZG9iZS5jb20vZGV2bmV0L2ZsZXgvYXJ0aWNsZXMvZmxhc2hidWlsZGVyNF93aGF0c25ldy5odG1s">other productivity enhancements</a>. Tool support does seem a bit lacking in some areas for Flex &#8211; whilst there is a memory profiler as part of Flash Builder 4 the performance testing seems to be very much a manual process. We prefer to have performance tests as part of our automated processes so you can catch any regressions as early as possible.</p>
<p>Next week I will post my followup to my previous <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS8yMDA5LzEwLzIwL2FwcHJvYWNoZXMtdG8tc3RyZWFtaW5nLw==">post about streaming technologies</a>, which will touch on the LCDS approach compared to Caplin&#8217;s methods.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=482" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2009/10/22/scaling-flex-for-enterprise-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
