<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://prendreuncafe.com/blog/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Prendre un Café - Tag - flash</title>
  <link>http://prendreuncafe.com/blog/</link>
  <atom:link href="http://prendreuncafe.com/blog/feed/tag/flash/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>fr</language>
  <pubDate>Thu, 28 Aug 2008 04:27:09 +0200</pubDate>
  <copyright>Contenus sous licence Creative Commons BY-SA</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Partager la session utilisateur entre Flash/Flex et symfony avec AmfPHP</title>
    <link>http://prendreuncafe.com/blog/post/2008/07/25/Partager-la-session-utilisateur-entre-Flash/Flex-et-symfony-avec-AmfPHP</link>
    <guid isPermaLink="false">urn:md5:dd8eeb08fee3290129892d772067e574</guid>
    <pubDate>Fri, 25 Jul 2008 17:07:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Dev</category>
        <category>amfphp</category><category>flash</category><category>flex</category><category>php</category><category>symfony</category>    
    <description>    &lt;p&gt;Pour les besoins d'un projet récent, j'ai eu besoin de valider la possibilité de gérer l'authentification et l'accès à la session &lt;a href=&quot;http://www.symfony-project.com/&quot; hreflang=&quot;en&quot;&gt;symfony&lt;/a&gt; (côté serveur) depuis une interface générée par &lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/Presentation-de-Flex&quot; hreflang=&quot;fr&quot;&gt;Adobe Flex&lt;/a&gt; (en Flash, donc côté client).&lt;/p&gt;


&lt;p&gt;Pour cela, j'ai utilisé la librairie &lt;a href=&quot;http://amfphp.org/&quot; hreflang=&quot;en&quot;&gt;AmfPHP&lt;/a&gt; en version &lt;a href=&quot;https://amfphp.svn.sourceforge.net/svnroot/amfphp/tags/1.9beta2/&quot;&gt;1.9beta2&lt;/a&gt;, certes pas très récente mais suffisament fonctionnelle pour satisfaire à ce besoin précis. Voyons comment ça se passe concrètement. L'avantage de la démonstration ci-dessous est qu'elle ne nécessite pas d'installer Flex puisque AmfPHP fournit un navigateur de services (browser) qui nous suffira pour valider notre concept.&lt;/p&gt;


&lt;h3&gt;Installation du plugin sfGuard&lt;/h3&gt;


&lt;p&gt;Je pars du principe que tout le monde a une installation de symfony 1.1 nanti d'une application &lt;code&gt;main&lt;/code&gt;, ainsi qu'un projet et un virtual host apache fonctionnels pointant sur &lt;code&gt;local.mademo.org&lt;/code&gt;. Si ce n'est pas le cas, &lt;a href=&quot;http://prendreuncafe.com/blog/post/2008/03/10/Symfony-11-beta-tour-du-proprietaire-Installation&quot; hreflang=&quot;fr&quot;&gt;voila de quoi vous mettre à jour&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;On commence par installer le plugin &lt;a href=&quot;http://trac.symfony-project.com/wiki/sfGuardPlugin&quot; hreflang=&quot;en&quot;&gt;sfGuard&lt;/a&gt;, qui se chargera de la persistance des droits et permissions utilisateurs en base de données, et fournira les utilitaires d'authentification et de manipulation de la session côté serveur :&lt;/p&gt;

&lt;pre&gt;
$ ./symfony plugin:install sfGuardPlugin
$ ./symfony propel-build-all
$ ./symfony cc
&lt;/pre&gt;


&lt;p&gt;On charge quelques données de test dans notre base de données nouvellement mise à jour :&lt;/p&gt;

&lt;pre&gt;
$ mkdir data/fixtures 
$ cp plugins/sfGuardPlugin/data/fixtures.yml.sample data/fixtures/fixtures.yml
$ ./symfony propel:data-load main
&lt;/pre&gt;


&lt;p&gt;Ce jeu de données de test nous fournit par défaut un compte &lt;code&gt;admin&lt;/code&gt; (mot de passe &lt;code&gt;admin&lt;/code&gt;) qui nous servira à tester notre service d'authentification.&lt;/p&gt;


&lt;p&gt;Ensuite, il nous faut modifier notre classe &lt;code&gt;apps/main/lib/myUser.php&lt;/code&gt; gérant la session utilisateur afin qu'elle étende désormais la classe &lt;code&gt;sfGuardSecurityUser&lt;/code&gt;, fournie par le plugin sfGuard :&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Fichier apps/main/lib/myUser.php&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; myUser extends sfGuardSecurityUser
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;


&lt;h3&gt;Installation et configuration d'AmfPHP&lt;/h3&gt;


&lt;p&gt;Nous allons installer la librairie AmfPHP dans le sous-répertoire &lt;code&gt;web/&lt;/code&gt; de notre projet&lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2008/07/25/Partager-la-session-utilisateur-entre-Flash/#pnote-989-1&quot; id=&quot;rev-pnote-989-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;, et aménager quelque peu notre arborescence pour accueillir les services AmfPHP :&lt;/p&gt;

&lt;pre&gt;
$ cd /path/to/project
$ svn export https://amfphp.svn.sourceforge.net/svnroot/amfphp/tags/1.9beta2 web/amfphp
$ mkdir lib/amfphp-services
$ mv web/amfphp/services/amfphp lib/amfphp-services/
&lt;/pre&gt;


&lt;p&gt;Ceci fait, nous allons éditer plusieurs fichiers d'amfphp afin de l'adapter à notre environnement symfony. Tout d'abord, commençons par éditer la valeur de la variable &lt;code&gt;$servicesPath&lt;/code&gt; dans le fichier &lt;code&gt;web/amfphp/globals.php&lt;/code&gt; :&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// ...&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;$servicesPath&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/dirname&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;dirname&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;__FILE__&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #ff0000;&quot;&gt;'/../../lib/amfphp-services/'&lt;/span&gt;;&lt;/pre&gt;


