<?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>Maurizio Conventi</title>
	<atom:link href="http://www.maurizioconventi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maurizioconventi.com</link>
	<description>interaction and development</description>
	<lastBuildDate>Mon, 13 Feb 2012 12:34:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<div id='fb-root'></div>
					<script type='text/javascript'>
						window.fbAsyncInit = function()
						{
							FB.init({appId: null, status: true, cookie: true, xfbml: true});
						};
						(function()
						{
							var e = document.createElement('script'); e.async = true;
							e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
							document.getElementById('fb-root').appendChild(e);
						}());
					</script>	
						<item>
		<title>Responsive Web Design with Twitter Bootstrap</title>
		<link>http://www.maurizioconventi.com/2012/02/08/responsive-web-design-with-twitter-bootstrap/</link>
		<comments>http://www.maurizioconventi.com/2012/02/08/responsive-web-design-with-twitter-bootstrap/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 11:54:11 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Responsive design]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[fluid layout]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mobile design]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[twitter bootstrap]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=213</guid>
		<description><![CDATA[Twitter Bootstrap 2.0 layout becomes fluid and this is a good news for developers. The Responsive Web Design is the practice to use fluid layouts and media queries to create designs able to adapt according to the user’s screen resolution. It allows to eliminate the need to create different designs (read templates) for each device (that in these days means desktop, netbook, tablet and mobile). If you want to read more about the Responsive Web Design approach I suggest a couple of articles from Smashing Magazine and Design Modo. Twitter Bootstrap gives you a fluid grid layout (the default grid system is a 940px-wide, 12-column grid but you can customize it here) and many css components to create a responsive design in few minutes. It means that you create your design using the Twitter Bootstrap grid and components then the toolkit modifies and resizes columns width, headings, texts and images according to the user device resolution. For this post I created a simple &#8220;marketing design&#8221; starting from the marketing design given with the library. I added a dropdown in the toolbar and a carousel (useful for example to show few screenshots). I think that the Twitter Bootstrap toolkit (as also [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2012/02/08/responsive-web-design-with-twitter-bootstrap/&amp;text=Responsive Web Design with Twitter Bootstrap&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p><strong>Twitter Bootstrap 2.0 layout becomes fluid</strong> and this is a good news for developers.<br />
The <strong>Responsive Web Design</strong> is the practice to use fluid layouts and media queries to create <strong>designs able to adapt according to the user’s screen resolution</strong>. It allows to eliminate the need to create different designs (read templates) for each device (that in these days means desktop, netbook, tablet and mobile).</p>
<p>If you want to read more about the Responsive Web Design approach I suggest a couple of articles from <a href="http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/" target="_blank">Smashing Magazine</a> and <a href="http://designmodo.com/responsive-design-examples/" target="_blank">Design Modo</a>.</p>
<p>Twitter Bootstrap gives you a fluid grid layout (the default grid system is a 940px-wide, 12-column grid but you can customize it <a href="http://twitter.github.com/bootstrap/download.html" target="_blank">here</a>) and many css components to create a responsive design in few minutes. It means that you create your design using the Twitter Bootstrap grid and components then the toolkit modifies and resizes columns width, headings, texts and images according to the user device resolution.</p>
<p>For this post <strong>I created a simple &#8220;marketing design&#8221;</strong> starting from the marketing design given with the library. <strong>I added a dropdown</strong> in the toolbar <strong>and a carousel</strong> (useful for example to show few screenshots).</p>
<p><a href="http://www.maurizioconventi.com/wp-content/uploads/2012/02/Fluid-layout_example.png"><img src="http://www.maurizioconventi.com/wp-content/uploads/2012/02/Fluid-layout_example-650x1024.png" alt="" title="Fluid-layout example" width="650" height="1024" class="aligncenter size-large wp-image-217" /></a></p>
<div style="text-align:center;">
<div id='wpdm_file_1' class='wpdm_file '>
<div class='cont'>
<div class='btn_outer'><a class='btn_left ' rel='1' title='Responsive Web Design with Twitter Bootstrap - example' href='http://www.maurizioconventi.com/?wpdmact=process&did=MS5ob3RsaW5r'  >Download the complete code example</a><span class='btn_right'><img src='http://www.maurizioconventi.com/wp-content/plugins/download-manager/icon/download.png'  height='16px'/></span></div>
<div class='clear'></div>
</div>
</div>
</div>
<p>I think that the Twitter Bootstrap toolkit (as also my example) can be a really useful starting point to create your own design, mainly to create a <strong>Minimum Viable Product</strong>. After that you can add your personal style avoiding to create an other Twitter clone <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2012/02/08/responsive-web-design-with-twitter-bootstrap/&amp;text=Responsive Web Design with Twitter Bootstrap&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2012/02/08/responsive-web-design-with-twitter-bootstrap/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2012/02/08/responsive-web-design-with-twitter-bootstrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phox wants to retire the upload forms</title>
		<link>http://www.maurizioconventi.com/2012/02/03/phox-wants-to-retire-the-upload-forms/</link>
		<comments>http://www.maurizioconventi.com/2012/02/03/phox-wants-to-retire-the-upload-forms/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 12:19:44 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[Phox]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[phox]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=206</guid>
		<description><![CDATA[I don&#8217;t use photo sharing platforms, but I like making photos. Few weeks ago I was thinking about why I don&#8217;t like using photo sharing platforms like Flickr or Picasa (I have an account on both). Then I understood&#8230;I don&#8217;t like upload the photos. I think that it&#8217;s time to retire the upload forms! Then I thought&#8230;but my photos are already online&#8230;I usually drag my photos into a dropbox folder shared with my girlfriend and my family! So Phox is born&#8230;from the need to share my photos avoiding to use an upload form (one or many upload forms considering that I could share my pictures on different platforms). I needed a tool able to copy my photos from dropbox on Flickr. The idea fascinated me and I created Phox with the idea that people need just to drag their photos into a dropbox folder (the Phox folder) and Phox will share that photos online. I released Phox in beta. At the moment it uploads your photos on Flickr and/or Facebook. My idea is to find few early adopters to get a feedback. Then I am going to add other features. Personally I find it really useful&#8230;the first time that I [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2012/02/03/phox-wants-to-retire-the-upload-forms/&amp;text=Phox wants to retire the upload forms&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maurizioconventi.com/wp-content/uploads/2012/02/Phox_logo.png"><img src="http://www.maurizioconventi.com/wp-content/uploads/2012/02/Phox_logo.png" alt="" title="Phox.me" width="87" height="45" class="alignleft size-full wp-image-209" /></a> I don&#8217;t use photo sharing platforms, but <strong>I like making photos</strong>. Few weeks ago I was thinking about why I don&#8217;t like using photo sharing platforms like Flickr or Picasa (I have an account on both). Then I understood&#8230;<strong>I don&#8217;t like upload the photos</strong>. I think that <strong>it&#8217;s time to retire the upload forms!</strong></p>
<p>Then I thought&#8230;but my photos are already online&#8230;I usually drag my photos into a dropbox folder shared with my girlfriend and my family!</p>
<p>So <strong>Phox is born</strong>&#8230;from the need to share my photos avoiding to use an upload form (one or many upload forms considering that I could share my pictures on different platforms). </p>
<p>I needed a tool able to copy my photos from dropbox on Flickr. The idea fascinated me and I created Phox with the idea that <strong>people need just to drag their photos into a dropbox folder</strong> (the Phox folder) and Phox will share that photos online.</p>
<p><a href="http://phox.me" target="_blank" title="visit Phox.me">I released Phox in beta</a>. At the moment it uploads your photos on Flickr and/or Facebook. My idea is to find few early adopters to get a feedback. Then I am going to add other features. </p>
<p>Personally I find it really useful&#8230;the first time that I used it I couldn&#8217;t believe that it was loading my photos on Flickr while I was walking on the beach with my laptop switched off!</p>
<p>This is what I mean when I say that <em>we must bring technology to people in the most elegant and transparent way</em>&#8230;you copy your photos into a folder and them are online (thanks to dropbox for the huge help)!</p>
<p>If you want to try Phox <a href="http://phox.me/newsletter/subscription/"  target="_blank" title="subscribe here">subscribe here</a> to receive an activation code. </p>
<p>If you want give your feedback or suggest new features you can do that <a href="http://phox.ideascale.com/"  target="_blank" title="phox ideascale">here</a>.</p>
<p>Help me creating something of useful <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2012/02/03/phox-wants-to-retire-the-upload-forms/&amp;text=Phox wants to retire the upload forms&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2012/02/03/phox-wants-to-retire-the-upload-forms/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2012/02/03/phox-wants-to-retire-the-upload-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A twitter like navigation topbar with Bootstrap</title>
		<link>http://www.maurizioconventi.com/2011/12/21/a-twitter-like-navigation-topbar-with-bootstrap/</link>
		<comments>http://www.maurizioconventi.com/2011/12/21/a-twitter-like-navigation-topbar-with-bootstrap/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 19:11:17 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=182</guid>
		<description><![CDATA[I want to show you how to create a twitter like navigation topbar in few minutes using Bootstrap. &#8220;Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.&#8221; As usual I am going to show you the code using Mootools or jQuery. The html code that you need to add at your page is the same in both cases: You need to add the stylesheet given by Bootstrap (you can start from it then you can download the uncompressed file to customize it). If you want to use jQuery all you need is to add jQuery, bootstrap-dropdown.js and call the dropdown function on the topbar: If you prefer Mootools you need to add the core library, the element shortcuts and the classes Bootstrap and Bootstrap.Dropdown: Here a demo of what you get Thanks to Twitter to have released the Bootstrap toolkit and to Aaron Newton for the &#8220;MooTools for Bootstrap&#8221; library. Personally I think that the Bootstrap toolkit can be really useful, it contains other interesting features that I hope to show you soon. Let me know what do you think [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/12/21/a-twitter-like-navigation-topbar-with-bootstrap/&amp;text=A twitter like navigation topbar with Bootstrap&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p>I want to show you how to create a twitter like navigation topbar in few minutes using Bootstrap.</p>
<blockquote><p>&#8220;Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.<br />
It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.&#8221;</p></blockquote>
<p>As usual I am going to show you the code using Mootools or jQuery.<br />
The <strong>html</strong> code that you need to add at your page is the same in both cases:</p>
<pre class="qoate-code">
&lt;div class="topbar" id="topbar"&gt;
    &lt;div class="fill"&gt;
        &lt;div class="container"&gt;
            &lt;a class="brand" href="#"&gt;Project name&lt;/a&gt;
            &lt;ul class="nav"&gt;
                &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#about"&gt;About&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;ul class="nav secondary-nav"&gt;
                &lt;li class="menu"&gt;
                    &lt;a href="#" class="menu"&gt;mconventi&lt;/a&gt;
                    &lt;ul class="menu-dropdown"&gt;
                        &lt;li&gt;&lt;a href="#"&gt;Settings&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"&gt;Help&lt;/a&gt;&lt;/li&gt;
                        &lt;li class="divider"&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"&gt;Sign out&lt;/a&gt;&lt;/li&gt;
                    &lt;/ul&gt;
                &lt;/li&gt;
            &lt;/ul&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>You need to add the <strong>stylesheet</strong> given by Bootstrap (you can start from it then you can download the uncompressed file to customize it).</p>
<pre class="qoate-code">
&lt;link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"&gt;
</pre>
<p>If you want to use <strong>jQuery</strong> all you need is to add <a href="http://www.maurizioconventi.com/wp-content/uploads/examples/bootstrap-topbar/jquery-js/jquery-1.7.1.min.js" target="_blank">jQuery</a>, <a href="http://www.maurizioconventi.com/wp-content/uploads/examples/bootstrap-topbar/jquery-js/bootstrap-dropdown.js" target="_blank" >bootstrap-dropdown.js</a> and call the dropdown function on the topbar:</p>
<pre class="qoate-code">
&lt;script src="&lt;your_path_here&gt;/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
&lt;script src="&lt;your_path_here&gt;/bootstrap-dropdown.js"&gt;&lt;/script&gt;
&lt;script&gt;
    $(window).load(function(){
        $('#topbar').dropdown();
    });
&lt;/script&gt;
</pre>
<p>If you prefer <strong>Mootools</strong> you need to add the <a href="http://www.maurizioconventi.com/wp-content/uploads/examples/bootstrap-topbar/mootools-js/mootools-core-1.4.2.js" target="_blank" >core library</a>, the <a href="http://www.maurizioconventi.com/wp-content/uploads/examples/bootstrap-topbar/mootools-js/mootools-element.shortcuts-1.4.0.1.js" target="_blank" >element shortcuts</a> and the classes <a href="http://www.maurizioconventi.com/wp-content/uploads/examples/bootstrap-topbar/mootools-js/Bootstrap.js" target="_blank" >Bootstrap</a> and <a href="http://www.maurizioconventi.com/wp-content/uploads/examples/bootstrap-topbar/mootools-js/Bootstrap.Dropdown.js" target="_blank" >Bootstrap.Dropdown</a>:</p>
<pre class="qoate-code">
&lt;script src="&lt;your_path_here&gt;/mootools-core-1.4.2.js"&gt;&lt;/script&gt;
&lt;script src="&lt;your_path_here&gt;/mootools-element.shortcuts-1.4.0.1.js"&gt;&lt;/script&gt;
&lt;script src="&lt;your_path_here&gt;/Bootstrap.js"&gt;&lt;/script&gt;
&lt;script src="&lt;your_path_here&gt;/Bootstrap.Dropdown.js"&gt;&lt;/script&gt;
&lt;script&gt;
    window.addEvent('domready', function(){
        new Bootstrap.Dropdown($('topbar'));
    });
&lt;/script&gt;
</pre>
<p><a href="http://www.maurizioconventi.com/wp-content/uploads/examples/bootstrap-topbar/examples/hero-mootools.html" target="_blank" >Here a demo</a> of what you get <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div style="text-align:center;">
<div id='wpdm_file_2' class='wpdm_file '>
<div class='cont'>
<div class='btn_outer'><a class='btn_left ' rel='2' title='A twitter like navigation topbar - example' href='http://www.maurizioconventi.com/?wpdmact=process&did=Mi5ob3RsaW5r'  >Download the complete code </a><span class='btn_right'><img src='http://www.maurizioconventi.com/wp-content/plugins/download-manager/icon/download.png'  height='16px'/></span></div>
<div class='clear'></div>
</div>
</div>
</div>
<p>Thanks to Twitter to have released the <a href="http://twitter.github.com/" target="_blank" >Bootstrap toolkit</a> and to <a href="http://www.aaronnewton.com/" target="_blank" >Aaron Newton</a> for the <a href="http://anutron.github.com/mootools-bootstrap/" target="_blank" >&#8220;MooTools for Bootstrap&#8221;</a> library.</p>
<p>Personally I think that the Bootstrap toolkit can be really useful, it contains other interesting features that I hope to show you soon. Let me know what do you think about this post, thanks <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/12/21/a-twitter-like-navigation-topbar-with-bootstrap/&amp;text=A twitter like navigation topbar with Bootstrap&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/12/21/a-twitter-like-navigation-topbar-with-bootstrap/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/12/21/a-twitter-like-navigation-topbar-with-bootstrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-Blocking JavaScript with Clumpy</title>
		<link>http://www.maurizioconventi.com/2011/11/02/non-blocking-javascript-with-clumpy/</link>
		<comments>http://www.maurizioconventi.com/2011/11/02/non-blocking-javascript-with-clumpy/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 12:43:43 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clumpy]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[non-blocking]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=148</guid>
		<description><![CDATA[Some months ago I worked on an experimental interface (I&#8217;d like to publish a post regarding it soon). I had a problem acting with javascript on a big number of dom elements. To solve that problem I used Clumpy. &#8220;Clumpy emulates for, for&#8230;in, while, do&#8230;while, continue, and break. These can be labeled, nested, chained, and interspersed with non-loop operations. Execution can be paused and resumed in various ways. It creates a managed chain of timeouts, promising to perform all the iterations in the proper order. The number of iterations performed in each single “clump” of execution is adjusted transparently to suit the speed of the computer executing the code.&#8221; I found it really useful and interesting so I created two simple examples to show why it could be useful also for your projects. In this case we want to append a text to an element 2000 times. Here you can see (and explore thanks to JSFiddle) my code in a standard loop. If you run it you&#8217;ll see that the code blocks your page. Here there is the same code (adapted to use Clumpy). Run it to see the difference. Thanks to JSFiddle you can interact with my code, try [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/11/02/non-blocking-javascript-with-clumpy/&amp;text=Non-Blocking JavaScript with Clumpy&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256.png"><img src="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256-150x150.png" alt="" title="Javascript tutorial" width="150" height="150" class="alignleft size-thumbnail wp-image-126" /></a></p>
<p>
Some months ago I worked on an experimental interface (I&#8217;d like to publish a post regarding it soon). I had a problem acting with javascript on a big number of dom elements. To solve that problem I used <a href="http://www.tumuski.com/code/clumpy/overview/" title="Clumpy" alt="Clumpy" target="_blank">Clumpy</a>.</p>
<p>&#8220;Clumpy emulates for, for&#8230;in, while, do&#8230;while, continue, and break. These can be labeled, nested, chained, and interspersed with non-loop operations. Execution can be paused and resumed in various ways.</p>
<p>It creates a managed chain of timeouts, promising to perform all the iterations in the proper order. The number of iterations performed in each single “clump” of execution is adjusted transparently to suit the speed of the computer executing the code.&#8221;</p>
<p>I found it really useful and interesting so I created two simple examples to show why it could be useful also for your projects.</p>
<p>In this case we want to append a text to an element 2000 times. Here you can see (and explore thanks to JSFiddle) my code in a standard loop. If you run it you&#8217;ll see that the code blocks your page.
</p>
<style>
.iframe-class {
   border: solid 1px #DADADA !important;
}
</style>
<p><!-- Iframe plugin v.2.1 (wordpress.org/extend/plugins/iframe/) --><br />
<iframe height="450" width="659" src="http://jsfiddle.net/FVjBr/6/embedded/" allowfullscreen="allowfullscreen" frameborder="1" scrolling="no" class="iframe-class"></iframe></p>
<p>
Here there is the same code (adapted to use Clumpy). Run it to see the difference.
</p>
<p><!-- Iframe plugin v.2.1 (wordpress.org/extend/plugins/iframe/) --><br />
<iframe height="450" width="659" src="http://jsfiddle.net/fMjNw/16/embedded/" allowfullscreen="allowfullscreen" frameborder="1" scrolling="no" class="iframe-class"></iframe></p>
<p>
Thanks to JSFiddle you can interact with my code, try to change the number of iterations in both examples and see what happens.<br />
<br />
To read more about Clumpy visit the <a href="http://www.tumuski.com/code/clumpy/usage/" title="Clumpy usage guide" alt="Clumpy usage guide" target="_blank">usage guide</a> and let me know.<br />
Enjoy <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/11/02/non-blocking-javascript-with-clumpy/&amp;text=Non-Blocking JavaScript with Clumpy&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/11/02/non-blocking-javascript-with-clumpy/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/11/02/non-blocking-javascript-with-clumpy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to avoid a js action if the mouse is over an element</title>
		<link>http://www.maurizioconventi.com/2011/10/20/how-to-avoid-a-js-action-if-the-mouse-is-over-an-element/</link>
		<comments>http://www.maurizioconventi.com/2011/10/20/how-to-avoid-a-js-action-if-the-mouse-is-over-an-element/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 12:27:10 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[clearTimeout]]></category>
		<category><![CDATA[domready]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[setTimeout]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=139</guid>
		<description><![CDATA[Working with javascript you can have a problem like that: you want to call an action after few milliseconds from the onready event. To do that you can use the setTimeout function at the domready event. For example we want to show the alert &#8216;Hello setTimeout World&#8217; after 1000 ms from the domready event. Using Mootools: Using jQuery: Now, if we want to avoid to show the alert if, at the page loading, the mouse is over a particular dom element, we can clear our timeout. Using Mootools: Using jQuery: What do you think about this solution? Let me know
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/10/20/how-to-avoid-a-js-action-if-the-mouse-is-over-an-element/&amp;text=How to avoid a js action if the mouse is over an element&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256.png"><img src="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256-150x150.png" alt="" title="Javascript tutorial" width="150" height="150" class="alignleft size-thumbnail wp-image-126" /></a>Working with javascript you can have a problem like that: you want to call an action after few milliseconds from the onready event.</p>
<p>To do that you can use the <strong>setTimeout</strong> function at the <strong>domready event</strong>.<br />
For example we want to show the alert &#8216;Hello setTimeout World&#8217; after 1000 ms from the domready event.</p>
<p><strong>Using Mootools</strong>:</p>
<pre class="qoate-code">
window.addEvent('domready', initHandler);

var g_initial_timeout = null;
var initHandler = function() {
    initial_timeout = setTimeout(function() {
        alert('Hello setTimeout World');
    }, 1000);
};
</pre>
<p><strong>Using jQuery</strong>:</p>
<pre class="qoate-code">
$(window).load(initHandler);

var g_initial_timeout = null;
var initHandler = function() {
    initial_timeout = setTimeout(function() {
        alert('Hello setTimeout World');
    }, 1000);
};
</pre>
<p>Now, if we want to avoid to show the alert if, at the page loading, the mouse is over a particular dom element, <strong>we can clear our timeout</strong>.</p>
<p><strong>Using Mootools</strong>:</p>
<pre class="qoate-code">
$('your-element-id').addEvent('mouseover', function(){
    if (g_initial_timeout) {
        clearTimeout(g_initial_timeout);
    }
});
</pre>
<p><strong>Using jQuery</strong>:</p>
<pre class="qoate-code">
$('#your-element-id').hover(function(){
    if (g_initial_timeout) {
        clearTimeout(g_initial_timeout);
    }
});
</pre>
<p>What do you think about this solution? Let me know <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/10/20/how-to-avoid-a-js-action-if-the-mouse-is-over-an-element/&amp;text=How to avoid a js action if the mouse is over an element&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/10/20/how-to-avoid-a-js-action-if-the-mouse-is-over-an-element/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/10/20/how-to-avoid-a-js-action-if-the-mouse-is-over-an-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Anchors in AJAX base web apps</title>
		<link>http://www.maurizioconventi.com/2011/09/14/using-anchors-in-ajax-base-web-apps/</link>
		<comments>http://www.maurizioconventi.com/2011/09/14/using-anchors-in-ajax-base-web-apps/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 12:17:58 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=125</guid>
		<description><![CDATA[In these years the use of AJAX calls and javascript in web pages is grown. Javascript could be really useful to create web based apps, reduce loading time of pages and create fancy web pages. Using javascript to change the contents in your pages could create big problems with the back button &#8230;I know, it&#8217;s always it Image if your user: - opens a section loaded using an AJAX call (but also only to show/hide contents) - then shows an other section - then clicks on the back button …ouch…your user&#8217;s browser doesn&#8217;t remember her actions! See the following example (note, I didn&#8217;t use js libraries to give you a simple generic example but I am sure you can use your favorite js library Now we are going to see how Anchors can help us. See this new example: What&#8217;s the difference? This last example uses a function that checks the anchor every 400ms. In this case we don&#8217;t have a function called at the onclick event. The periodic function checks if the anchor is coherent with the currently opened section and in case opens the correct one. Advantages: if you click on the back/forward button you&#8217;ll have a coherent [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/09/14/using-anchors-in-ajax-base-web-apps/&amp;text=Using Anchors in AJAX base web apps&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256.png"><img class="alignleft size-full wp-image-126" title="Javascript tutorial" src="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256.png" alt="" width="65" height="65" /></a>In these years the use of AJAX calls and javascript in web pages is grown.<br />
Javascript could be really useful to create web based apps, reduce loading time of pages and create fancy web pages.</p>
<p><strong>Using javascript to change the contents in your pages could create big problems with the back button </strong>&#8230;I know, it&#8217;s always it <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Image if your user:<br />
- opens a section loaded using an AJAX call (but also only to show/hide contents)<br />
- then shows an other section<br />
- then clicks on the back button</p>
<p>…ouch…your user&#8217;s browser doesn&#8217;t remember her actions!</p>
<p>See the following example</p>
<pre class="qoate-code">
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
  &lt;head&gt;

    &lt;style&gt;
        .hidden {display:none;}
    &lt;/style&gt;
    &lt;script type="text/javascript"&gt;
        var showSection = function(p_section_id){
            var section = document.getElementById(p_section_id);

            if (hasClass(section, 'hidden')) {
                hideOpenSections();
                removeClass(section, 'hidden');
            }

            return false;
        }
        // Hides all the open sections
        var hideOpenSections = function(){
            var sections = document.getElementsByTagName("p");

            for(var i=0; i &lt; sections.length; i++) {
              if (hasClass(sections[i], 'section') &#038;&#038; !hasClass(sections[i], 'hidden')) {
                  addClass(sections[i], 'hidden');
              }
            }
        }
        // Uses a regular expression to check if an element has a class
        var hasClass = function(p_element, p_class_name){
            return new RegExp('\\b'+p_class_name+'\\b').test(p_element.className)
        }
        // Removes a class from an element
        var removeClass = function(p_element, p_class_name){
            var rep=p_element.className.match(' '+p_class_name)?' '+p_class_name:p_class_name;
            p_element.className=p_element.className.replace(rep,'');
        }
        // Adds a class to an element
        var addClass = function(p_element, p_class_name){
            p_element.className += ' ' + p_class_name;
        }
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div&gt;
        &lt;h2&gt;&lt;a href="." onclick="return showSection('section_a');"&gt;Section A&lt;/a&gt;&lt;/h2&gt;
        &lt;p id="section_a" class="section"&gt;
            This is the content for the section A
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;h2&gt;&lt;a href="." onclick="return showSection('section_b');"&gt;Section B&lt;/a&gt;&lt;/h2&gt;
        &lt;p id="section_b" class="section hidden"&gt;
            This is the content for the section B
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;h2&gt;&lt;a href="." onclick="return showSection('section_c');"&gt;Section C&lt;/a&gt;&lt;/h2&gt;
        &lt;p id="section_c" class="section hidden"&gt;
            This is the content for the section C
        &lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>(note, I didn't use js libraries to give you a simple generic example but I am sure you can use your favorite js library <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Now we are going to see <strong>how Anchors can help us</strong>.<br />
See this new example:</p>
<pre class="qoate-code">
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
  &lt;head&gt;

    &lt;style&gt;
        .hidden {display:none;}
    &lt;/style&gt;
    &lt;script type="text/javascript"&gt;
        var init = function(){
            setInterval("checkSection()", 400);
        }

        // Every 400ms checks if the section currently showed is the right one
        var checkSection = function(p_section_id){
            current_anchor = document.location.hash.substring(1);

            var section = document.getElementById(current_anchor);
            if (section &#038;&#038; hasClass(section, 'hidden')) {
                hideOpenSections();
                removeClass(section, 'hidden');
            }
        }
        // Hides all the open sections
        var hideOpenSections = function(){
            var sections = document.getElementsByTagName("p");

            for(var i=0; i &lt; sections.length; i++) {
              if (hasClass(sections[i], 'section') &#038;&#038; !hasClass(sections[i], 'hidden')) {
                  addClass(sections[i], 'hidden');
              }
            }
        }
        // Uses a regular expression to check if an element has a class
        var hasClass = function(p_element, p_class_name){
            return new RegExp('\\b'+p_class_name+'\\b').test(p_element.className)
        }
        // Removes a class from an element
        var removeClass = function(p_element, p_class_name){
            var rep=p_element.className.match(' '+p_class_name)?' '+p_class_name:p_class_name;
            p_element.className=p_element.className.replace(rep,'');
        }
        // Adds a class to an element
        var addClass = function(p_element, p_class_name){
            p_element.className += ' ' + p_class_name;
        }
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="init()"&gt;
    &lt;div&gt;
        &lt;h2&gt;&lt;a href="#section_a"&gt;Section A&lt;/a&gt;&lt;/h2&gt;
        &lt;p id="section_a" class="section"&gt;
            This is the content for the section A
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;h2&gt;&lt;a href="#section_b"&gt;Section B&lt;/a&gt;&lt;/h2&gt;
        &lt;p id="section_b" class="section hidden"&gt;
            This is the content for the section B
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;h2&gt;&lt;a href="#section_c"&gt;Section C&lt;/a&gt;&lt;/h2&gt;
        &lt;p id="section_c" class="section hidden"&gt;
            This is the content for the section C
        &lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>What's the difference?<br />
This last example uses a function that checks the anchor every 400ms. In this case we don't have a function called at the onclick event. The periodic function checks if the anchor is coherent with the currently opened section and in case opens the correct one.</p>
<p><strong>Advantages</strong>: <strong>if you click on the back/forward button</strong> you'll have a coherent behavior. There is also a second advantage, <strong>we don't have js code in the html</strong> (also if you can obtain this last advantage even in other ways).</p>
<p>Naturally, suggestions  and comments are welcomed <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/09/14/using-anchors-in-ajax-base-web-apps/&amp;text=Using Anchors in AJAX base web apps&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/09/14/using-anchors-in-ajax-base-web-apps/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/09/14/using-anchors-in-ajax-base-web-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text highlighting filter with Django</title>
		<link>http://www.maurizioconventi.com/2011/06/28/text-highlighting-filter-with-django/</link>
		<comments>http://www.maurizioconventi.com/2011/06/28/text-highlighting-filter-with-django/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 10:46:38 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[snippets]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=111</guid>
		<description><![CDATA[Recently, working with Django, I needed a simple template filter with which highlight a string in a block of text. I found this snippet (thank you at the author to shared his work) but I modified it because I needed a case insensitive filter. I used it to highlight the filter string in the text resulting of a search. The filter is really simple but I want post it in order to help someone else who needs something similar. Here my filter: from django import template from django.utils.safestring import mark_safe register = template.Library() import re @register.filter(name='highlight') def highlight(text, filter): pattern = re.compile(r"(?P&#60;filter&#62;%s)" % filter, re.IGNORECASE) return mark_safe(re.sub(pattern, r"&#60;span class='highlight'&#62;\g&#60;filter&#62;&#60;/span&#62;", text)) To use it in a template you have to define the filter search in this way: {{text_block&#124;highlight:filter_string}}. After that you need only set the style for the span.highlight in your css file. Use it
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/06/28/text-highlighting-filter-with-django/&amp;text=Text highlighting filter with Django&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<div id="attachment_112" class="wp-caption alignleft" style="width: 246px"><a href="http://www.maurizioconventi.com/wp-content/uploads/2011/06/djangosnippets.gif"><img class="size-full wp-image-112" title="Django Snippets" src="http://www.maurizioconventi.com/wp-content/uploads/2011/06/djangosnippets.gif" alt="Django Snippets" width="236" height="70" /></a>
<p class="wp-caption-text">Django Snippets Logo</p>
</div>
<p>Recently, working with Django, I needed a simple template filter with which highlight a string in a block of text.</p>
<p>I found <a title="this snippet" href="http://djangosnippets.org/snippets/1242/" target="_blank">this snippet</a> (thank you at the author to shared his work) but I modified it because I needed a case insensitive filter. I used it to highlight the filter string in the text resulting of a search.</p>
<p>The filter is really simple but I want post it in order to help someone else who needs something similar.</p>
<p>Here my filter:<br />
<code><br />
from django import template<br />
from django.utils.safestring import mark_safe<br />
register = template.Library()<br />
import re<br />
@register.filter(name='highlight')<br />
def highlight(text, filter):<br />
pattern = re.compile(r"(?P&lt;filter&gt;%s)" % filter, re.IGNORECASE)<br />
return mark_safe(re.sub(pattern, r"&lt;span class='highlight'&gt;\g&lt;filter&gt;&lt;/span&gt;", text))<br />
</code><br />
To use it in a template you have to define the filter search in this way: <code>{{text_block|highlight:filter_string}}</code>.<br />
After that you need only set the style for the span.highlight in your css file.<br />
Use it <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/06/28/text-highlighting-filter-with-django/&amp;text=Text highlighting filter with Django&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/06/28/text-highlighting-filter-with-django/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/06/28/text-highlighting-filter-with-django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online vs Offline interactions</title>
		<link>http://www.maurizioconventi.com/2011/06/23/online-vs-offline-interactions/</link>
		<comments>http://www.maurizioconventi.com/2011/06/23/online-vs-offline-interactions/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 10:29:33 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[Comments]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=103</guid>
		<description><![CDATA[Paul Adams, a researcher for &#8216;Social&#8217; at Facebook (previously at Google), in &#8220;The Real Life Social Network&#8221; writes about differences between social interactions online, and offline. I found really interesting his work so I want reassume some useful Paul&#8217;s considerations that designers can follow (I suggest to read his work). There are some important differences between the social interactions that people create online (with social networks) and offline (in the all days life). This creates many problems, and few opportunities. People don&#8217;t have one group of friends but they tend to have independent group of people with which they shared life stages and experiences. Not only do we not have one group of friends but, also in the same group, we are closer to some than others. On social networks (or in our mobile phones) all our contacts appear alphabetically without considering there differences. Yes, we can group them but they appear to us in the same way. Also if people use to have hundreds of friends, the majority of them interact regularly with few of them. Usually the people with which we interact are also the people that influence us in purchase decisions. There are hundreds of people that [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/06/23/online-vs-offline-interactions/&amp;text=Online vs Offline interactions&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<div id="attachment_106" class="wp-caption alignleft" style="width: 310px"><a href="http://www.maurizioconventi.com/wp-content/uploads/2011/06/social_interactions.png"><img class="size-medium wp-image-106 " title="Paul Adams: Independent groups of friends " src="http://www.maurizioconventi.com/wp-content/uploads/2011/06/social_interactions-300x225.png" alt="Paul Adams: Independent groups of friends" width="300" height="225" /></a>
<p class="wp-caption-text">Independent groups of friends</p>
</div>
<p><a title="Paul Adams" href="http://www.thinkoutsidein.com/" target="_blank">Paul Adams</a>, a researcher for &#8216;Social&#8217; at Facebook (previously at Google), in &#8220;<a title="The Real Life Social Network" href="http://www.slideshare.net/padday/the-real-life-social-network-v2" target="_blank">The Real Life Social Network</a>&#8221; writes about differences between social interactions online, and offline.</p>
<p>I found really interesting his work so I want reassume some useful Paul&#8217;s considerations that designers can follow (I suggest to read his work).</p>
<p>There are some important differences between the social interactions that people create online (with social networks) and offline (in the all days life). This creates many problems, and few opportunities.</p>
<p><strong>People don&#8217;t have one group of friends</strong> but they tend to have independent group of people with which they shared life stages and experiences.<br />
Not only do we not have one group of friends but, also in the same group, <strong>we are closer to some than others</strong>. On social networks (or in our mobile phones) all our contacts appear alphabetically without considering there differences. Yes, we can group them but they appear to us in the same way.</p>
<p>Also if people use to have hundreds of friends, the majority of them interact regularly with few of them. Usually the people with which we interact are also the people that influence us in purchase decisions.<br />
<strong>There are hundreds of people that you know, but you can&#8217;t consider all as friends. </strong>The way we communicate with our friends&#8217; friends or people we met recently is completely different from the way we interact with our close friends. Now with the social network we tend to maintain that connections. We don&#8217;t do that in the offline life.</p>
<p><strong>People don&#8217;t have only one &#8220;identity&#8221;.</strong> People appear differently to different audiences and usually we care deeply about how we look to others. People act one way with their family, they act another way in work, and they act another way with their best friends.<br />
In the online life, it is hard to set things up so that one group to see you one way, and another group to see you a different way.  People have workarounds to manage this, including multiple email accounts, multiple Twitter or Facebook accounts.</p>
<p>Furthermore, what people &#8220;say&#8221; online can be read and searched by all and remains there for long time. <strong>People need to understand the consequences of their actions online.</strong></p>
<p><strong>What designers can do:</strong><br />
- <strong>Design for multiple groups.</strong> Allow people to create groups (and rename a group if it changes over time) and allow people to create conversation threads with only few people (Google Wave followed that idea).<br />
- <strong>Design for different relationships.</strong> Don&#8217;t try to design something for all types of relationships. You&#8217;ll simply end up with a compromised solution for everyone.<br />
- <strong>Design tools to support how people look to others.</strong> Help people do understand what are the consequences of their actions, and make these things clear.</p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/06/23/online-vs-offline-interactions/&amp;text=Online vs Offline interactions&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/06/23/online-vs-offline-interactions/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/06/23/online-vs-offline-interactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No sortable columns in Moodgets</title>
		<link>http://www.maurizioconventi.com/2011/05/19/no-sortable-columns-in-moodgets/</link>
		<comments>http://www.maurizioconventi.com/2011/05/19/no-sortable-columns-in-moodgets/#comments</comments>
		<pubDate>Thu, 19 May 2011 09:48:41 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[Moodgets]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[moodgets]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=91</guid>
		<description><![CDATA[I use a request on the moodgets discussion group to create a new quick tutorial about how to create plugins for Moodgets. How can I avoid the sorting of a column (the request is not exactly this but it can solve the issue ) ? When you need to create or modify features for moodgets I suggest to create a new plugin (see this post ) and, if possible to start from an existing one. Now we are going to cover this last case. We can start our plugin by the SortableGridPlugin.js. The idea is to copy and past the source file renaming it to “MySortarbleGridPlugin.js”. Then you need to modify the name and id of your new file: var MySortableGridPlugin = new Class({ Extends: GridPlugin, id: 'MySortableGridPlugin', … … … At this point we can make our changes at our new plugin, in this case we are going to check if into the column model there is a flag “sortable:false” (to default we can leave every column sortable). If you read the source code of the function “onNewHeaderCellHandler” you can find the following lines of code: p_headerCell.store('sort', p_columnModel.sort); p_headerCell.addEvent('click', this.onHeaderClickHandler.bind(this)); p_headerCell.addEvent('mouseout', this.onHeaderOutHandler.bind(this)); p_headerCell.addEvent('mouseover', this.onHeaderOverHandler.bind(this)); That lines add the events [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/05/19/no-sortable-columns-in-moodgets/&amp;text=No sortable columns in Moodgets&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maurizioconventi.com/wp-content/uploads/2010/08/moodgets.gif"><img class="alignleft size-full wp-image-29" title="Logo Moodgets" src="http://www.maurizioconventi.com/wp-content/uploads/2010/08/moodgets.gif" alt="Logo Moodgets" width="143" height="100" /></a><br />
I use a request on the moodgets discussion group to create a new quick tutorial about how to create plugins for Moodgets.</p>
<p>How can I avoid the sorting of a column (the request is not exactly this but it can solve the issue <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) ?</p>
<p>When you need to create or modify features for moodgets I suggest to create a new plugin (see <a href="http://www.maurizioconventi.com/?p=47">this post</a> ) and, if possible to start from an existing one.</p>
<p>Now we are going to cover this last case.<br />
We can start our plugin by the SortableGridPlugin.js. The idea is to copy and past the source file renaming it to “MySortarbleGridPlugin.js”. Then you need to modify the name and id of your new file:</p>
<p><code><br />
var MySortableGridPlugin = new Class({</code></p>
<p><code> Extends: GridPlugin,</code></p>
<p><code> </code></p>
<p><code> id: 'MySortableGridPlugin',<br />
…<br />
…<br />
…<br />
</code><br />
At this point we can make our changes at our new plugin, in this case we are going to check if into the column model there is a flag “sortable:false” (to default we can leave every column sortable). If you read the source code of the function “onNewHeaderCellHandler” you can find the following lines of code:<br />
<code><br />
p_headerCell.store('sort', p_columnModel.sort);<br />
p_headerCell.addEvent('click', this.onHeaderClickHandler.bind(this));<br />
p_headerCell.addEvent('mouseout', this.onHeaderOutHandler.bind(this));<br />
p_headerCell.addEvent('mouseover', this.onHeaderOverHandler.bind(this));<br />
</code></p>
<p>That lines add the events listeners to a new column header. Our idea is to avoid to attach the listeners if we have the flag “sortable:false” in the column model (the column model object is passed as parameter to the “onNewHeaderCellHandler” function).</p>
<p>Our code becomes:<br />
<code><br />
if (!$defined(p_columnModel.sortable) || p_columnModel.sortable == true){<br />
p_headerCell.store('sort', p_columnModel.sort);<br />
p_headerCell.addEvent('click', this.onHeaderClickHandler.bind(this));<br />
p_headerCell.addEvent('mouseout', this.onHeaderOutHandler.bind(this));<br />
p_headerCell.addEvent('mouseover', this.onHeaderOverHandler.bind(this));<br />
}<br />
</code><br />
Now we can use our new plugin when we define a grid. For example if we want that the “title” column can&#8217;t be sorted we can define our column model in this way:<br />
<code><br />
var demo_columnModel = [{<br />
header: "ID",<br />
dataIndex: 'id',<br />
dataType:'number',<br />
width:50<br />
},{<br />
header: "Name",<br />
dataIndex: 'first_name',<br />
dataType:'string',<br />
width:105,<br />
sortable: false,<br />
validator: 'required validate-alpha maxLength:30',<br />
isEditable: true<br />
}]<br />
</code></p>
<p>then we define the grid using our new plugin:<br />
<code><br />
var g_grid = new Grid($('grid'), {<br />
dataStore: new RemoteDataStore({requestOptions:{url: ...}}),<br />
columnModel: new ColumnModel(demo_columnModel),<br />
gridPlugins: [<br />
new MySortableGridPlugin()<br />
]<br />
});<br />
</code></p>
<p>If you want you can download the <a href="http://www.maurizioconventi.com/wp-content/uploads/2011/05/MySortableGridPlugin.js">MySortableGridPlugin source file</a> .</p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/05/19/no-sortable-columns-in-moodgets/&amp;text=No sortable columns in Moodgets&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/05/19/no-sortable-columns-in-moodgets/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/05/19/no-sortable-columns-in-moodgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About using css classes with javascript</title>
		<link>http://www.maurizioconventi.com/2011/05/09/about-using-css-classes-with-javascript/</link>
		<comments>http://www.maurizioconventi.com/2011/05/09/about-using-css-classes-with-javascript/#comments</comments>
		<pubDate>Mon, 09 May 2011 10:08:42 +0000</pubDate>
		<dc:creator>Maurizio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.maurizioconventi.com/?p=79</guid>
		<description><![CDATA[Personally I try to avoid to manage directly the elements style when I develop with javascript. For example, if you need to hide a DOM element using javascript you can use the hard coded approach: or you can just use a css class: where hidden is a css class: NOTE: you can use also “display:none !important”; but be careful to use the “!important” property in your css elements, it can be really useful but it becomes without effects if you abuse. Ok, now, first of all, I strongly suggest you to use javascript libraries like jQuery, Mootools, etc&#8230;the are different advantages to use them and it can be alone a subject for one or more posts. Often I use Mootools in my projects (I developed Moodgets on Mootools) so we can write the previous code with it. If you use the hard coded approach the first example becomes following the approach which I prefer the first example becomes: where: Why I prefer to use the second approach: it is more elegant and clear because you split the interaction layer (javascript code) by the graphic layer (style attributes). In this way you can change the style attributes without modify the javascript [...]
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/05/09/about-using-css-classes-with-javascript/&amp;text=About using css classes with javascript&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256.png"><img class="alignleft size-full wp-image-126" title="Javascript tutorial" src="http://www.maurizioconventi.com/wp-content/uploads/2011/09/File_Adobe_Dreamweaver_JavaScript_Icon_256.png" alt="" width="154" height="154" /></a>Personally I try to avoid to manage directly the elements style when I develop with javascript.</p>
<p>For example, if you need to hide a DOM element using javascript you can use the hard coded approach:</p>
<pre class="qoate-code">document.getElementById(“myElementID”).style.display = "none";</pre>
<p>or you can just use a css class:</p>
<pre class="qoate-code">document.getElementById(“myElementID”).className += “ hidden”;</pre>
<p>where hidden is a css class:</p>
<pre class="qoate-code">
.hidden {
   display: none;
}
</pre>
<p>NOTE: you can use also “<code>display:none !important</code>”; but be careful to use the “<code>!important</code>” property in your css elements, it can be really useful but it becomes without effects if you abuse.</p>
<p>Ok, now, first of all, I strongly suggest you to use javascript libraries like jQuery, Mootools, etc&#8230;the are different advantages to use them and it can be alone a subject for one or more posts.</p>
<p>Often I use Mootools in my projects (I developed Moodgets on Mootools) so we can write the previous code with it. If you use the hard coded approach the first example becomes</p>
<pre class="qoate-code">$(“myElementID”).setStyle(“display”, “none”);</pre>
<p>following the approach which I prefer the first example becomes:</p>
<pre class="qoate-code">$(“myElementID”).addClass(“hidden”);</pre>
<p>where:</p>
<pre class="qoate-code">
.hidden {
   display: none;
}
</pre>
<p>Why I prefer to use the second approach:<br />
it is more elegant and clear because you split the interaction layer (javascript code) by the graphic layer (style attributes). In this way you can change the style attributes without modify the javascript code.<br />
It allows you to create better programs. Consider the case in which you need to show and hide a DOM element when the user clicks on a link (Note: I&#8217;m using the Mootools library for this example).</p>
<p>With the first approach you need to create something like that:</p>
<pre class="qoate-code">
function onClickHandler(){
   var my_element = $(“myElementID”);
   if (my_element.getStyle(“display”) == “none”){
      my_element.setStyle(“display”, “block”);
   }else{
      my_element.setStyle(“display”, “none”);
   }
}
</pre>
<p>Using the style which I prefer you can write:</p>
<pre class="qoate-code">
function onClickHandler(){
   $(“myElementID”).toggleClass(“hidden”);
}</pre>
<p>Isn&#8217;t it better?!</p>
<p>Naturally, this approach is strongly suggested even when you are writing style for html tags but I&#8217;m sure that you knew!</p>
<p>Do you have comments about my post? Do you prefer the first or the second approach when you develop with javascript? Let me know, write a comment <img src='http://www.maurizioconventi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="twitterbutton" style="float: right; padding-left: 5px;"><a href="http://twitter.com/share?url=http://www.maurizioconventi.com/2011/05/09/about-using-css-classes-with-javascript/&amp;text=About using css classes with javascript&amp;via=mconventi&amp;related=DolcePixel"><img align="right" src="http://www.maurizioconventi.com/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.maurizioconventi.com/2011/05/09/about-using-css-classes-with-javascript/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='true' /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.maurizioconventi.com/2011/05/09/about-using-css-classes-with-javascript/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

