<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2frenchfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Renoir Boulanger</title>
	
	<link>http://renoirboulanger.com</link>
	<description>Un geek social et Linuxien de nature</description>
	<lastBuildDate>Mon, 01 Apr 2013 16:13:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RenoirBoulanger" /><feedburner:info uri="renoirboulanger" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://renoirboulanger.com</link><url>http://renoirboulanger.com/wp-content/logo.png</url><title>Renoir Boulanger, Webmestre</title></image><feedburner:feedFlare href="http://add.my.yahoo.com/content?lg=fr&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/bn/intatm_fr_1.gif">Subscribe with Mon Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/RenoirBoulanger" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FRenoirBoulanger" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>Encapsulate a LDAP DN string using Arrays in PHP</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/8iGGR24sRww/</link>
		<comments>http://renoirboulanger.com/blog/2013/04/encapsulate-a-ldap-dn-string-using-an-array-in-php/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 15:02:15 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=5006</guid>
		<description><![CDATA[<p>While I was trying to create a way to fork logic from an elaborate LDAP DN string from users logging in a web application, I realized that there was not yet specific PHP helpers to do so, I realized that there was not small wrapper to work it. I then decided to contribute it and here is the resulting wrapper.</p><p>The post <a href="http://renoirboulanger.com/blog/2013/04/encapsulate-a-ldap-dn-string-using-an-array-in-php/">Encapsulate a LDAP DN string using Arrays in PHP</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>During a project I had to read and fork logic coming from an LDAP server. Since the string can be very different for each user and their affiliations, we know that some sub-parts can be used to figure out what is required to adjust from it.</p>
<p>My snippet&#8217;s purpose is to get the capability to get a subset of the string, assuming that the first index is more precise than the last, but concatenated would give the full context.</p>
<p>While I was trying to create the functionality in PHP, I realized that there was not small wrapper to work it. I then decided to contribute it as <a title="Parse, and format a DN string to Array " href="http://www.php.net/manual/en/function.ldap-explode-dn.php#109482" target="_blank">a comment on the PHP.net website</a>.</p>
<p><span id="more-5006"></span></p>
<p>&nbsp;</p>
<p>­</p>
<h3>The basics</h3>
<p>As a reminder, an LDAP DN string looks like the following:</p>
<pre>CN=username,OU=UNITNAME,OU=Region,OU=Country,DC=subdomain,DC=domain,DC=com</pre>
<p>In such a string, we get basically everything a user may inherit from:</p>
<ul>
<li>Group assignation</li>
<li>Organization domain (either DNS or Microsoft&#8217;s idea of a &#8220;domain&#8221; (aka. &#8220;Active Directory&#8221;))</li>
<li>etc.</li>
</ul>
<p>The main idea is to deal with different logic based on changes or assignment. The DN has all we need.</p>
<p>&nbsp;</p>
<p>­</p>
<h3>How to use</h3>
<p>Assuming we want to work with changes in the OU field. We could do as:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php 
&nbsp;
<span style="color: #666666; font-style: italic;">// Fictive User object, coming from an ORM entity manager ($em) </span>
<span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$em</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>find<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userId</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// $user instanceof User</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// This is coming from the LDAP</span>
<span style="color: #000088;">$dn</span><span style="color: #339933;">=</span> <span style="color: #0000ff;">'CN=username,OU=UNITNAME,OU=Region,OU=Country,DC=subdomain,DC=domain,DC=com'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$wrapper</span> <span style="color: #339933;">=</span> parseLdapDn<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// We are working with &quot;UNITNAME&quot; but there can be other ones</span>
<span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wrapper</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'OU'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'UNITNAME'</span><span style="color: #339933;">:</span>
        <span style="color: #666666; font-style: italic;">// Specific logic or authorization setters</span>
        <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addRole</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ROLE_UNITNAME'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
      <span style="color: #666666; font-style: italic;">// Default behavior, in case we did not grasp</span>
    <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// And so on...</span></pre></td></tr></table></div>

<p>In this example I added a role using Symfony2&#8242;s method on a Doctrine2 provided object. But you may see other use cases.</p>
<p>&nbsp;</p>
<p>­</p>
<h3>Snippet</h3>
<p><script src="https://gist.github.com/renoirb/3152719.js"></script><br />
I also published it as <a title="Parse, and format a DN string to Array " href="http://www.php.net/manual/en/function.ldap-explode-dn.php#109482" target="_blank">a comment on the PHP.net website</a>.</p>
<p>&nbsp;</p>
<p>­</p>
<h3>That is all folks</h3>
<p>If you have other questions or suggestions, let me know.</p>
<p>The post <a href="http://renoirboulanger.com/blog/2013/04/encapsulate-a-ldap-dn-string-using-an-array-in-php/">Encapsulate a LDAP DN string using Arrays in PHP</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=8iGGR24sRww:CfrbNPaJug0:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=8iGGR24sRww:CfrbNPaJug0:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=8iGGR24sRww:CfrbNPaJug0:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=8iGGR24sRww:CfrbNPaJug0:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=8iGGR24sRww:CfrbNPaJug0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=8iGGR24sRww:CfrbNPaJug0:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2013/04/encapsulate-a-ldap-dn-string-using-an-array-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2013/04/encapsulate-a-ldap-dn-string-using-an-array-in-php/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=encapsulate-a-ldap-dn-string-using-an-array-in-php</feedburner:origLink></item>
		<item>
		<title>Creating and using Javascript events while combining events on two separates behaviors</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/zH1gEUwVMCE/</link>
		<comments>http://renoirboulanger.com/blog/2013/03/creating-and-using-javascript-events-while-combining-events-on-two-separates-behaviors/#comments</comments>
		<pubDate>Sat, 30 Mar 2013 03:42:58 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=4959</guid>
		<description><![CDATA[<p>This is an article I wrote on my new project "HTML and CSS The Right way". I wrote it when I discovered something that chocked me: Did you know that the ‘click’ event is only a string and you can create any event name you may want? Here is an experimentation example.</p><p>The post <a href="http://renoirboulanger.com/blog/2013/03/creating-and-using-javascript-events-while-combining-events-on-two-separates-behaviors/">Creating and using Javascript events while combining events on two separates behaviors</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I discovered something that chocked me: Did you know that the ‘click’ event is only a string and you can create any event name you may want? Here is an experimentation example.</p>
<p>During web development, it often happens you want to attach events handler on something in your page. A common usage could be you want to flip a plus sign to a minus sign when you click on a button.</p>
<pre><code>&lt;a href="/some/url/324" class="flip-icon" data-target="#generated-324"&gt;&lt;i class="icon-plus"&gt;&lt;/i&gt;&lt;/a&gt;</code></pre>
<p>Later in a script you may be compelled to do something similar to the following (assuming you are using jQuery):</p>
<pre>$(document).ready(function(){
// Rest of the document in document.ready
// DO NOT USE AS-IS, SEE LAST EXAMPLE

    $('.flip-icon.).click(function(event){  
        event.preventDefault(); 
        var clicked = $(this);
        var flipElement = clicked.find('i');
        if (flipElement.hasClass('icon-plus')) {
            flipElement.removeClass('icon-plus').addClass('icon-minus');
        } else {
            flipElement.removeClass('icon-minus').addClass('icon-plus');
        }
    });
});</pre>
<p>But what happens if you want to add other events such as, for example, <em>activating an accordion</em>. You may end up with duplicating events and get some collisions.</p>
<p><em>Did you know that the ‘click’ event is only a string and you can create any event name you may want?</em></p>
<p>To describe what I am refering to, I have a add an other behavior that will also, in part, require the previous example.</p>
<p>Imagine we have an accordion managed already grabbing the element’s <code>a[data-target]</code> click event handler.</p>
<pre>$(document).ready(function(){
// Rest of the document in document.ready
// DO NOT USE AS-IS, SEE LAST EXAMPLE

    $('a[data-target]').click(function(event){
        // do the accordion stuff
    });
});</pre>
<p>But, what if for some reason, our page has to reload some sections and our event handler managing the <code>a[data-target]</code> click gets lost</p>
<p>Instead, of creating a click specific event handler (what if we want to change) and be potentially lost with the element to attach event onto.</p>
<p>You can use <a href="http://api.jquery.com/on/">jQuery’s <code>on</code> method</a> and attach an event to the <code>&lt;body&gt;</code>, a safe element that every document has.</p>
<p>Things to note about the <code>on</code> method:</p>
<ul>
<li>First parameter is an event name, can be ANYTHING (yes, you read it), space separated</li>
<li>Second element is on what to listen, can be null</li>
<li>a <code>Function</code> object to handle the event</li>
</ul>
<p>Also, there is nice thing about bubbling.</p>
<p>When an event happens, the event crawls the DOM up to the body (called ‘catch’) then gets back to the triggerer element (called ‘bubbling’) and firing in that order all event handlers.</p>
<p>Knowing all of this now, instead of attaching a single event type handler to a specific element, let’s take advantage of our new knowledge.</p>
<pre>'use strict';
$(document).ready(function(){
// Rest of your document

    // Look at the 'flip-my-icon-event', we just made-up that one. See below.
    $('body').on('click flip-my-icon-event', '.flip-icon', function(){
/* Look here     *************************                                       */
        // Let's put it also in a self-executing anonymous, to isolate scope
        (function(triggered){

            // Same as earlier.
            var clicked = $(this);
            var flipElement = clicked.find('i');
            if (flipElement.hasClass('icon-plus')) {
                flipElement.removeClass('icon-plus').addClass('icon-minus');
            } else {
                flipElement.removeClass('icon-minus').addClass('icon-plus');
            }
            // End same as earlier

        })($(this)); // this fires the self-executing.
    });

    $('body').on('click', 'a[data-target]', function(event){
        event.preventDefault();

        // do the accordion stuff
        var collapsible = $($(this).attr('data-target'));
        if (typeof collapsible.attr('data-collapsible') === 'undefined')  {
            collapsible
                .collapse()
                .attr('data-collapsible', 'applied')
                .on('show', function(){
                    jQuery(this).parent().removeClass('is-hidden');
                })
                .on('hide', function(){
                    jQuery(this).parent().addClass('is-hidden');
                });
        // End do the accordion stuff

        jQuery(this).trigger('click').trigger('flip-my-icon-event');
/* Look here                         *******************************        */
        }
    });
});</pre>
<p>The following works, because of the following trigger html pattern, as from the begining:</p>
<pre><code>&lt;a href="/some/url/324" class="flip-icon" data-target="#generated-324"&gt;&lt;i class="icon-plus"&gt;&lt;/i&gt;&lt;/a&gt;</code></pre>
<p>And of the following:</p>
<ul>
<li>We have an icon for <code>.icon-plus</code> and <code>.icon-minus</code> class names</li>
<li>The <code>a[data-target]</code> attribute has ALSO a <code>.flip-icon</code> class name</li>
<li>The <code>a[data-target]</code> triggers our made-up <code>flip-my-icon-event</code> event to an element that also matches (see the two ‘look here’ comments)</li>
</ul>
<p><em>References</em></p>
<ul>
<li><a href="http://docs.webplatform.org/wiki/tutorials/events_in_javascript"><strong>WPD</strong> Events in Javascript (WebPlatform.org)</a></li>
<li><a href="https://github.com/jquery/jquery/blob/master/src/event.js#L206">jQuery <code>trigger</code> method</a> from the jQuery source</li>
<li><a href="https://github.com/jquery/jquery/blob/master/src/event.js#L715">jQuery <code>on</code> method</a> from the jQuery source</li>
<li><a href="http://api.jquery.com/on/">jQuery documentation <code>on</code> method</a> * <strong>Note</strong> direct events handlers such as <code>live</code>, or <code>delegate</code> are considered deprecated (as of jQuery 1.7) <a href="http://api.jquery.com/delegate/">see delegate API</a> and <a href="http://api.jquery.com/live/">live API</a> notes.</li>
</ul>
<p>The post <a href="http://renoirboulanger.com/blog/2013/03/creating-and-using-javascript-events-while-combining-events-on-two-separates-behaviors/">Creating and using Javascript events while combining events on two separates behaviors</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=zH1gEUwVMCE:2-0cMaiWhpU:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=zH1gEUwVMCE:2-0cMaiWhpU:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=zH1gEUwVMCE:2-0cMaiWhpU:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=zH1gEUwVMCE:2-0cMaiWhpU:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=zH1gEUwVMCE:2-0cMaiWhpU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=zH1gEUwVMCE:2-0cMaiWhpU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2013/03/creating-and-using-javascript-events-while-combining-events-on-two-separates-behaviors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2013/03/creating-and-using-javascript-events-while-combining-events-on-two-separates-behaviors/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=creating-and-using-javascript-events-while-combining-events-on-two-separates-behaviors</feedburner:origLink></item>
		<item>
		<title>Conférence: Comment évaluer le niveau de qualité d’un site web selon les techniques d’intégration web d’actualité</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/fpd8FN00wfk/</link>
		<comments>http://renoirboulanger.com/blog/2013/02/conference-comment-evaluer-la-qualite-dun-site-web-selon-les-techniques-dintegration-web-dactualite/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 03:21:10 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Favourites]]></category>
		<category><![CDATA[good-practices]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Slides]]></category>
		<category><![CDATA[Talk]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2886</guid>
		<description><![CDATA[<p>La façon de concevoir des sites Web a beaucoup évolué au cours des deux dernières années. Concevez-vous encore vos sites comme en 2009? Trouvez-vous vos sites lents? Êtes-vous web-responsable? Comment pouvez-vous être certain que votre pigiste, employé ou fournisseur fait un travail de qualité?</p><p>The post <a href="http://renoirboulanger.com/blog/2013/02/conference-comment-evaluer-la-qualite-dun-site-web-selon-les-techniques-dintegration-web-dactualite/">Conférence: Comment évaluer le niveau de qualité d’un site web selon les techniques d&#8217;intégration web d&#8217;actualité</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Cette semaine, je fait une conférence pour la deuxième fois de ma présentation qui décrit les pratiques en intégration web qui sont d&#8217;actualités.</p>
<p>La première fois que j&#8217;ai présenté c&#8217;était pendant le <a href="http://mtldgtl.com/fr/web-in/">WebIn 2012</a>, et cette-semaine c&#8217;est à Québec pendant la conférence <a href="http://webaquebec.org/">Web à Québec 2013 (WAQ)</a>.</p>
<p>Cette fois-ci, j&#8217;aurai l&#8217;honneur de présenter tout juste avant une personne que j&#8217;admire; <a href="http://twitter.com/snookca">Jonathan Snook</a>.</p>
<h2>Audience</h2>
<p>L&#8217;audience de cette présentation est principalement les gens qui travaillent avec le web, qui engagent des programmeurs/intégrateurs et qui veulent comprendre les dernières tendances et le pourquoi elles sont populaires.</p>
<p>Comme une valeur ajoutée, j&#8217;illustre avec des exemples concrêts et compare les outils vis à vis leur utilité.</p>
<p>&nbsp;</p>
<h2>Synopsis</h2>
<p>La façon de concevoir des sites Web a beaucoup évolué au cours des deux dernières années. Concevez-vous encore vos sites comme en 2009? Trouvez-vous vos sites lents? Êtes-vous web-responsable? Imaginez si vous étiez capable de gagner du temps.</p>
<p>Comment pouvez-vous être certain que votre pigiste, employé ou fournisseur fait un travail de qualité?</p>
<p>Nous allons couvrir des techniques clé qui permettent d&#8217;optimiser le travail, comment être plus efficace avec votre équipe technique et savoir jauger le son niveau d&#8217;expérience.</p>
<p>L’objectif de la séance est de donner des outils pour évaluer le niveau de qualité d’un site web; des pistes pour en améliorer la performance et s’assurer de pouvoir en entretenir le code après plusieurs révisions.</p>
<p>&nbsp;</p>
<h2>Trois questions qui seront répondues dans la conférence</h2>
<ol>
<li>Que faire pour optimiser la communication lors de l&#8217;établissement du cahier de charge</li>
<li>Quelles techniques ont été découvertes pour éviter le gaspillage lors de la réalisation</li>
<li>Indicateurs de qualité qu&#8217;on peut retrouver dans le HTML/CSS</li>
</ol>
<p>&nbsp;</p>
<h2>Les «slides»</h2>
<p><script src="//speakerdeck.com/assets/embed.js" type="text/javascript" data-id="e6b55b505ea10130f6bb22000a952b58" data-ratio="1.77777777777778"></script><br />
<strong><a href="http://renoirboulanger.com/files/201302-slides.pdf">Télécharger en format PDF</a></strong></p>
<p>&nbsp;</p>
<h2>Réception</h2>
<p>Je ne m&#8217;attendait pas vraiment au succès de ma présentation durant la conférence, c&#8217;était une belle surprise.</p>
<p>Mon ami <a href="http://twitter.com/frLegare">François Légaré</a> a pris cette photo:</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-4945" alt="Il y avait foule lors de ma présentation au Web à Québec" src="http://renoirboulanger.com/wp-content/uploads/2013/02/presentation-renoir-web-a-quebec-qualite-integration-web.jpg" width="717" height="538" /></p>
<p>&nbsp;</p>
<h2>Merci à</h2>
<ol>
<li><a href="http://twitter.com/gabiviana"><strong>@gabiviana</strong>: Gabi Viana</a> pour les visuels</li>
<li><a href="http://twitter.com/joplam"><strong>@joplam</strong>: Josée Plamondon</a> pour la révision</li>
<li><a href="http://twitter.com/cybik"><strong>@cybik</strong>: Renaud Lepage</a> pour la révision</li>
<li><a href="http://twitter.com/vivrass"><strong>@vivrass</strong>: Martin Provencher</a> pour l&#8217;inspiration de l&#8217;angle technique à couvrir.</li>
</ol>
<p>The post <a href="http://renoirboulanger.com/blog/2013/02/conference-comment-evaluer-la-qualite-dun-site-web-selon-les-techniques-dintegration-web-dactualite/">Conférence: Comment évaluer le niveau de qualité d’un site web selon les techniques d&#8217;intégration web d&#8217;actualité</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=fpd8FN00wfk:3iHbdPQzhfI:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=fpd8FN00wfk:3iHbdPQzhfI:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=fpd8FN00wfk:3iHbdPQzhfI:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=fpd8FN00wfk:3iHbdPQzhfI:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=fpd8FN00wfk:3iHbdPQzhfI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=fpd8FN00wfk:3iHbdPQzhfI:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2013/02/conference-comment-evaluer-la-qualite-dun-site-web-selon-les-techniques-dintegration-web-dactualite/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2013/02/conference-comment-evaluer-la-qualite-dun-site-web-selon-les-techniques-dintegration-web-dactualite/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=conference-comment-evaluer-la-qualite-dun-site-web-selon-les-techniques-dintegration-web-dactualite</feedburner:origLink></item>
		<item>
		<title>Why would I NOT use my own framework and how I sell usage of Symfony2 and other current PHP 5.3+ goodies to my client</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/pXeYcXRMsnw/</link>
		<comments>http://renoirboulanger.com/blog/2012/11/why-would-i-not-use-my-own-framework-and-how-i-sell-usage-of-symfony2-and-other-current-php-5-3-goodies-to-my-client/#comments</comments>
		<pubDate>Thu, 22 Nov 2012 05:16:54 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Tranche de vie]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2852</guid>
		<description><![CDATA[<p>Sometimes, in a mailing list I am following and in real life. People are sometimes explaining their choices in technology to create an e-commerce site using a CMS (&#8220;Content Management system&#8221;) or their own &#8220;homemade&#8221; framework. As if there is &#8230; <a href="http://renoirboulanger.com/blog/2012/11/why-would-i-not-use-my-own-framework-and-how-i-sell-usage-of-symfony2-and-other-current-php-5-3-goodies-to-my-client/">Continued</a></p><p>The post <a href="http://renoirboulanger.com/blog/2012/11/why-would-i-not-use-my-own-framework-and-how-i-sell-usage-of-symfony2-and-other-current-php-5-3-goodies-to-my-client/">Why would I NOT use my own framework and how I sell usage of Symfony2 and other current PHP 5.3+ goodies to my client</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Sometimes, in a mailing list I am following and in real life. People are sometimes explaining their choices in technology to create an e-commerce site using a CMS (&#8220;Content Management system&#8221;) or their own &#8220;homemade&#8221; framework. As if there is no good PHP ones out there nowadays.</p>
<p>A CMS is a web application to manage content and when specialized requirements (as in managing other things than pages of content) we have to extend outside of the CMS part. A framework is thus a good friend.</p>
<p>In either case. My opinion is to use the right tool for the right task.</p>
<p>I wrote on the subject because I recently had to defend my technological choice of <a href="http://symfony.com/">Symfony2</a> at my (very-large) client. You can see on these <a title="My answer to people asking whether they should or not use a framework" href="/blog/2012/08/my-answer-to-people-asking-whether-they-should-or-not-use-a-framework-on-their-programming-language/">two</a> <a title="Choosing a framework, how I personally define what is hot about them, an evaluation process (part 1)" href="/blog/2012/07/choosing-a-framework-how-i-personally-define-what-is-hot-about-them-an-evaluation-process">posts</a>.</p>
<p>I tend to believe that everybody who can program can work with a well architectured CMS/framework whatever software architecture patterns it is following. The priority is that we, programmer, fills the client&#8217;s requirements and use what is existing to make us efficient.</p>
<p>Creating a &#8220;just for this project&#8221;-&#8221;super custom&#8221;-framework and saying it is using [a buzzword-compliant] architecture principle, doesn&#8217;t PROVE IT well made.</p>
<p>Don&#8217;t get me wrong. It is not that creating a framework is bad. It is quite an educative hobby. Creating a framework requires a lot of work, dedication and ideally a quantity of skilled people to work to improve, review, test and document. A full time job by itself alone.</p>
<p>My feeling is that the client probably did not asked to create a &#8220;framework&#8221;.</p>
<p>My problem is more precisely about using it as production-code for their business application, make them pay for it AND what they explicitly asked for. Should they only pay for the features they asked for?</p>
<p>But if you used a well known, documented, framework with an active community. You can use it as a good selling argument in front of the client. It even reassures them that other people can take on your work.</p>
<p>So a question lingers in my mind. If one has the skillset to create his own framework. Why doesn&#8217;t he contribute to an existing one?</p>
<p>Personally, all my choices follows the NIH approach. NIH as in &#8220;not invented here&#8221; see <a href="http://iamproblematic.com/2012/03/07/getting-over-the-not-invented-here-mentality">Derek Strobe&#8217;s blog post about NIH</a>, a much inspiring read.</p>
<p>The overall idea is that Instead of charging for my time implementing dependency injection, i&#8217;ll use an existing one.</p>
<h3>Maturity</h3>
<p>Talking about maturity. <a href="https://github.com/symfony/symfony/commit/c3ebdbf9cceddb82cd2089aaef8c7b992e536363">Symfony2</a> is 2 years old already (compared to <a href="https://github.com/zendframework/zf2/commits/release-2.0.0beta5">Zf2</a> few month of age).</p>
<p>If it is not only about maturity. Think that the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR</a> (levels <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">0</a>, <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md">1</a>, <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md">2</a>)  recommendation is written by a group community leaders who decided to standardize the way to structure libraries so they are inter-operable, <a href="http://www.php-fig.org/">PHP FIG</a> was created for this.</p>
<p>I think everything changed since the PHP-FIG group created the PSR* standard and the use of <a href="http://getcomposer.org/doc/01-basic-usage.md">composer</a> to manage dependencies. CMS and other framework projects have to follow the lead, otherwise they may get left behind.</p>
<h3>CMSes</h3>
<p>I have the feeling that someday CMS will be only a GUI, with full edition capability (see <a href="http://jejacks0n.github.com/mercury/">Mercury Editor</a>, or <a href="http://createjs.org/">Createjs</a>) using HTML5&#8242;s  <a href="http://html5doctor.com/the-contenteditable-attribute/">ContentEditable property</a>. And persisting inside a Storage engine known as &#8220;Content Repository&#8221;.</p>
<p>This trend is also what some calls &#8220;<a href="http://bergie.iki.fi/blog/decoupling_content_management/">Decoupled Content Management</a>&#8221; (<a href="http://bergie.iki.fi/blog/phpcr/">also explained here</a>), a VERY promising concept that will give some more chances for us to actually re-use code.</p>
<p>The prospect may even make us be able to really create easily semantic-friendly pages. Created by editors. Regarding semantic web, you should look at <a href="http://viejs.org/">&#8220;VIE&#8221; over here</a>.</p>
<p>The trend is more than mere theory. Many project spawned already. Most notably the <a href="http://cmf.symfony.com/">Symfony-CMF</a>, <a href="http://midgard-project.org/">Midgard</a> and even known CMS-es such as <a href="http://symfony.com/blog/symfony2-meets-drupal-8">Drupal</a> and Joomla are currently re-evaluating their projects and following the trend.</p>
<h3>Dependencies</h3>
<p>A common problem is how can I make sure the project uses proper libraries and a compatible version number.</p>
<p>Many stacks has their own implementations of it. It comes as a simple file stating which version you want, and it takes care of getting the proper version from any configured package we may think of.</p>
<p>The concept is now new and many web development stack has their own implementations. Have a look at <a href="https://npmjs.org/doc/json.html">package.json</a> (for Javascript), <a href="http://gembundler.com/">Bundler</a> (for Ruby).</p>
<p>PHP has it&#8217;s own now, it&#8217;s called <a href="http://getcomposer.org/">Composer</a>, here is how you would declare your dependencies:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
   <span style="color: #0000ff;">&quot;require&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #0000ff;">&quot;myown/vendor&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;master&quot;</span><span style="color: #339933;">,</span>
       <span style="color: #0000ff;">&quot;external/lib&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;3.1.*&quot;</span><span style="color: #339933;">,</span>
       <span style="color: #0000ff;">&quot;external2/template&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;master&quot;</span>
   <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>See: <a href="http://getcomposer.org/doc/00-intro.md">Introduction to composer</a> using <a href="http://packagist.org/">Packagist</a></p>
<p>Add to that any cache management, deployment configuration and <a href="http://developer.yahoo.com/yui/compressor/">other</a> <a href="https://github.com/h5bp/ant-build-script">build libraries</a>, <a href="http://lesscss.org/">compilation</a> and <a href="https://github.com/mishoo/UglifyJS/">protection</a> you may wish to use.</p>
<h3>All in all</h3>
<p>Nowadays. If you are still:</p>
<ul>
<li>Manually using require_once(&#8230;)</li>
<li>Adding database queries in your view (WordPress? x_X)</li>
<li>Using loops and query hidden in a &#8230; templating engine (ExpressionEngine &#8220;loops&#8221; x_X)</li>
</ul>
<p>You may need to see the reference I made in this post.</p>
<p>My argument goes as following, mostly for what my (our) clients pays us for:</p>
<ul>
<li>Learn and make good use of framework that has a reputation, good architecture, modular, inter-operable with other, in PHP is not a chimera anymore.</li>
<li>NIH please</li>
<li>Build functionality for the client who pays you. not maintain the serializer service mechanism&#8230; framework do that stuff. client do not care about it</li>
<li>SOLID principles?</li>
<li>Scaling? (only one database? what if I need to go deploy on a PaaS solution?)</li>
</ul>
<p>The post <a href="http://renoirboulanger.com/blog/2012/11/why-would-i-not-use-my-own-framework-and-how-i-sell-usage-of-symfony2-and-other-current-php-5-3-goodies-to-my-client/">Why would I NOT use my own framework and how I sell usage of Symfony2 and other current PHP 5.3+ goodies to my client</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=pXeYcXRMsnw:AL0bTbHgUmw:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=pXeYcXRMsnw:AL0bTbHgUmw:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=pXeYcXRMsnw:AL0bTbHgUmw:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=pXeYcXRMsnw:AL0bTbHgUmw:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=pXeYcXRMsnw:AL0bTbHgUmw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=pXeYcXRMsnw:AL0bTbHgUmw:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2012/11/why-would-i-not-use-my-own-framework-and-how-i-sell-usage-of-symfony2-and-other-current-php-5-3-goodies-to-my-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2012/11/why-would-i-not-use-my-own-framework-and-how-i-sell-usage-of-symfony2-and-other-current-php-5-3-goodies-to-my-client/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=why-would-i-not-use-my-own-framework-and-how-i-sell-usage-of-symfony2-and-other-current-php-5-3-goodies-to-my-client</feedburner:origLink></item>
		<item>
		<title>A list of quality indicators we could find on an application or web site</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/58DSoWDGfQE/</link>
		<comments>http://renoirboulanger.com/blog/2012/11/a-list-of-quality-indicators-we-could-find-on-an-application-or-web-site/#comments</comments>
		<pubDate>Mon, 12 Nov 2012 03:37:49 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Programmation]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2839</guid>
		<description><![CDATA[<p>I was writing a requirement document for a client project and I wanted to outline some key indicators of quality he should expect from the final product. I thought of sharing it with you.</p><p>The post <a href="http://renoirboulanger.com/blog/2012/11/a-list-of-quality-indicators-we-could-find-on-an-application-or-web-site/">A list of quality indicators we could find on an application or web site</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>When we write a project specification document, we write functionnal and non-functionnal and other sections.  As I want to communicate to my peers and sponsors the level of quality, I thought of creating this list of indicators.</p>
<p>&nbsp;</p>
<h2>Web application quality attributes</h2>
<ul>
<li><strong>Frontend</strong> should adjust to the user browser (tablet, computer, phone) “Responsive” (already partially in place)</li>
<li><strong>Frontend</strong> URIs should express what they represent for future/possible conversion to REST service endpoint</li>
<li><strong>Frontend</strong> response time should be as quick as possible using optimization techniques such as assets minification and non-blocking javascript</li>
<li>Code “<strong>Domain</strong>” (language) should illustrate user intent</li>
<li><strong>Frontend</strong> to use W3C valid markup following HTML5 recommendations in a “Progressive enhancement” manner;</li>
<li><strong>Logging</strong> system should declare application state and intents and provide helpful feedback (e.g. &#8220;User jshmoe logged in from&#8230; Montreal Quebec.&#8221;)</li>
<li>Front-end error <strong>message</strong> should be using terms that speaks to the end user</li>
<li>Error <strong>message</strong> and notices should not break layout</li>
<li>All <strong>message</strong> and user read text should be without spelling mistakes or bad translation</li>
</ul>
<p>&nbsp;</p>
<h2>Frontend as quick to load as possible</h2>
<p>Among most recommendations and references about common user frustrations is the time a web page loads.</p>
<p>The idea is to basically push to the queue and forget returning a page back as soon as possible.</p>
<p>Other key aspects are graceful degradation of javascript, functional site even with javascript errors.</p>
<p>Most importantly. The portal frontend can be deployed in any number of instances, with only one address, and be completely transparent to the user.</p>
<p>&nbsp;</p>
<h2>Your opinion</h2>
<p>What else should we also include in such a list? I agree that it is not complete as much as a W3C recommendation is. But I believe it is much good in a context of a project outline to explain details you are taking into account while evaluating.</p>
<p>&nbsp;</p>
<h2>Reference</h2>
<ul>
<li><strong>High available websites with AWS</strong><br />
<a href="http://www.slideshare.net/AmazonWebServices/highly-available-websites-in-aws">http://www.slideshare.net/AmazonWebServices/highly-available-websites-in-aws</a></li>
<li><strong>Progressive enhancement</strong><br />
<a href="http://youtu.be/hdTxeR90_1E">http://youtu.be/hdTxeR90_1E</a></li>
<li><strong>Front End Engineering Manifesto </strong><br />
Set of rules on which web application frontend are considered best-practices<br />
<strong><a href="http://f2em.com/">http://f2em.com/</a></strong></li>
<li><strong>Frontend optimization build toolkit</strong><br />
<a href="http://yeoman.io/">http://yeoman.io/</a></li>
</ul>
<p>The post <a href="http://renoirboulanger.com/blog/2012/11/a-list-of-quality-indicators-we-could-find-on-an-application-or-web-site/">A list of quality indicators we could find on an application or web site</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=58DSoWDGfQE:kg9Lo8Rg7OU:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=58DSoWDGfQE:kg9Lo8Rg7OU:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=58DSoWDGfQE:kg9Lo8Rg7OU:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=58DSoWDGfQE:kg9Lo8Rg7OU:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=58DSoWDGfQE:kg9Lo8Rg7OU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=58DSoWDGfQE:kg9Lo8Rg7OU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2012/11/a-list-of-quality-indicators-we-could-find-on-an-application-or-web-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2012/11/a-list-of-quality-indicators-we-could-find-on-an-application-or-web-site/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-list-of-quality-indicators-we-could-find-on-an-application-or-web-site</feedburner:origLink></item>
		<item>
		<title>My first introduction to the Hypermedia</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/eNqwk9XQSRk/</link>
		<comments>http://renoirboulanger.com/blog/2012/10/my-first-introduction-to-the-hypermedia/#comments</comments>
		<pubDate>Sun, 28 Oct 2012 00:47:40 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[architecture]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2827</guid>
		<description><![CDATA[<p>At work, I had a conversation about implementing SOAP with an other service, It struck me that they did not talk about REST. Mostly in today's distributed systems, you may want to think twice about how to implement for the future. This is some thoughts I had on the matter</p><p>The post <a href="http://renoirboulanger.com/blog/2012/10/my-first-introduction-to-the-hypermedia/">My first introduction to the Hypermedia</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I was reading around about how to architect in a scalable fashion a web service. You know, the concept of remote procedure call?</p>
<p>At work, I had a conversation about implementing SOAP with an other service, It struck me that they did not talk about REST. Mostly in today&#8217;s distributed system, you may want to think twice about if there is something newer that solves better than a solution designed 20 years ago&#8230; there must be things learned</p>
<p>So, I wrote this small introduction to what is REST, and the Hypermedia.</p>
<p>Beware, I am not an expert, just a curious that found a nice video and some links about it and trying to learn and apply it properly.</p>
<p>Actually, I heard it for the first time from <a href="http://www.bizcoder.com/">Darrell Miller</a> in an impressive presentation that blew my mind. Unfortunatly I did not pursue up until a few months ago.</p>
<p>Now, I am at a state where I am starting a project and we have to talk to many nodes, I would like to take this opportunity of starting from scratch and use it&#8217;s concepts. I am anxious on how it is going to look like.</p>
<p>As for the difference this post started for; I discussed with my colleagues, I compiled these two descriptions with code example in PHP to illustrate.</p>
<p>&nbsp;</p>
<p><span id="more-2827"></span></p>
<h3>SOAP</h3>
<p>SOAP is an object&#8217;s method call to a remote server as if it was a local object, but abstracting idea.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$o</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoapClient<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'https://some.host/wsdl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$clients</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$o</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getClients<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>What you get at the  is an understandable array, or text, or object coming from the web service.</p>
<p>Regardless of the other application SOAP server is in the same language as the client (PHP in this case).</p>
<p>This may seem nice, it has a few limitations on the regard of what you can do out of it.</p>
<p>&nbsp;</p>
<h3>REST</h3>
<p>In contrast to SOAP, a REST call, you actually use HTTP to request things and use it&#8217;s content and headers to work your logic.</p>
<p>Situation is that most implementations only do a GET to a URL and that is all. A situation where most implementations do not fulfill all the power of it, again. This is the reason why the RESTafarians (passionate about REST) decided to change the name of it&#8217;s usages.</p>
<p>A nice way to explain the lacks of use of it&#8217;s potential through the popular implemenatation goes from <a href=" http://www.youtube.com/watch?v=g4sqydY3hHU&amp;feature=BFa&amp;list=PLr4f8f5Q9NTmnV4KxjPaE1bgMMoaZbIOt">Designing Hypermedia APIs presentation by Steve Klabni</a>.</p>
<p>&nbsp;</p>
<h3>Hypermedia</h3>
<p>In comparison to REST, Hypermedia it is basically going like the following.</p>
<p>Popupar REST implementation would only care of sending a request and work with the received data, Hypermedia on the other hand, is like using what we receive and &#8220;browse&#8221; the content, follow links, submit forms to end up with the objective.</p>
<p>So, as an example:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">use</span> Guzzle\Http\Client<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Client<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'https://some.host/api/v1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$request</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'user/42348972389/profile/picture'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$request</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>setAuth<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myusername'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mypassword'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$image</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$request</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>send<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>With this example, you could get the RAW image file stream directly.</p>
<h3>Libraries</h3>
<p>Using Symfony2 in my projects all of this made me think about how to implement it, I stumbled on <strong><a href="http://guzzlephp.org/">Guzzle</a></strong> and <strong><a href="https://github.com/kriswallsmith/Buzz">BUZZ</a></strong>, two PHP 5.3 libraries, which I could use. What I appreciate with Guzzle is the pattern around it&#8217;s usage.</p>
<p>As a side note, if you want to see an <a title="How I managed to make work Guzzle REST client library under Symfony 2.0.x as a bundle" href="http://renoirboulanger.com/blog/2012/07/how-i-managed-to-make-work-guzzle-rest-client-library-under-symfony-2-0-x-as-a-bundle-snipet">applied example of a REST call using Guzzle, you can see this post I created explaining my attempts</a>. I did not work with that since then, I hope to get back to it soon.</p>
<p>&nbsp;</p>
<h3>More to read</h3>
<p>I am a padawan on the subject, but I have a few recommendations to read, here they are:</p>
<ul>
<li><a href=" http://www.youtube.com/watch?v=g4sqydY3hHU&amp;feature=BFa&amp;list=PLr4f8f5Q9NTmnV4KxjPaE1bgMMoaZbIOt">The introductory video that started it all for me, by Steve Klabnik</a></li>
<li><a href="http://designinghypermediaapis.com/">Designing Hypermedia APIs, by Steve Klabnik</a></li>
<li><a href="http://www.aaronheld.com/post/practical-hypermedia ">Practical Hypermedia by Aaron Held</a></li>
<li><a href="http://herbjorn.wordpress.com/2010/11/19/rest-versus-soap-for-the-public-cloud/">REST versus SOAP</a></li>
<li><a href="http://www.bizcoder.com/index.php/2012/03/07/hypermedia-client-maturity-model/">Hypermedia Client Maturity Level by Darrell Miller</a></li>
<li><a href="http://deepfriedbytes.com/podcast/episode-90-going-through-the-7-r-rsquo-s-of-hypermedia-with-darrel-miller/">Darrell Miller: Going through the 7 R&#8217;s of Hypermedia</a> (podcast recording)</li>
</ul>
<p>The post <a href="http://renoirboulanger.com/blog/2012/10/my-first-introduction-to-the-hypermedia/">My first introduction to the Hypermedia</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eNqwk9XQSRk:GJJGuauH4sE:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=eNqwk9XQSRk:GJJGuauH4sE:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eNqwk9XQSRk:GJJGuauH4sE:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eNqwk9XQSRk:GJJGuauH4sE:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eNqwk9XQSRk:GJJGuauH4sE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=eNqwk9XQSRk:GJJGuauH4sE:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2012/10/my-first-introduction-to-the-hypermedia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2012/10/my-first-introduction-to-the-hypermedia/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=my-first-introduction-to-the-hypermedia</feedburner:origLink></item>
		<item>
		<title>Réflexion a voix-haute: La réalité frustrante des développeurs dans l’industrie du web</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/_JvwmZMPq80/</link>
		<comments>http://renoirboulanger.com/blog/2012/09/reflexion-a-voix-haute-la-realite-frustrante-des-developpeurs-dans-lindustrie-du-web/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 18:05:48 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Tranche de vie]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2615</guid>
		<description><![CDATA[<p>Être développeur web, dans notre industrie, apporte plusieurs avantages. Lorsqu'on est passionné, ce que l'on fait tout les jours est très similaire a un hobby qu'on apprécie beaucoup. Je partage ici avec vous un des désavantages du métier. Un problème récurrent que j'ai vécu à cause d'une incompréhension de la part de l'industrie, et de ceux qui ne sont pas dans "le web".</p><p>The post <a href="http://renoirboulanger.com/blog/2012/09/reflexion-a-voix-haute-la-realite-frustrante-des-developpeurs-dans-lindustrie-du-web/">Réflexion a voix-haute: La réalité frustrante des développeurs dans l&#8217;industrie du web</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Je suis conscient que cette situation n&#8217;arrive pas qu&#8217;au développeurs web. Je raconte ici ce que j&#8217;ai vécu pour illustrer comment je trouve que c&#8217;est un non-sens. Je doute qu&#8217;il y ait réellement de solution autre que de s&#8217;armer d&#8217;argumentaires et la pratique.</p>
<p>Parmi les efforts que je trouve admirable est celui fait par l&#8217;<a title="Alliance numérique constitue le réseau d'affaires de l'industrie des nouveaux médias et des contenus numériques interactifs du Québec." href="http://www.alliancenumerique.com/">Alliance Numérique</a> avec son <a title="Guide des bonnes pratiques du web fait par l'Alliance Numérique" href="http://www.alliancenumerique.com/guideweb.html">guide des bonnes pratiques</a>.</p>
<h3>Résumé d&#8217;une histoire de réalisation web</h3>
<p>Une personne du monde marketing a une idée. Elle veut que ce soit super beau. Toutes les vues sont faites sur 40 pages faites par Photoshop et doivent être respectés au pixel parfait sur IE6 à Firefox 3. Il y a 70 pages de descriptions de comment javascript doit faire sortir des étoiles partout. Ensuite, pendant la réalisation, la compagnie a pas de budget, généralement elle fait couper les coins ronds aux endroits cruciaux et le site sera bon seulement pour changer ton adresse et inutilisable.</p>
<p>The post <a href="http://renoirboulanger.com/blog/2012/09/reflexion-a-voix-haute-la-realite-frustrante-des-developpeurs-dans-lindustrie-du-web/">Réflexion a voix-haute: La réalité frustrante des développeurs dans l&#8217;industrie du web</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=_JvwmZMPq80:yiVvJ9qgOj8:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=_JvwmZMPq80:yiVvJ9qgOj8:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=_JvwmZMPq80:yiVvJ9qgOj8:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=_JvwmZMPq80:yiVvJ9qgOj8:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=_JvwmZMPq80:yiVvJ9qgOj8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=_JvwmZMPq80:yiVvJ9qgOj8:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2012/09/reflexion-a-voix-haute-la-realite-frustrante-des-developpeurs-dans-lindustrie-du-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2012/09/reflexion-a-voix-haute-la-realite-frustrante-des-developpeurs-dans-lindustrie-du-web/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=reflexion-a-voix-haute-la-realite-frustrante-des-developpeurs-dans-lindustrie-du-web</feedburner:origLink></item>
		<item>
		<title>Comment je valide et convertit des documents HTML trop chargés ou provenant de Microsoft Word en HTML valide et simplifié</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/eIYoLtG9snI/</link>
		<comments>http://renoirboulanger.com/blog/2012/08/comment-je-valide-et-convertit-des-documents-html-trop-charges-ou-provenant-de-microsoft-word-en-html-valide-et-simplifie/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 16:01:18 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Outils]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2521</guid>
		<description><![CDATA[<p>Cette procédure est faite pour permettre de prendre n'importe quel fichier Word ou HTML généré avec beaucoup de tagsoup en en simplifier a sa plus simple expression html. Valide.</p><p>The post <a href="http://renoirboulanger.com/blog/2012/08/comment-je-valide-et-convertit-des-documents-html-trop-charges-ou-provenant-de-microsoft-word-en-html-valide-et-simplifie/">Comment je valide et convertit des documents HTML trop chargés ou provenant de Microsoft Word en HTML valide et simplifié</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<h3>Description</h3>
<p>Cette procédure est faite optimiser la conversion document word en html, spécialement ceux qui sont généré avec beaucoup de «tagsoup» en en simplifier a sa plus simple expression html. Valide.</p>
<p><strong>Sauter à la <a href="#CommentconvertirunfichierWordversduHTMLsimpleetvalide-Proc%C3%A9dure">Procédure</a></strong></p>
<h4>Exemple</h4>
<h5>Avant</h5>
<pre>...</pre>
<h2 class="Standard" dir="ltr" lang="fr-FR" style="margin-top: 0; margin-bottom: 0; text-align: center;" xml:lang="fr-FR"><span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">TERMS AND CONDITIONS OF 1</span> <span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">‐</span> <span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">YEAR OR 30</span> <span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">‐</span> <span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">DAY ACCESS AND USE</span></h2>
<p><span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">OF THE SERVICE BY SUBSCRIBERS</span> <span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">SECTION 1</span> <span lang="en-CA" style="font-weight: bold; font-size: 16.0px;" xml:lang="en-CA">PURPOSE OF THE SERVICE</span> &#8230;</p>
<h5>Après</h5>
<pre></pre>
<p>&nbsp;</p>
<h2>TERMS AND CONDITIONS OF 1 ‐ YEAR OR 30 ‐ DAY ACCESS AND USE</h2>
<p>OF THE SERVICE BY SUBSCRIBERS SECTION 1 PURPOSE OF THE SERVICE </p>
<h3>Inspiration et pistes</h3>
<ol>
</ol>
<ol>
<li>Convertir de format document en ligne de commandeDe Word2000 vers HTML, voir <strong>UNOCONV</strong> <a class="external-link" href="http://dag.wieers.com/home-made/unoconv/#download" rel="nofollow">http://dag.wieers.com/home-made/unoconv/#download</a></li>
</ol>
<p>&nbsp;</p>
<ul>
<li>Utiliser open office en mode &#8220;headless&#8221; (en le transformant en service) et y envoyer les documents pour conversionVoir: <a class="external-link" href="http://stackoverflow.com/questions/3405687/openoffice-org-using-uno-to-convert-docx-to-html" rel="nofollow">http://stackoverflow.com/questions/3405687/openoffice-org-using-uno-to-convert-docx-to-html</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3>Procédure</h3>
<p>&nbsp;</p>
<h4>Version abstraite</h4>
<ol>
</ol>
<ol>
<li>Utiliser Open Office (ou peu importe) pour exporter le document en HTML</li>
</ol>
<p>&nbsp;</p>
<ul>
<li>Purifier via <tt>HTMLTidy</tt></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ul>
<li>Nettoyer les attributs inutiles avec la classe <tt>htmLawed</tt></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3>Use cases</h3>
<p>&nbsp;</p>
<h5>Document texte seulement</h5>
<ul>
</ul>
<ul>
<li>Pas de formulaire, ni images, etc</li>
<li>Idéal pour un document légal, par exemple.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3>Étapes concrètes:</h3>
<ol>
</ol>
<ol>
<li>A partir du fichier HTML généré <strong>exemple</strong>: Fichier appelé &#8220;1.1.2.en.html&#8221;</li>
</ol>
<p>&nbsp;</p>
<ul>
<li>Extraire le fichier <a href="#">htmLawed.zip</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre>cd ~
mkdir htmlawed
mv htmLawed.zip htmlawed/
cd htmlawed
unzip htmLawed.zip</pre>
<p>Passer au travers de la classe <tt>htmLawed</tt></p>
<pre class="php">&lt; ?php
    require('htmLawed.php');
    $config = array('safe'=&gt;1,'elements'=&gt;'a,em,strong,p,ul,li,ol,h1,h2,h3,h4,h5,div,tr,td,table','deny_attribute'=&gt;'* -title -href');
    $out = htmLawed(file_get_contents('in.html'), $config);
    echo $out;</pre>
<p>Rouler le script. Déplacer le fichier a utiliser, puis exécuter le script pour en générer dans out.html</p>
<pre>cp ~/1.1.2.en.tidy.html in.html
php cleanup.php &gt; out.html</pre>
<p>Rouler Tidy. <strong>Normaliser le fichier &#8220;1.1.2.en.html&#8221;, Nettoyer les balises, minuscules, etc</strong></p>
<pre>tidy --drop-font-tags 1 --logical-emphasis 1 --clean 1 --merge-spans 1 --show-body-only 1 --output-xhtml 1 --word-2000 1 --indent "auto" --char-encoding "utf8" --indent-spaces "2" --wrap "90" 1.1.2.en.html &gt; 1.1.2.en.tidy.html</pre>
<p>tada!</p>
<h3>Précautions</h3>
<p>Ordre d&#8217;exécution des tâches</p>
<p><strong>Remarque:</strong></p>
<p>J&#8217;ai essayé de passer Tidy avant htmLawed et j&#8217;ai réalisé que le nettoyage de htmLawed est assez drastique et que Tidy rend le code plus propre. Sans oublier que htmLawed peut générer des balises vides que Tidy va éliminer.</p>
<h3>Références</h3>
<ol>
<li><a class="external-link" href="http://tidy.sourceforge.net/docs/quickref.html">Options Tidy</a></li>
<li>htmLawed Documentation a PHP Html purification Class
<ol>
<li><a class="external-link" href="http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/more.htm" rel="nofollow">original documentation</a></li>
<li><a class="external-link" href="http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/example_settings.htm" rel="nofollow">Example settings</a></li>
</ol>
</li>
</ol>
<p>The post <a href="http://renoirboulanger.com/blog/2012/08/comment-je-valide-et-convertit-des-documents-html-trop-charges-ou-provenant-de-microsoft-word-en-html-valide-et-simplifie/">Comment je valide et convertit des documents HTML trop chargés ou provenant de Microsoft Word en HTML valide et simplifié</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eIYoLtG9snI:JG80VQSb4a4:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=eIYoLtG9snI:JG80VQSb4a4:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eIYoLtG9snI:JG80VQSb4a4:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eIYoLtG9snI:JG80VQSb4a4:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=eIYoLtG9snI:JG80VQSb4a4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=eIYoLtG9snI:JG80VQSb4a4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2012/08/comment-je-valide-et-convertit-des-documents-html-trop-charges-ou-provenant-de-microsoft-word-en-html-valide-et-simplifie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2012/08/comment-je-valide-et-convertit-des-documents-html-trop-charges-ou-provenant-de-microsoft-word-en-html-valide-et-simplifie/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=comment-je-valide-et-convertit-des-documents-html-trop-charges-ou-provenant-de-microsoft-word-en-html-valide-et-simplifie</feedburner:origLink></item>
		<item>
		<title>Ma critique sur l’intégration du site a25.com</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/HxYSv3KSmYY/</link>
		<comments>http://renoirboulanger.com/blog/2012/08/ma-critique-sur-lintegration-du-site-a25-com/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 22:38:26 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Web Integration Review]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2782</guid>
		<description><![CDATA[<p>Cet article est un premier d'une série de plusieurs où je propose mes commentaires constructifs pour informer et partager des concepts et bonnes pratiques en intégration web qu'un site pourrait prendre avantage.</p><p>The post <a href="http://renoirboulanger.com/blog/2012/08/ma-critique-sur-lintegration-du-site-a25-com/">Ma critique sur l&#8217;intégration du site a25.com</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Dans la série &#8220;Revue de code en Intégration web&#8221; qui se veut une série de remarques pour améliorer le résultat final du site je commence avec ce premier site.</p>
<p>Le site <a href="http://a25.com/">a25.com</a> est un service web qui sert a amasser les paiements dus pour l&#8217;usage du pont de l&#8217;Autoroute 25. Une caméra capture les plaques d&#8217;immatriculation et envoit une enveloppe réclamant son dû.</p>
<p>&nbsp;</p>
<p>Quoi que très fonctionnel comme service, j&#8217;ai pas pu m&#8217;empêcher de regarder le code HTML envoyé aux visiteurs et remarquer ces détails.</p>
<p>Ce qui m&#8217;a frappé et incité a faire ces remarques est la mention &#8220;<em>Optimisé pour Internet Explorer</em>&#8220;. J&#8217;ai tout de suite eu un flashback des années 2000.</p>
<p>&nbsp;</p>
<h3>Mes observations</h3>
<p><strong>Remarque</strong> Je suis conscient que la réalisation du site a pu être fait a la sauvette et qu&#8217;il y a peut être eu à faire plusieurs coins ronds, c&#8217;est malheureusement monaie courrante dans l&#8217;industrie du web. Le choix technologique imposé par la politique plutôt que l&#8217;expérience de celui réalisant le site peut aussi affecter la qualité. Pour contre-carrer les argumentaires vides, pourquoi ne pas s&#8217;armer en explications. Le but est constructif après tout :)</p>
<p>&nbsp;</p>
<h4>Annonce pour support spécifique <em>Internet Explorer</em></h4>
<p>Nous sommes en 2012. Le HTML5 est supporté et possible depuis 2009&#8230; même sous IE6.</p>
<p>Les conventions de navigation et la <strong>fonte du contenu</strong> par défaut est beaucoup trop petite, plus petite que la moyenne des sites</p>
<blockquote class="twitter-tweet tw-align-center"><p>Hé <a href="http://t.co/1lryt3hB" title="http://a25.com">a25.com</a> 2002 called, they want their &#8220;Optimized for Internet Explorer&#8221; quote back. <a href="https://twitter.com/search/?q=%23W3C"><s>#</s><b>W3C</b></a> <a href="https://twitter.com/search/?q=%23standards"><s>#</s><b>standards</b></a></p>
<p>&mdash; Renoir Boulanger (@renoirb) <a href="https://twitter.com/renoirb/status/240557073270722561" data-datetime="2012-08-28T21:10:50+00:00">August 28, 2012</a></p></blockquote>
<p><script src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>&nbsp;</p>
<h3>Données tableau en image</h3>
<p>Votre <a href="http://www.a25.com/#tarif"><strong>page tarifs</strong></a> donne des <strong>données tabulaire en image</strong></p>
<p>Quoi que très jolie image, des données alignées par des colones, un tableau est là pour ordonner des données par colones et rangées. La synthèse peut très mal se faire sur une image.</p>
<p>Je pourrai sortir l&#8217;argument de l&#8217;Accessibilité et vous allez me dire, un mal-voyant ne peut pas conduire. Peu importe. Une image c&#8217;est pour décorer.</p>
<p>&nbsp;</p>
<h3>Changement de pages en AJAX et URLs</h3>
<p>Les pages changent sous en AJAX (exemple <a href="http://www.a25.com/#joindre">#joindre</a> dans l&#8217;adresse) plutot qu&#8217;un URL unique par contenu avec adressage de langue au URL.</p>
<p>Si vous voulez réellement faire un changement à la AJAX, vous pouvez simplement capturer le clic sur certains liens (par usage d&#8217;une classe qui décrit le fonctionnement) puis un court bloc jQuery pourrait s&#8217;occuper de capturer le clic et changer le DOM via un <code>$.ajax</code></p>
<p>Le pire n&#8217;est pas que si votre visiteur n&#8217;utilise pas javascript pour des prétextes de sécurité. Mais aussi le SEO, vous perdez du contenu et ce sont pourtant des pages légitimes avec contenus qui vaudraient la peine d&#8217;être indexés et augumenteraient la qualité du point de vue SEO.</p>
<p>J&#8217;insiste sur ce fait car c&#8217;est du contenu référence. Un cas acceptable serait si ce serait du contenu en relation au temps (comme twitter par exemple) ou une vue spécifique a un utilisateur dans une application web.</p>
<p>&nbsp;</p>
<h3>Le SEO. Je l&#8217;ai dit</h3>
<p>D&#8217;accord, le SEO sert a optimiser la trouvabilité d&#8217;un document parmi plusieurs. Chaque partie d&#8217;un URI a son utilité. <a href="http://rield.com/how-to/url-design"><em>Jonas Jacek</em> le décrit bien dans son billet à ce sujet</a>.</p>
<p>Je ne suis pas un expert du SEO, mais regardons plus loin que cet argument. peut etre la valeut du mot dans le URL ou simplement un mauvais usage detourné.</p>
<p>Un URI dans ses composantes represente chaque element a son role. e.g. <code>http://host/corps/du/uri?query=value#anchor</code> alors le document pour me contacter serait dans le corps du url.</p>
<p>Le #hash dans le URL est normalement la pour representer un anchor (partie) dans UN document (parmi plusieurs) pas une page complete. Le Javascript supporte le history avec le #hash. Mais encore. Il degrade sans JS. Cool.  Un hash est pour un anchor.</p>
<p>Pourquoi donc ne pas faire <code>&lt;div onclick="javascript:window.location=http://foo.bar/"&gt;Hola!&lt;/div&gt;?</code>. Parce que le &lt;a /&gt; sert a faire un lien. Meme chose pour un anchor.</p>
<p>&nbsp;</p>
<h3>Fichiers attachés utilisé pour toutes les &#8220;sauces&#8221;</h3>
<p>Vos <strong>fichiers attachés</strong> sont des <strong>fichiers PDF plutot que d&#8217;être vers d&#8217;autres pages</strong>, encore perte de contenu cohérent et un signe d&#8217;echec d&#8217;usage d&#8217;un site web (un PDF est bon sur le web pour des formulaires ou on nécécessite impression et signature)</p>
<p>Les<strong> fichiers attachés ont des noms sous forme de phrases avec caractères spéciaux</strong>, nous ne sommes plus a l&#8217;époque du <code>8.3</code> (exemple de nom à l&#8217;époque: <code>MONFIC~1.BMP</code>) mais quand même.</p>
<p>Un fichier avec un nom résumé de deux trois mots ne nuit pas. Investissez plutôt du temps sur les méta données avant conversion au PDF et éviter d&#8217;avoir une tonne de fichiers au titre &#8220;Document Microsoft Word&#8221;.</p>
<p>&nbsp;</p>
<h3>CSS sur-spécifique avec utilisation de #ID inutile</h3>
<p>Les fichiers CSS et Javascript ne sont pas minifiés et/ou combinés, vous pourriez sauver du temps de chargement</p>
<p>Mais à mon opinion, la structure CSS démontre un certain manque de maîtrise de la structure en intégration de votre développeur web. Je ne suis pas parfait moi même, j&#8217;ai fait mon lot d&#8217;erreur, mais j&#8217;aimerai vous mettre au courrant qu&#8217;il y a beaucoup d&#8217;ouvrages et documentation sur les pratiques d&#8217;aujourd&#8217;hui que votre site pourrait profiter. La facilité de rendre votre site fonctionnel pour le mobile n&#8217;est qu&#8217;un parmi tant d&#8217;autres avantages.</p>
<p>Avez-vous déjà entendu parler de <a href="http://oocss.org/">OOCSS </a>ou <a href="http://smacss.com">SMACSS</a>?</p>
<h3>Fin</h3>
</p>
<p>Voilà, c&#8217;est mon premier billet dans la série de &#8220;Revue de code en Intégration web&#8221;. J&#8217;espère que vous trouverez inspirant</p>
<p>The post <a href="http://renoirboulanger.com/blog/2012/08/ma-critique-sur-lintegration-du-site-a25-com/">Ma critique sur l&#8217;intégration du site a25.com</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=HxYSv3KSmYY:qwnAc-8yHHw:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=HxYSv3KSmYY:qwnAc-8yHHw:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=HxYSv3KSmYY:qwnAc-8yHHw:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=HxYSv3KSmYY:qwnAc-8yHHw:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=HxYSv3KSmYY:qwnAc-8yHHw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=HxYSv3KSmYY:qwnAc-8yHHw:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2012/08/ma-critique-sur-lintegration-du-site-a25-com/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2012/08/ma-critique-sur-lintegration-du-site-a25-com/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ma-critique-sur-lintegration-du-site-a25-com</feedburner:origLink></item>
		<item>
		<title>What is Cloud computing when it is related to web application</title>
		<link>http://feedproxy.google.com/~r/RenoirBoulanger/~3/oVUupDTGOX0/</link>
		<comments>http://renoirboulanger.com/blog/2012/08/what-is-cloud-computing-when-it-is-related-to-web-application/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 15:25:38 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Tranche de vie]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[best-practices]]></category>
		<category><![CDATA[cloud-computing]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2713</guid>
		<description><![CDATA[<p>Some guidelines on what is Cloud Computing related to the scaling point of view. This is the continuity of the thread about a shopping cart and payment gateway commerce site using a CMS. The conversation persisted on what to do and look for cloud hosting.</p><p>The post <a href="http://renoirboulanger.com/blog/2012/08/what-is-cloud-computing-when-it-is-related-to-web-application/">What is Cloud computing when it is related to web application</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>During the discussion, the contributor persisted on knowing what would be considered and thresholds to use some kind of push-button-scaling.</p>
<p>Knowing his context, <a href="/blog/2012/08/some-steps-you-can-look-for-if-you-feel-your-web-application-is-slow">a unzipped install CMS with a buch of plugins</a> I felt the urge to explain that there is not always need to get a bigger server capacity. Here is an overview of what I mean when I talk about cloud computing and continuous integration.</p>
<h3>The E-Mail</h3>
<p>Let&#8217;s talk about cloud! </p>
<p>I mean in the web application hosting realm. Not the storage (Google Drive, Dropbox) or software as a service (Salesforce, Basecamp).</p>
<h4>Let&#8217;s talk about a use case before and my own experience.</h4>
<p>My former company <a href="http://evocatio.com/" rel="nofollow">Evocatio Solutions technologiques</a> manage a pretty large site at the domain <a href="https://uda.ca/">uda.ca</a>.</p>
<h3>The use-case on my recent experience</h3>
<p>This is a complete business management web application that manages an union who represents french speaking artists in north america (mostly residents of Canada).  We built a complete web application that manages many aspects an artist needs to represent themselves and be found. A big part of it is a 140 tables worth of artist description listing details as small a hair length and types of musical instruments to voice tones. It also manages renewal, communication with agencies, portfolios, and management of contracts with managers and more.</p>
<p>Not to forget the very heavy databases queries we generate to search, for example: &lt;example&gt;An <em>asian woman</em> with <em>white hair</em> playing <em>yuku lélé</em> who can <em>pilot helicopter</em> AND ride <em>motorcycle</em> &#8230;&lt;/example&gt; </p>
<p>Yes. Database queries get very big, very quickly. Not only in the search engine I described, but through all the features.</p>
<p>That, to my opinion, is heavy. Also considering that that Artist&#8217;s Union has several thousand members.</p>
<p>This information is on top of my head, please do not take this into real numbers, I did not look the latest deployment needs.  But for the server side, it only uses a simple Virtual machine with 4Gb of RAM give or take.</p>
<p>That is my point about expanding hosting without optimizing stuff around.</p>
<h3>What your web application has to consider then</h3>
<p>Amazon and other Cloud service is about mostly about automated server deployment.</p>
<p>But the powerful offering of &#8220;scale tour application&#8221; with computing cubes that automatically scales requires more than just nodes.</p>
<p>It requires the code (here again) to support:</p>
<ul>
<li>multiple databases hosts and types support (Cassandra, Solr, MySQL) specialized for the type of data to store</li>
<li>User upload files replication</li>
<li>Database/Keystore (CouchDB, Mongo)</li>
</ul>
<p>All spanable on multiple hosts by a mere change of one configuration file.</p>
<p>The code itself should:</p>
<ul>
<li>Be deployable by a simple phing/ant/nant task</li>
<li>Hosted on a NAS mount that you could create an other machine and use when time of computing need happens</li>
</ul>
<p>All this (for some parts)  is what is called <a href="http://agile.dzone.com/articles/digg-using-continuous">Continuous integration</a> (<a href="http://en.wikipedia.org/wiki/Continuous_integration">Wikipedia</a>) some <a href="http://stackoverflow.com/questions/425692/what-is-your-preferred-php-deployment-strategy" title="Reference on some good deployment strategies">deployment strategies</a> (<a href="http://stackoverflow.com/questions/2180460/setting-up-a-deployment-build-ci-cycle-for-php-projects" title="Other relevant StackOverflow thread">also here</a> and <a href="http://erichogue.ca/2011/05/php/continuous-integration-in-php/" title="Blog post and presentation about Continous Integration by EricHogue">this blog post too</a>), and most of the time. It&#8217;s not just the continuity and automation that matters, but the underlying deployment mechanism can be provided by third parties, like <a href="http://www.iamproblematic.com/why-i-like-heroku/" title="Blog post about what is nice about Heroku">Heroku</a> and many others.</p>
<p>The post <a href="http://renoirboulanger.com/blog/2012/08/what-is-cloud-computing-when-it-is-related-to-web-application/">What is Cloud computing when it is related to web application</a> appeared first on <a href="http://renoirboulanger.com">Renoir Boulanger</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=oVUupDTGOX0:JMTLph3v-G4:XhI0_UKdTUU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=oVUupDTGOX0:JMTLph3v-G4:XhI0_UKdTUU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=oVUupDTGOX0:JMTLph3v-G4:ds3RjYz8xlo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=ds3RjYz8xlo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=oVUupDTGOX0:JMTLph3v-G4:JwF4sU492aU"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?d=JwF4sU492aU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/RenoirBoulanger?a=oVUupDTGOX0:JMTLph3v-G4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RenoirBoulanger?i=oVUupDTGOX0:JMTLph3v-G4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2012/08/what-is-cloud-computing-when-it-is-related-to-web-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://renoirboulanger.com/blog/2012/08/what-is-cloud-computing-when-it-is-related-to-web-application/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=what-is-cloud-computing-when-it-is-related-to-web-application</feedburner:origLink></item>
	</channel>
</rss>