&lt;p&gt;Enfin, il nous faut &amp;quot;patcher&amp;quot;&lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2008/07/25/Partager-la-session-utilisateur-entre-Flash/#pnote-989-2&quot; id=&quot;rev-pnote-989-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt; le fichier &lt;code&gt;web/amfphp/core/amf/app/Filters.php&lt;/code&gt;, qui initialise la session PHP sans définir le nom de la session. Ici, nous utiliserons le nom de la session symfony par défaut, &amp;quot;&lt;code&gt;symfony&lt;/code&gt;&amp;quot; (ligne 105 du fichier) :&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;102&lt;/span&gt;     &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//Fix for godaddy not allowing ini_get&lt;/span&gt;
&lt;span style=&quot;color: #cc66cc;&quot;&gt;103&lt;/span&gt;     &lt;span style=&quot;color: #0000ff;&quot;&gt;$sessionName&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;PHPSESSID&amp;quot;&lt;/span&gt;;
&lt;span style=&quot;color: #cc66cc;&quot;&gt;104&lt;/span&gt;   &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #cc66cc;&quot;&gt;105&lt;/span&gt;   &lt;a href=&quot;http://www.php.net/session_name&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;session_name&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'symfony'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span style=&quot;color: #cc66cc;&quot;&gt;106&lt;/span&gt;   &lt;a href=&quot;http://www.php.net/session_start&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;session_start&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span style=&quot;color: #cc66cc;&quot;&gt;107&lt;/span&gt;   &lt;span style=&quot;color: #0000ff;&quot;&gt;$session_id&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/session_id&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;session_id&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/pre&gt;


&lt;h3&gt;Création d'un service permettant le partage de la session utilisateur&lt;/h3&gt;


&lt;p&gt;Voila, nous pouvons maintenant créer un service de gestion de l'authentification, que nous nommerons pompeusement &lt;code&gt;UserSessionService&lt;/code&gt; et que nous enregistrerons dans le fichier &lt;code&gt;lib/amfphp-services/UserSessionService.php&lt;/code&gt; :&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;require_once&lt;/span&gt; &lt;a href=&quot;http://www.php.net/dirname&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;dirname&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;__FILE__&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #ff0000;&quot;&gt;'/../../config/ProjectConfiguration.class.php'&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
 * This class tests the symfony session within an AmfPHP context
 *
 */&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; UserSessionService
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Symfony context
   * @var sfContext
   */&lt;/span&gt;
  protected &lt;span style=&quot;color: #0000ff;&quot;&gt;$context&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
  
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Symfony session
   * @var sfGuardSecurityUser
   */&lt;/span&gt;
  protected &lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
  
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Public constructor
   *
   */&lt;/span&gt;
  public &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; __construct&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #0000ff;&quot;&gt;$configuration&lt;/span&gt; = ProjectConfiguration::&lt;span style=&quot;color: #006600;&quot;&gt;getApplicationConfiguration&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'main'&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;'dev'&lt;/span&gt;, &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;context&lt;/span&gt; = sfContext::&lt;span style=&quot;color: #006600;&quot;&gt;createInstance&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$configuration&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;context&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getUser&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
  
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Checks wheter user is authenticated or not
   *
   * @return boolean
   */&lt;/span&gt;
  public &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; isAuthenticated&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getUser&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;isAuthenticated&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
  
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Authenticates user
   *
   * @param  string  $username
   * @param  string  $password
   * @return boolean True if user has been successfully authenticated
   */&lt;/span&gt;
  public &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; login&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$username&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$password&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;isAuthenticated&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
      &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
    
    &lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt; = sfGuardUserPeer::&lt;span style=&quot;color: #006600;&quot;&gt;retrieveByUsername&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$username&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
    
    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!&lt;a href=&quot;http://www.php.net/is_null&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;is_null&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;checkPassword&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$password&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getUser&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;signIn&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
      &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
    
    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
  
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Signs out a user 
   *
   */&lt;/span&gt;
  public &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; logout&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getUser&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;signOut&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
  
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Retrieves the current symfony context
   *
   * @return sfContext
   */&lt;/span&gt;
  protected &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; getContext&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;context&lt;/span&gt;;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
  
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/**
   * Retrieves the current symfony user session
   *
   * @return sfGuardSecurityUser
   */&lt;/span&gt;
  protected &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; getUser&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;user&lt;/span&gt;;
  &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Pour tester notre service, utilisons le navigateur de service proposé par AmfPHP. Pour cela, il faut lancer un navigateur sur &lt;code&gt;http://local.mademo.org/amfphp/browser/index.html&lt;/code&gt; :&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://prendreuncafe.com/blog/public/images/Dev/Flex/amfphpbrowsertest.png&quot;&gt;&lt;img src=&quot;http://prendreuncafe.com/blog/public/images/Dev/Flex/.amfphpbrowsertest_m.jpg&quot; alt=&quot;Naviagateur de services AmfPHP&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;Naviagateur de services AmfPHP, juil 2008&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Via cette interface, elle même réalisée en Flex, on peut tester les méthodes publiques définies dans notre service, manipuler les arguments, et constater que nous arrivons à nous authentifier et que nous accédons bien à la même session utilisateur que dans symfony : login, logout et test du statut d'authentification.&lt;/p&gt;


&lt;h3&gt;En conclusion&lt;/h3&gt;


