<?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>netinfluence&#039;s blog &#187; jean</title>
	<atom:link href="http://blog.netinfluence.com/author/jean/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.netinfluence.com</link>
	<description>le blog de l&#039;agence netinfluence</description>
	<lastBuildDate>Fri, 13 Jan 2012 10:39:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>SEO Campus 2010 à Paris, Jour 2</title>
		<link>http://blog.netinfluence.com/2010/02/23/seo-campus-2010-a-paris-jour-2/</link>
		<comments>http://blog.netinfluence.com/2010/02/23/seo-campus-2010-a-paris-jour-2/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 06:00:43 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[grow]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Kpi]]></category>
		<category><![CDATA[SEM]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[seocamp]]></category>
		<category><![CDATA[web analytics]]></category>
		<category><![CDATA[Xiti]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=1041</guid>
		<description><![CDATA[De retour à l&#8217;Usine, en commençant par un petit déjeuner très sympa, l&#8217;organisation est vraiment au top, même le café est bon pour dire qu&#8217;il vient d&#8217;un thermos La journée commence par 2 tables rondes, une &#8220;annonceurs&#8221; et l&#8217;autre &#8220;agences&#8221;. Plateau 1 : Les enjeux économiques du search marketing pour les &#8220;annonceurs&#8221; J&#8217;ai pour ma part trouvé peu d&#8217;intérêt à cette table ronde, où l&#8217;on a appris que les grosses structures avaient au moins 1 spécialiste en SEO, qu&#8217;ils essayaient de former les développeurs à leurs problématiques et qu&#8217;ils faisaient appel à des consultants externes pour être conseillés… De plus, tous ont été très &#8220;langue de bois&#8221; sur les problèmes de la presse avec Google, et sur les possibilités de mettre [...]]]></description>
			<content:encoded><![CDATA[<p>De retour à l&#8217;Usine, en commençant par un petit déjeuner très sympa, l&#8217;organisation est vraiment au top, même le café est bon pour dire qu&#8217;il vient d&#8217;un thermos <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> </p>
<p>La journée commence par 2 tables rondes, une &#8220;annonceurs&#8221; et l&#8217;autre &#8220;agences&#8221;.</p>
<h2>Plateau 1 : <span style="font-weight: 800;">Les enjeux économiques du search marketing pour les &#8220;annonceurs&#8221;</span></h2>
<p>J&#8217;ai pour ma part trouvé peu d&#8217;intérêt à cette table ronde, où l&#8217;on a appris que les grosses structures avaient au moins 1 spécialiste en SEO, qu&#8217;ils essayaient de former les développeurs à leurs problématiques et qu&#8217;ils faisaient appel à des consultants externes pour être conseillés… De plus, tous ont été très &#8220;langue de bois&#8221; sur les problèmes de la presse avec Google, et sur les possibilités de mettre en nofollow leurs articles.</p>
<p>Je prends les paris qu&#8217;ils ne le feront pas!  On ne coupe pas la main qui vous donne à manger comme cela <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> J&#8217;ai vraiment l&#8217;impression que le milieu de la presse a un problème avec Google. Perso, je ne vois pas comment google news peux les cannibaliser, à eux de mettre en place un business model qui tienne la route, et par exemple d&#8217;ouvrir leurs archives, et de mieux monétiser leurs contenus.</p>
<h2>Plateau 2 : Les modèles d&#8217;interventions des agences de search marketing</h2>
<p>Ce plateau a été une véritable séance de Pitching en live, où un concours de b… de &#8220;mon agence est la meilleure du monde&#8221; et on obtient les meilleurs résultats, la preuve, on fait x millions de CA….. nananère <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_unhappy.png' alt=':(' class='wp-smiley' /> </p>
<p>Vous l&#8217;avez compris, je n&#8217;y ai trouvé aucun intérêt! On a appris que les clients font appels à une agence pour obtenir de conseils (je n&#8217;y avais pas pensé..), ou quand ils n&#8217;y connaissent rien (Ah bon ?) : pour résumer, on appelle une agence quand on en a besoin <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> En tout cas, bravo a Anji Mail, qui faisait le poisson rouge au milieu des requins, mais qui s&#8217;en est bien sorti, bien que je l&#8217;ai trouvé un peu agressif dans sa présentation commerciale, mais cela doit faire trop longtemps que je suis en Suisse.<br />
J&#8217;irai voir ce que propose CapSeo, bien que je ne crois pas à la viabilité du concept de coopératives pour gérer une société.</p>
<h2>Comment optimiser son site pour la recherche géolocalisée</h2>
<p>Lors de cette conférence, David Cohen, de la société Companeo, nous a présenté les différentes problématiques pour géolocaliser un site, que cela soit par la langue, ou googleMaps. Il existe encore trop peu de société qui ont renseigné leur page dans le Local Business Center de Google.  C&#8217;est gratuit, et cela permet un référencement local optimal.  Il suffit de remplir un formulaire.</p>
<p>J&#8217;ai particulièrement apprécié son exemple d&#8217;Europcar qui a décidé de mettre en place un annuaire en plusieurs langues pour référencer tous ses points de ventes, et qui a pu baisser de manière drastique son cout d&#8217;acquisition.</p>
<p><strong>SEO en 2010 : les approches à privilégier</strong></p>
<p>Philippe Yonnet, DG Adjoint d&#8217;Apposition / Isobar, nous a fait une présentation des nouveautés dans les moteurs de recherches, de l&#8217;inclusion de la recherche en temps réel dans certains cas, ou encore de la mise en place du QFD par Google, suite à leur impossibilité de présenté du contenu cohérent lors du tsunami. Le résultat de la page de recherche s&#8217;adapte donc maintenant à l&#8217;actualité, ce qui est très bonne chose. Ou encore, l&#8217;inclusion des Tweets lors d&#8217;évènements comme un tremblement de terre en californie. A voir aussi dans quelle mesure cela n&#8217;est pas fait pour ne pas laisser à twitter le monopole du temps réel…</p>
<p>Il nous a aussi parlé des nouveautés google, pour par exemple proposer un résultat différent pour GM, Generals Motors ou Génétiquement Modifiés, en fonction du contexte de recherche.</p>
<h2>WebAnalytics : suivre le trafic issu des moteurs de recherches</h2>
<p>Nicolas Guillard, consultant expert web analytics chez Hub&#8217;Sales, nous a fait part de l&#8217;utilisation souvent simpliste de Google Analytics, où l&#8217;on a tendance à juste lire le taux de rebond général. Il nous a parlé de la notion de taux de rebond positif : ce n&#8217;est pas parce que quelqu&#8217;un quitte directement votre site sur sa landing page qu&#8217;il n&#8217;a pas trouvé la réponse à ce qu&#8217;il cherche. Il reviendra peut-être ou alors a ouvert 8 pages sur 8 sites différents pour comparer des prix et attends de prendre sa décision.</p>
<p>Ensuite, une explication très clair des Funnels de conversions, et des erreurs possible.</p>
<h2>Tableau de bord SEO, SMART et KPI</h2>
<p>Je m&#8217;attendais à une réflexion ou idées pour la mise en place de tableau de bord, mais à la place, nous avons eu le droit a une excellent présentation commerciale d&#8217;Antoine Gay, de At Internet, anciennement Xiti… Bof…. Je ne vois pas l&#8217;intérêt de ce genre de présentation, ou alors, il faudrait mettre un tag &#8220;Commercial&#8221; sur ces présentations ;-)  Je sais bien que cela ne dois pas être facile de choisir, mais cela m&#8217;a fait regretter de ne pas aller voir la séance sur Twitter et le microblogging… Je vais attendre le retour de Nicolas Pittet sur cette conf. <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> </p>
<blockquote><p>Bilan un peu plus mitigé sur cette seconde journée, mais aucun regrets. Ces 2 jours m&#8217;ont permis de prendre conscience de certaines problématiques. Par contre, j&#8217;ai été surpris de ne rien entendre sur la publicité dans Facebook, qui prend de plus en plus d&#8217;importance et pas tant de SEM que cela.</p></blockquote>
<h2>Un tel évent en Suisse ?</h2>
<p>On se faisait la réflexion avec Nicolas Pittet de l&#8217;intérêt d&#8217;une telle journée en Suisse, vous en pensez quoi ? Que voudriez vous y trouver ? des conseils, des ateliers ?</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2010/02/23/seo-campus-2010-a-paris-jour-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SEO Campus 2010 à Paris, Jour 1</title>
		<link>http://blog.netinfluence.com/2010/02/22/seo-campus-2010-a-paris-jour-1/</link>
		<comments>http://blog.netinfluence.com/2010/02/22/seo-campus-2010-a-paris-jour-1/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 07:00:06 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[grow]]></category>
		<category><![CDATA[Adwords]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Landing Pages]]></category>
		<category><![CDATA[Nathalie Peret]]></category>
		<category><![CDATA[Référencement]]></category>
		<category><![CDATA[SEM]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[seocamp]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=985</guid>
		<description><![CDATA[J&#8217;ai participé à cette seconde édition du SEO Campus a Paris ce vendredi 19 et samedi 20 Février. Rassemblant plus de 300 inscrits pour chaque jour, l&#8217;évènement a été, du point de vue de l&#8217;organisation, une absolue réussite. Le lieu, l&#8217;Usine, avec ses différentes sites, son bar et sa salle de repas sur place a été des plus agréable. J&#8217;y ai même rencontré le seul autre hélvète, Nicolas Pittet, de l&#8217;agence Details.ch avec qui j&#8217;ai eu beaucoup de plaisir à discuter Journée du vendredi: Lors de l&#8217;allocution d&#8217;ouverture, Philippe Yonnet nous a présenté l&#8217;association et parlé de la certification SEO qu&#8217;ils sont en train de mettre en place. 2 sessions aurons lieux en Mars et Avril 2010 Voici les conférences [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai participé à cette seconde édition du <a title="SEO Campus - annonce" href="http://www.seo-camp.org/seo-campus-2010-annonce-749" target="_blank">SEO Campus</a> a Paris ce vendredi 19 et samedi 20 Février.</p>
<p>Rassemblant plus de 300 inscrits pour chaque jour, l&#8217;évènement a été, du point de vue de l&#8217;organisation, une absolue réussite.<br />
Le lieu, l&#8217;<a title="l'usine" href="http://www.lusine-saintdenis.com/" target="_blank">Usine</a>, avec ses différentes sites, son bar et sa salle de repas sur place a été des plus agréable.<br />
J&#8217;y ai même rencontré le seul autre hélvète, <a title="nicolas sur twitter" href="http://twitter.com/Nicolaspittet" target="_blank">Nicolas Pittet</a>, de l&#8217;agence <a title="details.ch" href="http://details.ch/" target="_blank">Details.ch</a> avec qui j&#8217;ai eu beaucoup de plaisir à discuter <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> </p>
<h2>Journée du vendredi:</h2>
<p>Lors de l&#8217;allocution d&#8217;ouverture, Philippe Yonnet nous a présenté l&#8217;association et parlé de la certification SEO qu&#8217;ils sont en train de mettre en place. 2 sessions aurons lieux en Mars et Avril 2010</p>
<p>Voici les conférences auxquelles j&#8217;ai donc assisté :</p>
<h2>Duplicate content et Site Clinic</h2>
<p><a title="Profil Linkedin de Nathalie Peret" href="http://ie.linkedin.com/in/nperet" target="_blank">Nathalie Peret</a>, de l&#8217;équipe Qualité de Recherche de Google, est venue  d&#8217;Irlande pour cette conférence.<br />
Ce qui est surprenant c&#8217;est que parmi les spécialistes en SEO, y compris parmi les grandes agences, peu ont de contacts avec des personnes de chez Google.  Donc voir une personne &#8220;en vrai&#8221; de chez eux avait presque quelque chose de miraculeux <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> </p>
<p>Elle nous a parlé de la problématique de &#8220;duplicate content&#8221; dans google, en disant que cela n&#8217;était pas pénalisant, mais qu&#8217;il valait mieux ne pas en avoir. Il existe encore beaucoup de sites avec une url en www.site.com et site.com, pointant vers le même contenu, un simple redirection 302 corrigera cela.</p>
<p>Pour les sites étant obligés d&#8217;avoir du contenu dupliqué, il peux être judicieux d&#8217;utiliser la balise <strong>rel=&#8221;canonical&#8221;</strong>, qui permet d&#8217;indiquer à Google le contenu de référence et de ne prendre en compte que celui-ci.</p>
<p>J&#8217;ai appris que Google ne se servait pas de la balise langue pour le contenu, mais la déduisait du contenu.</p>
<p>Ensuite, Nathalie Paret a fait une analyse rapide de 5 sites parmi ceux qui lui ont été soumis, et j&#8217;ai pu voir que certaines méthodes ont la vie dure, comme des liens illisibles en bas de page, ou une liste de lien sur des mot-clés genre &#8220;gagner de l&#8217;argent,2 etc… pour mieux positionner un site de jeu, ou des sites avec des pages sans titres uniques ou avec des paramètres à rallonges.</p>
<p>Par contre, lors de l&#8217;analyse d&#8217;un site de produits, on a remarqué qu&#8217;il y avait du &#8220;duplicate content&#8221; avec le site Shopping.com, ce qui me semble normal, mais pour éviter cela, il faudrait offrir un contenu différent aux sites comparateurs de prix, mais je ne suis pas sure qu&#8217;un client fasse 2 contenus différents pour chaque articles de son catalogue…</p>
<p>Pour résumer : faite simple, des url simples et surtout un c<strong>ontenu de QUALITE !!!</strong> Optimiser votre contenu pour votre lecteur et pas pour Google, il se débrouillera tout seul <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> </p>
<h2>Achat de mots clés pour google AdWords, et optimisation des Landing Pages</h2>
<p>Ensuite, j&#8217;ai suivi 2 sessions (adwords &amp; landing pages) avec <a title="Profil linkedin de Benoit Martin" href="http://fr.linkedin.com/pub/benoit-martin/2/416/483" target="_blank">Benoit Martin</a>, Directeur Technique SEM chez Isobar.<br />
Nous n&#8217;avons pas pu finir la session avant le repas, mais une séance de rattrapage l&#8217;après midi a permis de tout voir.</p>
<p>Le thème était l&#8217;achat de mots clés pour google AdWords, et l&#8217;optimisation des Landing Pages.</p>
<p>J&#8217;ai particulièrement apprécié sa méthode pour chercher des mots clés, en se basant sur l&#8217;arborescence du site, et ne descendant à chaque niveau et calquer ses campagnes sur la structure de son site.</p>
<p>On obtient une structure sur 4 niveaux :</p>
<p style="padding-left: 30px;">1. Expression génériques, qui représente l&#8217;activité de votre site (horlogerie, voyage, …)<br />
2. Expression associé à la marque, votre marque en particulier<br />
3. mots clés produits, vos références produits, ou des mots clés spécifique à vos produits<br />
4. Long tail, les mots clés vous apportant du trafic récurrent.</p>
<p>Ensuite, lors de la session sur l&#8217;optimisation des Landing Pages, je m&#8217;attendais à retrouver des conseils sur les formulaires, les call to action, etc… mais il a été question de l&#8217;optimisation par rapport au QS (Quality Score) de Google, qui conseille de retrouver les mots clés utilisés dans l&#8217;url, le titre er le contenu, logique mais encore faut-il le vérifier à chaque fois.</p>
<p>Si la première séance était donc très intéressante, la seconde l&#8217;était en revanche moins car je m&#8217;attendais à une approche marketing et non technique.</p>
<h2>L&#8217;influence des performances des sites sur le SEO</h2>
<p>Cette conférence, présentée par Alain Gouret, directeur du Développement chez <a title="IP Label" href="http://www.ip-label.fr" target="_blank">IP Label</a> , a plus été une présentation commerciale de leurs solutions qu&#8217;une conférence. Même si l&#8217;on sait maintenant que Google va ajouter le temps de chargement de la page dans le calcul de son index, mettre en place une telle solution n&#8217;est pas à la portée de toute les bourses. Leur produit permet de mesurer le temps de chargement des site de différents endroits du globe, pour un monitoring complet. C&#8217;est vrai que je me demande comment sont chargées mes pages en Colombie, mais serais-ce la solution idéale… De plus, on ne connait pas le prix de cette solution, décu je suis <img src='http://blog.netinfluence.com/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> </p>
<h2>Un tableau de bord référencement sans notion de positionnement</h2>
<p>Cette conférence était une réflexion d&#8217;Olivier Andrieu, Consultant et éditeur du site <a title="Sita abondance" href="http://www.abondance.com/" target="_blank">Abondance</a>, sur le future de la mesure des sites internet, Avec les nouvelles options de google comme la prise en compte de notre historique pour l&#8217;affichage des résultats de recherche, du temps réel ou bientôt la prise en compte des réseaux sociaux pour vous proposer un résultat de recherche prenant en compte les recherches de vos amis, chaque internaute aura un résultat de recherche personnalisé. Quid du positionnement par rapport à un mot-clés?!…</p>
<p>Je pense pour ma part, que nous aurons toujours besoins d&#8217;un métric &#8220;neutre&#8221;, pour avoir une idée de ce positionnement, et si celui-ci est correct, il n&#8217;y a pas de raison qu&#8217;il ne le soit pas dans la personnalisation des résultats.</p>
<p><a rel="attachment wp-att-991" href="http://blog.netinfluence.com/2010/02/22/seo-campus-2010-a-paris-jour-1/long_tail/"><img class="alignleft size-medium wp-image-991" title="long_tail" src="http://blog.netinfluence.ch/wp-content/uploads/2010/02/long_tail-300x177.png" alt="" width="151" height="89" /></a>Ensuite, Olivier nous a présenté son concept de &#8220;Long Tail&#8221; appliqué aux mots clés de recherche, vraiment très intéressant. Les spécialistes en SEO ou les responsables de sites ont tendance à se concentrer sur les mots clefs qui génèrent le plus de traffic.  Paradoxalement, c&#8217;est dans ceux qui génèrent le moins de visites (parfois une seule visite) que se cache une richesse inexploitée : la longue traine. Hors celle-ci est celle qui sur l&#8217;ensemble génère le plus traffic et surtout le traffic le plus qualifié.</p>
<p>J&#8217;ai hâte de tester cela avec nos site pour vérifier sa théorie, je vous en ferai par dans un prochain article.</p>
<blockquote><p><em>Voilà pour cette première journée, qui hormis une présentation commerciale, était très intéressante de mon point de vue. Je n&#8217;ai pas pu rester pour les tables rondes sur le métier de référenceurs, mais les échos que j&#8217;en ai eu ont été très positifs, Il me tarde de les voir en vidéos.</em></p></blockquote>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2010/02/22/seo-campus-2010-a-paris-jour-1/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quel produit sera présenté le 27 Janvier ?</title>
		<link>http://blog.netinfluence.com/2010/01/20/quel-produit-sera-presente-le-27-janvier/</link>
		<comments>http://blog.netinfluence.com/2010/01/20/quel-produit-sera-presente-le-27-janvier/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 23:32:59 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[create]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iSlate]]></category>
		<category><![CDATA[keynote]]></category>
		<category><![CDATA[tablette]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=773</guid>
		<description><![CDATA[Le 27 Janvier prochain, Apple va présenter un nouveau produit lors de sa keynote. A priori, le buzz du moment est la future tablette, iSlate ou autre nom, vous ne pouvez pas y avoir échappé. Pour ma part, je me souviens de la keynote d&#8217;il y a 3 ans, où a été présenté l&#8217;iphone pour la première fois, et la révolution que cela a entrainée. Sommes nous à l&#8217;aube d&#8217;une autre révolution ? Je l&#8217;espère, et attends avec impatience de découvrir ce qui va nous être présenté. Je pari sur une tablette, avec webcam intégré, 3G, un Kindle sauce Apple, mais communiquant. Le compagnon parfait de mon ordinateur. En souvenir, l&#8217;image que je retiens de la keynote 2007, que vous [...]]]></description>
			<content:encoded><![CDATA[<p>Le 27 Janvier prochain, Apple va présenter un nouveau produit lors de sa keynote. A priori, le buzz du moment est la future tablette, iSlate ou autre nom, vous ne pouvez pas y avoir échappé.</p>
<p>Pour ma part, je me souviens de la keynote d&#8217;il y a 3 ans, où a été présenté l&#8217;iphone pour la première fois, et la révolution que cela a entrainée. Sommes nous à l&#8217;aube d&#8217;une autre révolution ? Je l&#8217;espère, et attends avec impatience de découvrir ce qui va nous être présenté.</p>
<p>Je pari sur une tablette, avec webcam intégré, 3G, un Kindle sauce Apple, mais communiquant. Le compagnon parfait de mon ordinateur.</p>
<p>En souvenir, l&#8217;image que je retiens de la keynote 2007, que vous pouvez retrouver ici : <a title="Keynote 2007" href="http://www.apple.com/quicktime/qtv/mwsf07/" target="_blank">http://www.apple.com/quicktime/qtv/mwsf07/</a></p>
<p>Plus que quelques jours à attendre&#8230;.</p>
<p><img class="alignleft size-medium wp-image-775" title="Capture d’écran 2010-01-20 à 00.14.27" src="http://blog.netinfluence.ch/wp-content/uploads/2010/01/Capture-d’écran-2010-01-20-à-00.14.27-300x184.png" alt="" width="300" height="184" /></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2010/01/20/quel-produit-sera-presente-le-27-janvier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Foursquare = twitter + geolocalisation</title>
		<link>http://blog.netinfluence.com/2010/01/18/foursquare-twitter-geolocalisation/</link>
		<comments>http://blog.netinfluence.com/2010/01/18/foursquare-twitter-geolocalisation/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 23:16:16 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[reach]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[foursquare]]></category>
		<category><![CDATA[geolocalisation]]></category>
		<category><![CDATA[Réseaux sociaux]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=699</guid>
		<description><![CDATA[Foursquare est un réseau social qui n&#8217;existait jusqu&#8217;à maintenant uniquement au états-unis est maintenant disponible chez nous. Le principe, pour résumé, est un Twitter avec géolocalisation. Vos messages seront localisés et vous pouvez voir vos amis proches. De plus, au fur et à mesure de l&#8217;utilisation de ce service, vous accumulez des points, pour obtenir des &#8220;badges&#8221;, matérialisant ainsi votre progression ou vos habitudes. De plus, ce service est intégré à Twitter et Facebook. Ce services connait actuellement une croissance de 400% par semaine, et a déjà monétisé son audience, notamment en permettant à des marques des publicités ciblées sur la position des utilisateurs. Comment tester ce service ? Pour le tester, rien de plus simple : Créer un compte [...]]]></description>
			<content:encoded><![CDATA[<p>Foursquare est un réseau social qui n&#8217;existait jusqu&#8217;à maintenant uniquement au états-unis est maintenant disponible chez nous. Le principe, pour résumé, est un Twitter avec géolocalisation. Vos messages seront localisés et vous pouvez voir vos amis proches.</p>
<p>De plus, au fur et à mesure de l&#8217;utilisation de ce service, vous accumulez des points, pour obtenir des &#8220;badges&#8221;, matérialisant ainsi votre progression ou vos habitudes. De plus, ce service est intégré à Twitter et Facebook.</p>
<p>Ce services connait actuellement une croissance de 400% par semaine, et a déjà monétisé son audience, notamment en permettant à des marques des publicités ciblées sur la position des utilisateurs.</p>
<p><strong>Comment tester ce service ?</strong></p>
<p>Pour le tester, rien de plus simple :</p>
<ol>
<li>Créer un compte chez <a title="foursquare.com" href="http://foursquare.com" target="_blank">foursquare</a></li>
<li>Installé une application iPhone, Android ou Palm Pre.</li>
</ol>
<p><strong>Et en Suisse ?</strong></p>
<p>Encore peu d&#8217;utilisateur en Suisse, mais je prends le pari que cela ne vas pas durer. Vous en pensez quoi ? Déjà testé ?</p>
<p><a rel="attachment wp-att-710" href="http://blog.netinfluence.com/2010/01/18/foursquare-twitter-geolocalisation/"><img class="alignleft size-full wp-image-710" style="margin-left: 20px; margin-right: 20px;" title="foursquare" src="http://blog.netinfluence.ch/wp-content/uploads/2010/01/foursquare.jpg" alt="" width="211" height="317" /></a> <a rel="attachment wp-att-711" href="http://blog.netinfluence.com/2010/01/18/foursquare-twitter-geolocalisation/"><img class="alignleft size-full wp-image-711" title="foursquare_home" src="http://blog.netinfluence.ch/wp-content/uploads/2010/01/foursquare_home.jpg" alt="" width="211" height="317" /></a></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2010/01/18/foursquare-twitter-geolocalisation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Un “typo3 certified integrator” chez netinfluence</title>
		<link>http://blog.netinfluence.com/2009/11/13/un-typo3-certified-integrator-chez-netinfluence/</link>
		<comments>http://blog.netinfluence.com/2009/11/13/un-typo3-certified-integrator-chez-netinfluence/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 20:44:00 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[create]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[typo3]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=57</guid>
		<description><![CDATA[Jean-David, alias Macmade, a obtenu la certification &#8220;Typo3 certified integrator&#8220;. Cela valide ses connaissances et son expertise dans ce CMS. Ce n&#8217;est pas une surprise pour nous qui ait obtenu cette certification haut la main, compte tenu de son expertise reconnue dans la communauté Typo3. Cette certification est par ailleurs une excellente nouvelle pour ce CMSqui se professionnalise. C&#8217;est le seul CMS qui fasse l&#8217;objet d&#8217;une telle communauté et maintenant d&#8217;une certification. Vous pouvez consulter la liste des personnes certifiées ici. C&#8217;est une certification de plus que nous accrochons à notre tableau, révélatrice de notre stratégie d&#8217;expertise et de formation permanente.]]></description>
			<content:encoded><![CDATA[<p>Jean-David, alias Macmade, a obtenu la certification &#8220;<strong>Typo3 certified integrator</strong>&#8220;. Cela valide ses connaissances et son expertise dans ce CMS.</p>
<p>Ce n&#8217;est pas une surprise pour nous qui ait obtenu cette certification haut la main, compte tenu de son expertise reconnue dans la communauté Typo3. Cette certification est par ailleurs une excellente nouvelle pour ce CMSqui se professionnalise.</p>
<p>C&#8217;est le seul CMS qui fasse l&#8217;objet d&#8217;une telle communauté et maintenant d&#8217;une certification.</p>
<p>Vous pouvez consulter la liste des personnes certifiées <a hreflang="fr" href="http://certification.typo3.org/index.php?id=63">ici</a>.</p>
<p>C&#8217;est une certification de plus que nous accrochons à notre tableau, révélatrice de notre stratégie d&#8217;expertise et de formation permanente.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2009/11/13/un-typo3-certified-integrator-chez-netinfluence/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Blog en ZF – étape 3 : Utilisation du Zend_Layout pour le template</title>
		<link>http://blog.netinfluence.com/2009/09/11/blog-en-zf-etape-3-utilisation-du-zend_layout-pour-le-template/</link>
		<comments>http://blog.netinfluence.com/2009/09/11/blog-en-zf-etape-3-utilisation-du-zend_layout-pour-le-template/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 20:13:00 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[create]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=52</guid>
		<description><![CDATA[Notre blog affiche bien notre contenu, mais on doit actuellement coder notre code HTML dans chaque vue. A ce stade, on pourrait s&#8217;en contenter, mais comme nous allons avoir plusieurs pages, cela n&#8217;est pas viable. Il nous faut donc un template. La création du template nous permettra de ne pas répéter le code pour chaque nouveau contenu et de changer notre mise en plage simplement en modifiant un seul fichier. La solution existe : le Zend_Layout. Pour cet exemple, j&#8217;ai préparé un fichier Zip, contenant un template html. Je me suis inspiré du site www.alsacreations.com, qui vous propose plusieurs modèles prêts à l&#8217;emploi. Vous pouvez accéder à tous les templates d&#8217;alsacréations sur cette page : http://www.alsacreations.com/static/gabarits/liste.html. Le fichier Zip que je vous [...]]]></description>
			<content:encoded><![CDATA[<p>Notre blog affiche bien notre contenu, mais on doit actuellement coder notre code HTML dans chaque vue. A ce stade, on pourrait s&#8217;en contenter, mais comme nous allons avoir plusieurs pages, cela n&#8217;est pas viable. Il nous faut donc un template.  La création du template nous permettra de ne pas répéter le code pour chaque nouveau contenu et de changer notre mise en plage simplement en modifiant un seul fichier.</p>
<p>La solution existe : le <strong>Zend_Layout</strong>.</p>
<p>Pour cet exemple, j&#8217;ai préparé un fichier Zip, contenant un template html. Je me suis inspiré du site <a href="http://www.alsacreations.com/static/gabarits/liste.html">www.alsacreations.com</a>, qui vous propose plusieurs modèles prêts à l&#8217;emploi. Vous pouvez accéder à tous les templates d&#8217;alsacréations sur cette page : <a href="http://www.alsacreations.com/static/gabarits/liste.html">http://www.alsacreations.com/static/gabarits/liste.html</a>.</p>
<p><a href="/public/jean/tuto_zf/_article_3.zip">Le fichier Zip que je vous ai préparé et que vous pouvez télécharger ici</a>, contient donc un fichier phtml, et 2 fichiers CSS.</p>
<h2>1. Mise en place des fichiers :</h2>
<p>Dans le répertoire public, créer un répertoire <strong>css</strong> et y déposer les 2 fichiers Css.</p>
<p>Dans le répertoire application, créer le répertoire <strong>layouts</strong> et <strong>scripts</strong>. copier le fichier layout.phtml.</p>
<p>Par défaut, le Zend_Layout utilisera ce fichier pour rendre nos vues.</p>
<h2>2. Configurer le Zend_Layout</h2>
<p>Ajouter le code suivant dans application/configs/application.ini :</p>
<pre class="brush:php">resources.layout.layoutPath = APPLICATION_PATH . "/layouts/scripts"
resources.view[] =
resources.view.encoding = "UTF-8"</pre>
<p>Dans le fichier template, vous trouverez ce code :</p>
<pre class="brush:html">
<div id="contenu">
    content; ?&gt;</div>
</pre>
<p>Cela permet de rendre le contenu de notre vue à cette endroit.</p>
<h2>3. Modifier notre fichier de vue</h2>
<p>Nous pouvons maintenant supprimer de ce fichier (application/views/scripts/index/index.phtml) tout le code html de la page, et ne garder que ceci :</p>
<pre class="brush: php">url(array('controller'=&gt;'articles', 'action' =&gt;'detail', 'id'=&gt;$row-&gt;art_id ));
?&gt;</pre>
<pre lang="enc__php">entries AS $row) {
$lien = $this-&gt;url(array('controller'=&gt;'articles', 'action' =&gt; 'detail', 'id'=&gt;$row-&gt;art_id ));
?&gt;
<div class="article">
<h2><a href="&lt;?= $lien; ?&gt;">art_titre; ?&gt;</a></h2>

<span class="date">art_date; ?&gt; </span>

art_chapeau ?&gt;</div>
</pre>
<pre class="brush: php">entries AS $row) {
$lien = $this-&gt;url(array('controller'=&gt;'articles', 'action' =&gt; 'detail', 'id'=&gt;$row-&gt;art_id ));
?&gt;
<div class="»article">
<h2><a href="&lt;?= $lien; ?&gt;">art_titre; ?&gt;</a></h2>

<span class="date">art_date; ?&gt; </span>

art_chapeau ?&gt;</div>
</pre>
<blockquote>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
<p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="color: #b1b100;">foreach</span><span style="color: #009900;">(</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">entries</span> <span style="color: #b1b100;">AS</span> <span style="color: #000088;">$row</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></span></p>
<p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="color: #000088;">$lien</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">url</span><span style="color: #009900;">(</span><span style="color: #990000;">array</span><span style="color: #009900;">(</span><span>&#8216;controller&#8217;</span><span style="color: #339933;">=&gt;</span><span>&#8216;articles&#8217;</span><span style="color: #339933;">,</span> <span>&#8216;action&#8217;</span> <span style="color: #339933;">=&gt;</span> <span>&#8216;detail&#8217;</span><span style="color: #339933;">,</span> <span>&#8216;id&#8217;</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_id</span> <span style="color: #009900;">)</span><span style="color: #009900;">)</span>;</span><br />
<strong>?&gt;</strong><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;div class=&#8221;article&#8221;&gt;</span><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;h2&gt;&lt;a href=&#8221;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$lien</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&#8220;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_titre</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/h2&gt;</span></p>
<p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;span class=&#8221;date&#8221;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_date</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/span&gt;</span></p>
<p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;p class=&#8221;chapeau&#8221;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_chapeau</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/p&gt;</span><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;/div&gt;</span><br />
<strong>&lt;?php</strong><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #009900;">}</span><br />
<strong>?&gt;</strong></p></blockquote>
<p>Il faut faire la même chose pour le fichier de détail (application/views/scripts/articles/detail.phtml) :</p>
<blockquote><p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;div class=&#8221;article_detail&#8221;&gt;</span></p>
<p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_titre</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;</span></p>
<p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;span class=&#8221;date&#8221;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_date</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/span&gt;</span><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;p class=&#8221;chapeau&#8221;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_chapeau</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/p&gt;</span><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;p class=&#8221;corps&#8221;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_contenu</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/p&gt;</span><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;/div&gt;</span></p></blockquote>
<h2>4. Rendons ces menus dynamiques</h2>
<p>Dans le template, vous pouvez trouver ce code :</p>
<blockquote><p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;">&lt;div id=&#8221;navigation&#8221;&gt;</span><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">action</span><span style="color: #009900;">(</span><span>&#8216;index&#8217;</span><span style="color: #339933;">,</span> <span>&#8216;menu&#8217;</span><span style="color: #009900;">)</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">action</span><span style="color: #009900;">(</span><span>&#8216;categories&#8217;</span><span style="color: #339933;">,</span> <span>&#8216;menu&#8217;</span><span style="color: #009900;">)</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span></span></p>
<p><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="color: #000000; font-weight: bold;"><span style="font-weight: normal;">&lt;/div&gt;</span></span></span></p></blockquote>
<p>Comme ces menus sont amenés à être modifié et dynamique pour les catégories, nous allons utiliser un controleur menu et 2 actions :  index et categories.</p>
<p>Exécuter ces commandes à la racine du blog, en ligne de commande :</p>
<pre class="php php" style="font-family: inherit;">zf create controller menu
zf create action categories menu</pre>
<blockquote><p>zf create controller menu<br />
zf create action categories menu</p></blockquote>
<p>Pour cette exemple, nous allons laisser du code html dans ces 2 vues, mais nous les modifierons plus tard pour les rendre dynamique, notamment pour afficher la liste des catégories.</p>
<p>Dans /application/views/scripts/menu/index.phtml, ajoutez ce code :</p>
<blockquote>
<div id="_mcePaste">&lt;ul&gt;</div>
<div id="_mcePaste">&lt;li&gt;&lt;a href=&#8221;/&#8221;&gt;Accueil&lt;/a&gt;&lt;/li&gt;</div>
<div id="_mcePaste">&lt;li&gt;&lt;a href=&#8221;/auteurs/&#8221;&gt;Auteurs&lt;/a&gt;&lt;/li&gt;</div>
<div id="_mcePaste">&lt;li&gt;&lt;a href=&#8221;/historique/&#8221;&gt;Historique&lt;/a&gt;&lt;/li&gt;</div>
<div id="_mcePaste">&lt;/ul&gt;</div>
</blockquote>
<p>et dans /application/views/scripts/menu/categories.phtml :</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #339933;">&lt;</span>h3<span style="color: #339933;">&gt;</span>Catégories<span style="color: #339933;">&lt;/</span>h3<span style="color: #339933;">&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">"/categorie/1/"</span><span style="color: #339933;">&gt;</span>Catégorie <span style="color: #cc66cc;">1</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">"/categorie/2/"</span><span style="color: #339933;">&gt;</span>Catégorie <span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">"/categorie/3/"</span><span style="color: #339933;">&gt;</span>Catégorie <span style="color: #cc66cc;">3</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">"/categorie/4/"</span><span style="color: #339933;">&gt;</span>Catégorie <span style="color: #cc66cc;">4</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">"/categorie/5/"</span><span style="color: #339933;">&gt;</span>Catégorie <span style="color: #cc66cc;">5</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span></div>
</li>
</ol>
</pre>
<h2>5. Résultat</h2>
<p>Retournons maintenant sur notre page index, et observons le résultat :</p>
<p><img style="display: block; margin: 0 auto;" title="screenshot_home.png, sept. 2009" src="/public/jean/tuto_zf/.screenshot_home_m.jpg" alt="screenshot_home.png" /></p>
<p>c&#8217;est quand même plus sympa, non ?</p>
<h3>A voir ou revoir :</h3>
<ul>
<li>Article 1 : <a href="/post/2009/05/23/Un-blog-en-Zend-Framework-Etape-1-Zend-Tool">Mise en place et Zend_Tool</a></li>
<li>Article 2 : <a href="/post/2009/08/25/Blog-en-ZF-etape-2-La-base-de-donnees-et-le-premier-affichage">La base de données</a></li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2009/09/11/blog-en-zf-etape-3-utilisation-du-zend_layout-pour-le-template/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Blog en ZF – étape 2 : La base de données et le premier affichage</title>
		<link>http://blog.netinfluence.com/2009/08/25/blog-en-zf-etape-2-la-base-de-donnees-et-le-premier-affichage/</link>
		<comments>http://blog.netinfluence.com/2009/08/25/blog-en-zf-etape-2-la-base-de-donnees-et-le-premier-affichage/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 21:27:00 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[create]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=51</guid>
		<description><![CDATA[Après avoir installé correctement notre Zend Framework, nous allons passer du coté de la base de données. Pour mettre en place notre blog, nous allons commencé par créer 4 tables : Table &#8220;Articles&#8221; Un article sera composé d&#8217;un titre, d&#8217;un chapeau, du texte en lui-même, la date, l&#8217;auteur et un flag indiquant que l&#8217;article est en ligne. Table &#8220;Categories&#8221; Cette table contient le nom de la catégorie, et un nom d&#8217;url propre. La catégorie &#8220;Zend FrameWork&#8221; aura l&#8217;url zend_framework. Table &#8220;Auteurs&#8221; le nom, le prénom, l&#8217;email de l&#8217;auteur, ainsi qu&#8217;un champ url pour avoir des url propre. Table &#8220;Commentaires&#8221; Les commentaires à nos articles, avec le nom, l&#8217;email, le commentaire en lui même, la date et un champ de validation pour [...]]]></description>
			<content:encoded><![CDATA[<p>Après avoir installé correctement notre Zend Framework, nous allons passer du coté de la base de données.</p>
<p>Pour mettre en place notre blog, nous allons commencé par créer 4 tables :</p>
<p><strong>Table &#8220;Articles&#8221;</strong><br />
Un article sera composé d&#8217;un titre, d&#8217;un chapeau, du texte en lui-même, la date, l&#8217;auteur et un flag indiquant que l&#8217;article est en ligne.</p>
<p><strong>Table &#8220;Categories&#8221;</strong><br />
Cette table contient le nom de la catégorie, et un nom d&#8217;url propre. La catégorie &#8220;Zend FrameWork&#8221; aura l&#8217;url zend_framework.</p>
<p><strong>Table &#8220;Auteurs&#8221;</strong><br />
le nom, le prénom, l&#8217;email de l&#8217;auteur, ainsi qu&#8217;un champ url pour avoir des url propre.</p>
<p><strong>Table &#8220;Commentaires&#8221;</strong><br />
Les commentaires à nos articles, avec le nom, l&#8217;email, le commentaire en lui même, la date et un champ de validation pour permettre la modération de nos commentaires</p>
<p>Voici le schéma de notre base de données. <img style="display: block; margin: 0 auto;" title="MCD Blog, août 2009" src="/public/jean/tuto_zf/mcd_blog.png" alt="MCD Blog" /> Celle ci est volontairement simplifiée, mais suffisamment complète pour voir les différents aspects du Framework.</p>
<p>Je vous laisse mettre votre propre contenu pour vos tests. Voici un fichier pour créer cette base, et aussi mettre du contenu pour commencer. <a href="/public/jean/tuto_zf/blog_sql.zip">Le fichier sql.</a></p>
<p>Maintenant que notre base est mise en place, avec du contenu pour faire nos premiers tests, il est temps de passer au choses sérieuses : l&#8217;affichage de nos articles.</p>
<h3>1- Configuration de l&#8217;accès MySql</h3>
<p>Editer votre fichier <em>application/configs/application.ini</em></p>
<p>Après la ligne : resources.frontController.controllerDirectory = APPLICATION_PATH &#8220;/controllers&#8221;</p>
<p>Ajouter le code suivant :</p>
<p>[php]<br />
// Connexion a la base de donnees<br />
resources.db.adapter = &quot;pdo_mysql&quot;<br />
resources.db.params.host = &quot;localhost&quot;<br />
resources.db.params.username = &quot;root&quot;<br />
resources.db.params.password = &quot;password&quot;<br />
resources.db.params.dbname = &quot;blog&quot;<br />
resources.db.params.driver_options.1002 = &quot;SET NAMES utf8&quot;<br />
resources.db.isDefaultTableAdapter = true<br />
[/php]</p>
<p>Cela va indiquer au Zend FrameWork que nous allons nous connecter à la base &#8220;blog&#8221; avec le user &#8220;root&#8221;, via une connexion &#8220;PDO&#8221;.</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">resources<span style="color: #339933;">.</span>db<span style="color: #339933;">.</span>params<span style="color: #339933;">.</span>driver_options<span style="color: #339933;">.</span>1002 <span style="color: #339933;">=</span> <span style="color: #0000ff;">"SET NAMES utf8"</span></div>
</li>
</ol>
</pre>
<p>Cette ligne va nous permettre de gérer correctement le contenu Utf8.</p>
<p>La dernière ligne nous permet d&#8217;indiquer qu&#8217;il s&#8217;agit de notre adaptateur par défaut. Comme nous n&#8217;avons qu&#8217;une seule base de données, cela nous éviteras de spécifier le connecteur.</p>
<h3>2 &#8211; Autoloader</h3>
<p>Dans le fichier Bootstrap.php, il faut configurer notre autoloader, pour que ZendFrameWork trouve nos classes tout seul.</p>
<p>Ajouter la méthode _initAutoload() comme cela :</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">class</span> Bootstrap <span style="color: #000000; font-weight: bold;">extends</span> Zend_Application_Bootstrap_Bootstrap</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	protected <span style="color: #000000; font-weight: bold;">function</span> _initAutoload<span style="color: #009900;">(</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    <span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    	<span style="color: #000088;">$autoloader</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Application_Module_Autoloader<span style="color: #009900;">(</span><span style="color: #990000;">array</span><span style="color: #009900;">(</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">            <span>'namespace'</span> <span style="color: #339933;">=&gt;</span> <span>''</span><span style="color: #339933;">,</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">            <span>'basePath'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">(</span><span style="color: #000000; font-weight: bold;">__FILE__</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        <span style="color: #009900;">)</span><span style="color: #009900;">)</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$autoloader</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    <span style="color: #009900;">}</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #009900;">}</span></div>
</li>
</ol>
</pre>
<h3>3 &#8211; Db Oject pour Articles</h3>
<p>Afin d&#8217;accéder à nos contenus, nous allons créer des classes qui vont étendre le Zend_Db_Table_Abstract. Cet objet nous permet d&#8217;accéder facilement à notre table en nous fournissant des méthodes standards pour effectuer des recherches ou update.</p>
<p>La première classe sera la classe Articles.</p>
<p>Dans le répertoires models/DbTable ( créer le répertoire s&#8217;il n&#8217;existe pas), nous créons la classe <strong>Articles.php</strong></p>
<p>Le contenu de cette classe :</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #0000ff; font-style: italic;">/**</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #0000ff; font-style: italic;"> * This is the DbTable class for the artices table.</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #0000ff; font-style: italic;"> */</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">class</span> Model_DbTable_Articles <span style="color: #000000; font-weight: bold;">extends</span> Zend_Db_Table_Abstract</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    <span style="color: #0000ff; font-style: italic;">/** Table name */</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    protected <span style="color: #000088;">$_name</span>    <span style="color: #339933;">=</span> <span>'articles'</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    protected <span style="color: #000088;">$_primary</span> <span style="color: #339933;">=</span> <span>'art_id'</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #009900;">}</span></div>
</li>
</ol>
</pre>
<p>Comme vous pouvez le constater, cette classe est très simple. On définit simplement le nom de la table et le nom de notre clé primaire.</p>
<h3>4 &#8211; Afficher la liste des articles</h3>
<p>Il est temps d&#8217;afficher la liste de nos articles sur notre page d&#8217;acceuil.</p>
<p>La première chose à faire est de modifier notre controller &#8220;indexController.php&#8221;</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> indexAction<span style="color: #009900;">(</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    <span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        <span style="color: #666666; font-style: italic;">// action body</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">       	<span style="color: #000088;">$articles</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Model_DbTable_Articles<span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"> 		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">entries</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$articles</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchAll</span><span style="color: #009900;">(</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"> 										<span style="color: #000088;">$articles</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">select</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"> 										<span style="color: #339933;">-&gt;</span><span style="color: #004000;">where</span><span style="color: #009900;">(</span><span>'art_en_ligne = ?'</span><span style="color: #339933;">,</span> <span>'1'</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">                                        <span style="color: #339933;">-&gt;</span><span style="color: #004000;">order</span><span style="color: #009900;">(</span><span>'art_date DESC'</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">                                        <span style="color: #339933;">-&gt;</span><span style="color: #004000;">limit</span><span style="color: #009900;">(</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #800080;">0</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    <span style="color: #009900;">}</span></div>
</li>
</ol>
</pre>
<p>Nous indiquons ici que nous recherchons les articles en ligne, par date de publication. J&#8217;ai pris ici la méthode préconisé dans la documentation, en utilisant l&#8217;objet &#8220;select&#8221;.</p>
<p>Il nous reste plus qu&#8217;à mettre en forme cette affichage dans le fichier <em>application/views/scripts/index/index.phtml</em>. Ce fichier est notre Vue, le V du MVC. Remplacer le contenu de ce fichier par :</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;style&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">h2</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	    color: #91BE3F;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    		margin: 20px 0 10px 0;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    }</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	h2 a</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	    {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	        color: #91BE3F;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	}</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    div.article</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        color: #000;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        width:  600px;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        border-bottom: 1px solid #444444;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    }</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	span.date {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	   color: #000;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">		font-size: 12px;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	}</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;/style&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;div id="welcome"&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    &lt;h1&gt;Bienvenue sur notre Blog&lt;/h1&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;/div&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #b1b100;">foreach</span><span style="color: #009900;">(</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">entries</span> <span style="color: #b1b100;">AS</span> <span style="color: #000088;">$row</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;div class="article"&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">		&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_titre</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">		&lt;span class="date"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_date</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/span&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">		&lt;p class="chapeau"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_chapeau</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/p&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;/div&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #009900;">}</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div>
</li>
</ol>
</pre>
<p>Nous pouvons maintenant voir notre résultat en rafraichissant notre navigateur :</p>
<p><img style="display: block; margin: 0 auto;" title="Index du blog, août 2009" src="/public/jean/tuto_zf/resultat_index_blog.jpg" alt="Index du blog" /></p>
<p>Simple non ?</p>
<h3>5 &#8211; Faire un lien sur le détail d&#8217;un article.</h3>
<p>Nous n&#8217;allons pas nous arrêter en aussi bon chemin, nous allons faire un lien sur le titre de nos articles pour afficher le détail de celui ci.</p>
<p>Dans notre boucle d&#8217;affichage, ajoutons un lien sur le controller articles et sur l&#8217;action detail, en passant le parametre id, contenant l&#8217;id de l&#8217;article à afficher.</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">foreach($this-&gt;entries AS $row) {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	$lien =  $this-&gt;url(array('controller'=&gt;'articles', 'action' =&gt; 'detail', 'id'=&gt;$row-&gt;art_id ));</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">?&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;div class="article"&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">		&lt;h2&gt;&lt;a href="<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$lien</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_titre</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/h2&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">		&lt;span class="date"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_date</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/span&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">		&lt;p class="chapeau"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_chapeau</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/p&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;/div&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #009900;">}</span></div>
</li>
</ol>
</pre>
<h2>6 &#8211; Afficher le detail de l&#8217;article</h2>
<p>Dans le controlleur :<em> /application/controllers/ArticlesControllers</em>, nous ajoutons ceci à la méthode &#8220;detailAction&#8221;, afin de rechercher le detail d&#8217;un article en ligne :</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> detailAction<span style="color: #009900;">(</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    <span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">       <span style="color: #666666; font-style: italic;">// Id of the Farm</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        <span style="color: #000088;">$articleId</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRequest</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getParam</span><span style="color: #009900;">(</span><span>'id'</span><span style="color: #009900;">)</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #000088;">$articleId</span> <span style="color: #339933;">!=</span> <span>''</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        	<span style="color: #000088;">$articles</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Model_DbTable_Articles<span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"> 			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$articles</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchRow</span><span style="color: #009900;">(</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"> 										<span style="color: #000088;">$articles</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">select</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"> 										<span style="color: #339933;">-&gt;</span><span style="color: #004000;">where</span><span style="color: #009900;">(</span><span>'art_en_ligne = ?'</span><span style="color: #339933;">,</span> <span>'1'</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;"> 										<span style="color: #339933;">-&gt;</span><span style="color: #004000;">where</span><span style="color: #009900;">(</span><span>'art_id = ?'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$articleId</span><span style="color: #009900;">)</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">										<span style="color: #009900;">)</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        <span style="color: #009900;">}</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">{</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">            <span style="color: #000088;">$articleId</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        <span style="color: #009900;">}</span></div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    <span style="color: #009900;">}</span></div>
</li>
</ol>
</pre>
<p>et dans le fichier application/views/scripts/articles/detail.phtml :</p>
<pre class="php php" style="font-family: inherit;">
<ol>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;style&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    h1</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        color: #91BE3F;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    	margin: 20px 0 10px 0;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    }</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    div.article_detail</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        color: #000;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        width:  600px;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">        border-bottom: 1px solid #444444;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    }</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    p.chapeau {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">    	font-style: italic;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	}</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	span.date {</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	    color: #000;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	    font-size: 12px;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	}</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;/style&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;div class="article_detail"&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_titre</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;span class="date"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_date</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/span&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;p class="chapeau"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_chapeau</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/p&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">	&lt;p class="corps"&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">art_contenu</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/p&gt;</div>
</li>
<li>
<div style="font-family: monospace; font-weight: normal; font-style: normal; margin: 0; padding: 0; background: inherit;">&lt;/div&gt;</div>
</li>
</ol>
</pre>
<p>Si nous cliquons sur le titre de notre article, nous nous retrouvons maintenant sur le détail de l&#8217;article.</p>
<h3>La suite&#8230;</h3>
<p>Dans le prochain article, nous allons voir les points suivants :</p>
<ul>
<li>La mise en forme avec le Zend Layout</li>
<li>Les liaisons entre nos tables, via le ZendDb</li>
<li>Les formulaires</li>
<li>La gestion des droits avec les ACLs pour la partie administration.</li>
<li>Personnaliser et mettre en place le routing des urls.</li>
</ul>
<p>N&#8217;hésitez pas à me dire si vous voulez aborder certains points en particulier.</p>
<h3>A voir ou revoir :</h3>
<ul>
<li>Article 1 : <a href="/post/2009/05/23/Un-blog-en-Zend-Framework-Etape-1-Zend-Tool">Mise en place et Zend_Tool</a></li>
<li>Article 3 : <a href="/post/2009/09/11/Blog-en-ZF-etape-3-Utilisation-du-Zend_Layout-pour-le-template">Zend_Layout et template</a></li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2009/08/25/blog-en-zf-etape-2-la-base-de-donnees-et-le-premier-affichage/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Un blog en Zend Framework : Etape 1 =&gt; Zend Tool</title>
		<link>http://blog.netinfluence.com/2009/05/24/un-blog-en-zend-framework-etape-1-zend-tool/</link>
		<comments>http://blog.netinfluence.com/2009/05/24/un-blog-en-zend-framework-etape-1-zend-tool/#comments</comments>
		<pubDate>Sun, 24 May 2009 21:15:00 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[create]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=43</guid>
		<description><![CDATA[Le Zend Framework, depuis sa version 1.8, a apporté une nouvelle fonctionnalité, le ZendTool. Cela permet de nous aider dans la mise en route d&#8217;un projet Zend Framework. Pour cette série d&#8217;article, je vais prendre comme exemple la création d&#8217;un blog. Il ne s&#8217;agit pas de concurrencer WordPress ou dotclear, ce blog aura des fonctionnalités simples, comme l&#8217;affichage des articles, l&#8217;affichage par catégorie d&#8217;article et par auteur. Configuration Je pars du principe que votre Zend Server est correctement installé. Le répertoire d&#8217;installtion est /usr/local/zend. Création d&#8217;un lien symbolique sur le script zf.sh sudo ln -s /usr/local/zend/share/ZendFramework/bin/zf.sh /usr/bin/zf Création d&#8217;un projet Dans un premier temps, il faut se placer dans le répertoire destination. Dans mon cas, je me suis positionné dans [...]]]></description>
			<content:encoded><![CDATA[<p>Le Zend Framework, depuis sa version 1.8, a apporté une nouvelle fonctionnalité, le ZendTool. Cela permet de nous aider dans la mise en route d&#8217;un projet Zend Framework.</p>
<p>Pour cette série d&#8217;article, je vais prendre comme exemple la création d&#8217;un blog. Il ne s&#8217;agit pas de concurrencer WordPress ou dotclear, ce blog aura des fonctionnalités simples, comme l&#8217;affichage des articles, l&#8217;affichage par catégorie d&#8217;article et par auteur.</p>
<h3>Configuration</h3>
<p>Je pars du principe que votre Zend Server est correctement installé. Le répertoire d&#8217;installtion est /usr/local/zend.</p>
<p>Création d&#8217;un lien symbolique sur le script zf.sh</p>
<pre>sudo ln -s /usr/local/zend/share/ZendFramework/bin/zf.sh /usr/bin/zf</pre>
<h3>Création d&#8217;un projet</h3>
<p>Dans un premier temps, il faut se placer dans le répertoire destination. Dans mon cas, je me suis positionné dans mon répertoire Sites, à savoir /Users/jean/Sites</p>
<pre>zf create project blog</pre>
<p><img style="float: left; margin: 0 1em 1em 0;" title="Structure Zend FrameWork, mai 2009" src="/public/jean/tuto_zf/structure_zf.png" alt="Structure Zend FrameWork" /> Nous retrouvons l&#8217;architecture sandard du Zend Framework, avec 3 répertoires principaux : application, library et public.</p>
<h4>public</h4>
<p>Ce répertoire est le répertoire de départ de notre site. Il contient uniquement le fichier index.php et .htaccess. C&#8217;est ici que nous ajouterons nos fichiers css, javascript et images.</p>
<h4>library</h4>
<p>Ce répertoire contiendra vos classes et éventuellement le répertoire du Zend Framework s&#8217;il n&#8217;est pas configuré dans votre include_path.</p>
<h4>application</h4>
<p>C&#8217;est le coeur de notre application. Il est composé d&#8217;un fichier Bootstrap.php et de 4 répertoires : vos controlleurs (controllers), vos modèles (models), vos vues (views) et le répertoire de configuration (configs).</p>
<h3>Configuration du serveur Apache</h3>
<p>Pour faire fonctionner le site, il faut créer un virtual host dans notre serveur Apache, pour pointer sur notre répertoire public ajouter cela dans le fichier : /usr/local/zend/apache2/conf/extra/httpd-vhosts.conf</p>
<pre>&lt;virtualhost *:80&gt; DocumentRoot /Users/jean/Sites/blog/public ServerName blog &lt;/virtualhost&gt;</pre>
<p>ainsi que cette ligne dans votre fichier /etc/hosts</p>
<pre>127.0.0.1 blog</pre>
<p>redémarrage du serveur apache :</p>
<pre>sudo /usr/local/zend/bin/apachectl restart</pre>
<p>ouvrir la page http://blog/ dans votre navigateur, et vous devez voir cette page : <img style="display: block; margin: 0 auto;" title="ecran OK, mai 2009" src="/public/jean/tuto_zf/.ecran_ok_s.jpg" alt="ecran OK" /> Félicitation, votre projet est correctement configuré.</p>
<h3>Création de nos contrôleurs</h3>
<p>Pour cette exemple, je vais mette en place 2 contrôleurs : <strong>articles</strong>, pour l&#8217;affichage des articles, avec un affichage par auteur et catégorie, ainsi que <strong>auteurs</strong>, pour afficher la liste des auteurs et la page détail de l&#8217;auteur.</p>
<h4>Contrôleur articles</h4>
<p>Nous allons créer les actions suivantes, sauf l&#8217;action index, qui est créée directement avec le contrôleur :</p>
<ul>
<li>index : affichage des derniers articles, juste le teaser</li>
<li>categorie: pour l&#8217;affichage des articles pour une catégorie</li>
<li>auteur: affichage des articles pour un auteur</li>
<li>detail: affichage de l&#8217;article complet</li>
</ul>
<p>Voici les commandes  pour créér ce contrôleur, ainsi que les actions correspondantes :</p>
<pre>zf create controller articles zf create action categorie articles zf create action auteur articles zf create action detail articles</pre>
<h4>Contrôleur auteurs</h4>
<p>Il ne contient que les actions index et detail.</p>
<pre>zf create controller auteurs zf create action detail auteurs</pre>
<p>Comme on peut le voir dans l&#8217;image ci dessous, les controlleurs et vues sont automatiquement générés. <img style="display: block; margin: 0 auto;" title="structure-after.png, mai 2009" src="/public/jean/tuto_zf/structure-after.png" alt="structure-after.png" /></p>
<h3>Test</h3>
<p>Nous allons maintenant vérifier que tout cela fonctionne, en testant les urls suivantes :</p>
<ul>
<li>http://blog/articles</li>
<li>http://blog/articles/detail</li>
<li>http://blog/articles/categorie</li>
<li>http://blog/articles/auteur</li>
<li>http://blog/auteurs</li>
<li>http://blog/auteurs/detail</li>
</ul>
<h3>La suite</h3>
<p>Pour l&#8217;instant, ces pages ne contiennent pas grand chose, mais nous allons rapidement y remédier.</p>
<p>Dans le prochain billet, nous allons mettre en place la base de données, l&#8217;utilisation de DbTable et mettre en place l&#8217;affichage de ces données.</p>
<h3>A voir ou revoir :</h3>
<ul>
<li>Article 2 : <a href="/post/2009/08/25/Blog-en-ZF-etape-2-La-base-de-donnees-et-le-premier-affichage">La base de données</a></li>
<li>Article 3 : <a href="/post/2009/09/11/Blog-en-ZF-etape-3-Utilisation-du-Zend_Layout-pour-le-template">Zend_Layout et template</a></li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2009/05/24/un-blog-en-zend-framework-etape-1-zend-tool/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Zend Server, l’environnement de développement parfait pour Mac.</title>
		<link>http://blog.netinfluence.com/2009/05/23/zend-server-l-environnement-de-developpement-parfait-pour-mac/</link>
		<comments>http://blog.netinfluence.com/2009/05/23/zend-server-l-environnement-de-developpement-parfait-pour-mac/#comments</comments>
		<pubDate>Sat, 23 May 2009 14:25:00 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[create]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend Server]]></category>

		<guid isPermaLink="false">http://blog.netinfluence.ch/?p=42</guid>
		<description><![CDATA[Bien que le Mac soit pour moi une des meilleures machines pour le développement, la configuration de PHP relevait plus du parcours du combattant que de la promenade de santé. Je ne parle pas de la configuration par défaut, mais d&#8217;une installation spécifique. Php5 est inclus dans Leopard, mais ses fonctionnalités ne sont pas complètes. Par exemple, si vous avez besoin de certaines librairies, comme la librairie graphique GD2 ou encore les connexions PDO, il faut en passer par une recompilation, ce qui n&#8217;est pas le plus simple. Zend nous propose maintenant un serveur d&#8217;applications Web, le Zend Server. Il existe en 2 versions, une version gratuite, le Zend Server Community Edition et une version payante, le Zend Server. 1. [...]]]></description>
			<content:encoded><![CDATA[<p>Bien que le Mac soit pour moi une des meilleures machines pour le développement, la configuration de PHP relevait plus du parcours du combattant que de la promenade de santé. Je ne parle pas de la configuration par défaut, mais d&#8217;une installation spécifique.</p>
<p>Php5 est inclus dans Leopard, mais ses fonctionnalités ne sont pas complètes. Par exemple,  si vous avez besoin de certaines librairies, comme la librairie graphique GD2 ou encore les connexions PDO, il faut en passer par une recompilation, ce qui n&#8217;est pas le plus simple.</p>
<p>Zend nous propose maintenant un serveur d&#8217;applications Web, le <strong>Zend Server</strong>. Il existe en 2 versions, une version gratuite, le Zend Server Community Edition et une version payante, le Zend Server.</p>
<h3>1. Installation</h3>
<p>Pour mettre en place cet environnement de développement, il faut commencer par downloader la version 4.0.2 du Zend Server. Pour cela, rendez vous sur le site de Zend : <a hreflang="fr" href="http://www.zend.com/fr/products/server/downloads">http://www.zend.com/fr/products/server/downloads</a></p>
<p>Ensuite, il suffit de suivre la procédure d&#8217;installation. Par défaut, l&#8217;installation sera faite dans : /usr/local/zend/.</p>
<p>Par rapport aux anciennes versions, le Zend Server est maintenant installé avec un serveur MySql et phpMyAdmin. On se retrouve avec un environnement  prêt à l&#8217;usage.</p>
<h3>2. Administration du Zend Server</h3>
<p>Lors du premier accès à l&#8217;interface d&#8217;administration, qui se trouve à l&#8217;url http://localhost:10081/, un mot de passe  devra être défini. C&#8217;est via cette interface, que vous allez contrôler votre installation Php. Cette interface est composé de plusieurs onglets, dont 2 principaux : <img style="display: block; margin: 0 auto;" title="menu.png, mai 2009" src="/public/jean/zend_server/.menu_m.jpg" alt="menu.png" /></p>
<h4>L&#8217;onglet Monitor</h4>
<p>Cet onglet vous donne accès au Dashboard, dans lequel vous pourrez retrouver les liens sur PhpMyAdmin par exemple. On a aussi un accès au phpinfo et aux différents logs.</p>
<h4>L&#8217;Onglet Server Setup.</h4>
<h5>a. Extension</h5>
<p>Le sous menu Extensions va nous permettre de configurer les extensions Php, simplement en indiquant que l&#8217;on désire activer ou non une extension. <img style="display: block; margin: 0 auto;" title="extensions.png, mai 2009" src="/public/jean/zend_server/.extensions_m.jpg" alt="extensions.png" /></p>
<h5>b. Directives</h5>
<p>Le sous menu Directives permet l&#8217;édition des directives. Oublier les modifications en ligne de commande de votre fichier php.ini, l&#8217;édition de ces valeurs se fait simplement via l&#8217;interface. <img style="display: block; margin: 0 auto;" title="directives.png, mai 2009" src="/public/jean/zend_server/.directives_m.jpg" alt="directives.png" /></p>
<h5>c. Debugger</h5>
<p>Le sous menu Debugger permet de configurer le debugger pour les clients Zend Studio.</p>
<p>Un bouton en bas de la page va permettre le redémarrage de Php directement depuis cette interface.</p>
<h3>3. Partie FrontEnd</h3>
<p>On accède via http://localhost:10088/ au site par défaut. On se retrouve alors avec un PHP configuré avec Pdo et GD2 parfaitement opérationnel. De plus, le Zend Framework se trouve lui aussi installé, dans sa version 1.8.0.</p>
<p>Pour garder la même configuration que mon environnement actuel, j&#8217;ai créé des Vhosts pointant sur mon répertoire Sites. Il est aussi possible d&#8217;utiliser le port 80, en désactivant le partage web de Mac. il suffit de changer les numéros de port dans les fichiers de configuration d&#8217;Apache.</p>
<h3>Conclusion</h3>
<p>Après les galères de la recompilation de Php, j&#8217;avoue ne plus pouvoir me passer de ce Zend server. Il m&#8217;apporte un confort d&#8217;installation remarquable.</p>
<p>Mon mac se retrouve maintenant avec un environnement de développement parfaitement opérationnel, pour mes développement Zend Framework.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.netinfluence.com/2009/05/23/zend-server-l-environnement-de-developpement-parfait-pour-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

