<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.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:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Helyx Weblog</title>
	
	<link>http://blog.helyx.org</link>
	<description>Java, Web and everything else...</description>
	<lastBuildDate>Sun, 21 Oct 2012 23:03:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/helyx/rss" /><feedburner:info uri="helyx/rss" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Gérez vos dépendances Objective-C avec CocoaPods</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/r9lFlP9q5zg/</link>
		<comments>http://blog.helyx.org/2012/10/gerez-vos-dependances-objective-c-avec-cocoapods/#comments</comments>
		<pubDate>Sun, 21 Oct 2012 23:02:30 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobilité]]></category>
		<category><![CDATA[CocoaPods]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=587</guid>
		<description><![CDATA[La popularité du langage Objective-C est en constante augmentation ces dernières années. Les succès de l&#8217;iPhone et de l&#8217;iPad en sont à coup sûr une raison évidente. L&#8217;Objective-C, cependant, est utilisé depuis bien plus longtemps dans le développement des logiciels Apple. Le langage en lui-même a été inventé en 1983 comme indiqué sur sa page Wikipedia. [...]]]></description>
				<content:encoded><![CDATA[<p><span style="float: right;"><img style="border: 0px solid black;" src="http://blog.xebia.fr/wp-content/uploads/2012/10/logo-sidebar.png" alt="" vspace="4" /></span></p>
<p>La popularité du langage Objective-C est en constante augmentation ces dernières années. Les succès de l&#8217;iPhone et de l&#8217;iPad en sont à coup sûr une raison évidente. L&#8217;Objective-C, cependant, est utilisé depuis bien plus longtemps dans le développement des logiciels Apple. Le langage en lui-même a été inventé en 1983 comme indiqué sur sa page <a href="http://en.wikipedia.org/wiki/Objective-C" rel="nofollow">Wikipedia</a>. Apple prend d&#8217;ailleurs un soin particulier à faire évoluer son langage en y apportant de nouveaux raffinements chaque année (Spécification <a href="http://en.wikipedia.org/wiki/Objective-C#Objective-C_2.0" rel="nofollow">Objective-C 2.0</a>, &#8230;).</p>
<p>Bien qu&#8217;Apple propose une <a href="http://en.wikipedia.org/wiki/Toolchain" rel="nofollow">tool chain</a> à la pointe basée sur <a href="http://www.llvm.org/" rel="nofollow">LLVM</a> et <a href="http://clang.llvm.org/" rel="nofollow">Clang</a>, il faut se rendre à l&#8217;évidence: la gestion des dépendances en Objective-C reste un domaine assez peu exploré, et laisse un petit goût amer lorsqu&#8217;on a goûté à d&#8217;autres langages accompagnés de leur gestionnaires de dépendances. Je pense ici à JavaScript avec Node.JS et NPM, Ruby et ses Gem, ou bien encore notre bon vieux Java et autres languages de la JVM qui fournissent eux aussi une multitude d&#8217;outils répondant à ce besoin.</p>
<p>Il semble que les langages des générations C / C++ et Objective-C aient plus de mal à fournir des outils de ce type. L&#8217;intégration de librairies et frameworks peut d&#8217;ailleurs rapidement donner des maux de têtes aux développeurs, ce qui n&#8217;est pas acceptable pour un langage / écosystème de développement qui se veut moderne.</p>
<p>Concernant l&#8217;Objective-C, la réponse à l&#8217;absence de gestionnaire de dépendance est venue de la communauté à travers la création d&#8217;un outil appelé: <a href="http://cocoapods.org/" rel="nofollow">CocoaPods</a>. Cet outil est basé sur le partage de configurations également nommées <em>Spec</em>. Elles ont pour rôle de décrire le contenu d&#8217;une dépendance. L&#8217;outil, développé en Ruby, est visiblement assez inspiré de l&#8217;éco-système qui existe autour de ce langage.</p>
<h3>Installation &amp; Utilisation</h3>
<p>Pour installer CocoaPods, vous devez exécuter les commandes suivantes:</p>
<div class="codecolorer-container bash railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">sudo</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> cocoapods<br />
$ pod setup</div></div>
<p>Un des points très intéressant de cet outil est sa simplicité d&#8217;utilisation : il suffit en effet de créer un fichier &#8220;<em>Podfile&#8221;</em> à la racine de son projet XCode listant les dépendances requises et de lancer la commande:</p>
<div class="codecolorer-container bash railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pod <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>pour que l&#8217;outil aille télécharger tous les fichiers sources nécessaires sur internet et vous configure un workspace XCode en bonne et due forme sans effort supplémentaire de votre part. Pour ouvrir le workspace XCode configuré avec toutes ses dépendances, il suffit d&#8217;exécuter ensuite la commande :</p>
<div class="codecolorer-container bash railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">open my-project.xcworkspace</div></div>
<p>Les pré-requis à l&#8217;utilisation de CocoaPods se résument à installer Ruby 1.9 sur sa machine (si ce n&#8217;est déjà fait).</p>
<p><em>Note : Si vous avez exécuté l&#8217;installation avec une version de Ruby 1.8, je vous conseille de nettoyer votre dossier .gem dans votre dossier home, et de recommencer l&#8217;installation pour éviter tout problème de compatibilité.</em></p>
<h3>Configuration</h3>
<p>L&#8217;outil est utilisable aussi bien pour des projets iOS que pour des projet OS X. Pour cela, il suffit de spécifier la cible en début de fichier comme indiqué dans l&#8217;exemple ci-dessous :</p>
<div class="codecolorer-container bash railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">platform :ios<br />
<br />
pod <span style="color: #ff0000;">'JSONKit'</span>, <span style="color: #ff0000;">'1.5pre'</span><br />
pod <span style="color: #ff0000;">'LibComponentLogging-Core'</span>, <span style="color: #ff0000;">'1.2.2'</span><br />
pod <span style="color: #ff0000;">'LibComponentLogging-NSLog'</span>, <span style="color: #ff0000;">'1.0.4'</span><br />
pod <span style="color: #ff0000;">'Reachability'</span>, <span style="color: #ff0000;">'3.0.0'</span><br />
pod <span style="color: #ff0000;">'RestKit'</span>, <span style="color: #ff0000;">'0.10.1'</span></div></div>
<p>Contrairement à ce que laisse penser l&#8217;exemple précédent, différents opérateurs de comparaison permettent d&#8217;affiner les versions des librairies utilisées. Il est possible de créer des configurations plus complexes si votre projet le requiert en allant visiter <a href="https://github.com/CocoaPods/CocoaPods/wiki/A-Podfile" rel="nofollow">la documentation du projet</a>. Vous pouvez, entre autre chose, créer plusieurs target correspondant, par exemple, à des targets de test ou de debug de vos applications.</p>
<h3><a name="G%C3%A9rezvosd%C3%A9pendancesObjective-CavecCocoaPods-Sp%C3%A9cifications"></a>Spécifications</h3>
<p>Cerise sur le gâteau, le système de contribution d&#8217;une dépendance est très simple, puisque vous pouvez, vous-même, constituer une spécification de dépendances et la soumettre via un <em>Pull Request</em> sur le repository Github <a href="https://github.com/CocoaPods/Specs" rel="nofollow">CocoaPods/Specs</a>. Ce repository contient l&#8217;ensemble des spécifications de dépendances utilisables avec CocoaPods. La lecture de différents fichiers <em>Spec</em>, en plus de la lecture du wiki du projet, permet de comprendre très rapidement le format.</p>
<p>Exemple de spécification pour la librairie Cordova 2.1.0 (PhoneGap) :</p>
<div class="codecolorer-container ruby railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:650px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#6666ff; font-weight:bold;">Pod::Spec</span>.<span style="color:#9900CC;">new</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>s<span style="color:#006600; font-weight:bold;">|</span><br />
s.<span style="color:#9900CC;">name</span> = <span style="color:#996600;">&quot;Cordova&quot;</span><br />
s.<span style="color:#9900CC;">version</span> = <span style="color:#996600;">&quot;2.1.0&quot;</span><br />
s.<span style="color:#9900CC;">summary</span> = <span style="color:#996600;">&quot;Apache Cordova is a platform for building native mobile applications using HTML, CSS and JavaScript.&quot;</span><br />
s.<span style="color:#9900CC;">homepage</span> = <span style="color:#996600;">&quot;http://incubator.apache.org/cordova/&quot;</span><br />
s.<span style="color:#9900CC;">author</span> = <span style="color:#996600;">&quot;Original developed by Nitobi (acquire by Adobe) and all other PhoneGap and Cordova Contributors&quot;</span><br />
<br />
s.<span style="color:#9900CC;">license</span> = <span style="color:#996600;">'Apache License, Version 2.0'</span><br />
<br />
s.<span style="color:#9900CC;">source</span> = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:git</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">&quot;http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios.git&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:tag</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">&quot;2.1.0&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span><br />
<span style="color:#008000; font-style:italic;"># s.source = { :git =&amp;gt; &quot;https://github.com/apache/incubator-cordova-ios.git&quot;, :tag =&amp;gt; &quot;2.1.0&quot; }</span><br />
s.<span style="color:#9900CC;">source_files</span> = <span style="color:#996600;">'CordovaLib/Classes/*.{h,m}'</span><br />
s.<span style="color:#9900CC;">resources</span> = <span style="color:#996600;">'CordovaLib/javascript/*.js'</span>, <span style="color:#996600;">'CordovaLib/VERSION'</span><br />
<br />
s.<span style="color:#9900CC;">platform</span> = <span style="color:#ff3333; font-weight:bold;">:ios</span>, <span style="color:#996600;">'4.3'</span><br />
s.<span style="color:#9900CC;">requires_arc</span> = <span style="color:#0000FF; font-weight:bold;">true</span><br />
<br />
<span style="color:#008000; font-style:italic;"># TODO: Missing AddressBookUI here, but CocoaPods generates incorrect OTHER_LDFLAGS in Pods/Pods.xcconfig. Will analyse this soon..</span><br />
<span style="color:#008000; font-style:italic;"># OTHER_LDFLAGS = -ObjC UI -framework AVFoundation &amp;lt; - incorrect UI argument here!</span><br />
<br />
s.<span style="color:#9900CC;">frameworks</span> = <span style="color:#996600;">'AddressBook'</span>, <span style="color:#996600;">'AudioToolbox'</span>, <span style="color:#996600;">'AVFoundation'</span>, <span style="color:#996600;">'CoreLocation'</span>, <span style="color:#996600;">'MediaPlayer'</span>, <span style="color:#996600;">'QuartzCore'</span>, <span style="color:#996600;">'SystemConfiguration'</span>, <span style="color:#996600;">'MobileCoreServices'</span>, <span style="color:#996600;">'CoreMedia'</span>, <span style="color:#996600;">'UIKit'</span><br />
<br />
<span style="color:#008000; font-style:italic;"># Note: This is not the same like the original JSONKit. Cordova developers decide to integrate</span><br />
<span style="color:#008000; font-style:italic;"># *a changed copy* (with prefixed class and method names) of it instead of using CocoaPods. :S</span><br />
<span style="color:#008000; font-style:italic;"># But they missed to translate it like the main project to use ARC, yet.</span><br />
s.<span style="color:#9900CC;">subspec</span> <span style="color:#996600;">'JSON'</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>json<span style="color:#006600; font-weight:bold;">|</span><br />
json.<span style="color:#9900CC;">source_files</span> = <span style="color:#996600;">'CordovaLib/Classes/JSON/*.{h,m}'</span><br />
json.<span style="color:#9900CC;">platform</span> = <span style="color:#ff3333; font-weight:bold;">:ios</span>, <span style="color:#996600;">'4.3'</span><br />
json.<span style="color:#9900CC;">requires_arc</span> = <span style="color:#0000FF; font-weight:bold;">false</span><br />
<span style="color:#008000; font-style:italic;"># TODO requires_arc does not work for subproject, so set compiler flag by hand until CocoaPods 0.15(?) will support this.</span><br />
json.<span style="color:#9900CC;">compiler_flags</span> = <span style="color:#996600;">'-fno-objc-arc'</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<h3>Moteur de recherche</h3>
<p>Bien entendu, il ne serait pas possible de tirer toute la quintessence d&#8217;un tel outil sans un moteur de recherche de dépendances associé, c&#8217;est ce que propose le site <a href="http://cocoapods.org/" rel="nofollow">CocoaPods.org</a>.</p>
<p>Les fans de la ligne de commande pourront bien entendu lister les dépendances disponibles via la commande :</p>
<div class="codecolorer-container bash railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pod list</div></div>
<p>ou bien encore trouver la liste des autres commandes disponibles via l&#8217;aide :</p>
<div class="codecolorer-container bash railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pod <span style="color: #7a0874; font-weight: bold;">help</span></div></div>
<h3>Conclusion</h3>
<p>Doucement mais sûrement, un éco-système composé d&#8217;outils modernes d&#8217;aide au développement s&#8217;est formé autour d&#8217;Objective-C, et CocoaPods en est un rouages important. Parmi ces nouveaux outils, nous pouvons en citer quelques uns: :</p>
<ul>
<li><a href="http://iosboilerplate.com/" rel="nofollow">ios-boilerplate.com</a> est un kickstarter pour démarrer une application iOS.  Ce template permet de gagner un temps précieux au bootstrap du projet, et fait inévitablement penser au désormais célèbre <a href="http://html5boilerplate.com/" rel="nofollow">html5-boilerplate</a>.</li>
<li><a href="http://www.cocoacontrols.com/" rel="nofollow">cocoacontrol.com</a> est un site web référençant nombre de composants utilisables dans vos projet iOS.</li>
<li><a href="http://iosframeworks.com/" rel="nofollow">iosframeworks.com</a> est un catalogue référençant classes et frameworks utiles pour vos projets.</li>
</ul>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/r9lFlP9q5zg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/10/gerez-vos-dependances-objective-c-avec-cocoapods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/10/gerez-vos-dependances-objective-c-avec-cocoapods/</feedburner:origLink></item>
		<item>
		<title>Dans la famille des XaaS, je voudrais le BaaS</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/DqONO3VkZIc/</link>
		<comments>http://blog.helyx.org/2012/09/dans-la-famille-des-xaas-je-voudrais-le-baas/#comments</comments>
		<pubDate>Sat, 29 Sep 2012 14:14:29 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Mobilité]]></category>
		<category><![CDATA[BaaS]]></category>
		<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=572</guid>
		<description><![CDATA[En ce début de week-end, je suis tombé sur un terme que je n&#8217;avais pas encore vu, mais qui m&#8217;a tout de suite fait tilt et qui prend tout son sens dans le business de la mobilité. BaaS est l&#8217;acronyme pour Backend as a Service. Quand on code une application mobile on aime pas trop [...]]]></description>
				<content:encoded><![CDATA[<p>En ce début de week-end, je suis tombé sur un terme que je n&#8217;avais pas encore vu, mais qui m&#8217;a tout de suite fait tilt et qui prend tout son sens dans le business de la mobilité.</p>
<p>BaaS est l&#8217;acronyme pour Backend as a Service. </p>
<p>Quand on code une application mobile on aime pas trop se prendre la tête sur d&#8217;autres sujets que le développement de l&#8217;application en elle-même qui demande déjà beaucoup de temps à concevoir et qui devient assez rapidement complexe (Problématiques multi-plateforme, multi-version d&#8217;os, &#8230;). </p>
<p>C&#8217;est pour ça que de nombreuses startup et sociétés spécialisées dans la mobilité délèguent le développement de la partie serveur à un ensemble de services webs tel que: Parse ou bien Deployd &#8230;</p>
<p>Ces services de nouvelles génération viennent compléter l&#8217;écosystème habituel de services sociaux (Twitter, Facebook, &#8230;) avec par exemple: Flurry pour les stats ou bien encore Urban Airship pour les notifications push.</p>
<p>La particularité des services comme Parse et Deployd réside dans le fait qu&#8217;elles proposent sur le fait de construire non pas un backend, mais directement les données utiles aux applications mobiles. Ainsi on ne pert plus de temps à construire le backend serveur, on ne construit que les structures de données, et on s&#8217;intègre avec le framework du services web qui fournit également les librairies côté client.</p>
<p>Ces startups proposent des Backend as a Service qui permettent donc de créer les services web dans le cloud dont on a besoin sans perdre de temps avec la technique. Ils intègrent en général des mécanismes d&#8217;authentification, ce qui permet de ne pas uniquement pouvoir stocker les habituels highscores d&#8217;un jeu, mais également de pouvoir stocker des données relatives à un utilisateur dans le contexte d&#8217;une application mobile.</p>
<p>Différents services de ce nouveau type:</p>
<ul>
<li><a href="https://parse.com/">https://parse.com/</a></li>
<li><a href="http://deployd.com/">http://deployd.com/</a></li>
<li><a href="http://kinvey.com">http://kinvey.com</a></li>
<li>&#8230;</li>
</ul>
<p>Une vidéo de démonstration du service deployd : </p>
<p></p>
<div align="center">

<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/I_Jq1BVj6D0"
			width="425"
			height="350">
	<param name="movie" value="http://www.youtube.com/v/I_Jq1BVj6D0" />
	<param name=wmode" value="transparent" />
</object>
</div>
<p></p>
<p>Enfin, voici une map très intéressante tirée de l&#8217;article suivant: <a href="http://www.kinvey.com/index.php?option=com_k2&#038;view=item&#038;id=217&#038;Itemid=322">http://www.kinvey.com/index.php?option=com_k2&#038;view=item&#038;id=217&#038;Itemid=322</a></p>
<p><a href="http://blog.helyx.org/wp-content/uploads/kinvey_backend-as-a-service_mobileecosystem_2100px.png"><img src="http://blog.helyx.org/wp-content/uploads/kinvey_backend-as-a-service_mobileecosystem_2100px-300x214.png" alt="" title="kinvey_backend-as-a-service_mobileecosystem_2100px" width="300" height="214" class="aligncenter size-medium wp-image-577" /></a></p>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/DqONO3VkZIc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/09/dans-la-famille-des-xaas-je-voudrais-le-baas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/09/dans-la-famille-des-xaas-je-voudrais-le-baas/</feedburner:origLink></item>
		<item>
		<title>Faille Android du jour … Et hop, ton téléphone est wipé !</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/GKi81s2FMkM/</link>
		<comments>http://blog.helyx.org/2012/09/faille-android-du-jour-et-hop-ton-telephone-est-wipe/#comments</comments>
		<pubDate>Tue, 25 Sep 2012 20:36:15 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobilité]]></category>
		<category><![CDATA[Sécurité]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=561</guid>
		<description><![CDATA[Mise à jour: Le sujet est tout chaud, il vient juste de tomber. Prenons les hypothèses avec des pincettes, et ne tirons pas de conclusions hâtives. Ce billet émane de premiers éléments qui seront peut-être/sûrement démentis/contredits dans les prochains jours. La faille du jour ultra critique,&#160;au cas où vous seriez pour le moment passé à [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://blog.helyx.org/wp-content/uploads/android.png" alt="" title="android" width="256" height="256" class="alignright size-full wp-image-562" /></p>
<p><strong>Mise à jour:</strong> <em>Le sujet est tout chaud, il vient juste de tomber. Prenons les hypothèses avec des pincettes, et ne tirons pas de conclusions hâtives. Ce billet émane de premiers éléments qui seront peut-être/sûrement démentis/contredits dans les prochains jours.</em></p>
<p>La faille du jour ultra critique,&nbsp;au cas où vous seriez pour le moment passé à côté, concerne votre téléphone Android. Elle est plutôt du genre sévère et touche un grand nombre de combinés Android sans épargner les modèles phares et marques leader du marché.</p>
<p>Pour ma part, j&#8217;ai un Samsung Galaxy S et, ô surprise, il est vulnérable. Pourtant il fonctionne sur <a href="http://www.android.com/about/ice-cream-sandwich/">ICS</a>, c&#8217;est à dire, la dernière version majeure du système Android.<br />
La vulnérabilité concerne l&#8217;exécution automatique des codes spéciaux via le dialer de votre téléphone. Vous en avez peut-être déjà entendu parlé. Par exemple, si vous saisissez le code: *#06# sur votre téléphone, une popup avec son numéro IMEI apparaîtra.<br />
En apparence, rien de très grave. Sachez cependant qu&#8217;il est possible de saisir d&#8217;autres codes provoquant d&#8217;autres actions sur votre téléphone dont un qui permet de wiper (Supprimer) toutes les données de votre cher téléphone Android.<br />
Sachez également, qu&#8217;il est juste nécessaire d&#8217;ouvrir une page web contenant un lien téléphonique pour exécuter ce type de code. Le problème de sécurité réside dans le fait système Android permet l&#8217;exécution automatique de ces codes sans demander de confirmation, il est ainsi possible de créer des QRCode piégés ou bien encore de créer des liens piégés via de simples pages web.</p>
<p>Si vous avez des doutes quant à la criticité de cette faille, rendez-vous sur cette page avec votre téléphone: <a href="http://dylanreeve.com/phone.php">http://dylanreeve.com/phone.php</a> et voyez comment il réagit. Si le numéro EMEI de votre téléphone apparaît dans une popup sans action de votre part, alors votre téléphone est vulnérable.<br />
Mon Samsung Galaxy S ouvre fièrement une popup affichant son numéro IMEI. Ceci sous-entend qu&#8217;il est également capable d&#8217;exécuter le wipe du téléphone ou d&#8217;autres choses peut-être encore moins sympas dont personne n&#8217;a idée pour le moment.<br />
En prenant le temps de la réflexion un instant, on se croirait revenu au temps de Windows 98, et de ses failles béantes découvertes tous les quatre matin ! On peut se demander comment de telles failles de sécurité peuvent encore passer entre les mains des équipes de sécurité chez Google sans être repérées, c&#8217;est tout bonnement incroyable!</p>
<p>Sachant que les mises à jours Android sont mises à dispositions, en général, uniquement pour les combinés les plus récents, nous sommes devant une faille avec potentiel destructeur énorme, et qui pourrait n&#8217;être jamais corrigée pour une vaste majorité de combinés. Je ne parle même pas du fait que l&#8217;utilisateur moyen n&#8217;a que peu de chance de savoir qu&#8217;il faille mettre à jour son téléphone lorsqu&#8217;il en a la possibilité.</p>
<p>Différentes solutions ou workaround existent. Si vous n&#8217;avez pas la chance d&#8217;avoir un téléphone protégé ou bien même d&#8217;avoir une mise à jour de sécurité applicable pour votre modèle de téléphone, vous pouvez dans un premier temps installer un second Dialer via le Google Play afin de vous prémunir de l&#8217;exécution automatique de ces code spéciaux. Vous vous verrez proposer à la place une popup de confirmation vous demandant de choisir l&#8217;application à utiliser. Vous aurez donc le choix d&#8217;annuler l&#8217;action.</p>
<p>Si votre système est assez moderne et dispose de Google Chromen vous pouvez attendre une nouvelle version de l&#8217;application fixant la faille de sécurité. Sachez cependant que bon nombre d&#8217;applications dont les readers fonctionnent avec un composant WebView basé sur le navigateur système. Ce composant n&#8217;est pour le moment pas une webview Google Chrome même pour les téléphones les plus récents (Hormis exception pour l&#8217;instant me semble-t-il). C&#8217;est donc la webview système qui prenda en chargement la page web. Une mise à jour de Chrome ne permettra donc pas de se prémunir des applications embarquant une webview et donc potentiellement affectées par le problème.Quant aux applications proposant la lecture de QRCode, il faudra attendre les mises à jour.</p>
<p>Il est fort à parier que la solution la plus pérenne viendra de la mise à disposition via le Play Store d&#8217;applications de filtrage de demande d&#8217;exécution de ces codes spéciaux. La question étant de savoir s&#8217;il est nécessaire d&#8217;avoir un téléphone rooté pour installer une application de ce type.</p>
<p>Nos téléphones auraient-ils besoin finalement d&#8217;antivirus sachant que la plupart des failles de sécurités ne sont jamais corrigées du fait de l&#8217;obsolescence effrénée de nos combinés et donc de l&#8217;absence récurrente de mise à disposition de mises à jours de sécurité pour les modèles les plus anciens.<br />
De même, combien de temps les constructeurs fermeront les yeux sur l&#8217;absence de mise à jour de sécurité régulières de nos combinés mobiles ?</p>
<p>Fait étonnant, les derniers Google Phone ne semblent pas touchés. Google aurait-il corrigé en toute discrétion cette faille et aurait-il fait passer une mise à jour silencieuse ? Il semble que cela soit effectivement le cas. Google, ses partenaires et différents opérateurs auraient été prévenus dès la fin du mois de juin, mais seul Google pour ses modèles récents et quelques opérateurs pour quelques modèles très précis auraient effectivement appliqué un patch de sécurité. Les autres combinés étant sujets aux aléas de la qualité des protections implémentés dans les surcouches constructeurs et opérateurs. En tout état de cause, les téléphone équipés de ROM <em>stock</em> ou <em>custom</em> (Rom Cyanogen et compagnie) semblent touchés par le problème.</p>
<p>En tout état de cause, il ne faut pas trop s&#8217;attendre à recevoir <em>Over The Air</em> une mise à jour pour un combiné Android qui a plus de 6 mois ou 1 an. Combien cela coûterait aux opérateurs de mettre à disposition des mises à jours de sécurité pour des centaines de modèles qui sont pour la plupart arrivés en fin de vie commerciale ? Nos chers opérateurs doivent-ils d&#8217;ailleurs prévoir de tels plans catastrophe ? Qui s&#8217;engage à sécuriser votre combiné ? J&#8217;aurais malheureusement tendance à dire personne à part vous-même: Soyez vigilant face aux alertes de sécurités concernant les systèmes mobiles:</p>
<ul>
<li>Tenez votre système ainsi que vous applications à jour</li>
<li>Utilisez un navigateur updatable</li>
<li>Evitez l&#8217;usage du navigateur système</li>
<li>Utilisez à la place un navigateur updatable, tel que Google Chrome.</li>
</ul>
<p>Les informations critiques relatives à votre vie privée et professionnelles sont toutes accessibles depuis votre combiné mobile ou même tout simplement stockées dans votre téléphone, il est donc impératif d&#8217;être vigilant quant à la sécurisation des données nomades. Preuve, s&#8217;il en faut, la mésaventure arrivée au mois d&#8217;août dernier à Mat Honan, journaliste du magazine Wired qui a vu sa vi digitale effacée en un claquement de doigt (<a href="http://www.wired.com/gadgetlab/2012/08/mat-honan-data-recovery/">ici</a> et <a href="http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/">là</a>).</p>
<p>Cette faille de sécurité met en lumière toute la problématique de la fragmentation du système Android, et c&#8217;est Apple qui doit se frotter les mains cette semaine après avoir subit les railleries la semaine dernière lors du lancement de sa nouvelle application Map.</p>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/GKi81s2FMkM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/09/faille-android-du-jour-et-hop-ton-telephone-est-wipe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/09/faille-android-du-jour-et-hop-ton-telephone-est-wipe/</feedburner:origLink></item>
		<item>
		<title>Sortie de l’outil PhoneGap Emulation powered by Ripple</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/WQygxHrQsq0/</link>
		<comments>http://blog.helyx.org/2012/08/sortie-de-loutil-phonegap-emulator/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 10:30:51 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[Mobilité]]></category>
		<category><![CDATA[Emulator]]></category>
		<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=530</guid>
		<description><![CDATA[Si vous avez déjà expérimenté le développement web mobile avec PhoneGap vous vous êtes sûrement demandé comment débugger les fonctionnalités fournies par l&#8217;outil telles que la géolocalisation, l&#8217;accéléromètre ou bien encore l&#8217;accès aux informations de connectivité. Jusqu&#8217;à présent peu de solutions étaient à disposition, et le débuggage en était que plus compliqué. Nitobi (racheté par Adobe) fournit [...]]]></description>
				<content:encoded><![CDATA[<p>Si vous avez déjà expérimenté le développement web mobile avec <a href="http://www.phonegap.com/" rel="nofollow">PhoneGap</a> vous vous êtes sûrement demandé comment débugger les fonctionnalités fournies par l&#8217;outil telles que la géolocalisation, l&#8217;accéléromètre ou bien encore l&#8217;accès aux informations de connectivité. Jusqu&#8217;à présent peu de solutions étaient à disposition, et le débuggage en était que plus compliqué.</p>
<p>Nitobi (racheté par Adobe) fournit depuis quelques temps maintenant une solution SaaS de <a href="http://build.phonegap.com/" rel="nofollow">build</a> de vos applications PhoneGap, permettant d&#8217;éviter d&#8217;avoir à installer les différents environnement de développement, tels que le SDK Android accompagné d&#8217;Eclipse ou bien encore l&#8217;IDE Xcode d&#8217;Apple, pour construire vos applications. Dommage me direz-vous si vous devez les installer pour débugger vos applications.</p>
<p>Il y a déjà plus d&#8217;un an le plugin <a href="https://chrome.google.com/webstore/detail/geelfhphabnejjhdalkjhgipohgpdnoc" rel="nofollow">Ripple Mission Control</a> pour Chrome proposait de répondre à cette problématique, Malheureusement la société à l&#8217;origine de ce plugin fût rachetée par RIM (<a href="http://www.rim.com/" rel="nofollow">Research In Motion</a>), et fût intégré au SDK Blackberry avec la menace de devenir un projet zombie pour les autres plateformes.</p>
<p>TinyHippos, la société à l&#8217;origine de l&#8217;outil avait même envoyé une communication le 5 janvier dernier pour annoncer la fin de l&#8217;outil en tant que tel pour fournir en lieu et place un outil pleinement intégré à la frontière entre navigateur et debugger mobile à l&#8217;image de <a href="http://www.iwebinspector.com/" rel="nofollow">iWebInspector</a>, mais uniquement disponible depuis le SDK de RIM.</p>
<p>Cette communication indiquait même que le plugin serait retiré le 29 février 2012 du chrome web store. Heureusement, il semble qu&#8217;à ce jour il n&#8217;en soit rien. Alors que le projet semblait être plongé dans une profonde léthargie, Adobe, à travers l&#8217;équipe PhoneGap, a décidé de proposer un outils basé dessus appelé <a href="http://emulate.phonegap.com/" rel="nofollow">PhoneGap Emulator</a>. Les pré-requis pour utiliser l&#8217;outil sont bien entendu Chrome et le plugin Ripple Mission Control. Une fois installé si vous vous rendez sur la page d&#8217;accueil de PhoneGap Emulation, un formulaire vous proposera de lancer Ripple à l&#8217;adresse indiquée par vos soin. Il est notamment possible d&#8217;indiquer la plateforme à émuler.</p>
<p>Bien que l&#8217;outil soit très basic, et que l&#8217;essentiel de la valeur ajoutée repose sur l&#8217;émulateur Ripple, PhoneGap Emulation a le mérite de faire connaître ce plugin Chrome bien pratique pour le débuggage d&#8217;applications mobile. Il est intéressant de voir qu&#8217;Adobe pousse fort sur le web mobile et propose une suite d&#8217;outils cohérente : Usine logicielle en ligne, Débugger, plateforme web mobile hybride PhoneGap, ainsi qu&#8217;<a href="http://labs.adobe.com/technologies/shadow/" rel="nofollow">Adobe Shadow</a>.</p>
<p>Adobe pourrait bien finalement réussir dans le domaine de la mobilité en embrassant les technologies web, là où elle a échoué avec Flash, et ce au grâce au rachat judicieux de la petite société Nitobi. Adobe souhaite fournir un ensemble de services et d&#8217;outils autour du développement web mobile comme le montre les différentes intégrations réalisées entre PhoneGap, jQueryMobile et différents outils Adobe tels que <a href="http://phonegap.com/2012/04/24/adobe-dreamweaver-cs6-supports-phonegap-build/" rel="nofollow">Dreamwaver</a>.</p>
<p>De nombreux outils de débuggage à destination des plateformes web mobiles fleurissent actuellement, la fondation Mozilla, a annoncé le <a href="https://hacks.mozilla.org/2012/08/remote-debugging-on-firefox-for-android/" rel="nofollow">sien</a> pas plus tard que jeudi dernier. Il permet de connecter le nouveau debugger de <a href="https://hacks.mozilla.org/2012/07/debugger-responsive-design-view-and-more-in-firefox-aurora-15/" rel="nofollow">Firefox Desktop</a> avec Firefox on Android, mais cet outil n&#8217;est pas le seul, puisqu&#8217;Opéra a été précurseur sur le sujet:</p>
<p>Pour la petite histoire l&#8217;outil web PhoneGap Emulation est basé sur Node.js, ainsi que les frameworks Javascript <a href="http://expressjs.com/" rel="nofollow">Express</a> et <a href="http://jade-lang.com/" rel="nofollow">Jade</a>, et est disponible sur <a href="https://github.com/phonegap/emulate.phonegap.com" rel="nofollow">GitHub</a>. Preuve s&#8217;il en est, encore une fois, que Javascript est aujourd&#8217;hui omniprésent et incontournable.</p>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/WQygxHrQsq0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/08/sortie-de-loutil-phonegap-emulator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/08/sortie-de-loutil-phonegap-emulator/</feedburner:origLink></item>
		<item>
		<title>Customisez Xcode avec un thème inspiré de Railscasts !</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/FhyYsuarA5Q/</link>
		<comments>http://blog.helyx.org/2012/08/customisez-xcode-avec-un-theme-inspire-de-railscasts/#comments</comments>
		<pubDate>Sat, 11 Aug 2012 12:13:58 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobilité]]></category>
		<category><![CDATA[Outils]]></category>
		<category><![CDATA[Railscast]]></category>
		<category><![CDATA[Thème]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=544</guid>
		<description><![CDATA[J&#8217;ai découvert, il y a quelques mois, le plaisir de travailler avec un thème sombre dans mes différents IDEs, et j&#8217;avoue avoir du mal à revenir en arrière. Le thème Railscasts, bien connu des développeurs, est décliné sur de nombreux environnements de développement en allant de VIM à IntelliJ IDEA, mais il manque à l&#8217;appel [...]]]></description>
				<content:encoded><![CDATA[<p>J&#8217;ai découvert, il y a quelques mois, le plaisir de travailler avec un thème sombre dans mes différents IDEs, et j&#8217;avoue avoir du mal à revenir en arrière. Le thème Railscasts, bien connu des développeurs, est décliné sur de nombreux environnements de développement en allant de VIM à IntelliJ IDEA, mais il manque à l&#8217;appel sur Xcode.</p>
<p>N&#8217;étant pas fan du thème proposé par défaut dans Xcode, je vous propose à travers ce billet de blog de découvrir un thème personnalisé inspiré du fameux thème Railscasts. Celui-ci à la particularité d&#8217;utiliser uniquement des tons sobres, ainsi qu&#8217;un nombre réduit de variations de couleurs.</p>
<p>Travaillant au quotidien depuis de nombreux mois avec cette base de thème que ce soit sur Xcode ou IntelliJ IDEA, je trouve qu&#8217;elle a pour effet de diminuer la fatigue visuelle, et d&#8217;améliorer la concentration. </p>
<h3><a name="CustomisezXcodeavecunth%C3%A8meinspir%C3%A9deRailscasts%21-Installation"></a>Installation</h3>
<p>Le thème peut être téléchargé depuis la <a href="http://xcode-railscasts-theme.helyx.org/" rel="nofollow">home</a> du thème ou bien depuis Github. Pour cela, il suffit de cloner le repository suivant: <a href="https://github.com/akinsella/xcode-railscasts-theme" rel="nofollow">https://github.com/akinsella/xcode-railscasts-theme</a>, et de copier le fichier <a href="https://github.com/akinsella/xcode-railscasts-theme/blob/master/RailsCast_Inspired.dvtcolortheme" rel="nofollow">RailsCast_Inspired.dvtcolortheme</a> dans le dossier suivant de votre mac : <em>~/Library/Developer/Xcode/UserData/FontAndColorThemes.</em></p>
<p>Une fois le fichier copié, il vous suffit de sélectionner le thème <em>RailsCast_Inspired</em> dans les préférences (Cmd+,) de l&#8217;application Xcode.</p>
<h3><a name="CustomisezXcodeavecunth%C3%A8meinspir%C3%A9deRailscasts%21-Screenshots"></a>Screenshots</h3>
<p>Vous trouverez ci-dessous quelques screenshots du résultat dans Xcode:</p>
<div align="center">
<p><img src="http://blog.helyx.org/wp-content/uploads/screenshot-2.png" style="border: 1px solid black; width: 720px;" /></p>
<p><img src="http://blog.helyx.org/wp-content/uploads/screenshot-1.png" style="border: 1px solid black; width: 720px;" /></p>
</div>
<h3><a name="CustomisezXcodeavecunth%C3%A8meinspir%C3%A9deRailscasts%21-Inspiration"></a>Inspiration</h3>
<p>Ce thème a été développé sur la base d&#8217;un thème Xcode proposé par Simon Wallner. Vous pouvez le retrouver sur son repository GitHub: <a href="https://github.com/SimonWallner/RailsCast-Xcode-Theme" rel="nofollow">https://github.com/SimonWallner/RailsCast-Xcode-Theme</a>. Ce thème est assez proche des couleurs habituelles du thème Railscasts <a href="https://github.com/ryanb/textmate-themes" rel="nofollow">original</a>.</p>
<p>Sachez cependant qu&#8217;il existe d&#8217;autres variantes <a href="http://blog.codefront.net/2010/02/04/railscasts-xcode-theme/" rel="nofollow">ici</a> ou <a href="http://blog.10to1.be/cocoa/2009/09/25/railscasts-xcode-theme/" rel="nofollow">là</a>. Libre à vous de trouver chaussure à votre pied !</p>
<h3><a name="CustomisezXcodeavecunth%C3%A8meinspir%C3%A9deRailscasts%21-Questionsetremarques"></a>Questions et remarques</h3>
<p>N&#8217;hésitez pas à laisser vos commentaires ainsi que vos retours et remarques !</p>
<p>Un thème complet basé sur ces même couleurs existe également pour IntelliJ IDEA. Si vous êtes intéressés, indiquez-le dans les commentaires afin de voir s&#8217;il est utile de le proposer dans un futur article !</p>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/FhyYsuarA5Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/08/customisez-xcode-avec-un-theme-inspire-de-railscasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/08/customisez-xcode-avec-un-theme-inspire-de-railscasts/</feedburner:origLink></item>
		<item>
		<title>Code source de l’application Clock pour iPhone proposé dans un tutoriel OVH</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/j9E4rlvY_2M/</link>
		<comments>http://blog.helyx.org/2012/06/code-source-de-lapplication-clock-pour-iphone-propose-dans-un-tutoriel-ovh/#comments</comments>
		<pubDate>Sun, 10 Jun 2012 00:10:24 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[OVH]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=491</guid>
		<description><![CDATA[Il y a trois mois, OVH proposait sur son site un tutoriel aidant à développer sa première application iPhone. Le tutoriel en question avait pour objectif le développement d&#8217;une application permettant d&#8217;afficher l&#8217;heure au centre de l&#8217;écran sur un fond noir. Rien d&#8217;extraordinaire de premier abord, mais la complexité de prise en main de l&#8217;IDE [...]]]></description>
				<content:encoded><![CDATA[<p>Il y a trois mois, OVH proposait sur son site un tutoriel aidant à développer sa première application iPhone. Le tutoriel en question avait pour objectif le développement d&#8217;une application permettant d&#8217;afficher l&#8217;heure au centre de l&#8217;écran sur un fond noir. Rien d&#8217;extraordinaire de premier abord, mais la complexité de prise en main de l&#8217;IDE d&#8217;Apple (XCode) donne à ce tutoriel son intérêt puisqu&#8217;il permet de démarrer en douceur en se familiarisant avec différentes de ses fonctionnalités.</p>
<p>Malheureusement, le code source du tutoriel n&#8217;est pas fourni, je vous propose donc de le retrouver sur GitHub, et de le consulter tout au long de la lecture du tutoriel.</p>
<p>L&#8217;url du repo GitHub: <a href="https://github.com/akinsella/clock">https://github.com/akinsella/clock</a></p>
<p>L&#8217;url du tutoriel sur le site d&#8217;OVH: <a href="http://www.ovh.com/fr/all/a494.creer_sa_premiere_application_iphone">http://www.ovh.com/fr/all/a494.creer_sa_premiere_application_iphone</a></p>
<ul>
<li>Le fichier &#8216;ViewController.h&#8217;</li>
</ul>
<div class="codecolorer-container objc railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">//</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;ViewController.h</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Clock</span><br />
<span style="color: #11740a; font-style: italic;">//</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Created by Alexis Kinsella on 09/06/12.</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Copyright (c) 2012 __MyCompanyName__. All rights reserved.</span><br />
<span style="color: #11740a; font-style: italic;">//</span><br />
<br />
<span style="color: #6e371a;">#import &lt;uikit /UIKit.h&gt;</span><br />
<br />
<span style="color: #a61390;">@interface</span> ViewController <span style="color: #002200;">:</span> UIViewController <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; UILabel <span style="color: #002200;">*</span>hoursAndMinutesLabel;<br />
&nbsp; &nbsp; UILabel <span style="color: #002200;">*</span>secondsLabel;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> IBOutlet UILabel <span style="color: #002200;">*</span>hoursAndMinutesLabel;<br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> IBOutlet UILabel <span style="color: #002200;">*</span>secondsLabel;<br />
<br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> <span style="color: #002200;">*</span>dateFormatter;<br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/"><span style="color: #400080;">NSTimer</span></a> <span style="color: #002200;">*</span>walkTimer;<br />
<br />
<br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>updateClock;<br />
&nbsp; &nbsp; <br />
<span style="color: #a61390;">@end</span></div></div>
<ul>
<li>Le fichier &#8216;ViewController.m&#8217;</li>
</ul>
<div class="codecolorer-container objc railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:650px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">//</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;ViewController.m</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Clock</span><br />
<span style="color: #11740a; font-style: italic;">//</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Created by Alexis Kinsella on 09/06/12.</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Copyright (c) 2012 __MyCompanyName__. All rights reserved.</span><br />
<span style="color: #11740a; font-style: italic;">//</span><br />
<br />
<span style="color: #6e371a;">#import &quot;ViewController.h&quot;</span><br />
<br />
<span style="color: #a61390;">@implementation</span> ViewController<br />
<br />
<span style="color: #a61390;">@synthesize</span> hoursAndMinutesLabel;<br />
<span style="color: #a61390;">@synthesize</span> secondsLabel;<br />
<span style="color: #a61390;">@synthesize</span> walkTimer;<br />
<span style="color: #a61390;">@synthesize</span> dateFormatter;<br />
<br />
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>updateClock <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/"><span style="color: #400080;">NSDate</span></a> <span style="color: #002200;">*</span>currentDate <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/"><span style="color: #400080;">NSDate</span></a> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hh:mm&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; self.hoursAndMinutesLabel.text <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self.dateFormatter stringFromDate<span style="color: #002200;">:</span>currentDate<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;ss&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; self.secondsLabel.text <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self.dateFormatter stringFromDate<span style="color: #002200;">:</span>currentDate<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// ARC forbids explicits release &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// [currentDate release];</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> viewWillAppear<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>animated <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/"><span style="color: #400080;">NSTimer</span></a> <span style="color: #002200;">*</span>timer <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/"><span style="color: #400080;">NSTimer</span></a> timerWithTimeInterval<span style="color: #002200;">:</span><span style="color: #2400d9;">1.0</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;target<span style="color: #002200;">:</span>self <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>updateClock<span style="color: #002200;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;userInfo<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> repeats<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self setWalkTimer<span style="color: #002200;">:</span> timer<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSRunLoop_Class/"><span style="color: #400080;">NSRunLoop</span></a> currentRunLoop<span style="color: #002200;">&#93;</span> addTimer<span style="color: #002200;">:</span>timer forMode<span style="color: #002200;">:</span>NSDefaultRunLoopMode<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self updateClock<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>super viewWillAppear<span style="color: #002200;">:</span>animated<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> viewDidDisappear<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>animated <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>self walkTimer<span style="color: #002200;">&#93;</span> invalidate<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self setWalkTimer<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>; <br />
<span style="color: #002200;">&#125;</span><br />
<br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>viewDidLoad<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>super viewDidLoad<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Do any additional setup after loading the view, typically from a nib.</span><br />
<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> <span style="color: #002200;">*</span>df <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self setDateFormatter<span style="color: #002200;">:</span> df<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// [dateFormatter release];</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.dateFormatter setLocale<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/"><span style="color: #400080;">NSLocale</span></a> autoupdatingCurrentLocale<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>viewDidUnload<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>super viewDidUnload<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; self.dateFormatter <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Release any retained subviews of the main view. &nbsp; &nbsp;</span><br />
&nbsp; &nbsp; self.hoursAndMinutesLabel <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;<br />
&nbsp; &nbsp; self.secondsLabel <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>shouldAutorotateToInterfaceOrientation<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIInterfaceOrientation<span style="color: #002200;">&#41;</span>interfaceOrientation<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> <span style="color: #a61390;">YES</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #a61390;">@end</span></div></div>
<ul>
<li>Le fichier &#8216;AppDelegate.m&#8217;</li>
</ul>
<div class="codecolorer-container objc railscasts codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:650px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">//</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;AppDelegate.m</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Clock</span><br />
<span style="color: #11740a; font-style: italic;">//</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Created by Alexis Kinsella on 09/06/12.</span><br />
<span style="color: #11740a; font-style: italic;">// &nbsp;Copyright (c) 2012 __MyCompanyName__. All rights reserved.</span><br />
<span style="color: #11740a; font-style: italic;">//</span><br />
<br />
<span style="color: #6e371a;">#import &quot;AppDelegate.h&quot;</span><br />
<br />
<span style="color: #6e371a;">#import &quot;ViewController.h&quot;</span><br />
<br />
<span style="color: #a61390;">@implementation</span> AppDelegate<br />
<br />
<span style="color: #a61390;">@synthesize</span> window <span style="color: #002200;">=</span> _window;<br />
<span style="color: #a61390;">@synthesize</span> viewController <span style="color: #002200;">=</span> _viewController;<br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>application<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application didFinishLaunchingWithOptions<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>launchOptions<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; self.window <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIWindow alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIScreen mainScreen<span style="color: #002200;">&#93;</span> bounds<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Override point for customization after application launch.</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> setStatusBarHidden<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span> withAnimation<span style="color: #002200;">:</span>UIStatusBarAnimationNone<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; self.viewController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>ViewController alloc<span style="color: #002200;">&#93;</span> initWithNibName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;ViewController&quot;</span> bundle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; self.window.rootViewController <span style="color: #002200;">=</span> self.viewController;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.window makeKeyAndVisible<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> <span style="color: #a61390;">YES</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>applicationWillResignActive<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>applicationDidEnterBackground<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. </span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>applicationWillEnterForeground<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>applicationDidBecomeActive<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>applicationWillTerminate<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #a61390;">@end</span></div></div>
<p></uikit></p>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/j9E4rlvY_2M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/06/code-source-de-lapplication-clock-pour-iphone-propose-dans-un-tutoriel-ovh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/06/code-source-de-lapplication-clock-pour-iphone-propose-dans-un-tutoriel-ovh/</feedburner:origLink></item>
		<item>
		<title>Supprimer les accents d’une phrase avec Java6</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/a_E82GNxclw/</link>
		<comments>http://blog.helyx.org/2012/05/supprimer-les-accents-dune-phrase-avec-java6/#comments</comments>
		<pubDate>Wed, 30 May 2012 22:06:43 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[J2SE]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=480</guid>
		<description><![CDATA[Au cours d&#8217;un développement, il arrive qu&#8217;il soit nécessaire de supprimer les accents d&#8217;une chaine de caractère. S&#8217;il faut développer soit-même la solution autant dire que la tâche peut se révéler complexe si on souhaite faire les choses bien. Heureusement Java propose une solution élégante directement disponible dans le JDK depuis la version 6. Il [...]]]></description>
				<content:encoded><![CDATA[<p>Au cours d&#8217;un développement, il arrive qu&#8217;il soit nécessaire de supprimer les accents d&#8217;une chaine de caractère. S&#8217;il faut développer soit-même la solution autant dire que la tâche peut se révéler complexe si on souhaite faire les choses bien.</p>
<p>Heureusement Java propose une solution élégante directement disponible dans le JDK depuis la version 6. Il s&#8217;agit de la classe <a href="http://docs.oracle.com/javase/6/docs/api/java/text/Normalizer.html" target="_blank">java.text.Normalizer</a>.</p>
<p>La classe Normalizer permet de décomposer les caractères composites en caractères unicode. En clair, cela signifie qu&#8217;un caractère accentué est divisé en 2 caractères: le 1er non accentué, puis un second correspondant à l&#8217;accent. Le caractère: &#8216;ê&#8217; sera ainsi décomposé comme suit: &#8216;e&#8217;, &#8216;^&#8217;.</p>
<p>Le premier exemple ci-dessous permet de normaliser une chaîne de caractère selon la norme définie à l&#8217;adresse suivante: <a href="http://www.unicode.org/reports/tr15/tr15-23.html#Decomposition" target="_blank">http://www.unicode.org/reports/tr15/tr15-23.html#Decomposition</a></p>
<div class="codecolorer-container java5 railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java5 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/String.html"><span style="color: #003399; font-weight: bold;">String</span></a> normalize<span style="color: #009900;">&#40;</span><a href="http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/String.html"><span style="color: #003399; font-weight: bold;">String</span></a> input<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">return</span> Normalizer.<span style="color: #006633;">normalize</span><span style="color: #009900;">&#40;</span>input, Normalizer.<span style="color: #006633;">Form</span>.<span style="color: #006633;">NFD</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Le deuxième exemple, ci-dessous, permet de normaliser la chaîne de caractères, puis de supprimer l&#8217;ensemble des caractères représentant les accents des caractères décomposés:</p>
<div class="codecolorer-container java5 railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java5 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/String.html"><span style="color: #003399; font-weight: bold;">String</span></a> stripAccents<span style="color: #009900;">&#40;</span><a href="http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/String.html"><span style="color: #003399; font-weight: bold;">String</span></a> input<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">return</span> Normalizer.<span style="color: #006633;">normalize</span><span style="color: #009900;">&#40;</span>input, Normalizer.<span style="color: #006633;">Form</span>.<span style="color: #006633;">NFD</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">replaceAll</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>p{InCombiningDiacriticalMarks}+&quot;</span>, <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Comment souventen Java, mieux vaut ne pas essayer de refaire la roue, le JDK offre souvent une solution efficace, et de nombreuses librairies permettent souvent de répondre à vos besoins permettant ainsi de se concentrer un peu plus sur l&#8217;objectif de votre développement et d&#8217;éviter de perdre du temps sur des détails techniques.</p>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/a_E82GNxclw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/05/supprimer-les-accents-dune-phrase-avec-java6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/05/supprimer-les-accents-dune-phrase-avec-java6/</feedburner:origLink></item>
		<item>
		<title>Ajoutez vos flux Twitter et Delicious sans plugin dans WordPress</title>
		<link>http://feedproxy.google.com/~r/helyx/rss/~3/1FYfJIySftw/</link>
		<comments>http://blog.helyx.org/2012/05/ajouter-vos-flux-twitter-et-delicious-sans-plugin-dans-wordpress/#comments</comments>
		<pubDate>Sat, 26 May 2012 13:30:47 +0000</pubDate>
		<dc:creator>Alexis Kinsella</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Delicious]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.helyx.org/?p=468</guid>
		<description><![CDATA[J&#8217;ai toujours trouvé laborieux la recherche de plugins pour WordPress. On ne sait pas ce qu&#8217;on installe et le résultat est souvent loin de ce qu&#8217;on attend. Autant dire qu&#8217;il est parfois plus efficace de faire le job soi-même. Le résultat obtenu est parfois meilleurs et ce en peu de temps. En cherchant un plugin [...]]]></description>
				<content:encoded><![CDATA[<p>J&#8217;ai toujours trouvé laborieux la recherche de plugins pour WordPress. On ne sait pas ce qu&#8217;on installe et le résultat est souvent loin de ce qu&#8217;on attend. Autant dire qu&#8217;il est parfois plus efficace de faire le job soi-même. Le résultat obtenu est parfois meilleurs et ce en peu de temps.</p>
<p>En cherchant un plugin pour afficher dans la sidebar du blog la user timeline de mes tweets ou bien mon feed Delicious, j&#8217;ai souvent eu de mauvaises surprises liées au performances: Page qui bloque au chargement plus ou moins longtemps dans le meilleurs des cas, voir page qui plante lorsque le chargement côté serveur  n&#8217;aboutit pas ou bien lorsque le javascript est mal codé.</p>
<p>1. Intégrer un widget Twitter</p>
<p>Pour cela rien de plus simple, il suffit d&#8217;ajouter un widget de type texte et d&#8217;y coller le contenu suivant:</p>
<div class="codecolorer-container html4strict railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_div&quot;</span>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">ul</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_update_list&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">ul</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/alexiskinsella&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter-link&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:block;text-align:right;&quot;</span>&gt;</span>follow me on Twitter<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/javascripts/blogger.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://twitter.com/statuses/user_timeline/alexiskinsella.json?callback=twitterCallback2&amp;include_rts=1&amp;include_entities=0&amp;contributor_details=0&amp;exclude_replies=1&amp;trim_user=1&amp;count=8&quot;</span>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></div>
<p>N&#8217;oubliez pas de personnaliser au mieux les options afin d&#8217;éviter de récupérer du contenu qui ne sera de toute façon pas affiché!</p>
<p>2. Intégrer un widget Delicious</p>
<div class="codecolorer-container html4strict railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://feeds.delicious.com/v2/js/akinsella?title=&amp;count=12&amp;sort=date&amp;name&amp;showadd&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></div>
<p>Cerise sur le gâteau, l&#8217;intégration des 2 scripts précédents n&#8217;ajoute aucun style au HTML généré, et si votre thème est correctement développé, le résultat sera naturellement intégré avec celui-ci.</p>
<p>Ces deux scripts sont plutôt performants et votre blog ne souffrira que peu de leur ajout dans le rendu de votre page. Delicious a souffert pendant longtemps de problème de performances, ceci semble ne plus être le cas, et le script se comporte très bien. Cependant à toutes fins utiles, placez plutôt ces scripts dans la sidebar de droite, afin de privilégier l&#8217;affichage du contenu de votre billet avant tout.</p>
<img src="http://feeds.feedburner.com/~r/helyx/rss/~4/1FYfJIySftw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.helyx.org/2012/05/ajouter-vos-flux-twitter-et-delicious-sans-plugin-dans-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.helyx.org/2012/05/ajouter-vos-flux-twitter-et-delicious-sans-plugin-dans-wordpress/</feedburner:origLink></item>
	</channel>
</rss>
