<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mushtitude &#187; CakePHP</title>
	<atom:link href="http://www.mushtitude.com/category/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mushtitude.com</link>
	<description>Developpement LAMP</description>
	<lastBuildDate>Fri, 30 Dec 2011 17:20:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CakePHP &#8211; Combinator helper</title>
		<link>http://www.mushtitude.com/2010/08/17/cakephp-combinator-helper/</link>
		<comments>http://www.mushtitude.com/2010/08/17/cakephp-combinator-helper/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 16:08:50 +0000</pubDate>
		<dc:creator>st3ph</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[combinator]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[http request]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.mushtitude.com/?p=57</guid>
		<description><![CDATA[Aujourd&#8217;hui je vous propose un helper CakePHP que je viens de terminer : Combinator (je trouve que ça sonne bien). A quoi ça sert ? Ce helper vous permet de combiner vos fichiers javascripts et/ou css en un seul fichier, afin de réduire les requêtes HTTP de votre site. Il pourra de plus compresser le [...]]]></description>
			<content:encoded><![CDATA[<p>Aujourd&#8217;hui je vous propose un helper <a title="CakePHP" href="http://cakephp.org/" target="_blank">CakePHP</a> que je viens de terminer : Combinator (je trouve que ça sonne bien).</p>
<h2>A quoi ça sert ?</h2>
<p>Ce helper vous permet de combiner vos fichiers javascripts et/ou css en un seul fichier, afin de <strong>réduire les requêtes HTTP</strong> de votre site. Il pourra de plus compresser le tout afin de réduire au maximum le poids de ces derniers.</p>
<h2>Pourquoi ne pas utiliser le plugin Asset ?</h2>
<p>Effectivement il existe un plugin similaire développé par <a title="Matt curry" href="http://www.pseudocoder.com" target="_blank">Matt Curry</a> : <a title="Plugin Asset CakePHP" href="http://github.com/mcurry/asset" target="_blank">Asset</a></p>
<p>Pour être honnête j&#8217;ai régulièrement eut des problèmes avec ce dernier, probablement car j&#8217;utilise un autre plugin (que je vous partagerai un jour) qui charge automatiquement les javascripts / css dont j&#8217;ai besoin à la volée.</p>
<p>J&#8217;ai donc développé mon propre helper pour ce travail, dont le fonctionnement est plus &laquo;&nbsp;libre&nbsp;&raquo; pour l&#8217;utilisateur (à mon sens)</p>
<h2>Installation</h2>
<p>1. Copier le helper dans /app/views/helpers<br />
2. Copier jsmin (1.1.0 ou plus) et csstidy (1.3 ou plus), fournis dans l&#8217;archive, dans respectivement /app/vendors/jsmin et /app/vendors/csstidy<br />
3. Inclure le helper dans votre application, généralement dans AppController afin qu&#8217;il soit disponible sur toute votre application :</p>
<blockquote><p>var $helpers = array(&#8216;Combinator&#8217;);</p></blockquote>
<p>4. Dans le layout ou la vue ajoutez les javascripts et/ou css comme ceci :</p>
<blockquote><p>&lt;?php $combinator-&gt;add_libs(&#8216;js&#8217;, array(&#8216;jquery&#8217;, &#8216;jquery.easyShare&#8217;));?&gt;</p>
<p>&lt;?php $combinator-&gt;add_libs(&#8216;css&#8217;, array(&#8216;styles&#8217;));?&gt;</p></blockquote>
<p>Ou si vous souhaitez ajouter du css/js inline :</p>
<blockquote><p>&lt;?php $combinator-&gt;add_inline_code(&#8216;css&#8217;, &#8216;#header {border:2px solid red}&#8217;);?&gt;</p></blockquote>
<p>Notez que le deuxième paramètre peut être un tableau ou une simple chaine. Les extensions .js et .css sont optionnelles et seront ajoutées automatiquement si absentes.<br />
5. Créez les liens dans le layout ou la vue :</p>
<blockquote><p>&lt;?php echo $combinator-&gt;scripts(&#8216;js&#8217;);?&gt;</p>
<p>&lt;?php echo $combinator-&gt;scripts(&#8216;css&#8217;);?&gt;</p></blockquote>
<p>Ou</p>
<blockquote><p>&lt;?php echo $combinator-&gt;scripts();?&gt;</p></blockquote>
<p>pour tout inclure au même endroit.</p>
<h2>Comment ça marche ?</h2>
<p>Le helper va récupérer le contenu de tous les fichiers (par type), les combiner, les compresser puis insérer le tout dans un seul fichier de cache (toujours par type)</p>
<h2>Tips &amp; Tricks</h2>
<ul>
<li>Par défaut les fichiers sont compressés, vous pouvez changer cela via les options du helpers</li>
<li>Par défaut les fichiers générés sont stockés dans /app/webroot/js et /app/webroot/css. Vous pouvez changer cela via les options du helpers</li>
<li>Si vous rencontrez une erreur javascript après la compression c&#8217;est en général du au manque d&#8217;un &laquo;&nbsp;;&nbsp;&raquo; quelque part.</li>
<li>L&#8217;ordre d&#8217;appel est important, si script1 est appelé avant script2 dans une vue, et l&#8217;inverse dans une autre, deux fichiers de cache seront générés.</li>
<li><strong>Le helper a été testé avec <a title="CakePHP 1.2.x manual" href="http://book.cakephp.org/view/2/x1-2-Collection" target="_blank">CakePHP 1.2.x</a> et <a title="CakePHP 1.3.x manual" href="http://book.cakephp.org/view/875/x1-3-Collection" target="_blank">CakePHP 1.3.x</a></strong></li>
</ul>
<h2>Warning</h2>
<p>CssTidy semble poser problème avec le css3 (problème rencontré avec la propriété background gradient)</p>
<h2>Convaincu ? Téléchargement !</h2>
<p>L&#8217;archive est <a title="Télécharger helper CakePHP : Combinator" href="http://code.google.com/p/combinator/downloads/detail?name=cakephp_combinator_v1_2.zip" target="_blank">téléchargeable ici</a></p>
<p>Pour changer, tous les commentaires ou suggestions sont les bienvenus.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mushtitude.com/2010/08/17/cakephp-combinator-helper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Lithium</title>
		<link>http://www.mushtitude.com/2009/10/27/cakephp-lithium/</link>
		<comments>http://www.mushtitude.com/2009/10/27/cakephp-lithium/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 09:58:21 +0000</pubDate>
		<dc:creator>st3ph</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.mushtitude.com/?p=29</guid>
		<description><![CDATA[Un petit mot pour dire que Cake3 devient officiellement Lithium. Pour ceux ou celles qui n&#8217;ont pas tout suivi, Lithium est une refonte totale de CakePHP &#171;&#160;from scratch&#160;&#187; visant à exploiter au mieux les nouveautés de php 5.3, notamment les namespace. Whoa, easy now, let&#8217;s not jump to any hasty conclusions. The fact of the [...]]]></description>
			<content:encoded><![CDATA[<p>Un petit mot pour dire que <strong>Cake3</strong> devient officiellement <a title="Lithium Framework" href="http://li3.rad-dev.org/" target="_blank">Lithium</a>.</p>
<p>Pour ceux ou celles qui n&#8217;ont pas tout suivi, Lithium est une refonte totale de <strong>CakePHP</strong> &laquo;&nbsp;from scratch&nbsp;&raquo; visant à exploiter au mieux les nouveautés de <strong>php 5.3</strong>, notamment les <a title="PHP 5.3 Namespace" href="http://www.php.net/manual/en/language.namespaces.rationale.php" target="_blank">namespace</a>.</p>
<blockquote><p>Whoa, easy now, let&#8217;s not jump to any hasty conclusions. The fact of the matter is that from the very beginning, this project was written from scratch to be its own entity. It always has been, and that&#8217;s true whether or not it exists within the CakePHP ecosystem. The same developers who are focused on it now were focused on it when it was a sub-project of CakePHP, and several of them are continuing to contribute to CakePHP and stay active in the community, just as they were when it was called Cake3.</p></blockquote>
<p>Nate nous explique dans un <a title="Lithium : and-were-baaaack" href="http://rad-dev.org/lithium/wiki/blog/and-were-baaaack" target="_blank">long post</a> les pourquoi du comment et le &laquo;&nbsp;détachement&nbsp;&raquo; du projet. On y apprend aussi le rapprochement avec d&#8217;autres frameworks PHP tel que <a title="Symfony" href="http://www.symfony-project.org/" target="_blank">Symfony</a> ou <a title="Zend framework" href="http://framework.zend.com/" target="_blank">Zend</a>. En effet il sera donc possible d&#8217;utiliser des modules d&#8217;autres frameworks (et vice versa à terme je présume).</p>
<p>Bref que du bon à venir !</p>
<p><a title="Lithium Framework" href="http://li3.rad-dev.org/" target="_blank">Site du projet Lithium</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mushtitude.com/2009/10/27/cakephp-lithium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Helper Gravatar</title>
		<link>http://www.mushtitude.com/2009/10/16/cakephp-helper-gravatar/</link>
		<comments>http://www.mushtitude.com/2009/10/16/cakephp-helper-gravatar/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 20:14:29 +0000</pubDate>
		<dc:creator>st3ph</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[gravatar]]></category>
		<category><![CDATA[helper]]></category>

		<guid isPermaLink="false">http://www.mushtitude.com/?p=26</guid>
		<description><![CDATA[Gravatar ? Pour ceux (ou celles) qui débarquent sur le web, voici un petit récapitulatif de ce qu&#8217;est gravatar tiré de leur site Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts [...]]]></description>
			<content:encoded><![CDATA[<h2>Gravatar ?</h2>
<p>Pour ceux (ou celles) qui débarquent sur le web, voici un petit récapitulatif de ce qu&#8217;est <a title="Gravatar" href="http://www.gravatar.com/" target="_blank">gravatar</a> tiré de leur site</p>
<blockquote><p>Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts on blogs and web forums, so why not on any site?</p></blockquote>
<p>En gros cela permet d&#8217;assigner un avatar à une adresse email, permettant ainsi, pour tous les sites supportant <strong>Gravatar</strong>, d&#8217;afficher le bon avatar chaque fois que l&#8217;on utilise cette adresse email, évitant ainsi d&#8217;une part l&#8217;upload de son avatar sur tous les sites, et surtout d&#8217;avoir à le changer une seule fois si besoin.</p>
<h2>Et donc ?</h2>
<p>Maintenant que c&#8217;est clair, je voulais simplement pointer du doigt un <strong>helper</strong> <a title="CakePHP" href="http://cakephp.org/" target="_blank">CakePHP</a> sur lequel je viens de tomber, offrant le plus simplement du monde le support de <strong>Gravatar sur vos (nos) applications CakePHP</strong>. Plutôt cool non ?</p>
<h2>Téléchargement et détails</h2>
<p><a title="Helper Gravatar" href="http://hayden.id.au/articles/cakephp-gravatar-helper" target="_blank">http://hayden.id.au/articles/cakephp-gravatar-helper</a></p>
<p><a title="Télécharger le helper Gravatar" href="http://github.com/hharnett/cakephp-gravatar-helper" target="_blank">Téléchargement</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mushtitude.com/2009/10/16/cakephp-helper-gravatar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Mise à jour de l&#8217;API et du manuel</title>
		<link>http://www.mushtitude.com/2009/10/16/cakephp-mise-a-jour-de-lapi-et-du-manuel/</link>
		<comments>http://www.mushtitude.com/2009/10/16/cakephp-mise-a-jour-de-lapi-et-du-manuel/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 08:11:38 +0000</pubDate>
		<dc:creator>st3ph</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[manuel]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.mushtitude.com/?p=24</guid>
		<description><![CDATA[L&#8217;API et le manuel officiels CakePHP ont été mis à jour respectivement hier matin et ce matin même. Dans l&#8217;ensemble peu de chose à dire (et donc un post inutile) étant donné le peu d&#8217;informations disponible sur ce qui a changé, à part ces deux twits http://twitter.com/cakephp/status/4881410913 http://twitter.com/cakephp/status/4908730391 J&#8217;espère qu&#8217;ils ont supprimé tout ce qui [...]]]></description>
			<content:encoded><![CDATA[<p>L&#8217;<a title="CakePHP API" href="http://api.cakephp.org/" target="_self">API</a> et le <a title="CakePHP Manuel" href="http://book.cakephp.org/" target="_self">manuel</a> officiels <a title="CakePHP" href="http://www.cakephp.org" target="_self">CakePHP</a> ont été mis à jour respectivement hier matin et ce matin même.</p>
<p>Dans l&#8217;ensemble peu de chose à dire (et donc un post inutile) étant donné le peu d&#8217;informations disponible sur ce qui a changé, à part ces deux twits</p>
<p><a title="Twit API Update" href="http://book.cakephp.org/" target="_self">http://twitter.com/cakephp/status/4881410913</a></p>
<p><a title="Twit Manuel Update" href="http://twitter.com/cakephp/status/4908730391" target="_self">http://twitter.com/cakephp/status/4908730391</a></p>
<p>J&#8217;espère qu&#8217;ils ont supprimé tout ce qui a été déprécié sur les dernières versions afin de retrouver quelque chose de propre pour nos futurs développements et surtout pour les nouveaux arrivants sur ce <strong>framework</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mushtitude.com/2009/10/16/cakephp-mise-a-jour-de-lapi-et-du-manuel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