&lt;p&gt;On pourrait aller beaucoup plus loin dans cet exemple, en proposant par exemple une classe proxy en ActionScript 3 représentant un utilisateur du système (dans notre cas, une instance de la classe &lt;code&gt;sfGuardUser&lt;/code&gt;), cette dernière reproduisant tout ou partie de ses méthodes et propriétés, et donc d'utiliser l'ORM Propel directement depuis Flash... Je vous laisse faire vos tests si le coeur vous en dit.&lt;/p&gt;


&lt;p&gt;D'autre part, même si la librairie AmfPHP semble un peu passée au niveau architecture, elle reste néanmoins très efficace pour publier des services PHP dans Flash au travers du protocole AMF. J'ai eu vent d'autres librairies comme &lt;a href=&quot;http://www.themidnightcoders.com/weborb/&quot; hreflang=&quot;en&quot;&gt;WebORB&lt;/a&gt; ou &lt;a href=&quot;http://www.osflash.org/sabreamf&quot; hreflang=&quot;en&quot;&gt;SabreAMF&lt;/a&gt;, mais je ne sais pas vraiment ce qu'elles valent... Des avis dans l'assistance ?&lt;/p&gt;
&lt;div class=&quot;footnotes&quot;&gt;&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2008/07/25/Partager-la-session-utilisateur-entre-Flash/#rev-pnote-989-1&quot; id=&quot;pnote-989-1&quot;&gt;1&lt;/a&gt;] Du coup, on expose certains scripts AmfPHP, mais la librairie n'est malheureusement que prévue pour fonctionner en ce sens...&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2008/07/25/Partager-la-session-utilisateur-entre-Flash/#rev-pnote-989-2&quot; id=&quot;pnote-989-2&quot;&gt;2&lt;/a&gt;] Oui, c'est terriblement crade, je ne comprend d'ailleurs pas qu'AmfPHP n'aie pas prévu ce cas de figure...&lt;/p&gt;&lt;/div&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Je vais tuer votre productivité quotidienne (gnark)</title>
    <link>http://prendreuncafe.com/blog/post/2008/07/17/Je-vais-tuer-votre-productivite-quotidienne-gnark</link>
    <guid isPermaLink="false">urn:md5:7dbd0e0459e7bf098398d9859869f79b</guid>
    <pubDate>Thu, 17 Jul 2008 09:50:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Rigolo</category>
        <category>flash</category><category>haha</category><category>jeu</category><category>nimp</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.motion-twin.com/&quot; hreflang=&quot;fr&quot;&gt;MotionTwin&lt;/a&gt; vient de sortir un nouveau buzzgame dont ils ont le secret, &lt;em&gt;labrute&lt;/em&gt;. L'idée est très sympa, vous créez un personnage que vous lancez dans une arène virtuelle face à un adversaire qu'il devra combattre pour éventuellement acquérir de nouvelles compétences et armes diverses.&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://prendreuncafe.labrute.fr/&quot;&gt;&lt;img src=&quot;http://prendreuncafe.com/blog/public/images/Rigolo/.labrute_m.jpg&quot; alt=&quot;LaBrute.fr&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;LaBrute.fr, juil 2008&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Si vous voulez combattre mon perso, &lt;a href=&quot;http://prendreuncafe.labrute.fr/&quot; hreflang=&quot;fr&quot;&gt;c'est par là que ça se passe&lt;/a&gt; &lt;img src=&quot;/blog/themes/Puc4/smilies/smile.gif&quot; alt=&quot;:-)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Seul petit regret, le nombre de combats est limité à 3 par jour, c'est un peu juste et ça va inciter les gens à créer beaucoup de personnages différents.&lt;/p&gt;


&lt;p&gt;Un dernier conseil, une fois votre personnage créé, attribuez-lui tout de suite un mot de passe, je me suis fait déposséder de ma première brute en étant un peu trop confiant sur la nature humaine &lt;img src=&quot;/blog/themes/Puc4/smilies/wink.gif&quot; alt=&quot;;-)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Présentation de Flex</title>
    <link>http://prendreuncafe.com/blog/post/2007/08/19/Presentation-de-Flex</link>
    <guid isPermaLink="false">urn:md5:da44566c457d577a024483072a70682e</guid>
    <pubDate>Sun, 19 Aug 2007 13:04:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Dev</category>
        <category>actionscript</category><category>adobe</category><category>amfphp</category><category>bestpractices</category><category>flash</category><category>flex</category><category>framework</category><category>mxml</category><category>ria</category>    
    <description>    &lt;p&gt;Pour les besoins du boulot, j'ai du me mettre à &lt;a href=&quot;http://www.adobe.com/fr/products/flex/&quot; hreflang=&quot;fr&quot;&gt;Flex&lt;/a&gt;, le framework d'&lt;a href=&quot;http://adobe.fr&quot; hreflang=&quot;fr&quot;&gt;Adobe&lt;/a&gt; orienté &lt;a href=&quot;http://fr.wikipedia.org/wiki/Rich_Internet_Application&quot; hreflang=&quot;fr&quot;&gt;&lt;acronym title=&quot;Rich Internet application&quot;&gt;RIA&lt;/acronym&gt;&lt;/a&gt; en &lt;a href=&quot;http://fr.wikipedia.org/wiki/Format_Flash&quot; hreflang=&quot;fr&quot;&gt;Flash&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Je pensais que mon passé de flasheur m'aiderait à monter rapidement en compétence sur cette techno, ben non : c'est tout à fait autre chose que ce que je connaissais de l'IDE traditionnel, dont je m'étais arrêté à la version 8. Avec Flex on a affaire à un framework complet de génération d'interfaces riches basées sur l'emploi de composants décrits et paramétrés en XML et de la dernière mouture du langage &lt;a href=&quot;http://fr.wikipedia.org/wiki/ActionScript&quot; hreflang=&quot;fr&quot;&gt;ActionScript&lt;/a&gt; en version 3. Quelques &lt;a href=&quot;http://flex.org/showcase/&quot; hreflang=&quot;en&quot;&gt;exemples d'applications réalisées avec Flex&lt;/a&gt; sont disponibles, et pour certaines, ça en jette carrément.&lt;/p&gt;


