<?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>Content on Content Management &#187; AIR</title>
	<atom:link href="http://contentoncontentmanagement.com/category/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://contentoncontentmanagement.com</link>
	<description></description>
	<lastBuildDate>Tue, 03 Aug 2010 12:57:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<atom:link rel="next" href="http://contentoncontentmanagement.com/category/air/feed/?page=2" />

		<item>
		<title>Me, Flex and The Content Server</title>
		<link>http://contentoncontentmanagement.com/2008/04/me-flex-and-the-content-server/</link>
		<comments>http://contentoncontentmanagement.com/2008/04/me-flex-and-the-content-server/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 04:59:27 +0000</pubDate>
		<dc:creator>David Roe</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ContentOnContentManagement.com/?p=73</guid>
		<description><![CDATA[I&#8217;m having a little love affair lately with Adobe&#8217;s latest version of Flex.  It was released just a few months ago and since I&#8217;ve started playing with I&#8217;ve been very impressed with the language and the architecture.  Believe it or &#8230; <a href="http://contentoncontentmanagement.com/2008/04/me-flex-and-the-content-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having a little love affair lately with Adobe&#8217;s latest version of Flex.  It was released just a few months ago and since I&#8217;ve started playing with I&#8217;ve been very impressed with the language and the architecture.  Believe it or not the Flex compiler is actually now an open source application, so theoretically if you know ActionScript and/or the Flex definition schema, you can create your own applications with the free compiler.  Adobe&#8217;s Flex <em>product </em>at this point is actually just their IDE, Flex Builder, and that is actually just a customized, Flex-oriented version of Eclipse.</p>
<p>I decided to give Flex a go and in following the theme of the blog, have developed a custom Flex API and application for Oracle UCM.</p>
<p><strong>Wait, I thought you didn&#8217;t like Flash?</strong></p>
<p>Before I jump in to the sample project, I have to tell you that this is really a turning point for me with Flex.  For some time now I&#8217;ve usually frowned on Flex or Flash for web development.  There&#8217;s always the Flash movie or two that&#8217;s worked in to the site much the same way an image would be, but as far as using Flex or Flash for front end development, I&#8217;ve never been much of a fan.  My reasons go something like this:</p>
<ul>
<li>Web crawlers like Google can&#8217;t search content and links inside a SWF file</li>
<li>It&#8217;s sometimes hard to bookmark URLs or even have URLs to specific points</li>
<li>Just about anything you can do in Flash I can do in Javascript</li>
</ul>
<p>I know there are a ton of really cool Flash sites out there, but I&#8217;ve mostly thought of Flash as a &#8220;banner-ad&#8221; framework and assumed Flex was just Flash without the &#8220;Movie&#8221; format.  When I compare Flash sites to traditional HTML ones, they sure look really cool, but I like to copy content, download images and link to stuff.  Flash sites march to the beat of their designer and that has been a bit of a turn off for me.</p>
<div><strong>So why the change of heart</strong></div>
<p>Flex is really an interesting option for front end web development.  Because it runs on the Flash player, there&#8217;s less chance for browser compatibility issues.  IE6, IE7, FF?  Who cares?  As long as you have the Flash player your app should run fine.  The code for Flex(Actionscript) is also considerably more powerful than Javascript.  In addition to possessing all the qualities of Javascript like prototype inheritance and loose typing, it&#8217;s also developed the features of a strongly-typed, object oriented language like Java.  I&#8217;ve found it extremely flexible and actually pretty fun to work with.</p>
<p>Another thing to consider is that Flex is a web framework, but now with the introduction of Adobe&#8217;s AIR runtime,  you can run and deploy Flex applications to the desktop.  The very common sense distinction between what is a web application and desktop application suddenly becomes a little fuzzy.</p>
<p>What we are really seeing is the evolution of the Flash movie player in to a lightweight virtual machine and I think in that model this could be an even more successful technology than it already is.  You can make a decent argument that Flex, Flash and Air are still niche technologies, but given the Adobe competition that is forming some of the big wigs think there is a market there.</p>
<ul>
<li>Microsoft has released it&#8217;s Flash/Flex alternative framework, <a href="http://silverlight.net/">Sliverlight</a></li>
<li>Rumors have started that Sun is <a href="http://www.cmswatch.com/Trends/1165-Sun-to-pursue-Java-less-Java">working on a Java-less VM</a></li>
</ul>
<div>AIR was released along with Flex 3, so it&#8217;s been out for just a few months(beta has been out almost a year).  Still there&#8217;s already a pretty sizable list of <a href="http://airapps.pbwiki.com/">applications</a>.  Will Flex, Air and Sliverlight stay niche frameworks?  I&#8217;,m not sure yet, but I am 100% certain that there&#8217;s a point where integration with a content management will become a consideration and a priority for them.</div>
<p><strong>Didn&#8217;t you mention a UCM Component?</strong></p>
<p>I&#8217;m way off track and sounding like an Adobe advertisement, so back to my sample project&#8230;.As I mentioned I&#8217;ve been working on a sample Flex application for Oracle UCM.  I started out developing a Flex API for UCM, along the same vein as my .NET API for UCM.  Basically I&#8217;ve mirrored the object model of Stellent/Oracle&#8217;s own idcserver package which is used for content server JSP development.  It&#8217;s a simple and yet very flexible design that allows you to make just about any service call to the content server, returning local data and/or resultsets.  Those values and resultsets can then be directly bound to Flex controls.</p>
<p>Here&#8217;s an example of what a service call looks like using the Actionscript API in Flex:</p>
<p style="padding-left: 30px;"><span style="font-family: -webkit-monospace; ">var sb:ServerBean = new ServerBean();</span></p>
<p style="padding-left: 60px;"><code> </code></p>
<p style="padding-left: 30px;"><span style="font-family: -webkit-monospace;">sb.putLocal(&#8220;IdcService&#8221;,&#8221;GET_SEARCH_RESULTS&#8221;);</span></p>
<p> </p>
<p> </p>
<p><code></p>
<p style="padding-left: 30px;">sb.putLocal("QueryText","dDocType &lt;matches&gt; `Document`");</p>
<p style="padding-left: 30px;">sb.executeService();</p>
<p></code></p>
<p> </p>
<p>One interesting thing about Flex though is that its httpservice object(needed for web service calls) forces you in to asynchronous calls&#8230;.great for applications&#8230;sort of a pain for example code.  Nevertheless I&#8217;ve added several events to signal when a service call is complete.  Listener methods are then attached to those events and in those listener<em> </em>methods, you can retrieve a value or resultset and bind it to a control.  Here&#8217;s an example of what occurs in the listener method to bind the resultset to the Flex datagrid.</p>
<p style="padding-left: 30px;"><code>var SearchResults:ServerResultSet = sb.getResultSet("SearchResults");</code></p>
<p style="padding-left: 30px;"><code>var rows:XMLList= SearchResults.getRows();</code></p>
<p style="padding-left: 30px;"><code>dgSearchResults.dataProvider = SearchResults.getRows();</code></p>
<p>I&#8217;m not showing it in the examples above, but the resultset object also has all the methods you know and love from UCM, like first(), next() and isRowPresent().</p>
<p>Unlike the .NET API which I more or less pushed without an example, I&#8217;ve bundled the Flex API with what I think is a somewhat useful example component called Search and Update.</p>
<p>Search and Update contains a bound datagrid control that displays paged search results from a search request to the content server.  In addition to being a bound display of results, the Flex datagrid control also supports editing, which is enabled and tied via Flex events to UPDATE_DOCINFO service calls.  So if you edit a cell in the datagrid, the metadata for the content item is updated as well(non-editable fields in UCM are also not editable in the datagrid).</p>
<p>I&#8217;ve wrapped the application in a custom component that adds a link to the administrators menu titled &#8220;Search and Replace&#8221;.  The application fits very nicely in the content server page body, though there is a slight issue when you are in &#8220;top-menus&#8221; layout, where the drop down menus render behind the Flex app.  This is just one of the fun issues of dealing with Flash&#8230;.it&#8217;s always on top.</p>
<p>Inside the &#8220;Search and Update&#8221; component, there&#8217;s a folder called Source, which contains(you guessed it) all of the source for the API and Search and Update projects.  In addition when you unzip the download, you&#8217;ll find the component zip as well as a separate folder with a compiled version of the UCM API</p>
<p>Here&#8217;s a link to the sample:</p>
<p><a href="http://contentoncontentmanagement.com/2008/04/11/me-flex-and-the-content-server/ucm-flex-example/">Flex Search and Update Example for Oracle UCM</a></p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://contentoncontentmanagement.com/2008/04/me-flex-and-the-content-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

