<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2frenchfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>La Fabrick interactive</title>
	
	<link>http://www.lafabrick.com/blog</link>
	<description>Laboratoire d'interfaces riches ( Flex, Flash, Air ...)</description>
	<pubDate>Wed, 17 Jun 2009 07:20:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/lafabrick" type="application/rss+xml" /><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Flafabrick" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Flafabrick" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Flafabrick" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://add.my.yahoo.com/content?lg=fr&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Flafabrick" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/bn/intatm_fr_1.gif">Subscribe with Mon Yahoo!</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>FlashBuilder/Eclipse : installation guide - subclipse, PDT, WTP and Maven</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/BIvE7_dF1Gk/</link>
		<comments>http://www.lafabrick.com/blog/2009/06/11/1174-flashbuildereclipse-installation-guide-subclipse-pdt-wtp-and-maven/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 08:35:53 +0000</pubDate>
		<dc:creator>fab</dc:creator>
		
		<category><![CDATA[Logiciels / extensions / plugins...]]></category>

		<category><![CDATA[eclipse]]></category>

		<category><![CDATA[FlashBuilder]]></category>

		<category><![CDATA[maven]]></category>

		<category><![CDATA[PDT]]></category>

		<category><![CDATA[subclipse]]></category>

		<category><![CDATA[WTP]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=1174</guid>
		<description><![CDATA[

This installation guide step by step is based on my needs: I am user of Java and Maven technologies, and Tomcat and JBoss servers. This installation allows you to get all the tools necessary for these types of developments, starting from a “from scratch” Eclipse IDE or a standalone FlashBuilder.


Start !
Need an IDE ! 2 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/FlashBuilder.jpg" alt="FlashBuilder" /></p>
<p>
This installation guide step by step is based on my needs: I am user of Java and Maven technologies, and Tomcat and JBoss servers. This installation allows you to get all the tools necessary for these types of developments, starting from a “from scratch” Eclipse IDE or a standalone FlashBuilder.
</p>
<p><span id="more-1174"></span></p>
<h2>Start !</h2>
<p>Need an IDE ! 2 ways : Eclipse and FlashBuilder plug-in, or the standalone distribution of FlashBuilder.</p>
<ul>
<li><a href="http://www.eclipse.org/downloads/">Link for Eclipse</a> (take the Eclipse Classic distribution)</li>
<li><a href="http://labs.adobe.com/technologies/flashbuilder4/">Link for FlashBuilder</a></li>
</ul>
<p>I use in this guide FlashBuilder, standalone distribution.</p>
<p><center><strong>Note : FlashBuilder, is now an Eclipse Ganymede package (3.4). For against, FlashBuilder has preserved the update system of Eclipse Europa version. More simple, I am sure you will have no problem to install all features if you choose the pack Eclipse+Flex plug-in !</strong></center></p>
<p></p>
<table width="100%">
<tr  valign="top">
<td width="50%"><center><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/SoftwareUpdatesFlashBuilder.jpg" alt="FlashBuilder Softwares Updates" /><br />FlashBuilder Softwares Updates</center></td>
<td width="50%"><center><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/SoftwareUpdatesGanymede.jpg" alt="Ganymede Softwares Updates" /><br />Ganymede Softwares Updates</center></p>
<ul>
<li>Remote site management with &#8220;Manages Sites&#8221; : you just need to provide the url.</li>
<li>The  selection of required plug-ins is automatic (be sure you have select all you need in &#8220;Manages Sites&#8221;)</li>
</ul>
</td>
</table>
<h2>Subclipse : subversion for Eclipse</h2>
<p><a href="http://subclipse.tigris.org/">Subclipse</a> is an eclipse plug-in which provides support for Subversion (SVN).</p>
<p>To install subclipse :</p>
<ul>
<li>open “<strong>Help > Softawre Updates > Find and install&#8230;</strong>” dialog box.</li>
<li>Choose “<strong>Search for new features to Install</strong>” and click on “<strong>Finish</strong>”.</li>
<li>In the next box, click on “<strong>new remote site</strong>”. The dialog box for enter an update site appear.</li>
<li>Type “<strong>subclipse</strong>” in Name input, and “<strong>http://subclipse.tigris.org/update_1.6.x</strong>” in the url update address input.<br /><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/newRemoteSite-subclipse.jpg" alt="subclipse, update remote site" /></li>
<li>Click on “<strong>Ok</strong>”.<br />Verify in the list of includes sites that subclipse is selected. Select also “<strong>Ganymede Discovery Site</strong>” (Europa if your are on a Eclipse 3.3 IDE).<br /><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/installSublcipse-selectRequired.jpg" alt="subclipse, select required" /></li>
<li>Click on “<strong>Finish</strong>”.</li>
<li>In the search results box, open the Sublclipse folder, en select “<strong>Subclipse</strong>”. An error appears. Don’t panic! Some additional plug-in are necessary. Click on “<strong>Select Required</strong>” button: Eclipse check the list of not found plug-in, and select automatically all required plug-in in Ganymede Discovery Site.</li>
<li>Click on “<strong>Next</strong>”. Some validation, and other dialog box appear. Validate all boxes.</li>
<li>you can also take a coffee&#8230; But <strong>attention</strong> ! A lot of coffee can be taken during this installation.</li>
</ul>
<h2>For PHP developer : PDT !</h2>
<p>You know : with eclipse you can make coffee ! Some cool tool exist for Eclipse. If you are a PHP developer, you can use PDT - PHP Development Tool.<br />
PDT, like WTP - See further- add to your Eclipse some tools for developing PHP application.<br />
For more information about PDT, visit the <a href="http://www.eclipse.org/pdt/">PDT homepage</a>.</p>
<p>To Install PDT, follow these steps :</p>
<ul>
<li>In “<strong>Help > Softawre Updates > Find and install&#8230;</strong>” , choose “<strong>Search for new features to Install</strong>” and click on “<strong>Finish</strong>”.</li>
<li>Next, you need to add 2 Remote Site : <strong>PDT</strong>, and <strong>DLTK</strong> - <a href="http://www.eclipse.org/dltk/">Dynamic Language ToolKit</a>.<br />Click on “<strong>new remote site</strong>” :
<ul>
<li>Adding <strong>PDT</strong> : in Name input, type “<strong>PDT</strong>”, and for url : “<strong>http://download.eclipse.org/tools/pdt/updates/2.0/</strong>”</li>
<li>Adding <strong>DLTK</strong> :  in Name input, type “<strong>DLTK</strong>”, and for url : “<strong>http://download.eclipse.org/technology/dltk/updates-dev/1.0M4-PDT-2.0/</strong>”</li>
</ul>
<p>Verify in the list of includes sites that PDT and DLTK are selected. Select also “<strong>Ganymede Discovery Site</strong>”, and click on “<strong>Finish</strong>”.
	</li>
<li>In the list, select &#8220;<strong>PDT > PDT SDK 2.0.x > PDT SDK Feature</strong>”. An error appear : click on “<strong>Select required</strong>”. Then, “<strong>Next</strong>”.<br /><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/PDT-install.jpg" alt="PDT, jar selection" /></li>
<li><strong>Another coffee?</strong></li>
</ul>
<p>If your needs is just PHP : Stop ! The following is just for Java developers.</p>
<h2>Web Tools Platform : a tribute to Java</h2>
<p>Web Tools Platform (WTP) is a package of some tools for your eclipse IDE, which provides you to develop web and J2EE application. WTP add to your IDE the J2EE perspective (a very good view of your code), Some other stuff is added with the WTP. I invite you to discover all this !<br />
For more information about WTP, visit the <a href="http://www.eclipse.org/webtools/">Webtools homepage</a>.</p>
<p>Installing WTP is like the installation of subclise. More simple.
</p>
<ul>
<li>Open “<strong>Help > Softawre Updates > Find and install&#8230;</strong>”.</li>
<li>Choose “<strong>Search for new features to Install</strong>” and click on “<strong>Finish</strong>”.</li>
<li>Select “<strong>Ganymede Discovery Site</strong>” and click on “<strong>Finish</strong>”.</li>
<li>Open “<strong>Ganymede Discovery Site</strong>”, select “<strong>Web and Java EE Development</strong>”, and click on “<strong>Select Required</strong>”.<br /><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/WTP-required.jpg" alt="WTP, jar selection" /></li>
<li>Click on “<strong>Finish</strong>”. Like subclipse, some validation and other dialog box appear. Validate all.</li>
<li><strong>Coffee Time</strong></li>
</ul>
<p>Your IDE is now ready for good coding ! </p>
<h2>Maven : manager of project</h2>
<p>Based on the concept of a project object model (POM), Maven can manage a project&#8217;s build, reporting and documentation from a central piece of information.<br />
Maven is the perfect tool for continuous integration and version tracking of your jar, swc, war, &#8230;<br />
For more information about Maven, visit the <a href="http://maven.apache.org/">maven homepage</a>.<br />
<a href="http://m2eclipse.codehaus.org/">m2Eclipse is the Maven2 plugin for Eclipse</a>. This plug-in ads all you need to integrate Maven into your projects.</p>
<p>For the installation of m2Eclipse, you need to add another remote update site.
</p>
<ul>
<li>Go to “<strong>Help > Softawre Updates > Find and install&#8230;</strong>”.</li>
<li>Choose “<strong>Search for new features to Install</strong>” and click on “<strong>Finish</strong>”.</li>
<li>Click on “<strong>new remote site</strong>”.</li>
<li>Type “<strong>m2Eclipse</strong>” in Name input, and “<strong>http://m2eclipse.sonatype.org/update/</strong>“ in the url update address input.<br /><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/m2eclipseRemoteSite.jpg" alt="m2eclipse - remote update site" /></li>
<li>Click on “<strong>Ok</strong>”.</li>
<li>Verify in the list of includes sites that m2eclipse is selected. Click on “<strong>Finish</strong>”.</li>
<li>Now You need to select the list of Maven plug-in to install. The minimum required is to select all in the folder “Maven Integration” except POM XML Editor (for me, I have selected this feature), and POM Editor.<br />
 For a better integration with WTP and Subclipse, I select also the “<strong>Maven integration for WTP</strong>” (in Maven Project Configurators”) and “<strong>Maven Central repository index</strong>”, “Maven SCM handler for Subclipse” (in Maven Optional Components”).<br /><img src="http://www.lafabrick.com/blog/images/installDevGuideFB/minimumUpdateForm2eclipse.jpg" alt="m2eclipse : minimum selection" /></li>
<li>Click on “Next”.</li>
<li>After passing all validations, &#8230;. <strong>Another coffee time</strong> !</li>
</ul>
<h2>Finish !</h2>
<p>Now : restart your IDE&#8230;. And <strong>let’s gamble</strong> ! With all these coffees you can’t sleep anyway &#8230; it can be time to start your project? </p>
<p>Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/08/22/203-import-de-framework-via-svn-et-le-plug-in-subclipse/" rel="bookmark" title="22 août 2007">Import de framework via SVN et le plug-in Subclipse</a></li>
<li><a href="http://www.lafabrick.com/blog/2007/07/25/194-installer-son-environnement-de-dveloppement-tomcat-eclipse-wtp-flex-builder-maven-2/" rel="bookmark" title="25 juillet 2007">Installer son environnement de développement : Tomcat - Eclipse - WTP - Flex Builder</a></li>
<li><a href="http://www.lafabrick.com/blog/2007/10/14/254-maven-2-flex-2-une-synergie-possible/" rel="bookmark" title="14 octobre 2007">Maven 2 - Flex 2 - une synergie possible ?</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/02/27/309-flex-builder-3-et-le-php/" rel="bookmark" title="27 février 2008">Flex Builder 3 et le PHP ( PDT ) : installation</a></li>
</ul>
<p><!-- Similar Posts took 10.972 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/lafabrick?a=BIvE7_dF1Gk:6offynzoRVU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=BIvE7_dF1Gk:6offynzoRVU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=BIvE7_dF1Gk:6offynzoRVU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=BIvE7_dF1Gk:6offynzoRVU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=BIvE7_dF1Gk:6offynzoRVU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=BIvE7_dF1Gk:6offynzoRVU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=BIvE7_dF1Gk:6offynzoRVU:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/BIvE7_dF1Gk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/06/11/1174-flashbuildereclipse-installation-guide-subclipse-pdt-wtp-and-maven/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/06/11/1174-flashbuildereclipse-installation-guide-subclipse-pdt-wtp-and-maven/</feedburner:origLink></item>
		<item>
		<title>Interfaces tangibles : le futur du multitouch</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/0qy7oXVRZzQ/</link>
		<comments>http://www.lafabrick.com/blog/2009/05/04/1130-interfaces-tangibles-le-futur-du-multitouch/#comments</comments>
		<pubDate>Mon, 04 May 2009 21:39:00 +0000</pubDate>
		<dc:creator>fab</dc:creator>
		
		<category><![CDATA[Bientôt chez vous]]></category>

		<category><![CDATA[Expériences utilisateur]]></category>

		<category><![CDATA[Vu sur le web (2.0)]]></category>

		<category><![CDATA[interactivité]]></category>

		<category><![CDATA[interfaces]]></category>

		<category><![CDATA[multitouch]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=1130</guid>
		<description><![CDATA[
Le temps du touché est arrivé. Windows Surface, les initiatives comme NUIGroup, les PC Tactiles HP, le trackPad Apple, l&#8217;IPhone… Le multitouch est partout. On peut imaginer que lorsque tout ce beau monde se sera mis d’accord pour normaliser la gestuelle (bon courage les gars !), il faudra bien repenser nos habitudes à la maison [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-1133" title="audiopad" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/05/audiopad2.jpg" alt="audipad tangible interface" width="360" height="238" /><br />
Le temps du touché est arrivé. <a href="http://www.microsoft.com/surface/">Windows Surface</a>, les initiatives comme <a href="http://www.nuigroup.com/">NUIGroup</a>, les <a href="http://www.hp.com/united-states/campaigns/touchsmart/index.html?jumpid=ex_602_go/touchsmart/touchsmarthome">PC Tactiles HP</a>, le <a href="http://www.apple.com/macbook/features.html">trackPad Apple</a>, <a href="http://www.apple.com/iphone/">l&#8217;IPhone</a>… Le multitouch est partout. On peut imaginer que lorsque tout ce beau monde se sera mis d’accord pour normaliser la gestuelle (bon courage les gars !), il faudra bien repenser nos habitudes à la maison !<br />
<span id="more-1130"></span></p>
<p>Alors le multitouch remplaçant de nos bons vieux claviers / souris ? Pas si sûr ! Pour certains acteurs cela ne fait pas de doute. Pour d’autres en revanche, ces interfaces ne sont que des périphériques supplémentaires, un moyen différent de « consommer ».</p>
<p>Imaginez manipuler un fichier Excel en multitouch… Ça risque d’être assez pénible ! Pour peu que l’on soit un accro des macros ! (bon moi je m’en fou je fais pas d’Excel). Et puis pour l’instant ça fait mal aux doigts ! A force de gesticuler autour de sa table 50 pouces, on prend des crampes…</p>
<p>D’accord mais c’est bien le multitouch ! LA solution ? Les pseudo claviers / souris comme périphériques physiques de la table.  Imaginez un clavier souple ou une souris transparente en plexiglas : pas d’électronique dedans, et tout de même  repérés par la table. Un peu comme les <a href="http://en.wikipedia.org/wiki/Tangible_User_Interface">tables tangibles</a>, reconnaissant des périphériques électroniques (appareils photos…), ou des périphériques de soirée (<a href="http://www.i-bar.ch/en/pictures/">un verre</a>…) ou n’importe quoi qui possède un tag RFID. RFID ou bien par une forme particulière : on peut imaginer des objets de formes différentes, qu’une analyse d’image peu détecter.</p>
<p><object width="425" height="344" data="http://www.youtube.com/v/9fcUCRSyiw8&amp;hl=fr&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/9fcUCRSyiw8&amp;hl=fr&amp;fs=1" /><param name="allowfullscreen" value="true" /></object><br />
<em>slap widgets demo</em></p>
<p>Plusieurs groupes travaillent sur ce type d’interfaces tangibles : le MIT avec le groupe <a href="http://tangible.media.mit.edu/index.php">Tangible Media Group</a>, le Media Computing Group, un groupement de recherche des universités allemandes, avec le projet <a href="http://hci.rwth-aachen.de/slap">SLAP</a> : Silicone Illuminated Active Peripherals.</p>
<p>Et ce n’est qu’un début ! Le monde de la musique <a href="http://www.jamespatten.com/audiopad/">dispose déjà d’interfaces tangibles</a>.</p>
<p>[update] Do you want more ?<br />
Pattie Maes, du Fluid Interface Group - MIT, à présenter en février dernier leur dernier jouet : «<a href="http://ambient.media.mit.edu/projects.php?action=details&#038;id=68"> the SixthSense</a> » : Minority Report en vrai. Pourquoi avoir un périphérique alors que ses doigts c&#8217;est si bien ?!<br />
<object width="446" height="326"><param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"></param><param name="allowFullScreen" value="true" /><param name="wmode" value="transparent"></param><param name="bgColor" value="#ffffff"></param><param name="flashvars" value="vu=http://video.ted.com/talks/embed/PattieMaes_2009-embed_high.flv&#038;su=http://images.ted.com/images/ted/tedindex/embed-posters/PattieMaes-2009.embed_thumbnail.jpg&#038;vw=432&#038;vh=240&#038;ap=0&#038;ti=481" /><embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="446" height="326" allowFullScreen="true" flashvars="vu=http://video.ted.com/talks/embed/PattieMaes_2009-embed_high.flv&#038;su=http://images.ted.com/images/ted/tedindex/embed-posters/PattieMaes-2009.embed_thumbnail.jpg&#038;vw=432&#038;vh=240&#038;ap=0&#038;ti=481"></embed></object></p>
<p>Ils sont aussi à l’origine du projet fou <a href="http://ambient.media.mit.edu/projects.php?action=details&#038;id=35">Siftables</a><br />
<img src="http://www.lafabrick.com/blog/wp-content/uploads/2009/05/siftables.jpg" alt="siftables" title="siftables" width="308" height="253" class="aligncenter size-full wp-image-1166" /></p>
<p>Je vous invite vivement à découvrir<a href="http://ambient.media.mit.edu/projects.php"> l’ensemble des projets</a> de ce groupe : il y a là de quoi rêver sur l’avenir des interfaces !<br />
[/update]</p>
<p>Et là oui ! J’imagine mieux Excel en multitouch !<br />
A suivre de près donc&#8230; A quand un docteur maboul virtuel tangible ?<br />
Et vous, des idées ?Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/07/19/192-un-curseur-des-curseurs/" rel="bookmark" title="19 juillet 2007">Un curseur&#8230; des curseurs ???</a></li>
<li><a href="http://www.lafabrick.com/blog/2007/03/13/41-multi-touchscreen-multi-users-et-plus-si-imagination/" rel="bookmark" title="13 mars 2007">Multi-Touchscreen, multi-users et plus si imagination&#8230;</a></li>
<li><a href="http://www.lafabrick.com/blog/2007/11/15/265-si-j-tais-une-imprimante/" rel="bookmark" title="15 novembre 2007">Si j&#8217;étais une imprimante&#8230;</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/12/13/506-utiliser-le-dragmanager-de-flex-1ere-partie/" rel="bookmark" title="13 décembre 2008">Utiliser le DragManager de Flex ( 1ère partie )</a></li>
</ul>
<p><!-- Similar Posts took 10.897 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/lafabrick?a=0qy7oXVRZzQ:qlluQnLAaKY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=0qy7oXVRZzQ:qlluQnLAaKY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=0qy7oXVRZzQ:qlluQnLAaKY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=0qy7oXVRZzQ:qlluQnLAaKY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=0qy7oXVRZzQ:qlluQnLAaKY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=0qy7oXVRZzQ:qlluQnLAaKY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=0qy7oXVRZzQ:qlluQnLAaKY:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/0qy7oXVRZzQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/05/04/1130-interfaces-tangibles-le-futur-du-multitouch/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/05/04/1130-interfaces-tangibles-le-futur-du-multitouch/</feedburner:origLink></item>
		<item>
		<title>Prenez vous au serious : Serious Drink Party vol. 05</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/xJh_hVJBQY8/</link>
		<comments>http://www.lafabrick.com/blog/2009/04/20/1120-prenez-vous-au-serious-serious-drink-party-vol-05/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 21:59:41 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
		
		<category><![CDATA[La Fabrick]]></category>

		<category><![CDATA[Nawak]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=1120</guid>
		<description><![CDATA[

Bien le bonsoir,
on avait imaginé une cinquième édition des Serious Drink complétement serious pour le coup&#8230; annoncée plusieurs semaines à l&#8217;avance&#8230; avec un videoproj, des beaux thèmes PowerPoint, des chips, des olives, et quelques rythmes neojazzy en interlude entre chaque présentations&#8230; la sseuclaaa !
mais bon le temps a passé, tout était bien parti&#8230; sauf les [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://forestnet.blogit.fr/photos/c64f993bd6fd054c.jpg" alt="Bière et F." /><br />
<span id="more-1120"></span></p>
<p>Bien le bonsoir,<br />
on avait imaginé une cinquième édition des Serious Drink complétement serious pour le coup&#8230; annoncée plusieurs semaines à l&#8217;avance&#8230; avec un videoproj, des beaux thèmes PowerPoint, des chips, des olives, et quelques rythmes neojazzy en interlude entre chaque présentations&#8230; la sseuclaaa !<br />
mais bon le temps a passé, tout était bien parti&#8230; sauf les &#8220;invitations&#8221;&#8230; toujours pas parties elles&#8230; tanpis <img src='http://www.lafabrick.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , on a quand même soif !!!<br />
Du coup on a une petite salle réservée, mais trève de sérieux, on garde le thème classique :</p>
<p>Soirée Bière et fleeex donc au 1er étage du Café Cousu Jeudi le 23 d&#8217;avril à partir de 19h30 !!!<br />
Viendez y !!!</p>
<p>Passage Thiaffait<br />
19,rue René Leynaud<br />
69001 Lyon<br />
Tel: 04 72 98 83 38</p>
<p><a href="http://maps.google.fr/maps?f=q&#038;source=s_q&#038;hl=fr&#038;geocode=&#038;q=passage+thiaffait+lyon&#038;sll=47.15984,2.988281&#038;sspn=24.227066,39.902344&#038;ie=UTF8&#038;z=16&#038;iwloc=A">Voir où que c&#8217;est sur une carte</a>Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/12/03/275-climatus-et-lafabrick-sur-le-petit-cran/" rel="bookmark" title="3 décembre 2007">Climatus et lafabrick sur le petit écran&#8230;.</a></li>
<li><a href="http://www.lafabrick.com/blog/2007/09/13/220-3-minutes-pour-sauver-vos-futurs-prsentations/" rel="bookmark" title="13 septembre 2007">3 minutes pour sauver vos futurs présentations&#8230;</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/03/03/313-l-universit-lyon1-cherche-aussi-2-stagiaires/" rel="bookmark" title="3 mars 2008">L&#8217;université Lyon1 cherche (aussi) 2 stagiaires</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/06/647-serious-drink-0090108/" rel="bookmark" title="6 janvier 2009">Serious Drink 0.09.01.08&#8230;</a></li>
</ul>
<p><!-- Similar Posts took 9.971 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/lafabrick?a=xJh_hVJBQY8:hUT7b0UuTnQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=xJh_hVJBQY8:hUT7b0UuTnQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=xJh_hVJBQY8:hUT7b0UuTnQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=xJh_hVJBQY8:hUT7b0UuTnQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=xJh_hVJBQY8:hUT7b0UuTnQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=xJh_hVJBQY8:hUT7b0UuTnQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=xJh_hVJBQY8:hUT7b0UuTnQ:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/xJh_hVJBQY8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/04/20/1120-prenez-vous-au-serious-serious-drink-party-vol-05/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/04/20/1120-prenez-vous-au-serious-serious-drink-party-vol-05/</feedburner:origLink></item>
		<item>
		<title>Vous reprendrez bien un set de travail !?</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/cxbE0HuI09M/</link>
		<comments>http://www.lafabrick.com/blog/2009/04/14/1100-vous-reprendrez-bien-un-set-de-travail/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 23:40:15 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
		
		<category><![CDATA[Bientôt chez vous]]></category>

		<category><![CDATA[Logiciels / extensions / plugins...]]></category>

		<category><![CDATA[[Dev] Flash / Flex / AIR...]]></category>

		<category><![CDATA[eclipse]]></category>

		<category><![CDATA[flex builder]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=1100</guid>
		<description><![CDATA[[UPDATE] Si vous préférez la langue de Shakespeare, Tekool avait déjà écrit à ce propos il y a &#8220;fort longtemps&#8221;&#8230; je rends donc à César  !&#8230; désolé&#8230;
Vous venez de créer votre douzième workspace Eclipse/Flex Builder ??? Et vous en avez marre de recréer vos perspectives, et autres vues&#8230; à chaque fois ???

Mais pourquoi diable [...]]]></description>
			<content:encoded><![CDATA[<p>[UPDATE] Si vous préférez la langue de Shakespeare, <a href="http://www.tekool.net/blog/2008/05/26/%c2%abworking-sets%c2%bb-an-helpful-flex-navigator-functionality/">Tekool</a> avait déjà écrit à ce propos il y a &#8220;fort longtemps&#8221;&#8230; je rends donc à César <img src='http://www.lafabrick.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> !&#8230; désolé&#8230;</p>
<p>Vous venez de créer votre douzième workspace Eclipse/Flex Builder ??? Et vous en avez marre de recréer vos perspectives, et autres vues&#8230; à chaque fois ???</p>
<p><img src="http://lafabrick.com/blog/images/erick//01_project_list-20090414-012817.png" alt="trop c'est trop !!!" /></p>
<p>Mais pourquoi diable n&#8217;utilisez vous pas les &#8220;fameux&#8221; &#8216;working sets&#8217; ?</p>
<p><span id="more-1100"></span></p>
<p>Et puisque quelques pixels valent pleins de mots&#8230;</p>
<p><img src="http://lafabrick.com/blog/images/erick//02_menuWorkingSet-20090414-013950.png" alt="Selection Working Set" /></p>
<p><img src="http://lafabrick.com/blog/images/erick//03_Select_Working_Set-20090414-013159.png" alt="Nouvea working set" /></p>
<p><img src="http://lafabrick.com/blog/images/erick//04_RessourceSet-20090414-013246.png" alt="Ressource Set type" /></p>
<p><img src="http://lafabrick.com/blog/images/erick//05_NewWorkingSet-20090414-013429.png" alt="Choix ressources" /></p>
<p><img src="http://lafabrick.com/blog/images/erick//06_selectWorkingSet-20090414-013547.png" alt="Selection working set" /></p>
<p><img src="http://lafabrick.com/blog/images/erick//07_workingSet1_result-20090414-013636.png" alt="un bol d'air" /></p>
<p>Les working sets ( prononcez &#8217;setss&#8217; )&#8230; tout simplement la solution moderne aux problèmes de congestion de projets dans Eclipse &#038; Flex Builder !Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/08/28/209-wtp-flex-buider-rsoudre-les-problmes-de-mmoire/" rel="bookmark" title="28 août 2007">WTP - Flex Buider : résoudre les problèmes de mémoire</a></li>
<li><a href="http://www.lafabrick.com/blog/2007/11/15/266-debuguer-un-projet-flex-distant-via-flex-builder/" rel="bookmark" title="15 novembre 2007">L&#8217;erreur est humaine&#8230; debuguer un projet Flex distant via Flex Builder</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/02/27/309-flex-builder-3-et-le-php/" rel="bookmark" title="27 février 2008">Flex Builder 3 et le PHP ( PDT ) : installation</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/01/15/291-flex-masquer-les-warnings-inutiles/" rel="bookmark" title="15 janvier 2008">Flex et les warnings inutiles&#8230;</a></li>
</ul>
<p><!-- Similar Posts took 10.186 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/lafabrick?a=cxbE0HuI09M:mRH3y_t2tIg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=cxbE0HuI09M:mRH3y_t2tIg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=cxbE0HuI09M:mRH3y_t2tIg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=cxbE0HuI09M:mRH3y_t2tIg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=cxbE0HuI09M:mRH3y_t2tIg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=cxbE0HuI09M:mRH3y_t2tIg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=cxbE0HuI09M:mRH3y_t2tIg:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/cxbE0HuI09M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/04/14/1100-vous-reprendrez-bien-un-set-de-travail/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/04/14/1100-vous-reprendrez-bien-un-set-de-travail/</feedburner:origLink></item>
		<item>
		<title>FITC#09 : TwiiDee, WiiFlash and Rock ‘n’ Roll</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/9M7Xr5Btbyg/</link>
		<comments>http://www.lafabrick.com/blog/2009/03/02/1079-fitc09-twiidee-wiiflash-and-rock-n-roll/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 13:32:04 +0000</pubDate>
		<dc:creator>fab</dc:creator>
		
		<category><![CDATA[Bientôt chez vous]]></category>

		<category><![CDATA[La Fabrick]]></category>

		<category><![CDATA[Nos projets]]></category>

		<category><![CDATA[FITC]]></category>

		<category><![CDATA[Twiidee]]></category>

		<category><![CDATA[wiiFlash]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=1079</guid>
		<description><![CDATA[La semaine dernière s&#8217;est déroulé le FITC à Amsterdam. Au cours de la session &#8220;Cool Shit!&#8221;, Thibault a lâché en avant première une démo de la nouvelle monture de WiiFlash : vous allez voir ça envoie ! Il a aussi présenté TwiiDee, mon application pour manipuler des objets 3D à l&#8217;aide de wiimote. Malgré quelques [...]]]></description>
			<content:encoded><![CDATA[<p>La semaine dernière s&#8217;est déroulé le <a href="http://www.fitc.ca/">FITC</a> à Amsterdam. Au cours de la session &#8220;Cool Shit!&#8221;, <a href="http://www.bytearray.org/">Thibault</a> a lâché en avant première une démo de la nouvelle monture de <a href="http://wiiflash.bytearray.org/">WiiFlash</a> : vous allez voir ça envoie ! Il a aussi présenté TwiiDee, mon application pour manipuler des objets 3D à l&#8217;aide de wiimote. Malgré quelques heures de débug Vista / Air / Javascript, l&#8217;effet démo n&#8217;a pas manqué le rendez-vous :). A noter pour la prochaine fois Thibault, toujours utiliser des piles neuves en présentation :D. Mais bon avec un peu de patience et de sang froid&#8230; ça a fini par rouler !!!  Je vous laisse voir tout ça !</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/imjzIiHa3fw&#038;hl=fr&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/imjzIiHa3fw&#038;hl=fr&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2008/12/23/591-cocomo-wiibot/" rel="bookmark" title="23 décembre 2008">Introducing r.CØ &#8230; First &#8220;Cocomo ready&#8221; Air Wiibot&#8230;</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/12/10/472-retour-sur-lafabrick-max/" rel="bookmark" title="10 décembre 2008">retour sur Lafabrick @ max</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/02/04/298-wiiflash-et-3d-l-universit/" rel="bookmark" title="4 février 2008">wiiFlash et 3d à l&#8217;université</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/02/07/302-wiiflash-l-universit-acte-2/" rel="bookmark" title="7 février 2008">wiiFlash à l&#8217;université : acte 2</a></li>
</ul>
<p><!-- Similar Posts took 70.954 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/lafabrick?a=9M7Xr5Btbyg:T-7QhBUsSv4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=9M7Xr5Btbyg:T-7QhBUsSv4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=9M7Xr5Btbyg:T-7QhBUsSv4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=9M7Xr5Btbyg:T-7QhBUsSv4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=9M7Xr5Btbyg:T-7QhBUsSv4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/lafabrick?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/lafabrick?a=9M7Xr5Btbyg:T-7QhBUsSv4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/lafabrick?i=9M7Xr5Btbyg:T-7QhBUsSv4:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/9M7Xr5Btbyg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/03/02/1079-fitc09-twiidee-wiiflash-and-rock-n-roll/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/03/02/1079-fitc09-twiidee-wiiflash-and-rock-n-roll/</feedburner:origLink></item>
		<item>
		<title>Hello AFCS ( bye Cocomo ) ! Simple user authentication with Adobe Flash Collaboration Services</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/60qwiPkcNJg/</link>
		<comments>http://www.lafabrick.com/blog/2009/01/31/1040-hello-cocomo-first-app/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 21:48:24 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
		
		<category><![CDATA[[Dev] Flash / Flex / AIR...]]></category>

		<category><![CDATA[cocomo]]></category>

		<category><![CDATA[collaboration]]></category>

		<category><![CDATA[interactivité]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=1040</guid>
		<description><![CDATA[[ 05.03.2009 : Update : Cocomo is now called Adobe Flash Collaboration Services / AFCS and 0.9.1 was released with some bug fixes and a new namespace ]
(Translated from French tutorial on FlashXPress )
In this first application example, we will build, or rather &#8220;assemble&#8221;, a videoconferencing application including a chat tool, shared notes and a [...]]]></description>
			<content:encoded><![CDATA[<p>[ 05.03.2009 : Update : Cocomo is now called Adobe Flash Collaboration Services / AFCS and 0.9.1 was released with some bug fixes and a new namespace ]</p>
<p>(Translated from <a href="http://www.flashxpress.net/ressources-flex/hello-cocomo-premiere-application-multi-utilisateurs/">French tutorial on FlashXPress</a> )</p>
<p>In this first application example, we will build, or rather &#8220;assemble&#8221;, a videoconferencing application including <strong>a chat tool, shared notes and a file sharing manager.</strong> For this we&#8217;ll use some &#8220;<strong>pods</strong>&#8221; , the highest level components of the <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS framework.</p>
<p>One of the most important component in a <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS application is the <strong>session manager</strong>. It will be<strong> in charge of communicating with <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS server, user authentication, connection management, data synchronization</strong>, and even more&#8230;</p>
<p>Two components in the framework can do this job: <strong>ConnectSessionContainer</strong> and <strong>ConnectSession</strong> (both implement com.adobe.rtc.session.<strong>IConnectSession</strong>).</p>
<p><img src="http://lafabrick.com/blog/images/erick//cocomo_connection_tut2_sch1-20090201-155223.jpg" alt="Cocomo connection" /></p>
<p><span id="more-1040"></span></p>
<h3>Hello AFCS ( bye Cocomo )</h3>
<p>For starting :</p>
<p>- create a <strong>new Flex project</strong>,<br />
- <strong>copy <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS SWC file (from CocomoSDK_0.9/lib/player 9 or 10/afcs.swc) and paste it in your /libs/ folder</strong></p>
<p>Let&#8217;s start with <strong>ConnectSessionContainer</strong> :<br />
It&#8217;s a <strong>Canvas based component</strong>, which includes all features needed to communicate with <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS servers.</p>
<p>This container, and all of its children, will not be visible as long as the room connection is not established. This is the reason why we will integrate our pods (Webcamera, SimpleChat, Notes and FileShare) inside it. As long as our application isn&#8217;t connected to our room, collaborative components will remain hidden.</p>
<p>To start a session, we&#8217;ll need to define two attributes in the ConnectSessionContainer tag :</p>
<p>- roomURL( ex : http://connectnow.acrobat.com/yourAccount/roomName)<br />
- authenticator : your user credentials</p>
<p>User credential&#8217;s transmission is done by using the AdobeHSAuthenticator class. It will encapsulate authentication data (userName and password). Several authentication modes are possible, we&#8217;ll probably focus on them in a future tutorial.</p>
<p>In this first step, we will hard-code our credentials in our application&#8230; Only for the first example.</p>
<pre class="syntax-highlight:xml">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;mx:Application layout=&quot;absolute&quot;
 xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
 xmlns:rtc=&quot;AfcsNameSpace&quot;
 &gt;
&lt;rtc:ConnectSessionContainer id=&quot;sessionManager&quot; width=&quot;500&quot; height=&quot;400&quot;
 roomURL=&quot;http://connectnow.acrobat.com/yourAccount/roomName&quot;
 authenticator=&quot;{identificator}&quot;
 backgroundColor=&quot;#FFFFFF&quot;
/&gt;
&lt;rtc:AdobeHSAuthenticator id=&quot;identificator&quot;
 userName=&quot;votreLogin&quot; password=&quot;VotreMotDePasse&quot;
/&gt;
&lt;/mx:Application&gt;
</pre>
<p>In this step, your application can already connect to the server. By default, connectSessionContainer had a autoLogin property set to true. This means that it will try to communicate with the server as soon as it&#8217;s created. In this example, I set a background color for the container, so we can see when connection is established.</p>
<p>If you publish your project in debug mode, you&#8217;ll be able to see server / client communication logs.</p>
<p><img src="http://lafabrick.free.fr/blogImg/Flex_Builder-20081218-065625.jpg" alt="Logs Connexion Serveurs Cocomo" /></p>
<p>To be notified about the login result, we can watch for AuthenticationEvent.AUTHENTICATION_FAILURE and AuthenticationEvent.AUTHENTICATION_SUCCESS on the AdobeHSAuthenticator.</p>
<p>To know if application is fully connected and synchronized, we must add a listenner to the SessionEvent.SYNCHRONIZATION_CHANGE event of sessionContainer and watch for its isSynchronized property. We will talk about differents aspects of this synchronisation in future tutorials.</p>
<pre class="syntax-highlight:xml">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;mx:Application layout=&quot;absolute&quot;
    xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
    xmlns:rtc=&quot;AfcsNameSpace&quot;
&gt;
     &lt;mx:Script&gt;
         &lt;![CDATA[
             import mx.controls.Alert;
             import com.adobe.rtc.events.SessionEvent;

             // session&#039;s state
             private var isConnected:Boolean = false;

			// when a &quot;server synchronization&quot; event is dispatched
             public function onSynchro( e:SessionEvent ):void
             {
                 if ( sessionManager.isSynchronized &amp;&amp;  ! isConnected )
                 {
                     Alert.show(&quot;Application connectée&quot;);
                     isConnected = true ;
                 }
             }
     ]]&gt;
 &lt;/mx:Script&gt;
&lt;rtc:ConnectSessionContainer id=&quot;sessionManager&quot;
    width=&quot;100%&quot; height=&quot;100%&quot; backgroundColor=&quot;#FFFFFF&quot;
    authenticator=&quot;{identificator}&quot;
    roomURL=&quot;http://connectnow.acrobat.com/regartdemo/meetingzone&quot;
    synchronizationChange=&quot;onSynchro( event )&quot;
/&gt;
&lt;!-- Authentication component --&gt;
 &lt;rtc:AdobeHSAuthenticator id=&quot;identificator&quot;
   userName=&quot;YourUserName&quot; password=&quot;YourPassword&quot;
   authenticationSuccess=&quot;Alert.show(&#039;authentication success&#039;)&quot;
   authenticationFailure=&quot;Alert.show(&#039;authentication failed&#039;)&quot;/&gt;
&lt;/mx:Application&gt;
</pre>
<p>Now that our application can establish a connection to the room, we can start adding pod components.</p>
<h3>Using <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS Pods</h3>
<p>Pods are &#8220;ready to go&#8221; components. When you use a ConnectSessionContainer, you just have to add pods as children in it, and allow them to detect and use your <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS server connection.</p>
<p>For now, <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS contains:<br />
- Simple chat: chat component allowing public and private messages.<br />
- WebCamera: webcam publisher / subscriber<br />
- FileShare component: file sharing components (upload / download)<br />
- Shared Notes components<br />
- Roster and horizontalRoster: user management components<br />
- SharedWhiteBoard</p>
<p>Let&#8217;s insert our pods :</p>
<pre class="syntax-highlight:xml">

&lt;rtc:ConnectSessionContainer id=&quot;sessionManager&quot; width=&quot;100%&quot; height=&quot;100%&quot; backgroundColor=&quot;#FFFFFF&quot;
   authenticator=&quot;{identificator}&quot;
   roomURL=&quot;http://connectnow.acrobat.com/votreCompte/nomSalon&quot;
   synchronizationChange=&quot;onSynchro( event )&quot;
   &gt;

   &lt;!-- PODS --&gt;
   &lt;mx:VBox width=&quot;50%&quot; height=&quot;100%&quot; horizontalAlign=&quot;center&quot;&gt;

      &lt;rtc:WebCamera id=&quot;webcam&quot; width=&quot;300&quot; /&gt;

      &lt;rtc:SimpleChat id=&quot;chat&quot; width=&quot;100%&quot; height=&quot;100%&quot; /&gt;

   &lt;/mx:VBox&gt;

   &lt;mx:VBox width=&quot;50%&quot; height=&quot;100%&quot;  right=&quot;0&quot;&gt;

     &lt;rtc:FileShare id=&quot;fileManager&quot; width=&quot;100%&quot; height=&quot;50%&quot; /&gt;

      &lt;rtc:Note id=&quot;notes&quot; width=&quot;100%&quot; height=&quot;50%&quot; /&gt;
   &lt;/mx:VBox&gt;
&lt;/rtc:ConnectSessionContainer&gt;
</pre>
<p><img src="http://lafabrick.free.fr/blogImg/hello_cocomo-20081218-081901.jpg" alt="Hello Cocomo" /></p>
<p>Pods embed robust role management features, as we&#8217;ll see later.</p>
<p>Anyway, you&#8217;ve just built your first <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS application, or should I say your first &#8220;real time communication&#8221; application&#8230; I can&#8217;t think how we use to do that before!!??&#8230;</p>
<h3>User authentication et connection management</h3>
<p>Hmmm&#8230;there&#8217;s still something missing&#8230; For a single user app, it&#8217;s almost ok&#8230; but it&#8217;s not the scenario here&#8230; What are we going to do if, someday, we find friends and want to collaborate with them??? Does anybody need to connect with my &#8220;owner&#8221; account? Can we let any AS3 decompiler reveal our credential data? I don&#8217;t think so!! Fortunatly <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS allows us to easily manage these aspects.</p>
<p><del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS room allows several authentication methods, specially :<br />
- as owner, based on your <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS Developer account credentials<br />
- as guest, only needing a user name.</p>
<pre class="syntax-highlight:xml">

&lt;mx:Panel id=&quot;logPanel&quot; &gt;
   &lt;mx:Form&gt;

      &lt;mx:FormItem label=&quot;Login&quot;&gt;
         &lt;mx:TextInput id=&quot;chp_login&quot; /&gt;
      &lt;/mx:FormItem&gt;

      &lt;mx:FormItem label=&quot;your role :&quot; direction=&quot;horizontal&quot; &gt;

         &lt;mx:RadioButtonGroup id=&quot;userRole&quot; /&gt;

         &lt;mx:RadioButton id=&quot;isGuest&quot; groupName=&quot;userRole&quot;
            label=&quot;Guest&quot; value=&quot;{UserRoles.VIEWER}&quot;  selected=&quot;true&quot;
         /&gt;
         &lt;mx:RadioButton id=&quot;isOwner&quot; groupName=&quot;userRole&quot;
            label=&quot;Host&quot; value=&quot;{UserRoles.OWNER}&quot;
         /&gt;
      &lt;/mx:FormItem&gt;

      &lt;mx:FormItem label=&quot;Password&quot;  enabled=&quot;{ userRole.selectedValue == UserRoles.OWNER }&quot;&gt;
         &lt;mx:TextInput id=&quot;field_password&quot; displayAsPassword=&quot;true&quot;  /&gt;
      &lt;/mx:FormItem&gt;

      &lt;mx:FormItem &gt;
         &lt;mx:Button label=&quot;Enter&quot;
            click=&quot;login(chp_login.text , userRole.selectedValue == UserRoles.OWNER ? field_password.text : null  )&quot;
          /&gt;
      &lt;/mx:FormItem&gt;

   &lt;/mx:Form&gt;
&lt;/mx:Panel&gt;
</pre>
<p>Users role definition is based on integer values, which are defined as constants in UserRoles class.</p>
<p>The principal roles are : owner (host / developer account), publisher (guest who can publish on one or several components) and viewer (passive guest who is only allowed to publish on chat channel). By default, guests can use a room only if the owner is connected. You can configure initial room settings (auto-promote guest as publisher, data persistence, free room access&#8230;). You can also manage user roles and permissions with the <del datetime="2009-03-06T16:02:18+00:00">CocomoDevConsole</del> AFCSDevConsole app, or directly by using the API. But that&#8217;s another story&#8230;</p>
<p>For now we will insert an authentication form. We thus need to deactivate the ConnectSessionContainer&#8217;s autoLogin property.</p>
<p>Then, we need to add a login() method, in charge of filling the AdobeHSAuthenticator with data. It will also initialize the sessionContainer room connection:</p>
<pre class="syntax-highlight:js">

private function login ( login:String, password:String ):void
{
   identificator.userName = login;
	//if password is set : log as host
	//else log as guest
   identificator.password = password ;

	// run sessionManager connection
   sessionManager.login();
}
</pre>
<p>We can also add a logout button.</p>
<pre class="syntax-highlight:js">

// disconnection
// in actual 0.9 beta, mostly pods, can&#039;t be re-connected after a disconnection

private function logout():void
{
    sessionManager.logout();

	// close() is supposed to disconnect et remove all childNodes, but seems not work yet
    //sessionManager.close();
}
</pre>
<pre class="syntax-highlight:xml">

&lt;mx:VBox width=&quot;50%&quot; height=&quot;100%&quot; horizontalAlign=&quot;center&quot; right=&quot;0&quot;&gt;
    &lt;mx:Button label=&quot;Logout&quot; click=&quot;logout()&quot; /&gt;

    &lt;rtc:FileShare id=&quot;fileManager&quot; width=&quot;100%&quot; height=&quot;50%&quot; /&gt;

    &lt;rtc:Note id=&quot;notes&quot; width=&quot;100%&quot; height=&quot;50%&quot; /&gt;
&lt;/mx:VBox&gt;
</pre>
<p>Once the application is connected, we shall remove the form and the sessionContainer will be removed as well when the connection is stopped or lost</p>
<pre class="syntax-highlight:js">

// for each synchronization event
// : connection, disconnection , state&#039;s change, ...
private function onSynchro( e:SessionEvent ):void
{

	// once application is successfully connected / synchronized
    if ( sessionManager.isSynchronized &amp;&amp; ! isConnected )
    {
        Alert.show(&quot;Application connectée&quot;);

        isConnected = true ;

        removeChild( logPanel );

    } else if ( ! sessionManager.isSynchronized &amp;&amp; isConnected ){
    // if disconnected
    isConnected = false ;

   /* remove the connectSessionContainer
   *  » in this version disconnected pods can&#039;t re-connect
   *
   *  » For re-connect, you can :
   *     - reload html page
   *     - dynamically re-create connectSession and pods
   */
   removeChild( sessionManager );

   // display logout message
   Alert.show( &#039;vous avez quitté la réunion, recharger la page pour entrer à nouveau&#039;);
   }
}
</pre>
<p>In this beta version, I encountered problems when trying to repeat multiple login/logout. After a few tests, the best way I found wass to force a page refresh.</p>
<p><a href="http://www.e-actif.com/lab/hello_cocomo">Get sources</a></p>
<p>This first <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS example is finished, and obviously it&#8217;s possible to do a lot more. In future tutorials, we&#8217;ll take a deeper look on <del datetime="2009-03-06T16:02:18+00:00">Cocomo</del> AFCS architecture. We&#8217;ll also use the <del datetime="2009-03-06T16:02:18+00:00">CocomoDevConsole</del> AFCSDevConsole and LocalConnectionServer, two AIR utilities included in the SDK.</p>
<p>Have a good collaboration !!! :DAutres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/12/07/274-cocomo-dbarque-et-personne-me-prvient/" rel="bookmark" title="7 décembre 2007">Cocomo est là et personne me prévient ??!!</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/12/22/568-cocomo-kezako/" rel="bookmark" title="22 décembre 2008">Cocomo ? Kezako ?</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/12/23/591-cocomo-wiibot/" rel="bookmark" title="23 décembre 2008">Introducing r.CØ &#8230; First &#8220;Cocomo ready&#8221; Air Wiibot&#8230;</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/21/999-what-is-adobe-cocomo/" rel="bookmark" title="21 janvier 2009">Developing with AFCS a.k.a Cocomo - Introduction</a></li>
</ul>
<p><!-- Similar Posts took 11.359 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/lafabrick?a=Of9oJElS"><img src="http://feeds.feedburner.com/~f/lafabrick?i=Of9oJElS" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=PJ9dQMMm"><img src="http://feeds.feedburner.com/~f/lafabrick?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=8P8tkAG9"><img src="http://feeds.feedburner.com/~f/lafabrick?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=QBuuMj0g"><img src="http://feeds.feedburner.com/~f/lafabrick?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=j2RNSyXZ"><img src="http://feeds.feedburner.com/~f/lafabrick?i=j2RNSyXZ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/60qwiPkcNJg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/01/31/1040-hello-cocomo-first-app/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/01/31/1040-hello-cocomo-first-app/</feedburner:origLink></item>
		<item>
		<title>Developing with AFCS a.k.a Cocomo - Introduction</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/_rW89TmGAFo/</link>
		<comments>http://www.lafabrick.com/blog/2009/01/21/999-what-is-adobe-cocomo/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 23:38:28 +0000</pubDate>
		<dc:creator>Hervé</dc:creator>
		
		<category><![CDATA[[Dev] Flash / Flex / AIR...]]></category>

		<category><![CDATA[architecture]]></category>

		<category><![CDATA[cocomo]]></category>

		<category><![CDATA[collaboration]]></category>

		<category><![CDATA[RIA]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=999</guid>
		<description><![CDATA[[ 05.03.2009 : Update : Cocomo is now called Adobe Flash Collaboration Services / AFCS and 0.9.1 was released with some bug fixes and a new namespace ]
Hey there!
Here is, as a first English article, an introduction to Adobe Cocomo AFCS.
(Translated from  French tutorial on FlashXPress )


 Cocomo  is an abbreviation of «COmmon [...]]]></description>
			<content:encoded><![CDATA[<p>[ 05.03.2009 : Update : Cocomo is now called Adobe Flash Collaboration Services / AFCS and 0.9.1 was released with some bug fixes and a new namespace ]</p>
<p>Hey there!<br />
Here is, as a first English article, an introduction to <del datetime="2009-03-06T00:25:09+00:00">Adobe Cocomo</del> AFCS.<br />
(Translated from <a href="http://www.flashxpress.net/ressources-flex/developper-avec-cocomo-introduction/"> French tutorial on FlashXPress </a>)</p>
<p style="text-align: center;"><a href="https://cocomo.acrobat.com/"><img class="aligncenter" title="AFCS/Cocomo developer account" src="http://lafabrick.free.fr/blogImg/cocomo-20090121-005745.png" alt="" width="520" height="180" /></a></p>
<p><span id="more-999"></span></p>
<p><strong> Cocomo </strong> is an abbreviation of «<strong>COmmon COllaboration MOdel</strong>», which was the first name given by Adobe to its new online service dedicated to <strong>collaborative application development</strong>. The final commercial name is Adobe Flash Collaboration Services a.k.a AFCS </p>
<p>This name both references :</p>
<ul>
<li>a <strong>SDK</strong> that includes a Flex components library and tools dedicated to multi-users applications development. Just so you know, those components are used by Adobe for developing ConnectNow, a video conference application part of the <a href="http://www.acrobat.com/">Acrobat.com</a> platform.</li>
<li>a <strong>free online service</strong> (with some limitations), enabling creation and deployment of collaborative applications on <a href="http://www.adobe.com/fr/products/flashmediaserver/">FMS</a> servers hosted and maintained by Adobe.</li>
</ul>
<p>In short, <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS will allow us to develop applications that will use real-time communications capabilities of FMS servers, without taking care of those servers&#8230; cooool !!!</p>
<p>But what are the «<strong>real-time communications</strong> capabilities of those FMS servers» ???</p>
<p>In fact, the <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  servers will allow us to:</p>
<ul>
<li>exchange <strong>audio and video data flows</strong>, useful to create visioconference application for example,</li>
<li><strong>synchronize different types of data between multiple client applications</strong>. It allows you to add a chat to an existing application, to develop a co-navigation system, a document co-edition functionnality, some multi-users game&#8230;</li>
<li><strong>share files</strong></li>
<li><strong>manage user rights</strong> regarding their role</li>
</ul>
<p><img src="http://lafabrick.free.fr/blogImg/Cocomo_prez1-20090120-220414.png" alt="AFCS /  Cocomo  " /></p>
<p>This schema describes the interaction between a room, hosted on a developer account of a cocomo server, and some Flex clients : the host user (owner), an active guest (publisher), and a passive guest. The host send his webcam output, and both host and publisher can update notes on the server, these data are broadcasted to the other clients.</p>
<p>The library contains «high-level» graphical components, known as <strong>pods</strong>, but also some more «low-level» classes that a developer can use to create his own components (<strong>SharedModel</strong>, <strong>CollectionNode</strong>).</p>
<p><img src="http://lafabrick.free.fr/blogImg/Cocomo_Pods-2-3-20090121-003644.png" alt="AFCS / Cocomo built-in Pods" /></p>
<p>This schema shows an example of pods (Tchat, Notes, User management, Webcam and File sharing)</p>
<p>The pods are <strong>collaborative «plug’n’play» components</strong>, that we will use to create our first <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  applications without having to write a single line of code (Tchat, Webcam, Notes&#8230;). The lower level classes will help us to go deeper and create components that will fit more specific needs.</p>
<p>But, first things first : let’s create a «<del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  Developer» account&#8230;</p>
<h3><del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  Developer account creation</h3>
<p>To create an account :</p>
<ul>
<li>Go to the <a href="https://cocomo.acrobat.com/"><del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  portal (https://cocomo.acrobat.com)</a>,</li>
<li>Create a <strong>new account</strong> (you can also use your existing Adobe account)</li>
<li>Choose a <strong><del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  account identifier</strong> («account name», room access URLs will be based on that identifier)
<ol>
<li>The Account URL situation in the screen</li>
<li>The Room instances panel (click the &#8220;Add&#8221; button)</li>
<li>The &#8220;Download SDK&#8221; button</li>
</ol>
</li>
<p><img src="http://lafabrick.com/blog/images/erick//AFCS_Developer_Portal-20090305-213035.jpg" alt="Cocomo Developper Console" /><br />
This capture represents the <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  home page. It mainly illustrates the three steps to follow:</p>
<li>Once your account has been created, make sure to note your <strong>Account URL</strong></li>
<li>In the &#8220;<strong>Room instances</strong>&#8221; panel, create a new <strong>room. </strong>A room represents a &#8220;virtual meeting point&#8221; where several client application will be able to <strong>exchange audio / video flows, files or messages</strong>. Your account will allow you to create several rooms, with a single configuration for each room. A room is also identified by a URL that looks like <em>http://connectnow.acrobat.com/yourAccount/roomName</em>.</li>
<li>Once your room has been created, download the SDK.</li>
</ul>
<p>You&#8217;ll find within the downloaded ZIP:</p>
<ul>
<li><strong>documentation</strong></li>
<li><strong>application examples</strong></li>
<li>Air utilities: <strong><del datetime="2009-03-06T00:25:09+00:00">CocomoDevConsole</del> AFCSDevConsole</strong> for your accounts and rooms management, and <strong>LocalConnectionServer</strong>, a local <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  server emulation that will allow you to test some of your applications features without having to connect to a &#8220;real&#8221; <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  server (mainly messaging)</li>
<li>library <strong>sources</strong></li>
<li>library SWC for Flash Player 9 and Flash Player 10</li>
</ul>
<h3><del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  installation</h3>
<p>For this version (0.9), installation will reside in including <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  library documentation at Eclipse&#8217;s one. To do so:</p>
<ul>
<li>create a &#8216;<em>com.adobe.afcs</em>&#8216; folder in the &#8216;<em>plugins</em>&#8216; folder of your Flex Builder installation<br />
<strong>Windows</strong>: C:\Program Files\Adobe\Flex Builder 3\plugins\com.adobe.afcs<br />
<strong>Macintosh</strong>: /Applications/Adobe Flex Builder 3/plugins/com.adobe.afcs</li>
<li>Copy the content of the downloaded file into that folder</li>
<li>(Re)Launch Flex Builder and open the help contents (Help / Help Contents)</li>
</ul>
<p>You should now find the <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  API documentation</p>
<p><img src="http://lafabrick.free.fr/blogImg/cocomo_help-20081218-031802.jpg" alt="Cocomo Doc in Flex Builder / Eclipse" /><br />
This schema is a screen capture of the cocomo documentation opened within the Flex Builder environment.</p>
<p>And noooow&#8230; <a href="http://www.lafabrick.com/blog/2009/01/31/1040-hello-cocomo-first-app/">let&#8217;s collaborate</a> !!! <img src='http://www.lafabrick.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
&gt;&gt; Next : <a href="http://www.lafabrick.com/blog/2009/01/31/1040-hello-cocomo-first-app/">My first <del datetime="2009-03-06T00:25:09+00:00">Cocomo</del> AFCS  Application</a>Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/12/07/274-cocomo-dbarque-et-personne-me-prvient/" rel="bookmark" title="7 décembre 2007">Cocomo est là et personne me prévient ??!!</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/12/22/568-cocomo-kezako/" rel="bookmark" title="22 décembre 2008">Cocomo ? Kezako ?</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/12/23/591-cocomo-wiibot/" rel="bookmark" title="23 décembre 2008">Introducing r.CØ &#8230; First &#8220;Cocomo ready&#8221; Air Wiibot&#8230;</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/31/1040-hello-cocomo-first-app/" rel="bookmark" title="31 janvier 2009">Hello AFCS ( bye Cocomo ) ! Simple user authentication with Adobe Flash Collaboration Services</a></li>
</ul>
<p><!-- Similar Posts took 71.875 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/lafabrick?a=q424CnOY"><img src="http://feeds.feedburner.com/~f/lafabrick?i=q424CnOY" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=WvRIoiht"><img src="http://feeds.feedburner.com/~f/lafabrick?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=QdnM4ztw"><img src="http://feeds.feedburner.com/~f/lafabrick?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=SoFBTg60"><img src="http://feeds.feedburner.com/~f/lafabrick?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=m8YNqMrq"><img src="http://feeds.feedburner.com/~f/lafabrick?i=m8YNqMrq" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/_rW89TmGAFo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/01/21/999-what-is-adobe-cocomo/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/01/21/999-what-is-adobe-cocomo/</feedburner:origLink></item>
		<item>
		<title>Développer une application iPhone - XCode et Interface Builder passés au crible</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/y8afL-kUq90/</link>
		<comments>http://www.lafabrick.com/blog/2009/01/16/807-developper-une-application-iphone-xcode-et-interface-builder-passes-au-crible/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 22:00:38 +0000</pubDate>
		<dc:creator>Hervé</dc:creator>
		
		<category><![CDATA[Logiciels / extensions / plugins...]]></category>

		<category><![CDATA[[Dev] Flash / Flex / AIR...]]></category>

		<category><![CDATA[apple]]></category>

		<category><![CDATA[Conseils]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=807</guid>
		<description><![CDATA[Cet article suit la <a href="http://www.lafabrick.com/blog/2009/01/12/753-developper-une-application-iphone-introduction-aux-concepts-de-base/">description des concepts de base permettant d'appréhender le développement d'une application pour iPhone</a>.
Il présente les outils de développement utilisés pour faire une application pour iPhone en analysant rapidement un projet de base proposé avec le SDK iPhone.
Il ne parle pas de la syntaxe de développement Objective-C.]]></description>
			<content:encoded><![CDATA[<p>Cet article suit la <a href="http://www.lafabrick.com/blog/2009/01/12/753-developper-une-application-iphone-introduction-aux-concepts-de-base/">description des concepts de base permettant d&#8217;appréhender le développement d&#8217;une application pour iPhone</a>.<br />
Il présente les outils de développement utilisés pour faire une application pour iPhone en analysant rapidement un projet de base proposé avec le SDK iPhone.<br />
Il ne parle pas de la syntaxe de développement Objective-C.</p>
<p>Je vous suggère vivement si vous n&#8217;avez pas lu l&#8217;article ou si vous ne connaissez pas encore grand chose au développement sous iPhone de vous y intéresser pour mieux aborder cette suite&#8230;</p>
<p><img class="aligncenter" title="XCode and Interface Builder" src="http://lafabrick.free.fr/blogImg/xbuilderInterface-20090121-010351.png" alt="" width="520" height="224" /></p>
<p>Une dernière chose avant de démarrer : massez-vous les tempes, faites-vous un petit café&#8230;<br />
Prêt ?<br />
<span id="more-807"></span></p>
<h3>Installer le SDK iPhone</h3>
<p>A l&#8217;heure ou j&#8217;écris ces lignes, Apple en est à la <a href="http://developer.apple.com/iPhone/program/download.html">version 2.2 du SDK iPhone</a>.<br />
L&#8217;installation vous mettra à disposition tous les outils dont je vais parler ici.</p>
<h3>Ouvrir un projet d&#8217;exemple pour se familiariser avec la structure d&#8217;un projet iPhone</h3>
<p>Je considère à présent que vous avez déjà un Mac (bah oui&#8230;), et le SDK iPhone installé dessus.</p>
<ol>
<li>Ouvrez XCode.<br />
<img class="alignnone size-medium wp-image-785" title="Xcode" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/welcome-to-xcode-300x206.jpg" alt="Xcode" width="300" height="206" /></li>
<li>Faites Fichier &gt; Nouveau projet&#8230;<br />
<img class="alignnone size-full wp-image-787" title="New project" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/new-project.jpg" alt="New project" width="503" height="477" /></li>
<li>Choisissez &#8220;View-Based Application&#8221;</li>
<li>Entrez le nom de projet &#8220;LaFabrick&#8221; puis choisissez un emplacement, vous arrivez alors sur l&#8217;interface principale d&#8217;Xcode.</li>
</ol>
<p>Voyons maintenant les fichiers que nous avons :<br />
<img class="alignnone size-full wp-image-792" title="Accueil Xcode View-Based application" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/lafabrick.jpg" alt="Accueil Xcode View-Based application" width="676" height="479" /><br />
Nous sommes en Objective-C, donc pour chaque classe, vous trouverez un fichier .h définissant l&#8217;interface et un fichier .m contenant l&#8217;implémentation (amis du C bonjour !).<br />
Ouvrons &#8220;LaFabrickAppDelegate.h&#8221;<br />
<img class="alignnone size-full wp-image-799" title="LaFabrickAppDelegate.h" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/lafabrickappdelegateh.png" alt="LaFabrickAppDelegate.h" width="554" height="331" /><br />
On constate dans cette interface les déclarations d&#8217;un objet fenêtre (objet de base utilisé pour l&#8217;affichage) et le contrôleur <strong>LaFabrickViewController</strong> que nous étudierons rapidement après.<br />
L&#8217;implémentation est simple :<br />
<img class="alignnone size-full wp-image-801" title="LaFabrickAppDelegate.m" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/lafabrickappdelegatem.png" alt="LaFabrickAppDelegate.m" width="530" height="386" /><br />
Lorsque l&#8217;application vient d&#8217;être démarrée <code>applicationDidFinishLaunching</code>, on demande l&#8217;affichage de la vue contrôlée par notre LaFabrickViewController dans la fenêtre <code>[window addSubview:viewController.view];</code>.<br />
Notez enfin la notation à crochet pour appeler une méthode d&#8217;un objet : oui oui, c&#8217;est relou.</p>
<p>Jetons maintenant un oeil à LaFabrickViewController (.h et .m) : il est quasiment vide ! C&#8217;est effectivement là qu&#8217;on doit travailler un peu&#8230;<br />
Quelques questions se posent :</p>
<ul>
<li>Où est la vue ?</li>
<li>Comment est-elle associée au contrôleur ?</li>
</ul>
<p>Nous allons voir cela avec l&#8217;interface builder.</p>
<h3>Utilisation de l&#8217;Interface Builder pour gérer la vue</h3>
<p>Première réponse : notre vue est ici créée à partir d&#8217;un fichier de description d&#8217;interface géré par l&#8217;interface builder : <strong>LaFabrickViewController.xib</strong>. Double-cliquez dessus, l&#8217;interface suivante s&#8217;affiche alors :<br />
<img class="alignnone size-full wp-image-846" title="Interface Builder" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/interface-builder.png" alt="Interface Builder" width="727" height="481" /><br />
On constate notamment dans la fenêtre centrale, les éléments suivants :</p>
<ul>
<li>File&#8217;s owner : LaFabrickViewController</li>
<li>View : UIView</li>
</ul>
<p>OK, donc le .xib permet de dire que la vue est associée au contrôleur LaFabrickViewController, voilà la deuxième réponse !</p>
<p>Sélectionnez à présent la ligne <strong>View : UIView</strong> puis sélectionnez le second onglet dans la fenêtre de droite.<br />
<strong>Note :</strong> si cette fenêtre n&#8217;est pas visible, faites <em>Tools &gt; Identity Inspector</em></p>
<p>Vous pouvez visualiser l&#8217;association entre la vue <strong>View</strong> et la propriété <strong>view</strong> du contrôleur LaFabrickViewController.<br />
<img class="alignright size-full wp-image-847" title="View connections" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/view-connections.png" alt="View connections" width="290" height="104" /></p>
<p>Cette partie est primordiale pour que l&#8217;affichage de la vue soit effectif : souvenez-vous que dans LaFabrickAppDelegate, on charge la propriété &#8220;view&#8221; de LaFabrickViewController, aussi sans l&#8217;association effectuée dans l&#8217;Interface Builder, il serait impossible d&#8217;afficher quoi que ce soit !</p>
<p><strong>D&#8217;une manière générale, chaque élément ajouté depuis l&#8217;Interface Builder devra être lié à une propriété du contrôleur (ou d&#8217;un délégué) via l&#8217;Interface Builder afin que vous puissez interagir avec depuis le code.<br />
La propriété en question est alors nommée &#8220;Outlet&#8221; côté Interface Builder, soit &#8220;Sortie&#8221; si l&#8217;on traduit litéralement : c&#8217;est effectivement un paramètre de sortie de votre interface.</strong></p>
<h3>Personnaliser un peu l&#8217;interface</h3>
<p>Depuis l&#8217;Interface Builder, ajoutez deux champs texte, deux labels et un bouton histoire d&#8217;obtenir à peu près ça :<br />
<img class="alignnone size-full wp-image-899" title="iPhone - View" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/view.png" alt="iPhone - View" width="321" height="308" /></p>
<p>Si vous faites <em>Tools &gt; Reveal in Document Window&#8230;</em> vous verrez l&#8217;arborescence de contrôles de la vue mise à jour.<br />
<img class="alignnone size-full wp-image-901" title="iPhone - Arborescence de contrôles" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/lafabrickviewcontrollerxib.png" alt="iPhone - Arborescence de contrôles" width="435" height="232" /></p>
<p>Il est maintenant temps de contrôler ces éléments depuis notre LaFabrickViewController.<br />
Pour cela deux méthodes :</p>
<ol>
<li>Directement depuis Interface Builder (cf. <a href="#videodemo">vidéo de démonstration</a>)
<ul>
<li>Sélectionnez LaFabrickViewController depuis le Document Window</li>
<li>Dans &#8220;l&#8217;Inspector&#8221; (fenêtre de droite) choisissez le dernier onglet (i) puis ajoutez les propriétés via la section &#8220;Class Outlets&#8221;<br />
<img class="alignnone size-full wp-image-905" title="Interface Builder - Propriétés de classe" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/la-fabrick-view-controller-identity.png" alt="Interface Builder - Propriétés de classe" width="277" height="421" /></li>
<li>Ceci fait vous devez enregistrer les modifications dans le fichier LaFabrickViewController.m. Pour cela, vous devez utiliser la fonction <em>File &gt; Write class files&#8230;</em></li>
<li>Faites alors &#8220;Save&#8221;</li>
<li>L&#8217;outil vous demande si vous souhaitez fusionner ou écraser : choisissez Merge (fusionner)</li>
<li>Le fichier .m n&#8217;est pas modifié, vous pouvez le fermer, en revanche vous constaterez que le .h peut être modifié comme suit :<br />
<img class="alignnone size-full wp-image-908" title="Merging de fichier sous Interface Builder" src="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/lafabrickviewcontrollerh.png" alt="Merging de fichier sous Interface Builder" width="785" height="101" /><br />
sous réserve que vous choisissiez l&#8217;action &#8220;Choose left&#8221; depuis le menu déroulant du bas</li>
<li>Sauvegardez (enfin) votre fichier fusionné</li>
</ul>
</li>
<li>Mix XCode et Interface Builder
<ul>
<li>Déclarez manuellement les propriétés correspondant aux contrôles que vous souhaitez manipuler dans l&#8217;interface (LaFabrickViewController.h) :<code><br />
IBOutlet UITextField *lastNameField;<br />
IBOutlet UITextField *nameField;<br />
IBOutlet UIButton *validateButton;<br />
</code></li>
<li>Compilez le projet</li>
<li>Rouvrez l&#8217;Interface Builder pour faire les liens</li>
</ul>
</li>
</ol>
<p><strong>Note :</strong> la première méthode a le mauvais goût d&#8217;ouvrir l&#8217;outil de fusion de fichiers pour que vous validiez que rien n&#8217;est écrasé ou ajouté sans votre accord.<br />
J&#8217;avoue que, malgré la nécessité de la fusion, je trouve ça très peu pratique voire franchement lourdingue, je m&#8217;attendais à mieux venant d&#8217;un monstre de l&#8217;ergonomie. Mais c&#8217;est le prix à payer pour avoir deux outils quasiment indépendants, et enfin, si vous connaissez une meilleure méthode, n&#8217;hésitez pas à poster !</p>
<p><em>&#8211; ca se voit tant que ça que je préfère la méthode à l&#8217;ancienne ? &#8211;</em></p>
<p>Ce n&#8217;est pas encore tout à fait terminé ! (si si je vous jure, c&#8217;est long)<br />
Il reste à faire les fameux liens entre les contrôles de la vue et les propriétés que nous avons créé dans LaFabrickViewController. Pour cela, rien ne vaut l&#8217;image (et en plein écran tant qu&#8217;à faire) :</p>
<div id="videodemo">[kml_flashembed fversion="8.0.0" movie="http://www.lafabrick.com/blog/wp-content/uploads/2009/01/Tuto-iPhone.swf" targetclass="flashmovie" useexpressinstall="true" publishmethod="static" width="800" height="600" allowfullscreen="true"] </p>
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p>[/kml_flashembed]</p></div>
<p>Voilà ! Vous avez lié les contrôles de votre vue à des propriétés de votre contrôleur.<br />
Nous utiliserons désormais la technique décrite ci-dessus pour gérer nos association vue-contrôleur.</p>
<p>Reprenons Interface Builder pour créer un handler gérant le clic sur le bouton. Pour cela :</p>
<ol>
<li>Sélectionnez <strong>LaFabrickViewController</strong> depuis la <em>Document Window</em></li>
<li>Dans le dernier onglet de <em>l&#8217;Inspector</em>, cliquez sur le bouton + de la section <em>Class Actions</em> en entrez <code>buttonClick:</code>. Laissez le <em>Type</em> sur <strong>id</strong></li>
<li>Sauvegardez, faites <em>Write class files&#8230;</em>, fusionnez les sources et enregistrez</li>
<li>Faites un lien entre l&#8217;événement <em>Touch up Inside</em> de votre bouton et <strong>LaFabrickViewController</strong>, l&#8217;éditeur vous propose alors votre fonction <code>buttonClick:</code></li>
</ol>
<p>Maintenant que votre événement est lié à votre contrôleur, ajoutons un bout de code bateau juste pour valider que l&#8217;ensemble fonctionne bien :</p>
<ol>
<li>Retournez sous XCode, et ouvrez LaFabrickViewController.m</li>
<li>Modifiez le code pour avoir la méthode <strong>buttonClick:</strong> sous la forme suivante :<br />
<code>- (IBAction)buttonClick:(id)sender {<br />
[firstNameField setText:[lastNameField text]];<br />
}</code> </p>
<p>Le principe étant simplement de modifier le texte du prénom avec le texte du nom (je vous avais prévenu, c&#8217;est un bout de code bateau)</li>
<li>Faites <strong>Build and Go</strong> et testez !</li>
</ol>
<p>Bien, il ne reste plus qu&#8217;à apprendre Objective-C. Pour cela, rien ne vaut quelques ressources dédiée au sujet :</p>
<ul>
<li><a href="http://pierre-chatelier.developpez.com/tutoriels/mac/objectivec/migration/">Passage de C++ à Objective-C</a></li>
<li><a href="http://sylvain-gamel.developpez.com/tutoriel/mac/cocoa/java/">Passage de Java à Objective-C</a></li>
</ul>
<p>Voilà, vous avez à présent les bases nécessaires pour démarrer le développement d&#8217;une application iPhone.<br />
A bientôt !Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/09/04/206-flex-3-beta-rsolution-de-bug-comment-placer-fichier-d-application/" rel="bookmark" title="4 septembre 2007">[Flex 3 Beta] bug : Application File doesn&#8217;t exist</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/12/753-developper-une-application-iphone-introduction-aux-concepts-de-base/" rel="bookmark" title="12 janvier 2009">Développer une application iPhone - Introduction aux concepts de base</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/13/786-reflex-1-une-micro-architecture-pour-flex-simple/" rel="bookmark" title="13 janvier 2009">Reflex #1: une micro-architecture pour Flex&#8230; simple !</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/15/819-reflex-2-vous-reprendez-bien-un-peu-de-ioc/" rel="bookmark" title="15 janvier 2009">Reflex #2 : vous reprendrez bien un peu de IOC ?</a></li>
</ul>
<p><!-- Similar Posts took 13.153 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/lafabrick?a=tYKbP0mb"><img src="http://feeds.feedburner.com/~f/lafabrick?i=tYKbP0mb" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=MkXlasA5"><img src="http://feeds.feedburner.com/~f/lafabrick?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=ZiqLvCSf"><img src="http://feeds.feedburner.com/~f/lafabrick?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=MSBkizjU"><img src="http://feeds.feedburner.com/~f/lafabrick?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=LESsJE3W"><img src="http://feeds.feedburner.com/~f/lafabrick?i=LESsJE3W" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/y8afL-kUq90" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/01/16/807-developper-une-application-iphone-xcode-et-interface-builder-passes-au-crible/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/01/16/807-developper-une-application-iphone-xcode-et-interface-builder-passes-au-crible/</feedburner:origLink></item>
		<item>
		<title>Reflex #2 : vous reprendrez bien un peu de IOC ?</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/nsLngAoYreI/</link>
		<comments>http://www.lafabrick.com/blog/2009/01/15/819-reflex-2-vous-reprendez-bien-un-peu-de-ioc/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 22:16:49 +0000</pubDate>
		<dc:creator>fab</dc:creator>
		
		<category><![CDATA[Bientôt chez vous]]></category>

		<category><![CDATA[La Fabrick]]></category>

		<category><![CDATA[Nos projets]]></category>

		<category><![CDATA[[Dev] Flash / Flex / AIR...]]></category>

		<category><![CDATA[architecture]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[IOC]]></category>

		<category><![CDATA[MVC]]></category>

		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=819</guid>
		<description><![CDATA[
Reflex intègre un système d’Injection de contenu, qui est l’une des représentations de l’IOC.
Nous allons voir ici à quoi cela sert, et comment le mettre en œuvre dans Reflex.
Si ce n’est déjà fait, je vous laisse jeter un œil sur la première partie de cette architecture, et de récupérer le swc avant de lire la [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="reflex image tuto 2" src="http://www.lafabrick.com/labz/reflex/images/reflexImgTuto2.jpg" alt="" width="520" height="230" /><br />
Reflex intègre un système d’Injection de contenu, qui est l’une des représentations de l’IOC.<br />
Nous allons voir ici à quoi cela sert, et comment le mettre en œuvre dans Reflex.</p>
<p>Si ce n’est déjà fait, je vous laisse jeter un œil sur <a href="http://www.lafabrick.com/blog/2009/01/13/786-reflex-1-une-micro-architecture-pour-flex-simple/">la première partie de cette architecture</a>, et de <a href="http://www.lafabrick.com/blog/reflex/">récupérer le swc</a> avant de lire la suite.<br />
<span id="more-819"></span></p>
<h3><strong>A quoi ça sert l’IOC ?</strong></h3>
<p>L’IOC ( Inversion Of Control ) est un patron d’architecture, possédant plusieurs représentations ( inversion de contrôle, injection de dépendance, &#8230;).  Je ne vais pas faire un cours sur l’Injection de contenu : je vous laisse <a href="http://fr.wikipedia.org/wiki/Inversion_de_contr%C3%B4le">voir ici </a>pour plus d’informations.</p>
<p>Dans Reflex, le but du package IOC est de décentraliser les objets de configurations de l’application. En gros, mettre les services d’accès aux données dans un fichier de configuration XML au lieu de les coder en dur dans l&#8217;application Flex.</p>
<p>Certains spécialistes me diront certainement que l’Injection de contenu n’est pas forcement une représentation de l’IOC, et donc un abus de langage pour Reflex : je répondrais par “traduisez ici IOC par Injection Of Content, et laissons tomber les patrons d’architecture !”.</p>
<h3><strong>Au commencement, le ServicesLocator</strong></h3>
<p>Nous avons vu dans la première partie comment réaliser simplement un appel à une méthode distante. Avoir un point d’accès global aux différents services est pratique lorsque l’on commence à avoir plusieurs services, ou si des vues différentes utilisent un service identique. Voyons comment procéder avec le premier exemple.</p>
<p>Reprenons l’exemple du <a href="http://www.lafabrick.com/blog/2009/01/13/786-reflex-1-une-micro-architecture-pour-flex-simple/">tuto #1</a> :  il faut charger <strong>les services</strong> dans le <strong>ServicesLocator</strong>. Nous allons donc modifier notre vue :</p>
<pre class="syntax-highlight:xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application
	xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
	layout=&quot;absolute&quot;

	creationComplete=&quot;init()&quot;

	xmlns:controller=&quot;controller.*&quot;
	xmlns:model=&quot;model.*&quot;&gt;

	&lt;mx:Script&gt;
		&lt;![CDATA[
			import com.lafabrick.reflex.service.ServicesLocator;

			public static const SERVICE_USER:String = &quot;userService&quot;;
			public static const SERVICE_OTHER:String = &quot;otherService&quot;;

			private function init() : void
			{
				ServicesLocator.addService( SERVICE_USER, remoteUser );
				ServicesLocator.addService( SERVICE_OTHER, remoteOther );

				userControl.service = ServicesLocator.getService( SERVICE_USER );
			}

		]]&gt;
	&lt;/mx:Script&gt;

	&lt;mx:RemoteObject id=&quot;remoteUser&quot;
		destination=&quot;javaFacadeUser&quot; showBusyCursor=&quot;true&quot; /&gt;

	&lt;mx:RemoteObject id=&quot;remoteOther&quot;
		destination=&quot;javaFacadeOther&quot; showBusyCursor=&quot;true&quot; /&gt;

	&lt;controller:UserController id=&quot;userControl&quot; /&gt;

	&lt;model:UserModel id=&quot;userModel&quot; /&gt;

	&lt;mx:VBox&gt;
		&lt;mx:TextInput id=&quot;login&quot; /&gt;
		&lt;mx:TextInput id=&quot;password&quot; displayAsPassword=&quot;true&quot; /&gt;

		&lt;mx:Button label=&quot;connect&quot;
			click=&quot;{userControl.login(login.text, password.text)}&quot; /&gt;

		&lt;mx:Label x=&quot;208&quot; y=&quot;44&quot;
			text=&quot;User Name : {userModel.userLogged.name}&quot;/&gt;
	&lt;/mx:VBox&gt;

&lt;/mx:Application&gt;
</pre>
<ul>
<li>À la création de l’application ( <em>creationComplete</em> ), nous déclenchons la fonction<strong> init();</strong>.</li>
<li>Nous ajoutons les services <strong>RemoteObject</strong> dans le <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/service/ServicesLocator.html">ServicesLocator</a>. La signature de cette méthode est la suivante :
<pre class="syntax-highlight:js">
ServicesLocator.addService( serviceName:String, serviceObject:AbstractService )
</pre>
<p> </p>
<ul>
<li>  <strong><em>  serviceName:String</em></strong> est le nom de référence utilisé pour indexer, et plus tard retrouver le bon service.</li>
<li><strong><em>serviceObject:AbstractService</em></strong> est l’identifiant (id) de l’object service (le RemoteObject). </li>
</ul>
</li>
<li>Nous supprimons la propriété <strong><em>service</em></strong> dans la déclaration mxml de <strong>UserController</strong>, pour la déclarer en ActionScript dans la fonction<strong> init()</strong>.   ServicesLocator.getService( serviceName:String ) renvoie l’instance du service défini par serviceName, référencée dans le locator.</li>
</ul>
<p><strong>Note</strong> : Au niveau de l’appel du service, nous pourrions appeler la méthode <strong>getController</strong> de <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/controller/ControllerLocator.html">ControllerLocator</a>.</p>
<pre class="syntax-highlight:js">
userControl.login(login.text, password.text); 
</pre>
<p>devient :</p>
<pre class="syntax-highlight:js">
( ControllerLocator.getController( MonApplication.SERVICE_USER )
	as UserController ).login(login.text, password.text);
</pre>
<p>Dans ce cas, nous devons &#8220;caster&#8221; le retour de <strong>getController(&#8230;)</strong> en <strong>UserController</strong> ( sinon erreur ! Flex ne connaîtrait pas la méthode login )</p>
<h3><strong>Un composant pour la vue</strong></h3>
<p>Histoire de mettre en pratique un peu plus l’utilisation des “locators” de Reflex, nous allons créer un composant MXML étendant <strong>Canvas</strong>, qui va contenir la représentation visuelle de notre application. Nous allons utiliser <strong>ControllerLocator</strong> dans ce fichier pour récupérer le <strong>UserController</strong>.</p>
<pre class="syntax-highlight:xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Canvas
	xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
	width=&quot;100%&quot;
	height=&quot;100%&quot;&gt;

	&lt;mx:Script&gt;
		&lt;![CDATA[
			import model.UserModel;
			import controller.UserController;
			import com.lafabrick.reflex.controller.ControllerLocator;
			import com.lafabrick.reflex.model.ModelLocator;

			[Bindable]
			private var userDataModel:UserModel =
				( ModelLocator.getModel( UserModel ) as UserModel);

		]]&gt;
	&lt;/mx:Script&gt;

	&lt;mx:VBox horizontalCenter=&quot;0&quot; verticalCenter=&quot;0&quot;&gt;
		&lt;mx:TextInput id=&quot;login&quot; /&gt;
		&lt;mx:TextInput id=&quot;password&quot; displayAsPassword=&quot;true&quot; /&gt;

		&lt;mx:Button
			label=&quot;connect&quot;
			click=&quot;{ ( ControllerLocator.getController( UserController )
				as UserController ).login( login.text, password.text )}&quot; /&gt;

		&lt;mx:Label x=&quot;208&quot; y=&quot;44&quot;
			text=&quot;User Name : {userDataModel.userLogged.name}&quot;/&gt;
	&lt;/mx:VBox&gt;

&lt;/mx:Canvas&gt;
</pre>
<p>Pour que le “<strong>Binding</strong>” fonctionne correctement entre la vue et le modèle, nous devons utiliser des pointeurs vers les modèles à utiliser.</p>
<h3><strong>Le fichier de configuration XML (IOC)</strong></h3>
<p>Nous venons de voir comment utiliser le <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/service/ServicesLocator.html">ServiceLocator</a>. Intégrons maintenant le système <strong>IOC</strong> pour ne plus avoir à le gérer  !</p>
<p>Ce fichier vous permet de décrire des objets, pour ensuite les récupérer et les instancier dans votre application ( via <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/ioc/ApplicationContext.html">ApplicationContext</a> ). Ce fichier s’inspire fortement des fichiers de configuration de Spring, un framework puissant pour Java.</p>
<p>Ci-dessous le fichier représentant 2 services <strong>RemoteObject</strong> :</p>
<pre class="syntax-highlight:xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;objects&gt;

	&lt;object id=&quot;remotingUser&quot; className=&quot;mx.rpc.remoting.mxml.RemoteObject&quot;&gt;
		&lt;property name=&quot;destination&quot; className=&quot;String&quot;&gt;javaFacadeUser&lt;/property&gt;
		&lt;property name=&quot;showBusyCursor&quot; className=&quot;Boolean&quot;&gt;true&lt;/property&gt;
	&lt;/object&gt;

	&lt;object id=&quot;remotingOther&quot; className=&quot;mx.rpc.remoting.mxml.RemoteObject&quot;&gt;
		&lt;property name=&quot;destination&quot; className=&quot;String&quot;&gt;javaFacadeOther&lt;/property&gt;
		&lt;property name=&quot;showBusyCursor&quot; className=&quot;Boolean&quot;&gt;true&lt;/property&gt;
	&lt;/object&gt;

&lt;/objects&gt;
</pre>
<ul>
<li>Le tag <strong>&lt;objects&gt;</strong> englobe les différents objets définis dans le fichier. Il est défini par :</li>
<li>Un objet <strong>&lt;object&gt;</strong> est défini par :
<ul>
<li>un identifiant <strong><em>id</em></strong>. Cet id est celui que nous utiliserons plus tard dans l’application Flex pour retrouver et instancier l’objet.</li>
<li> un nom de classe <strong><em>className</em></strong> : la classe de référence.</li>
</ul>
</li>
<li>Les propriétés des objets sont définies par :
<ul>
<li>leur nom <strong><em>name</em></strong></li>
<li>leur classe <strong><em>className</em></strong> de référence.</li>
</ul>
</li>
</ul>
<p>Ici, un <a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/remoting/mxml/RemoteObject.html">RemoteObject</a> a besoin de 2 propriétés : la <em>destination</em> du type String, et éventuellement <em>showBusyCursor</em> du type Boolean.</p>
<h3><strong>Régler le problème d’inclusion de classe</strong></h3>
<p>Le “petit” problème de ce système est que la déclaration externe des objets fait que les classes ne sont pas intégrées dans le projet Flex. Le compilateur Flex ne trouve pas de référence aux classes, et ne les intègre donc pas dans la compilation. Un façon très simple de régler ce problème est de créer un petit fichier actionScript, et d’ajouter des objets bidons du même type que ceux définis dans votre fichier de config.</p>
<p>Exemple avec les services : (fichier includeService.as)</p>
<pre class="syntax-highlight:js">
import mx.rpc.http.mxml.HTTPService;
import mx.rpc.remoting.mxml.RemoteObject;
import mx.rpc.soap.mxml.WebService;

private var ser1:RemoteObject;
private var ser2:HTTPService;
private var ser3:WebService;
</pre>
<p>Ce fichier sera intégré dans votre application.</p>
<h3><strong>Chargement et gestion du contexte XML</strong></h3>
<p>Vous allez voir : simple comme bonjour !<br />
Nous allons ajouter le chargement du fichier via <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/ioc/ApplicationContext.html">ApplicationContext</a>. <strong>ApplicationContext</strong> permet de charger automatiquement le contexte cible, et de retrouver, instancier, et<strong> enregistrer automatiquement tous les service</strong>s qui se trouvent dans votre fichier de configuration XML dans le <strong>ServicesLocator</strong>.</p>
<p>Votre application finale :</p>
<pre class="syntax-highlight:xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application
	xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
	layout=&quot;absolute&quot;

	creationComplete=&quot;init()&quot;

	xmlns:model=&quot;model.*&quot;
	xmlns:view=&quot;view.*&quot;
	xmlns:controller=&quot;controller.*&quot;
	xmlns:service=&quot;service.*&quot;&gt;

	&lt;mx:Script&gt;
		&lt;![CDATA[
			import com.lafabrick.reflex.ioc.event.ContextEvent;
			import com.lafabrick.reflex.ioc.ApplicationContext;
			import com.lafabrick.reflex.controller.ControllerLocator;
			import com.lafabrick.reflex.service.ServicesLocator;

			include &quot;includeService.as&quot;

			private function init() : void
			{
				ApplicationContext.addEventListener(
					ContextEvent.CONTEXT_LOADED, onLoaded );

				ApplicationContext.load( &quot;ioc/application-config.xml&quot; );
			}

			private function onLoaded( event:ContextEvent ) :void
			{
				// Contexte chargé
				// ...
			}

		]]&gt;
	&lt;/mx:Script&gt;

	&lt;controller:UserController id=&quot;userControl&quot; /&gt;

	&lt;model:UserModel id=&quot;userModel&quot; /&gt;

	&lt;view:LoginView id=&quot;view&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<ul>
<li>Nous continuons à utiliser le “<strong>creationComplete</strong>” pour déclencher la fonction<strong> init()</strong> qui chargera le fichier de configuration.</li>
<li>Il ne faut pas oublier d’inclure au besoin les classes contenues dans notre fichier de config !
<pre class="syntax-highlight:js">
include &quot;includeService.as&quot;
</pre>
</li>
<li>Dans la fonction<strong> init()</strong>, nous ajoutons un écouteur sur <strong>ApplicationContext</strong> (<a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/ioc/event/ContextEvent.html#CONTEXT_LOADED">ContextEvent.CONTEXT_LOADED</a>), qui déclenchera la fonction <strong>onLoaded</strong> quand le fichier de configuration sera chargé. Puis nous lançons le chargement du fichier de config (<strong> ioc/application-config.xml</strong> ).</li>
<li>&#8230; Et nous incluons la vue LoginView.</li>
</ul>
<h3><strong>Modification de notre UserController</strong></h3>
<p>Dans un soucis de clarté, nous allons créer 2 classes contenants les constantes référençants les noms des services (contenus dans le fichier de configuration), et les noms des méthodes de ces services.</p>
<p>MethodConstant (dans notre exemple uniquement la méthode login)</p>
<pre class="syntax-highlight:js">
package service
{
	public class MethodConstant
	{
		public static const LOGIN:String = &quot;login&quot;;
	}
}
</pre>
<p>ServiceConstant (les identifiants des objets contenus dans le fichier de configuration)</p>
<pre class="syntax-highlight:js">
package service
{
	public class ServiceConstant
	{
		public static const SERVICE_USER:String = &quot;remotingUser&quot;;
		public static const SERVICE_OTHER:String = &quot;remotingOther&quot;;
	}
}
</pre>
<p>Nous venons de charger notre fichier de configuration au niveau de notre Application. Nous devons maintenant modifier notre contrôleur pour qu&#8217;il <strong>écoute le chargement du fichier</strong> (événement ContextEvent.CONTEXT_LOADED), et <strong>mette à jour sa propriété service</strong>.</p>
<pre class="syntax-highlight:js">
package controller
{
	import com.lafabrick.reflex.controller.BaseController;
	import com.lafabrick.reflex.ioc.ApplicationContext;
	import com.lafabrick.reflex.ioc.event.ContextEvent;
	import com.lafabrick.reflex.model.ModelLocator;
	import com.lafabrick.reflex.service.ServicesLocator;

	import dataObject.UserDo;

	import model.UserModel;

	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;

	import service.MethodConstant;
	import service.ServiceConstant;

	public class UserController extends BaseController
	{

		public function UserController() : void
		{
			ApplicationContext.addEventListener(ContextEvent.CONTEXT_LOADED, onLoaded);
		}

		private function onLoaded( event:ContextEvent ) :void
		{
			// Contexte chargé
			this.service = ServicesLocator.getService( ServiceConstant.SERVICE_USER );
		}

		public function login( log:String, pass:String ) : void
		{
			executeMethod(MethodConstant.LOGIN, onLoginResult, onLoginFault, log, pass);
		}

		public function onLoginResult( event:ResultEvent ) : void
		{
			(ModelLocator.getModel( UserModel ) as UserModel).userLogged =
				event.result as UserDo;

			trace((ModelLocator.getModel( UserModel ) as UserModel).userLogged.name);
		}
		public function onLoginFault( event:FaultEvent ) : void
		{
			trace(&quot;resultat pourri ...&quot;+event.fault);
		}

	}
}
</pre>
<p><strong><a href="http://www.lafabrick.com/labz/reflex/tuto/reflexTuto2.zip">Les sources de cette exemple</a></strong></p>
<p>Et voilà ! Je vais préparer d&#8217;autres articles, notemment l&#8217;intégration de Reflex dans un projet Gumbo/Flex4. N&#8217;hésitez pas à poster vos retours, c&#8217;est en flexant qu&#8217;on devient flexeron.Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/10/03/256-titre/" rel="bookmark" title="3 octobre 2007">Utiliser Cairngorm dans un projet Flex / AMFPHP</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/02/04/299-un-projet-java-flex-avec-maven-2/" rel="bookmark" title="4 février 2008">Un projet Java / Flex avec Maven 2</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/06/06/327-google-language-api-flex/" rel="bookmark" title="6 juin 2008">Google AJAX Language API&#8230; et ton Flex devient polyglotte !</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/13/786-reflex-1-une-micro-architecture-pour-flex-simple/" rel="bookmark" title="13 janvier 2009">Reflex #1: une micro-architecture pour Flex&#8230; simple !</a></li>
</ul>
<p><!-- Similar Posts took 72.681 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/lafabrick?a=XU6oqO1F"><img src="http://feeds.feedburner.com/~f/lafabrick?i=XU6oqO1F" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=rXwVMhmV"><img src="http://feeds.feedburner.com/~f/lafabrick?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=XdmZ2Hr3"><img src="http://feeds.feedburner.com/~f/lafabrick?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=W73fHvXJ"><img src="http://feeds.feedburner.com/~f/lafabrick?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=YhTq9XSK"><img src="http://feeds.feedburner.com/~f/lafabrick?i=YhTq9XSK" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/nsLngAoYreI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/01/15/819-reflex-2-vous-reprendez-bien-un-peu-de-ioc/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/01/15/819-reflex-2-vous-reprendez-bien-un-peu-de-ioc/</feedburner:origLink></item>
		<item>
		<title>Reflex #1: une micro-architecture pour Flex… simple !</title>
		<link>http://feedproxy.google.com/~r/lafabrick/~3/MHW93bE64EA/</link>
		<comments>http://www.lafabrick.com/blog/2009/01/13/786-reflex-1-une-micro-architecture-pour-flex-simple/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 23:05:01 +0000</pubDate>
		<dc:creator>fab</dc:creator>
		
		<category><![CDATA[La Fabrick]]></category>

		<category><![CDATA[Nos projets]]></category>

		<category><![CDATA[[Dev] Flash / Flex / AIR...]]></category>

		<category><![CDATA[architecture]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[MVC]]></category>

		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://www.lafabrick.com/blog/?p=786</guid>
		<description><![CDATA[
Après un temps de test, de mise en place et re-factorisation en tout genre, j’ai décidé de partager la petite micro-architecture que j’ai mis en place à l’université, et que j’utilise dans mes projets.
Let&#8217;s gamble !

Encore un MVC ?
Oui.
Plus sérieusement, l’écriture de cette micro-architecture est partie d’un besoin de simplicité et de robustesse.
Souvent dans le [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.lafabrick.com/labz/reflex/images/reflexImgTuto1.jpg" alt="reflex image tut 1" title="reflex image tut 1" width="520" height="220" class="aligncenter size-full wp-image-915" /><br />
Après un temps de test, de mise en place et re-factorisation en tout genre, j’ai décidé de partager la petite micro-architecture que j’ai mis en place à l’université, et que j’utilise dans mes projets.</p>
<p><strong>Let&#8217;s gamble !</strong><br />
<span id="more-786"></span></p>
<h3><strong>Encore un MVC ?</strong></h3>
<p>Oui.<br />
Plus sérieusement, l’écriture de cette micro-architecture est partie d’un besoin de simplicité et de robustesse.</p>
<p>Souvent dans le monde de Flex, les équipes ne sont pas forcement homogènes. Certains sont habitués à la rigueur de Java, d’autres sont plus “devsigners freestyle” venant du monde Flash. Les premiers aiment les grosses mécaniques comme <a href="http://puremvc.org/">PureMVC</a>, ou <a href="http://www.pranaframework.org/">Prana Framework</a> “Spring like”. Les seconds connaissent au mieux <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm">Cairngorm</a>, au pire confondent <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a> et <a href="http://fr.wikipedia.org/wiki/Ventilation_m%C3%A9canique_contr%C3%B4l%C3%A9e">VMC</a> - ce qui n’a rien a voir, sauf si vous faites une application riche sur le thème de la ventilation.<br />
Il fallait donc trouver la solution la plus efficace pour avoir un flux de production  le plus optimal.</p>
<p>Bon vous me direz “ba Cairngorm c’est pas mal” ! Oui mais voilà. Cairngorm est plus une ligne de conduite qu’une micro-architecture. Il suffit en gros de suivre les interfaces et d’écrire son MVC. C’est simple, mais pourquoi diable utiliser ces #?~! d’événements synchrones pour déclencher des commandes ! Et il devient assez pénible de dupliquer le travail déjà fait côté serveur&#8230; sans compter le temps de compilation à rallonge. C’est rigolo pour se faire les dents, mais au bout d’un moment faut être sérieux.</p>
<p>Donc Reflex.</p>
<h3><strong>Le MVC en 2 mots</strong></h3>
<p>MVC, pour Model View Controller, est le design pattern le plus connu. Le but de ce pattern est de décomposer la représentation graphique (la vue), la couche métier et le modèle de données.</p>
<p>Le modèle MVC de Reflex peut se visualiser comme suit :</p>
<p><img src="http://www.lafabrick.com/labz/reflex/images/MVCReflex.png" alt="MVC architecture" /></p>
<ul>
<li>La vue demande au contrôleur la récupération de données.</li>
<li>Le contrôleur lance la méthode avec les arguments associés, et capte les retours du serveur.</li>
<li>À la réception des données, le contrôleur met à jour le modèle de données.</li>
<li>Le modèle notifie à la vue son changement et la met à jour.</li>
</ul>
<h3><strong>Préparation de votre projet d’exemple</strong></h3>
<p><b><a href="http://www.lafabrick.com/blog/reflex/">Une page de ressources pour Reflex</a> est disponible sur le Blog.</b></p>
<p>Commencez par récupérer <a href=" http://www.lafabrick.com/labz/reflex/bin/reflex.swc">le swc reflex</a>.<br />
<a href="http://www.lafabrick.com/labz/reflex/source/reflex-src.zip">Les sources</a>, et <a href="http://www.lafabrick.com/labz/reflex/apidoc/">la documentation</a> sont aussi disponibles en lignes. </p>
<p>Pour cette exemple, nous allons utiliser un petit service Java. Je vous laisse <a href="http://www.lafabrick.com/labz/reflex/tuto/reflexTuto1.zip">télécharger le projet d’exemple “reflexTuto1”</a>, et regarder :</p>
<ul>
<li>le répertoire “java” : les sources Java ( UserDo : l’object de donnée, UserDs : la couche métier ).</li>
<li>Les fichiers de configuration dans le répertoire <strong>WebContent/WEB-INF/flex/remoting-config.xml</strong> : la configuration des services distants.</li>
</ul>
<p>Pour cette exemple vous aurez besoin d&#8217;un environnement Flex avec les WTP installés ainsi qu&#8217;un serveur Tomcat (pour lancer les exemples).</p>
<p>Petit rappel : </p>
<ul>
<li>
<strong>Pour installer les WPT</strong> ( qui vous donne accès à la perspective J2EE et à la vue server) :</p>
<ul>
<li>Ouvrez le menu <strong>Help > Software updates > Find and install…</strong></li>
<li>Faites “<strong>Search new features to install</strong>”</li>
<li>Dans la fenêtre qui apparaît, cochez “<strong>Europa Discovery Site</strong>”</li>
<li>Cliquez sur “<strong>Finish</strong>”</li>
<li>La recherche de plugins commence. Vous devrez choisir votre miroir. La fenêtre de résultats s’affiche. Déployez “<strong>Europa Update Site</strong>” et cochez “<strong>Web and J2EE Development</strong>”</li>
<li>Cliquez sur le bouton “<strong>Select Required</strong>”</li>
<li>Faites “<strong>Next</strong>”</li>
<li>Cochez <strong>“I accept…</strong>”</li>
<li>Faites “<strong>Next</strong>” de nouveau</li>
<li>Faites “<strong>Finish</strong>”</li>
</ul>
</li>
<li>
<strong>Pour installer un serveur TOMCAT</strong></p>
<ul>
<li>Téléchargez un <a href="http://apache.cict.fr/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.zip">Tomcat 6</a></li>
<li>Décompressez l&#8217;archive dans le répertoire de votre choix</li>
<li>Vous devez configurer votre serveur dans Flex à partir de la vue Server : &#8220;<strong>Windows > Other View&#8230;</strong>&#8221; puis &#8220;<strong>Servers</strong>&#8220;</li>
<li>Un fois configuré (clic droit dans la vue servers et &#8220;<strong>New&#8230;</strong>&#8220;), n&#8217;oubliez pas d&#8217;ajouter votre projet sur votre serveur ! (clic droit dans la vue servers et &#8220;<strong>Add and remove projects&#8230;</strong>&#8220;)</li>
</ul>
</li>
</ul>
<h3><strong>Au départ : un service et un objet de données</strong></h3>
<p>Tout d’abord nous devons représenter l’objet de données du serveur dans votre projet.</p>
<p>L’objectif est d’avoir une image identique des données côté serveur et côté Flex, afin que les 2 parties “parlent la même langue” : cette classe contient une référence vers son “image” côté serveur.</p>
<pre class="syntax-highlight:js">
package dataObject
{

	[Bindable]
	[RemoteClass(alias=&quot;User.UserDo&quot;)]
	public class UserDo
	{
		public function UserDo()
		{
		}

		public var login:String;
		public var name:String;

	}
}
</pre>
<p>Nous voulons discuter avec la couche server : nous allons donc utiliser un service de type <strong><a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/remoting/mxml/RemoteObject.html">RemoteObject</a></strong>, faisant référence à notre couche serveur, défini dans le fichier <strong>remoting-config.xml</strong>.</p>
<pre class="syntax-highlight:xml">
&lt;mx:RemoteObject
	id=&quot;remoteUser&quot;
	destination=&quot;javaFacadeUser&quot;
	showBusyCursor=&quot;true&quot; /&gt;;
</pre>
<h3><strong>Le Modèle</strong></h3>
<p>Le modèle est notre réceptacle de données.<br />
Cette classe étend <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/model/BaseModel.html">BaseModel</a>, qui permet l’enregistrement automatique du modèle dans le <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/model/ModelLocator.html">ModelLocator</a>.<br />
C’est lui qui sera mis à jour par le <strong>contrôleur</strong>, et qui, via le tag <strong>[Bindable]</strong>, mettra a jour là vue. Dans notre exemple nous allons stocker le UserDo, résultant de la requête serveur login().</p>
<pre class="syntax-highlight:js">
package model
{
	import com.lafabrick.reflex.model.BaseModel;

	import dataObject.UserDo;

	public class UserModel extends BaseModel
	{
		[Bindable]
		public var userLogged:UserDo;

	}
}
</pre>
<h3><strong>Le Contrôleur</strong></h3>
<p>C’est l’intelligence du système. C’est lui qui invoque le service, récupère et met à jour les données.</p>
<pre class="syntax-highlight:js">
package controller
{
	import com.lafabrick.reflex.controller.BaseController;
	import com.lafabrick.reflex.model.ModelLocator;

	import dataObject.UserDo;

	import model.UserModel;

	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;

	public class UserController extends BaseController
	{

		public function login( log:String, pass:String ) : void
		{
			executeMethod( &quot;login&quot;, onLoginResult, onLoginFault, log, pass);
		}

		public function onLoginResult( event:ResultEvent ) : void
		{
			(ModelLocator.getModel( UserModel ) as UserModel).userLogged =
				event.result as UserDo;
		}

		public function onLoginFault( event:FaultEvent ) : void
		{
			trace(&quot;Bad result ...&quot;+event.fault);
		}
	}
}
</pre>
<ul>
<li>Cette classe étend <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/controller/BaseController.html">BaseController</a>, qui permet l’enregistrement automatique du contrôleur dans le <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/controller/ControllerLocator.html">ControllerLocator</a>.</li>
<li> La méthode <strong>login()</strong> contient la mécanique de déclenchement du <strong>service</strong> (méthode de BaseController). La méthode <strong>executeMethod</strong> est définie par les propriétés suivantes :
<ul>
<li><strong><em>method:String</em></strong> : le nom de la méthode ( “login” ),</li>
<li><strong><em>resultFunction:Function</em></strong> : la fonction déclenchée lorsque le serveur renvoie un résultat (onLoginResult)</li>
<li><strong><em>faultFunction:Function = null</em></strong> : la fonction déclenchée lorsque le serveur renvoie une faute (onLoginFault)</li>
<li><strong><em>&#8230; args</em></strong> : tous les arguments à passer à la méthode distante&#8230;</li>
</ul>
</li>
<li>Le modèle est mis à jour dans le fonction de résultat. Pour récupérer l’instance du modèle, il suffit d’utiliser le <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/model/ModelLocator.html">ModelLocator</a> :
<pre class="syntax-highlight:xml">
// Renvoie l&#039;instance UserModel enregistré dans ModelLocator
trace( ( ModelLocator.getModel( UserModel ) as UserModel ) );
</pre>
</li>
</ul>
<p><span style="color: #800000;"><br />
<b>NOTE</b> : les “locator” <b>ModelLocator</b> et <b>ControllerLocator</b> n’enregistrent qu’une et une seul instance d’un même modèle / contrôleur. Si deux instances d’un même modèle / contrôleur sont déclarées, une erreur <a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/ReflexError.html">ReflexError</a> est levée. Les classes étendant <b>BaseController</b> et <b>BaseModel</b> sont automatiquement référencées dans <b>ModelLocator</b> et <b>ControllerLocator</b>.<br />
</span></p>
<h3><strong>La Vue</strong></h3>
<p>Construisons maintenant notre vue.</p>
<pre class="syntax-highlight:xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;&gt;
&lt;mx:Application
	xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
	layout=&quot;absolute&quot;
	xmlns:controller=&quot;controller.*&quot;
	xmlns:model=&quot;model.*&quot;&gt;

&lt;mx:RemoteObject
	id=&quot;remoteUser&quot;;
	destination=&quot;javaFacadeUser&quot;;
	showBusyCursor=&quot;true&quot; /&gt;

	&lt;controller:UserController id=&quot;userControl&quot; service=&quot;{remoteUser}&quot; /&gt;

	&lt;model:UserModel id=&quot;userModel&quot; /&gt;

	&lt;mx:VBox&gt;
		&lt;mx:TextInput id=&quot;login&quot; /&gt;
		&lt;mx:TextInput id=&quot;password&quot; displayAsPassword=&quot;true&quot; /&gt;

		&lt;mx:Button label=&quot;connect&quot;
			click=&quot;{userControl.login( login.text, password.text )}&quot; /&gt;

		&lt;mx:Label x=&quot;208&quot; y=&quot;44&quot;
			text=&quot;User Name : {userModel.userLogged.name}&quot;/&gt;;
	&lt;/mx:VBox&gt;

&lt;/mx:Application&gt;
</pre>
<ul>
<li>Nous créons une instance RemoteObject permettant de pointer sur le service côté serveur. La propriété <em>destination</em> est l’identifiant du service dans le fichier <strong>remoting-config.xml</strong>.</li>
<li>Nous créons une instance de <b>UserController</b>, avec comme propriété <em>service</em> l’identifiant du RemoteObject “<strong>remoteUser</strong>”.</li>
<li>De la même manière, nous créons l’instance du modèle UserModel.</li>
<li>Au final, la vue appel la méthode <strong>login()</strong> du contrôleur, qui se charge d’envoyer et de réceptionner les données au serveur. Au retour, le contrôleur met à jour le modèle, en “poussant” le UserDo provenant du serveur. La vue est automatiquement mise à jour via le principe de Binding des données.</li>
</ul>
<p><b><a href="http://www.lafabrick.com/labz/reflex/tuto/reflexTuto1.zip">Les sources de cette exemple</a></b></p>
<h3><strong>Conclusion</strong></h3>
<p>Reflex n’a pas la prétention de concurrencer des architectures reconnues comme <a href="http://puremvc.org/">PureMVC</a> ou <a href="http://mate.asfusion.com/">MATE</a>. L’objectif, vous l’aurez compris, est d’aller à l’essentiel, sans se perdre dans la forêt des Design Pattern,  pour une productivité la plus efficace possible. A vous d’implémenter cette architecture selon vos besoins.</p>
<p>Le prochain tutoriel ira un peu plus loin dans cette micro-architecture : comment mieux découper son projet, et comment associer un fichier de configuration XML externe (<a href="http://www.lafabrick.com/labz/reflex/apidoc/com/lafabrick/reflex/ioc/package-detail.html">package IOC</a>).</p>
<p>J’attends vos retours !Autres articles sur le même sujet
<ul>
<li><a href="http://www.lafabrick.com/blog/2007/10/03/256-titre/" rel="bookmark" title="3 octobre 2007">Utiliser Cairngorm dans un projet Flex / AMFPHP</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/12/13/506-utiliser-le-dragmanager-de-flex-1ere-partie/" rel="bookmark" title="13 décembre 2008">Utiliser le DragManager de Flex ( 1ère partie )</a></li>
<li><a href="http://www.lafabrick.com/blog/2008/06/06/327-google-language-api-flex/" rel="bookmark" title="6 juin 2008">Google AJAX Language API&#8230; et ton Flex devient polyglotte !</a></li>
<li><a href="http://www.lafabrick.com/blog/2009/01/15/819-reflex-2-vous-reprendez-bien-un-peu-de-ioc/" rel="bookmark" title="15 janvier 2009">Reflex #2 : vous reprendrez bien un peu de IOC ?</a></li>
</ul>
<p><!-- Similar Posts took 12.586 ms --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/lafabrick?a=Rh05MJuZ"><img src="http://feeds.feedburner.com/~f/lafabrick?i=Rh05MJuZ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=DXIGVJCF"><img src="http://feeds.feedburner.com/~f/lafabrick?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=cNxrTPHr"><img src="http://feeds.feedburner.com/~f/lafabrick?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=dFo9laWl"><img src="http://feeds.feedburner.com/~f/lafabrick?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/lafabrick?a=VHNkkxPP"><img src="http://feeds.feedburner.com/~f/lafabrick?i=VHNkkxPP" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/lafabrick/~4/MHW93bE64EA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lafabrick.com/blog/2009/01/13/786-reflex-1-une-micro-architecture-pour-flex-simple/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.lafabrick.com/blog/2009/01/13/786-reflex-1-une-micro-architecture-pour-flex-simple/</feedburner:origLink></item>
	</channel>
</rss>