&lt;h3&gt;Le langage MXML&lt;/h3&gt;


&lt;p&gt;La description des interfaces s'opère au moyen du langage MXML&lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#pnote-908-1&quot; id=&quot;rev-pnote-908-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;, basé sur XML un peu comme ce que proposent &lt;a href=&quot;http://xulfr.org/&quot; hreflang=&quot;fr&quot;&gt;XUL&lt;/a&gt; ou &lt;a href=&quot;http://www.xaml.fr/&quot; hreflang=&quot;fr&quot;&gt;XAML&lt;/a&gt; ou même &lt;a href=&quot;http://fr.wikipedia.org/wiki/XHTML&quot; hreflang=&quot;fr&quot;&gt;XHTML&lt;/a&gt; (qui reste une implémentation particulière et standardisée d'XML). Deux types principaux de composants sont disponibles : les &lt;strong&gt;conteneurs&lt;/strong&gt; (boîtes, panneaux, fenêtres, etc.) et les &lt;strong&gt;éléments de contrôle&lt;/strong&gt; (champs texte, listes, datagrids, tree, etc.)&lt;/p&gt;


&lt;p&gt;Le nombre de conteneurs et de contrôles est impressionnant, on se prend à rêver de la même richesse en HTML &lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#pnote-908-2&quot; id=&quot;rev-pnote-908-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;. La plupart des composants sont visibles sur &lt;a href=&quot;http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html&quot; hreflang=&quot;en&quot;&gt;l'explorateur de composants Flex&lt;/a&gt;, sur le site d'Adobe. Et le meilleur reste sans doute à venir quand on voit le catalogue de composants supplémentaires open source comme ceux du projet &lt;a href=&quot;http://code.google.com/p/flexlib/&quot; hreflang=&quot;en&quot;&gt;FlexLib&lt;/a&gt;...&lt;/p&gt;


&lt;p&gt;Le format généré après compilation d'un ensemble de fichiers MXML constituant une application Flex est le &lt;a href=&quot;http://fr.wikipedia.org/wiki/SWF&quot; hreflang=&quot;fr&quot;&gt;SWF&lt;/a&gt;, le format natif d'Adobe Flash, lisible par tout bon &lt;a href=&quot;http://www.adobe.com/fr/products/flashplayer/&quot; hreflang=&quot;fr&quot;&gt;Flash Player 9&lt;/a&gt; qui se respecte, implanté sur plus de 80% du parc machines desktop mondial &lt;a href=&quot;http://www.adobe.com/products/player_census/flashplayer/version_penetration.html&quot; hreflang=&quot;en&quot;&gt;d'après les dernières statistiques disponibles sur le site d'Adobe&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Voila un exemple de code MXML décrivant l'interface d'une application simpliste :&lt;/p&gt;

&lt;pre class=&quot;xml&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;?xml&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;version&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;encoding&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Application xmlns:&lt;span style=&quot;color: #000066;&quot;&gt;mx&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;http://www.adobe.com/2006/mxml&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;layout&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;absolute&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Panel &lt;span style=&quot;color: #000066;&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Dire bonjour&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;x&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;y&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;layout&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;absolute&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;width&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;303&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:TextInput &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;firstname&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;x&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;y&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Button &lt;span style=&quot;color: #000066;&quot;&gt;label&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Dire bonjour&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;click&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;result.text='Bonjour, '+firstname.text&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;x&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;178&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;y&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Label &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;result&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;x&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;y&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;40&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;width&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;265&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:Panel&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:Application&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Le code est assez parlant, mais voici quelques éléments significatifs :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Le conteneur principal de l'application déclare l'espace de noms &lt;code&gt;mx&lt;/code&gt;, ce qui nous permettra d'utiliser les composants natifs de Flex&lt;/li&gt;
&lt;li&gt;L'application déclare un conteneur sous la forme d'un &lt;code&gt;Panel&lt;/code&gt; contenant trois contrôles :
&lt;ul&gt;
&lt;li&gt;un &lt;code&gt;InputText&lt;/code&gt;, champs de saisie textuelle&lt;/li&gt;
&lt;li&gt;un &lt;code&gt;Button&lt;/code&gt;, un bouton d'action&lt;/li&gt;
&lt;li&gt;un &lt;code&gt;Label&lt;/code&gt;, un champs de texte potentiellement dynamique&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Chaque élément peut se voir nanti d'un attribut &lt;code&gt;id&lt;/code&gt; qui doit être unique si renseigné ; il permet de référencer facilement un élément de l'arbre &lt;acronym title=&quot;Document Object Model&quot;&gt;DOM&lt;/acronym&gt;&lt;/li&gt;
&lt;li&gt;La gestion des évènements peut se faire directement en MXML : ici, quand on clique sur le bouton, le contenu texte du label est modifié en fonction de la valeur textuelle du champs de saisie.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Style et mise en forme&lt;/h3&gt;


&lt;p&gt;Dans l'exemple précédent, on voit que les styles sont appliqués sous forme d'attributs XML. C'est une solution pratique à court terme mais qui peut rapidement s'avérer problématique à maintenir dès que votre application grossit. Aussi, pour séparer la couche de présentation de la description des contenus, tout comme en HTML, Flex permet l'utilisation de feuilles de styles CSS embarquées ou externalisées. Beaucoup de propriétés CSS ont du être créées ou adaptées aux spécificités du balisage MXML et des composants proposés, mais le résultat est une grande souplesse d'utilisation et une large palette de mise en forme disponible. Pour preuve, un petit tour du côté de l'&lt;a href=&quot;http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html&quot; hreflang=&quot;en&quot;&gt;explorateur de styles Flex&lt;/a&gt; s'impose.&lt;/p&gt;


&lt;h3&gt;Le langage ActionScript 3&lt;/h3&gt;


&lt;p&gt;ActionScript 3 est l'évolution logique des précédentes versions, étendant le périmètre fonctionnel et accentuant son caractère professionnel, notamment dans l'implémentation objet, les types natifs et l'organisation en packages des différents objets de programmation.&lt;/p&gt;


&lt;h3&gt;Composants personnalisés&lt;/h3&gt;


&lt;p&gt;Une des grandes forces de Flex à mes yeux est la simplicité avec laquelle on peut créer ses propres composants en héritant de composants basiques préexistants et de les manipuler via son propre espace de noms. Par exemple, la création d'un composant dérivé d'un formulaire présentant un champs de login/mot de passe donne à peu près ceci :&lt;/p&gt;

&lt;pre class=&quot;xml&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;?xml&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;version&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;encoding&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Form xmlns:&lt;span style=&quot;color: #000066;&quot;&gt;mx&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;http://www.adobe.com/2006/mxml&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;width&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;280&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;height&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;105&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:FormItem &lt;span style=&quot;color: #000066;&quot;&gt;label&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Login&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:TextInput &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;username&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:FormItem&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:FormItem &lt;span style=&quot;color: #000066;&quot;&gt;label&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Mot de passe&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:TextInput &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;password&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;displayAsPassword&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:FormItem&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:FormItem&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Button &lt;span style=&quot;color: #000066;&quot;&gt;label&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Connexion&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:FormItem&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:Form&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Si on nomme notre fichier de composant &lt;code&gt;LoginForm.mxml&lt;/code&gt; et qu'on le stocke dans le répertoire &lt;code&gt;./components&lt;/code&gt; de notre projet Flex, on va pouvoir l'utiliser de la façon suivante dans une application :&lt;/p&gt;

&lt;pre class=&quot;xml&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;?xml&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;version&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;encoding&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Application 
   xmlns:&lt;span style=&quot;color: #000066;&quot;&gt;mx&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;http://www.adobe.com/2006/mxml&amp;quot;&lt;/span&gt; 
   xmlns:&lt;span style=&quot;color: #000066;&quot;&gt;niko&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;components.*&amp;quot;&lt;/span&gt;
   &lt;span style=&quot;color: #000066;&quot;&gt;layout&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;absolute&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;mx&lt;/span&gt;:Panel &lt;span style=&quot;color: #000066;&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Connexion&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;niko&lt;/span&gt;:LoginForm &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;loginform&amp;quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:Panel&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;lt;/mx&lt;/span&gt;:Application&lt;span style=&quot;font-weight: bold; color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;On a déclaré un nouvel espace de noms, ici &lt;code&gt;niko&lt;/code&gt; (mais on aurait pu mettre ce qu'on veut) pointant vers les fichiers sous le répertoire &lt;code&gt;components&lt;/code&gt; du projet. Simple, non ? En tout cas, cela devient un jeu d'enfant de produire des composants réutilisables.&lt;/p&gt;


&lt;h3&gt;Le nerf de la guerre, l'accès aux données distantes&lt;/h3&gt;


&lt;p&gt;Flex propose trois modes d'accès aux données distantes, par le biais de trois composants :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;L'objet &lt;code&gt;HTTPService&lt;/code&gt;, comme son nom l'indique, permet d'effectuer des requêtes &lt;a href=&quot;http://fr.wikipedia.org/wiki/HTTP&quot; hreflang=&quot;fr&quot;&gt;HTTP&lt;/a&gt; sur une url et d'en récupérer la réponse. Un objet bien pratique quand on veut s'interfacer avec une &lt;a href=&quot;http://www.biologeek.com/journal/index.php/pour-ne-plus-etre-en-rest-comprendre-cette-architecture&quot; hreflang=&quot;fr&quot;&gt;architecture REST&lt;/a&gt;, par exemple.&lt;/li&gt;
&lt;li&gt;L'objet &lt;code&gt;WebService&lt;/code&gt; permet de s'interfacer avec un webservice au format &lt;a href=&quot;http://fr.wikipedia.org/wiki/WSDL&quot; hreflang=&quot;fr&quot;&gt;WSDL&lt;/a&gt; via &lt;a href=&quot;http://fr.wikipedia.org/wiki/SOAP&quot; hreflang=&quot;fr&quot;&gt;SOAP&lt;/a&gt;. Quand on dispose de tels service, c'est un plaisir de se baser dessus depuis Flex puisqu'on a qu'à réferencer les méthodes à utiliser et les déclencher depuis leur référence.&lt;/li&gt;
&lt;li&gt;Mais l'objet de loin le plus intéressant à mes yeux est &lt;code&gt;RemoteObject&lt;/code&gt;, implémentation du protocole &lt;a href=&quot;http://fr.wikipedia.org/wiki/Remote_procedure_call&quot; hreflang=&quot;fr&quot;&gt;RPC&lt;/a&gt; dans Flex, pendant Flash/ActionScript du &lt;a href=&quot;http://fr.wikipedia.org/wiki/Remote_method_invocation_%28Java%29&quot; hreflang=&quot;fr&quot;&gt;RMI&lt;/a&gt; en Java. Comme je fais peu de Java, j'ai tendance à plutôt utiliser &lt;a href=&quot;http://www.amfphp.org/&quot; hreflang=&quot;en&quot;&gt;AMFPHP&lt;/a&gt;&lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#pnote-908-3&quot; id=&quot;rev-pnote-908-3&quot;&gt;3&lt;/a&gt;]&lt;/sup&gt; pour publier mes services en utilisant &lt;a href=&quot;http://fr.php.net/&quot; hreflang=&quot;fr&quot;&gt;PHP&lt;/a&gt;. Un très bon &lt;a href=&quot;http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/index.php&quot; hreflang=&quot;en&quot;&gt;tuto de mise en oeuvre du couple AMFPHP/Flex&lt;/a&gt; se chargera d'illustrer le concept plus efficacement que je ne le fais ici.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;FlexBuilder&lt;/h3&gt;


&lt;p&gt;Adobe propose un IDE dédié à la réalisation d'applications Flex, &lt;a href=&quot;http://www.adobe.com/fr/products/flex/flexbuilder/&quot; hreflang=&quot;fr&quot;&gt;FlexBuilder&lt;/a&gt;. Cet outil, basé sur le célebrissime &lt;a href=&quot;http://eclipse.org&quot; hreflang=&quot;fr&quot;&gt;Eclipse&lt;/a&gt;, permet de disposer d'un environnement complet de développement comprenant entre autres un éditeur de code (MXML en mode source/wysiwyg, ActionScript, CSS, etc.), un débogueur avancé &lt;em&gt;à la Java&lt;/em&gt;, un gestionnaire de projets, la compilation automatique et surtout un accès à l'immense &lt;a href=&quot;http://eclipse-plugins.2y.net/eclipse/plugins.jsp&quot; hreflang=&quot;en&quot;&gt;catalogue des plugins Eclipse&lt;/a&gt;. D'ailleurs, FlexBuilder est également disponible sous la forme d'un plugin à installer sur une instance d'Eclipse existante : de quoi travailler sur vos projets Flex/PHP de façon centralisée, par exemple.&lt;/p&gt;


&lt;p&gt;Inconvénient majeur de cet outil, il est payant. Et coûte relativement cher, puisque proposé aux alentours de 500€. Néanmoins, le SDK de Flex étant gratuit, vous pouvez tout à fait vous passer de FlexBuilder et compiler vos applications à la main. Une bonne nouvelle ne venant jamais seule, &lt;a href=&quot;http://www.adobe.com/aboutadobe/pressroom/pressreleases/200704/042607Flex.html&quot; hreflang=&quot;en&quot;&gt;Adobe a décidé de publier la prochaine mouture du framework sous licence libre&lt;/a&gt; &lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#pnote-908-4&quot; id=&quot;rev-pnote-908-4&quot;&gt;4&lt;/a&gt;]&lt;/sup&gt;, aussi nous devrions voir fleurir des alternatives à FlexBuilder et assister à un taux d'adoption plus conséquent de la technologie.&lt;/p&gt;


&lt;h3&gt;Organisation du code, frameworks&lt;/h3&gt;


&lt;p&gt;Au vu de l'étendue fonctionnelle de Flex et des différents formats de fichiers mis en oeuvre ainsi que de leurs interactions potentielles, il est clair que maintenir la moindre petite application peut vite relever du cauchemar les développements avançant. Pour faire face à cette problématique, Adobe propose un &lt;em&gt;surframework&lt;/em&gt; du nom de &lt;a href=&quot;http://labs.adobe.com/wiki/index.php/Cairngorm&quot; hreflang=&quot;en&quot;&gt;Cairngorm&lt;/a&gt; mettant en oeuvre les bonnes pratiques d'architecture logicielle en implémentant le motif de conception &lt;acronym title=&quot;Modèle Vue Controlleur&quot;&gt;MVC&lt;/acronym&gt; bien connu des utilisateurs de frameworks de développement rapide orientés web.&lt;/p&gt;


&lt;p&gt;Même si le projet semble extrêmement intéressant, je n'ai pas encore pour l'heure pu jouer avec.&lt;/p&gt;


&lt;h3&gt;Conclusion&lt;/h3&gt;


&lt;p&gt;Pour l'heure et après avoir pas mal &lt;del&gt;galéré&lt;/del&gt; tâtonné avec l'outil au début, je dois reconnaître maintenant et avec un peu de recul que c'est assez efficace. C'est relativement déstabilisant pour quelqu'un qui comme moi avait l'habitude de l'IDE Flash Authoring classique, mais au final FlexBuilder semble beaucoup plus sérieux pour tout ce qui concerne la programmation et l'organisation des fichiers (Eclipse oblige.) Même le templating y gagne à mon sens, mais par contre impossible de faire de la création graphique avancée directement dans FlexBuilder, l'outil n'est clairement pas l'ami des infographistes de vocation.&lt;/p&gt;


&lt;p&gt;Pour enfoncer le clou, j'ai pu comparer l'utilisation de Flex et de XUL, ayant enchaîné deux projets coup sur coup les mettant en oeuvre. L'excellente documentation de Flex et la richesse des outils gravitant autour de la techno font que pour l'heure Flex me semble l'un des meilleurs choix pour développer une RIA, si l'on écarte le couple HTML/Ajax qui garde une toujours une place de choix dans mon arsenal webdeuzéroesque &lt;img src=&quot;/blog/themes/Puc4/smilies/wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;
&lt;div class=&quot;footnotes&quot;&gt;&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#rev-pnote-908-1&quot; id=&quot;pnote-908-1&quot;&gt;1&lt;/a&gt;] Je ne sais pas à quoi correspond la lettre M de l'acronyme, &lt;em&gt;Macromedia&lt;/em&gt; sans doute.&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#rev-pnote-908-2&quot; id=&quot;pnote-908-2&quot;&gt;2&lt;/a&gt;] En attendant &lt;a href=&quot;http://www.whatwg.org/specs/web-forms/current-work/&quot; hreflang=&quot;en&quot;&gt;HTML5&lt;/a&gt;, les antiflash pourront aller zieuter du côté d'&lt;a href=&quot;http://extjs.com/&quot; hreflang=&quot;en&quot;&gt;extjs&lt;/a&gt; ou de &lt;a href=&quot;http://developer.yahoo.com/yui/&quot; hreflang=&quot;en&quot;&gt;YUI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#rev-pnote-908-3&quot; id=&quot;pnote-908-3&quot;&gt;3&lt;/a&gt;] Attention à bien utiliser la &lt;a href=&quot;http://www.5etdemi.com/blog/archives/2006/12/amfphp-19-beta-get-it-now/&quot; hreflang=&quot;en&quot;&gt;dernière version 1.9 beta&lt;/a&gt; compatible avec Flex2&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2007/08/19/#rev-pnote-908-4&quot; id=&quot;pnote-908-4&quot;&gt;4&lt;/a&gt;] Sous licence &lt;acronym title=&quot;Mozilla Public Licence&quot;&gt;MPL&lt;/acronym&gt; plus précisément.&lt;/p&gt;&lt;/div&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>LineRider</title>
    <link>http://prendreuncafe.com/blog/post/2006/10/26/LineRider</link>
    <guid isPermaLink="false">urn:md5:fef4e0dc03eccf513f2a762966061602</guid>
    <pubDate>Thu, 26 Oct 2006 17:10:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Rigolo</category>
        <category>animation</category><category>flash</category><category>haha</category><category>jeu</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.linerider.org/play.php&quot; hreflang=&quot;en&quot;&gt;Addictif&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Flash Player 9 beta pour Linux</title>
    <link>http://prendreuncafe.com/blog/post/2006/10/19/Flash-Player-9-beta-pour-Linux</link>
    <guid isPermaLink="false">urn:md5:e9fe57c4ad36adc0461cb56ff1635e51</guid>
    <pubDate>Thu, 19 Oct 2006 13:05:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Ubuntu</category>
        <category>flash</category><category>linux</category><category>ubuntu</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://labs.adobe.com/downloads/flashplayer9.html&quot; hreflang=&quot;en&quot;&gt;Flash Player 9 beta&lt;/a&gt; pour Linux &lt;a href=&quot;http://blogs.adobe.com/penguin.swf/2006/10/beta_is_live.html&quot; hreflang=&quot;en&quot;&gt;est sorti&lt;/a&gt; ! Pour installer le plugin pour Firefox sur Ubuntu, c'est relativement simple (même si par la suite un véritable installeur devrait être disponible) :&lt;/p&gt;


&lt;pre&gt;$ wget -c http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
$ tar xvzf FP9_plugin_beta_101806.tar.gz
$ mkdir ~/.mozilla/plugins # créera le répertoire s'il n'existe pas
$ sudo mv flash-player-plugin-9.0.21.55/libflashplayer.so ~/.mozilla/plugins/&lt;/pre&gt;


&lt;p&gt;Et ça devrait rouler.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Ménage.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Objectif Respect</title>
    <link>http://prendreuncafe.com/blog/post/2006/10/18/Objectif-Respect</link>
    <guid isPermaLink="false">urn:md5:535e7d86af3dfe42816b5967535b8b46</guid>
    <pubDate>Wed, 18 Oct 2006 18:32:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Divers</category>
        <category>flash</category><category>haha</category><category>ratp</category><category>video</category><category>web</category>    
    <description>    &lt;p&gt;[Via &lt;a href=&quot;http://www.fastclemmy.com/index.php?viewlog=110_objectif-respect-respect&quot; hreflang=&quot;fr&quot;&gt;Fast Clemmy&lt;/a&gt;]&lt;/p&gt;


&lt;p&gt;La &lt;a href=&quot;http://www.ratp.fr&quot; hreflang=&quot;fr&quot;&gt;RATP&lt;/a&gt; bien inspirée, &lt;a href=&quot;http://www.objectif-respect.org/&quot; hreflang=&quot;fr&quot;&gt;ça donne ça&lt;/a&gt;. C'est drôle, extrêmement bien réalisé (par &lt;a href=&quot;http://www.upian.com/&quot; hreflang=&quot;fr&quot;&gt;Upian&lt;/a&gt;) et c'est surtout &lt;strong&gt;extrêmement vrai&lt;/strong&gt;.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>CMS, bonhomme en mousse, Rollex et tout ce qui s'en suit</title>
    <link>http://prendreuncafe.com/blog/post/2006/10/07/Zapping-3</link>
    <guid isPermaLink="false">urn:md5:1a3414b261e73cbba32f575c449fe45d</guid>
    <pubDate>Tue, 10 Oct 2006 08:14:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Divers</category>
        <category>cms</category><category>flash</category><category>framework</category><category>google</category><category>haha</category><category>javascript</category><category>linux</category><category>video</category>    
    <description>    &lt;ul&gt;
&lt;li&gt;Yooggle, Gootube, bref, je ne vais pas revenir sur &lt;a href=&quot;http://fr.techcrunch.com/2006/10/09/google-acquiert-youtube/&quot; hreflang=&quot;fr&quot;&gt;l'acquisition de l'année&lt;/a&gt;. La question qu'on peut raisonnablement se poser reste &lt;strong&gt;POURQUOI FAIRE BORDEL ?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://callmepep.org/blog/post/2006/10/07/Content-Management-ne-veut-pas-dire-CMS&quot; hreflang=&quot;fr&quot;&gt;Pep nous signale&lt;/a&gt; un excellent article sur &lt;a href=&quot;http://www.thinkvitamin.com&quot; hreflang=&quot;en&quot;&gt;Vitamin&lt;/a&gt; concernant le &lt;a href=&quot;http://www.thinkvitamin.com/features/blogs/redefining-content-management&quot; hreflang=&quot;en&quot;&gt;mythe du CMS&lt;/a&gt; ; cet article résume très bien ce que je pense depuis pas mal de temps, à savoir qu'aucun &lt;em&gt;système de gestion de contenu&lt;/em&gt; (&lt;acronym title=&quot;Content Management System&quot;&gt;CMS&lt;/acronym&gt;) ne saura jamais gérer entièrement la complexité de vos contenus (ou ceux de vos clients), et que l'y pousser est AMHA totalement contre-productif en regard de l'utilisation d'outils plus bas niveau comme les frameworks, associés aux méthodes de développement agiles.&lt;/li&gt;
&lt;li&gt;Cette &lt;a href=&quot;http://www.media.ebaumsworld.com/supercoolpic.swf&quot; hreflang=&quot;swf&quot;&gt;image sans fin&lt;/a&gt; est de toute beauté (Flash.)&lt;/li&gt;
&lt;li&gt;Le &lt;a href=&quot;http://www.scoopeo.com/humour/le-petit-hardos-en-mousse&quot; hreflang=&quot;fr&quot;&gt;petit hardos en mousse&lt;/a&gt;, déjà dans les bacs (Via &lt;a href=&quot;http://www.scoopeo.com/humour/le-petit-hardos-en-mousse&quot; hreflang=&quot;fr&quot;&gt;ScoopekNo'&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Une recherche d'images sur Google pour les mots-clé &lt;q&gt;&lt;a href=&quot;http://images.google.com/images?q=rolex%20watches&amp;amp;hl=en&amp;amp;btnG=Search%20Images&quot; hreflang=&quot;fr&quot;&gt;Rollex watches&lt;/a&gt;&lt;/q&gt; renvoie des résultats surprenants.&lt;/li&gt;
&lt;li&gt;Heureusement pendant ce temps-là, la science progresse et &lt;a href=&quot;http://dev.tufuncion.com/bigger-penises-linux&quot; hreflang=&quot;en&quot;&gt;assène des évidences&lt;/a&gt; qui n'avaient échappé à personne &lt;img src=&quot;/blog/themes/Puc4/smilies/biggrin.gif&quot; alt=&quot;:D&quot; class=&quot;smiley&quot; /&gt;&lt;/li&gt;
&lt;li&gt;Sinon sans transition, entrez cette petite ligne de javascript dans la barre d'adresse de votre navigateur sur n'importe quel site, pour voir  (&lt;a href=&quot;http://www.slackpack.net/?q=node/374&quot; hreflang=&quot;ru&quot;&gt;via&lt;/a&gt;) :&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i&amp;lt;DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);&lt;/pre&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Vacances again + Vrac</title>
    <link>http://prendreuncafe.com/blog/post/2006/08/18/486-vacances-again-vrac</link>
    <guid isPermaLink="false">urn:md5:75be4f50c3ff23c65dc371c4a28c42aa</guid>
    <pubDate>Fri, 18 Aug 2006 14:32:28 +0000</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Divers</category>
        <category>dedibox</category><category>flash</category><category>haha</category><category>java</category><category>myself</category><category>prendreuncafe</category><category>troll</category>    
    <description>    &lt;p&gt;D'ici quelques heures, les commentaires et trackbacks de ce blog prendront à nouveau congé une petite semaine, de même que votre hôte. C'est pas que je suis à plat, mais pas loin.&lt;/p&gt;


&lt;p&gt;En attendant, les nouvelles du front&amp;nbsp;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://blogs.adobe.com/penguin.swf/2006/08/across_the_distros_1.html&quot; hreflang=&quot;en&quot;&gt;Flash Player 9 pour Linux, le bout du tunnel ?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.wearetheweb.org/&quot; hreflang=&quot;en&quot;&gt;We are the web&lt;/a&gt;&amp;nbsp;: Fighting for Net Neutrality and Internet Freedom.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dappit.com/&quot; hreflang=&quot;en&quot;&gt;Dappit.com&lt;/a&gt;&amp;nbsp;: un générateur de webservices à partir de services en ligne existants, comme Google. C'est bêta, mais prometeur.&lt;/li&gt;
&lt;li&gt;J'ai pris une &lt;a href=&quot;http://www.dedibox.fr&quot; hreflang=&quot;fr&quot;&gt;Dédibox&lt;/a&gt;. Pour le prix, c'est quand même drôlement royal.&lt;/li&gt;
&lt;li&gt;Y'a pas à chier, Java ça craint.&lt;/li&gt;
&lt;li&gt;Je ne sais toujours pas &lt;a href=&quot;http://prendreuncafe.com/blog/2006/08/09/484-gangrene#c4439&quot; hreflang=&quot;fr&quot;&gt;gérer les trolls&lt;/a&gt;, et ne peux pas m'empêcher d'en lancer malgré moi (cf. point précédent.)&lt;/li&gt;
&lt;li&gt;Je suis crevé.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A bientôt pour de nouvelles zaventures.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Edit :&lt;/strong&gt; Je ne resiste pas à relater deux informations du journal télévisé de ce soir&amp;nbsp;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;La doyenne des français est décédé ce matin à l'âge de 114 ans&amp;nbsp;: mme &lt;strong&gt;Mornet&lt;/strong&gt; lui succède donc à l'âge de 112 ans,&lt;/li&gt;
&lt;li&gt;Mickaël &lt;strong&gt;Gelabale&lt;/strong&gt; se dit confiant pour l'imminent championnat du monde de basketball.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oui, un rien m'amuse.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Edit :&lt;/strong&gt; Reviendu (snif.)&lt;/p&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>