<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">

<channel>
	<title>Bell &amp; Whistle Blog</title>
	
	<link>http://blog.bell-n-whistle.com</link>
	<description>Bell &amp; Whistle Blog</description>
	<lastBuildDate>Mon, 23 Jan 2012 17:17:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BellnWhistleBlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="bellnwhistleblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Sabes programar apps en iPhone? Te gusta bacilarte en la chamba? Contáctanos!</title>
		<link>http://blog.bell-n-whistle.com/2012/01/23/buscando-programador-iphone/</link>
		<comments>http://blog.bell-n-whistle.com/2012/01/23/buscando-programador-iphone/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 17:06:54 +0000</pubDate>
		<dc:creator>Inés Peschiera</dc:creator>
				<category><![CDATA[Jobs]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=273</guid>
		<description><![CDATA[Ha llegado la hora. Bell &#38; Whistle busca programador con dominio de iOS para formar parte de nuestro talentoso equipo. El candidato ideal es una persona curiosa, motivada, que le gusta trabajar en equipo. Se ofrecen excelentes condiciones de contratación y la oportunidad de desarrollo de carrera en una empresa que se encuentra en pleno [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_274" class="wp-caption alignnone" style="width: 650px"><a rel="attachment wp-att-274" href="http://blog.bell-n-whistle.com/2012/01/23/buscando-programador-iphone/_mg_4920-copy2/"><img class="size-full wp-image-274" src="http://blog.bell-n-whistle.com/files/2012/01/MG_4920-copy2.jpg" alt="Meet Bell &amp; Whistle" width="640" height="427" /></a><p class="wp-caption-text">El equipo Bell &amp; Whistle. Falta uno más!</p></div>
<p>Ha llegado la hora. Bell &amp; Whistle busca programador con dominio de iOS para formar parte de nuestro talentoso equipo. El candidato ideal es una persona curiosa, motivada, que le gusta trabajar en equipo. Se ofrecen excelentes condiciones de contratación y la oportunidad de desarrollo de carrera en una empresa que se encuentra en pleno crecimiento.</p>
<p>Específicamente, buscamos a alguien con experiencia de Objective-C y Cocoa. Idealmente, ya has publicado por lo menos una app en la tienda de iTunes. Como programador, estarás a cargo de cranear conceptos nuevos con los diseñadores tanto como los programadores. Podrás ser parte de los proyectos más inovadores y de un equipo que trabaja con clientes alrededor del mundo.</p>
<p>Priorizaremos aquellos perfiles que posean marcada iniciativa para resolver retos técnicos, y que sea creativo tanto como responsable.</p>
<p><strong>Requisitos excluyentes:</strong></p>
<ul>
<li>Alto conocimiento de programación en Objective-C y Cocoa</li>
<li>Conocimiento del UIKit Framework</li>
<li>Deseable conocimiento de Ruby o PHP</li>
<li>Manejo de control de versiones, de preferencia Git</li>
<li>Excelente capacidad para resolver problemas</li>
<li>Deseable conocimiento de inglés</li>
</ul>
<p><strong>Ofrecemos:</strong></p>
<p>Remuneración de acuerdo al nivel de conocimiento y un excelente ambiente laboral, que incluye horas flexibles.</p>
<p><strong>Beneficios:</strong></p>
<ul>
<li>4 Semanas de vacaciones al año</li>
<li>CTS</li>
<li>AFP</li>
<li>Seguro de salud</li>
<li>Ingreso a planilla previa evaluación preliminar</li>
</ul>
<p>Si te sientes identificado/a con el perfil envíanos tu CV indicando remuneración pretendida y links a ejemplos de tus proyectos: jobs@bell-n-whistle.com</p>
<p><strong>Acerca de Bell &amp; Whistle</strong></p>
<p>Bell &amp; Whistle es una agencia de diseño y desarrollo con oficinas en Nueva York y Lima. Nos orientamos al diseño y desarrollo de aplicaciones web y dispositivos móviles. Elegimos proyectos que de alguna manera nos presente retos nuevos, ideas innovadoras o que simplemente sean chéveres.  Somos un equipo chico, con un rango muy amplio y mucha motivación para sacar adelante proyectos que rompan esquemas.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2012/01/23/buscando-programador-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://blog.bell-n-whistle.com/files/2012/01/MG_4920-copy2-150x150.jpg" />
		<media:content url="http://blog.bell-n-whistle.com/files/2012/01/MG_4920-copy2.jpg" medium="image">
			<media:title type="html">Team Bell &amp; Whistle!</media:title>
			<media:description type="html">El equipo Bell &amp; Whistle. Falta uno más!</media:description>
			<media:thumbnail url="http://blog.bell-n-whistle.com/files/2012/01/MG_4920-copy2-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>Conferencia sobre Planeamiento Web en Lima</title>
		<link>http://blog.bell-n-whistle.com/2011/09/13/conferencia-sobre-planeamiento-web-en-lima/</link>
		<comments>http://blog.bell-n-whistle.com/2011/09/13/conferencia-sobre-planeamiento-web-en-lima/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 18:42:05 +0000</pubDate>
		<dc:creator>Guisella Acuña</dc:creator>
				<category><![CDATA[Announcements]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=261</guid>
		<description><![CDATA[Nuestra queridísima CEO Inés Peschiera dará una conferencia sobre estrategias de planeamiento web y manejo de clientes el miércoles 14 de septiembre, de 7pm a 8:30pm, en la Escuela de Arte Digital en Lima. Los esperamos!]]></description>
			<content:encoded><![CDATA[<p>Nuestra queridísima CEO Inés Peschiera dará una conferencia sobre estrategias de planeamiento web y manejo de clientes el <strong>miércoles 14 de septiembre, de 7pm a 8:30pm</strong>, en la Escuela de Arte Digital en Lima.</p>
<p>Los esperamos!</p>
<p><img class="alignnone size-full wp-image-263" title="Conferencia Diseño Web" src="http://blog.bell-n-whistle.com/files/2011/09/AFLYERDRAFT.jpg" alt="Conferencia Diseño Web" width="640" height="966" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2011/09/13/conferencia-sobre-planeamiento-web-en-lima/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://blog.bell-n-whistle.com/files/2011/09/AFLYERDRAFT-150x150.jpg" />
		<media:content url="http://blog.bell-n-whistle.com/files/2011/09/AFLYERDRAFT.jpg" medium="image">
			<media:title type="html">Conferencia Diseño Web</media:title>
			<media:thumbnail url="http://blog.bell-n-whistle.com/files/2011/09/AFLYERDRAFT-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>Buscamos Maquetador Web en Lima</title>
		<link>http://blog.bell-n-whistle.com/2011/09/09/buscamos-maquetador-web-en-lima/</link>
		<comments>http://blog.bell-n-whistle.com/2011/09/09/buscamos-maquetador-web-en-lima/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 21:27:12 +0000</pubDate>
		<dc:creator>Guisella Acuña</dc:creator>
				<category><![CDATA[Jobs]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=251</guid>
		<description><![CDATA[Bell &#38; Whistle busca Maquetador Web para formar parte de nuestro talentoso equipo. El candidato ideal es una persona curiosa, motivada, que le gusta trabajar en equipo. Se ofrecen excelentes condiciones de contratación y la oportunidad de desarrollo de carrera en una empresa que se encuentra en pleno crecimiento. Priorizaremos aquellos perfiles que posean marcada [...]]]></description>
			<content:encoded><![CDATA[<p>Bell &amp; Whistle busca Maquetador Web para formar   parte de  nuestro talentoso equipo. El candidato ideal es una persona   curiosa,  motivada, que le gusta trabajar en equipo. Se ofrecen   excelentes  condiciones de contratación y la oportunidad de desarrollo de   carrera  en una empresa que se encuentra en pleno crecimiento.</p>
<p>Priorizaremos aquellos perfiles que posean marcada iniciativa para    resolver retos técnicos, y que sea creativo tanto como responsable.</p>
<p><strong>Requisitos excluyentes:</strong></p>
<p>-       Conocimiento avanzado de XHTML y CSS2<br />
-       Experiencia en webs accesibles y usables<br />
-       Conocimiento avanzado de Javascript y framework jQuery<br />
-       Saber maquetar en HAML y entender fundamentos de programación<br />
-       Manejo básico de Photoshop e Illustrator<br />
-       Excelente capacidad para resolver problemas<br />
-       Deseable conocimiento de inglés básico/intermedio<br />
-       HTML5 y CSS3 es un plus</p>
<p><strong>Ofrecemos:</strong></p>
<p>Remuneración de acuerdo al nivel de conocimiento y un excelente ambiente laboral, que incluye horas flexibles.</p>
<p>Beneficios:</p>
<p>-       4 Semanas de vacaciones al año<br />
-       CTS<br />
-       AFP<br />
-       Seguro de salud<br />
-       Ingreso a planilla previa evaluación preliminar</p>
<p>Si te sientes identificado/a con el perfil envíanos tu CV indicando remuneración pretendida y links a ejemplos de tus proyectos: <a href="mailto:jobs@bell-n-whistle.com">jobs@bell-n-whistle.com</a></p>
<p>&nbsp;</p>
<p><strong>Acerca de Bell &amp; Whistle</strong></p>
<p>Bell &amp; Whistle es una agencia de diseño y desarrollo con oficinas en Nueva York    y Lima. Nos orientamos al diseño y desarrollo de aplicaciones web y   dispositivos móviles. Elegimos proyectos que de alguna manera nos   presente  retos nuevos, ideas innovadoras o que simplemente sean   chéveres.  Somos  un equipo chico, con un rango muy amplio y mucha   motivación para sacar  adelante proyectos que rompan esquemas.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2011/09/09/buscamos-maquetador-web-en-lima/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Buscamos programador con dominio de PHP en Lima</title>
		<link>http://blog.bell-n-whistle.com/2011/09/09/buscamos-programador-con-conocimiento-de-php-en-lima/</link>
		<comments>http://blog.bell-n-whistle.com/2011/09/09/buscamos-programador-con-conocimiento-de-php-en-lima/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 21:02:09 +0000</pubDate>
		<dc:creator>Inés Peschiera</dc:creator>
				<category><![CDATA[Jobs]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=231</guid>
		<description><![CDATA[Bell &#38; Whistle busca programador con dominio de PHP para formar parte de nuestro talentoso equipo. El candidato ideal es una persona curiosa, motivada, que le gusta trabajar en equipo. Se ofrecen excelentes condiciones de contratación y la oportunidad de desarrollo de carrera en una empresa que se encuentra en pleno crecimiento.]]></description>
			<content:encoded><![CDATA[<p>Bell &amp; Whistle busca programador con dominio de PHP para formar  parte de nuestro talentoso equipo. El candidato ideal es una persona  curiosa, motivada, que le gusta trabajar en equipo. Se ofrecen  excelentes condiciones de contratación y la oportunidad de desarrollo de  carrera en una empresa que se encuentra en pleno crecimiento.</p>
<p>Específicamente, buscamos a alguien con experiencia de Drupal y WordPress. Conocimiento de Magento sería un plus.</p>
<p>Priorizaremos aquellos perfiles que posean marcada iniciativa para  resolver retos técnicos, y que sea creativo tanto como responsable.</p>
<p><strong>Requisitos excluyentes:</strong></p>
<p>-       Conocimiento de programación orientado a objetos<br />
-       Alto conocimiento de PHP<br />
-       Deseable conocimiento de UNIX, SQL, XML<br />
-       Preferible conocimiento de algunos frameworks. Entre ellos: (Zend, OsCommerce)<br />
-       Experiencia con MySQL, PostgresSQL<br />
-       Manejo de control de versiones, de preferencia Git.<br />
-       Excelente capacidad para resolver problemas<br />
-       Deseable conocimiento de inglés básico/intermedio</p>
<p><strong>Ofrecemos:</strong></p>
<p>Remuneración de acuerdo al nivel de conocimiento y un excelente ambiente laboral, que incluye horas flexibles.</p>
<p>Beneficios:</p>
<p>-       4 Semanas de vacaciones al año<br />
-       CTS<br />
-       AFP<br />
-       Seguro de salud<br />
-       Ingreso a planilla previa evaluación preliminar</p>
<p>Si te sientes identificado/a con el perfil envíanos tu CV indicando remuneración pretendida y links a ejemplos de tus proyectos: <a href="mailto:jobs@bell-n-whistle.com">jobs@bell-n-whistle.com</a></p>
<p>&nbsp;</p>
<p><strong>Acerca de Bell &amp; Whistle</strong></p>
<p>Bell &amp; Whistle es una agencia de diseño y desarrollo con oficinas en Nueva York  y Lima. Nos orientamos al diseño y desarrollo de aplicaciones web y dispositivos móviles. Elegimos proyectos que de alguna manera nos presente  retos nuevos, ideas innovadoras o que simplemente sean chéveres.  Somos  un equipo chico, con un rango muy amplio y mucha motivación para sacar  adelante proyectos que rompan esquemas.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2011/09/09/buscamos-programador-con-conocimiento-de-php-en-lima/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Tutorial: Ruby on Rails 3 and Faye</title>
		<link>http://blog.bell-n-whistle.com/2011/06/08/tutorial-ruby-on-rails-3-and-faye/</link>
		<comments>http://blog.bell-n-whistle.com/2011/06/08/tutorial-ruby-on-rails-3-and-faye/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 13:29:48 +0000</pubDate>
		<dc:creator>José Corcuera</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[faye]]></category>
		<category><![CDATA[publish]]></category>
		<category><![CDATA[rails3]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[subscribe]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=175</guid>
		<description><![CDATA[Faye is a publish-subscribe messaging system that provides message servers for Node.js and Rack. We can take advantage of this system in many ways, for example by creating a chat, sending notifications, even playing games. Previously I created a basic to-do application using Rails 3, so we&#8217;ll use this as our starting point. The application [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Faye" href="http://faye.jcoglan.com/">Faye</a> is a publish-subscribe messaging system that provides message servers for Node.js and Rack. We can take advantage of this system in many ways, for example by creating a chat, sending notifications, even playing games.</p>
<p><img class="alignnone size-full wp-image-227" src="http://blog.bell-n-whistle.com/files/2011/06/fraye_and_rails.gif" alt="Fraye and Ruby on Rails" width="640" height="275" /></p>
<p>Previously I created a basic to-do application using Rails 3, so we&#8217;ll use this as our starting point. The application is on <a href="https://github.com/BellandWhistle/rails3-todo-app">https://github.com/BellandWhistle/rails3-todo-app</a>. In a future post I&#8217;ll show you how to create this by yourself, but for now my goal is to show you how to integrate rails with faye.<span id="more-175"></span></p>
<p><strong>TO-DO App Review:</strong></p>
<p>In this application you can create projects and tasks inside projects, with each task having a state like <code>initial</code>, <code>in-progress</code>, <code>verify</code>,  <code>done</code>. The app uses ajax to create and update the tasks.</p>
<p>This app works fine for a single person but when several users try to use it at the same time, it&#8217;s not reliable. If I update a task, other people using the app won&#8217;t see my changes. They&#8217;ll be working with the wrong information. That&#8217;s where faye comes in. The idea is to subscribe people on the same project so they can see the changes other people make in real-time. So let&#8217;s do it!</p>
<p><strong>Setting up the project:</strong></p>
<pre>$ git clone https://github.com/BellandWhistle/rails3-todo-app
$ bundle install
$ bundle exec rake db:create &amp;&amp; db:migrate
$ bundle exec rake db:seed
$ bundle rails s</pre>
<p>Go to <a href="http://localhost:3000/projects" target="_blank">http://localhost:3000/projects</a>. There are some tasks (Things to check for rails 3.1) created in the <code>initial</code> state. If we change the state this will remove the current task and add it to the new state list.</p>
<p><strong>Faye Installation:</strong></p>
<p>Add faye to your Gemfile. It requires eventmachine, em-http-request, rack, thin and json, which should all be automatically installed.</p>
<div id="gist-1011641" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="n">gem</span> <span class="s1">&#39;faye&#39;</span><span class="p">,</span> <span class="s1">&#39;0.6.1&#39;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1011641/0faa48ba8818e398b7dd6c0d9f2f6008ae5d5e6e/Gemfile" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1011641#file_gemfile" style="float:right;margin-right:10px;color:#666">Gemfile</a>
            <a href="https://gist.github.com/1011641">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>*Faye gem version 0.6.0 has a bug with Firefox, so I&#8217;d recommend using 0.5.5 until the 0.6.1 release. (Update: faye 0.6.1 was release on June 6th).</p>
<p>All Faye clients communicate with a central server that processes the request and sends the response to the subscribers.</p>
<p>Create a file faye.ru in root app:</p>
<div id="gist-1011641" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="nb">require</span> <span class="s1">&#39;faye&#39;</span></div><div class='line' id='LC2'><span class="n">faye_server</span> <span class="o">=</span> <span class="no">Faye</span><span class="o">::</span><span class="no">RackAdapter</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="ss">:mount</span> <span class="o">=&gt;</span> <span class="s1">&#39;/faye&#39;</span><span class="p">,</span> <span class="ss">:timeout</span> <span class="o">=&gt;</span> <span class="mi">45</span><span class="p">)</span></div><div class='line' id='LC3'><br/></div><div class='line' id='LC4'><span class="n">run</span> <span class="n">faye_server</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1011641/2d249a99f427a5854089c472d321dc9483d3f815/faye.ru" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1011641#file_faye.ru" style="float:right;margin-right:10px;color:#666">faye.ru</a>
            <a href="https://gist.github.com/1011641">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>We&#8217;re using rack to run the faye server and mounting the application on <code>/faye</code> so it&#8217;s accessible through <a href="http://localhost:9292/faye" target="_blank">http://localhost:9292/faye</a> to interact with the server if we run it (this will run on port 9292 by default).</p>
<pre>$ bundle exec rackup faye.ru -s thin -E production</pre>
<p>Finally, if you go to <a href="http://localhost:9292/faye.js" target="_blank">http://localhost:9292/faye.js</a> you&#8217;ll be able to see the faye client script.</p>
<p><strong>Using Faye on Rails:</strong></p>
<p>Let&#8217;s use faye client on our views and add faye client on the application layout:</p>
<div id="gist-1011641" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="nt">&lt;head&gt;</span></div><div class='line' id='LC2'>...</div><div class='line' id='LC3'><span class="cp">&lt;%=</span> <span class="n">javascript_include_tag</span> <span class="s1">&#39;http://localhost:9292/faye.js&#39;</span> <span class="cp">%&gt;</span></div><div class='line' id='LC4'><span class="nt">&lt;/head&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1011641/74b99716e225b44cfb894aaa469c43b24485806b/application.html.erb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1011641#file_application.html.erb" style="float:right;margin-right:10px;color:#666">application.html.erb</a>
            <a href="https://gist.github.com/1011641">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>On <code>projects/show.html.erb</code>, create a new faye client pointing to the faye server and subscribe it to the project path.</p>
<div id="gist-1011641" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;%</span> <span class="n">javascript_tag</span> <span class="k">do</span> <span class="cp">%&gt;</span></div><div class='line' id='LC2'>&nbsp;&nbsp;$(function() {</div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;var client = new Faye.Client(&#39;http://localhost:9292/faye&#39;);</div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;client.subscribe(&quot;<span class="cp">&lt;%=</span> <span class="n">project_path</span><span class="p">(</span><span class="vi">@project</span><span class="p">)</span> <span class="cp">%&gt;</span>&quot;, function(data) {</div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// do stuff here when receives the data</div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;});</div><div class='line' id='LC7'>&nbsp;&nbsp;});</div><div class='line' id='LC8'><span class="cp">&lt;%</span> <span class="k">end</span> <span class="cp">%&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1011641/733a81199e04ea8d590429c62f1d3e24d6a4b194/preview_show.html.erb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1011641#file_preview_show.html.erb" style="float:right;margin-right:10px;color:#666">preview_show.html.erb</a>
            <a href="https://gist.github.com/1011641">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>When a user updates a task, we have 3 options:</p>
<p>1. Use faye client to update the other clients. If the operation doesn&#8217;t need to store data I&#8217;d recommend this option. In our case it&#8217;s essential to communicate with the other clients only when a successful operation happens so I&#8217;d probably use this option for a chat.</p>
<p>2. Send request to rails server and if the operation is success, create a faye client on the server and send the response to all the clients:</p>
<div id="gist-1011641" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c1">#Using Faye client on server</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="nb">require</span> <span class="s1">&#39;eventmachine&#39;</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'><span class="k">class</span> <span class="nc">TasksController</span> <span class="o">&lt;</span> <span class="no">ApplicationController</span></div><div class='line' id='LC6'>&nbsp;&nbsp;<span class="o">.</span><span class="n">.</span><span class="o">.</span></div><div class='line' id='LC7'><br/></div><div class='line' id='LC8'>&nbsp;&nbsp;<span class="k">def</span> <span class="nf">update</span></div><div class='line' id='LC9'>&nbsp;&nbsp;<span class="o">.</span><span class="n">.</span><span class="o">.</span></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="vi">@task</span><span class="o">.</span><span class="n">update_attributes</span><span class="p">(</span><span class="n">params</span><span class="o">[</span><span class="ss">:task</span><span class="o">]</span><span class="p">)</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">client</span> <span class="o">=</span> <span class="no">Faye</span><span class="o">::</span><span class="no">Client</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s1">&#39;http://localhost:9292/faye&#39;</span><span class="p">)</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">client</span><span class="o">.</span><span class="n">publish</span><span class="p">(</span><span class="n">project_path</span><span class="p">(</span><span class="vi">@project</span><span class="p">),</span> <span class="s1">&#39;text&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Update html view!&#39;</span><span class="p">)</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">else</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">#show errors</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">.</span><span class="n">.</span><span class="o">.</span></div><div class='line' id='LC17'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC18'><br/></div><div class='line' id='LC19'>&nbsp;&nbsp;<span class="o">.</span><span class="n">.</span><span class="o">.</span></div><div class='line' id='LC20'><span class="k">end</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1011641/8c5de529bffbea29d80f646e72aa2174fcab40ae/tasks_controller2.rb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1011641#file_tasks_controller2.rb" style="float:right;margin-right:10px;color:#666">tasks_controller2.rb</a>
            <a href="https://gist.github.com/1011641">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>But this approach has a problem, it requires <code>eventmachine</code> for subscribe and publish. In this case I don&#8217;t see the need to publish async. But the advantage is that if the connection fails it will try to send the request again.</p>
<p>3. Use HTTP interface to post messages. I like this solution because in our case we are not subscribing (in the server) so we don&#8217;t need async to publish, we just have to make a post.</p>
<div id="gist-1011641" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c1">#Using Faye HTTP interface</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="k">def</span> <span class="nf">update</span></div><div class='line' id='LC4'>&nbsp;&nbsp;<span class="vi">@task</span> <span class="o">=</span> <span class="no">Task</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">params</span><span class="o">[</span><span class="ss">:id</span><span class="o">]</span><span class="p">)</span></div><div class='line' id='LC5'>&nbsp;&nbsp;<span class="k">if</span> <span class="vi">@task</span><span class="o">.</span><span class="n">update_attributes</span><span class="p">(</span><span class="n">params</span><span class="o">[</span><span class="ss">:task</span><span class="o">]</span><span class="p">)</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">message</span> <span class="o">=</span> <span class="p">{</span><span class="ss">:channel</span> <span class="o">=&gt;</span> <span class="n">project_path</span><span class="p">(</span><span class="vi">@task</span><span class="o">.</span><span class="n">project</span><span class="p">),</span> <span class="ss">:data</span> <span class="o">=&gt;</span> <span class="p">{</span> <span class="ss">:task_id</span> <span class="o">=&gt;</span> <span class="vi">@task</span><span class="o">.</span><span class="n">id</span><span class="p">,</span> <span class="ss">:task_state</span> <span class="o">=&gt;</span> <span class="vi">@task</span><span class="o">.</span><span class="n">state</span><span class="p">}}</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">uri</span> <span class="o">=</span> <span class="no">URI</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="s2">&quot;http://localhost:9292/faye&quot;</span><span class="p">)</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="no">Net</span><span class="o">::</span><span class="no">HTTP</span><span class="o">.</span><span class="n">post_form</span><span class="p">(</span><span class="n">uri</span><span class="p">,</span> <span class="ss">:message</span> <span class="o">=&gt;</span> <span class="n">message</span><span class="o">.</span><span class="n">to_json</span><span class="p">)</span></div><div class='line' id='LC9'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC10'>&nbsp;&nbsp;<span class="n">render</span> <span class="ss">:nothing</span> <span class="o">=&gt;</span> <span class="kp">true</span></div><div class='line' id='LC11'><span class="k">end</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1011641/6edd1de4d3e6364593c7d5a58c4607d79c3a5973/tasks_controller.rb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1011641#file_tasks_controller.rb" style="float:right;margin-right:10px;color:#666">tasks_controller.rb</a>
            <a href="https://gist.github.com/1011641">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>And handle the data on the view:</p>
<div id="gist-1011641" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;%</span> <span class="n">javascript_tag</span> <span class="k">do</span> <span class="cp">%&gt;</span></div><div class='line' id='LC2'>&nbsp;&nbsp;$(function() {</div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;var client = new Faye.Client(&#39;http://localhost:9292/faye&#39;);</div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;client.subscribe(&quot;<span class="cp">&lt;%=</span> <span class="n">project_path</span><span class="p">(</span><span class="vi">@project</span><span class="p">)</span> <span class="cp">%&gt;</span>&quot;, function(data) {</div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var task_view = $(&#39;#task-&#39;+ data.task_id).remove();</div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#&#39;+ data.task_state + &#39;-tasks&#39;).append(task_view).fadeIn();</div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;});</div><div class='line' id='LC8'>&nbsp;&nbsp;});</div><div class='line' id='LC9'><span class="cp">&lt;%</span> <span class="k">end</span> <span class="cp">%&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1011641/6ee901a03ebeab6c5b0a70058a2801670405ba1d/show.html.erb" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1011641#file_show.html.erb" style="float:right;margin-right:10px;color:#666">show.html.erb</a>
            <a href="https://gist.github.com/1011641">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Authentication: One thing to keep in mind is that our current application is not safe because any person can make a post to our channel. We need to add an extension to protect against this. If you want to take a look to extensions, visit the <a href="http://faye.jcoglan.com">Faye site</a> or look <a href="http://railscasts.com/episodes/260-messaging-with-faye">Ryan Bate&#8217;s screencast</a> about faye.</p>
<p>You can download the whole project here: <a href="https://github.com/BellandWhistle/rails3-faye-example">https://github.com/BellandWhistle/rails3-faye-example</a></p>
<p>That&#8217;s it! It&#8217;s really easy to use faye to communicate with other clients, so give it a try and let us know how it goes in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2011/06/08/tutorial-ruby-on-rails-3-and-faye/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:thumbnail url="http://blog.bell-n-whistle.com/files/2011/06/fraye_and_rails-150x150.gif" />
		<media:content url="http://blog.bell-n-whistle.com/files/2011/06/fraye_and_rails.gif" medium="image">
			<media:title type="html">Fraye and Ruby on Rails</media:title>
			<media:thumbnail url="http://blog.bell-n-whistle.com/files/2011/06/fraye_and_rails-150x150.gif" />
		</media:content>
	</item>
		<item>
		<title>Social Radio Anyone?</title>
		<link>http://blog.bell-n-whistle.com/2011/06/01/social-radio-anyone/</link>
		<comments>http://blog.bell-n-whistle.com/2011/06/01/social-radio-anyone/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 13:00:17 +0000</pubDate>
		<dc:creator>Guisella Acuña</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Billy Chasen]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[Seth Goldstein]]></category>
		<category><![CDATA[social network]]></category>
		<category><![CDATA[turntable.fm]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=133</guid>
		<description><![CDATA[Last Friday B&#38;W discovered a great new site and it pretty much rendered the entire team&#8211;New York to Lima&#8211;useless for the afternoon. I&#8217;m talking about Turntable.fm, a new and actually fun way of listening/discovering music with a bunch of people, including your friends. Created by Seth Goldstein and Billy Chasen, Turntable is still in a [...]]]></description>
			<content:encoded><![CDATA[<p>Last Friday B&amp;W discovered a great new site and it pretty much rendered the entire team&#8211;New York to Lima&#8211;useless for the afternoon. I&#8217;m talking about <a href="http://turntable.fm/" target="_blank">Turntable.fm</a>, a new and actually fun way of listening/discovering music with a bunch of people, including your friends.</p>
<p>Created by Seth Goldstein and Billy Chasen, Turntable is still in a private alpha, so you can only log in if you have a Facebook friend already logged into the application.</p>
<p>It&#8217;s a fun mix of <a href="http://www.shoutcast.com/" target="_blank">SHOUTcast</a> + Chat + Sharing Tools. And the GUI, OH MY!! Adorable. You get to pick a cute avatar from a variety of options, but some of them are locked until you collect enough points to select them. To collect the coveted points, listeners have to like the song you are playing in any given &#8216;room&#8217;. If a lot of the listeners don&#8217;t like your song, it gets skipped. Great, democratic approach to music selection.</p>
<p><img class="alignnone size-full wp-image-155" src="http://blog.bell-n-whistle.com/files/2011/05/turntable_social_radio.jpg" alt="turntable.fm User Interface" width="640" height="323" /></p>
<p>I really like the graphic details of the interface. The speakers bounce while the music is playing, the laptops showcase your computer&#8217;s OS, and the lighting in the graphics is pitch-perfect. They really nailed it. I just love it.</p>
<p>They use <a href="http://www.w3.org/TR/css3-fonts/" target="_blank">@font-face</a> for the name of the song and artist, if the name of the song is too long, it scrolls like a marquee, and you know what? THAT&#8217;S THE BEST MARQUEE I&#8217;ve seen in a long, long time (and on a website that doesn&#8217;t suck.)</p>
<p>The one thing I will say is, it&#8217;d be really nice if there were more ways for users to win points.  Users should be able to win some massive points for getting friends to  join, or maybe just a couple points if they play good songs on the site for a few days in a row. Right now it seems like a very one-dimensional system, but hey! it is is a private alpha, so I get it.</p>
<p>I&#8217;m sure the project will evolve and become even more fun in the near future, but so far, SO GOOD!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2011/06/01/social-radio-anyone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://blog.bell-n-whistle.com/files/2011/05/turntable_social_radio-150x150.jpg" />
		<media:content url="http://blog.bell-n-whistle.com/files/2011/05/turntable_social_radio.jpg" medium="image">
			<media:title type="html">turntable.fm User Interface</media:title>
			<media:thumbnail url="http://blog.bell-n-whistle.com/files/2011/05/turntable_social_radio-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>A Round Up of 2011′s Best Graduation Speeches</title>
		<link>http://blog.bell-n-whistle.com/2011/05/30/a-round-up-of-2011s-best-graduation-speeches/</link>
		<comments>http://blog.bell-n-whistle.com/2011/05/30/a-round-up-of-2011s-best-graduation-speeches/#comments</comments>
		<pubDate>Mon, 30 May 2011 23:40:45 +0000</pubDate>
		<dc:creator>Inés Peschiera</dc:creator>
				<category><![CDATA[Diversions]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[amy poehler]]></category>
		<category><![CDATA[bill clinton]]></category>
		<category><![CDATA[denzel washington]]></category>
		<category><![CDATA[graduation]]></category>
		<category><![CDATA[graduation speech]]></category>
		<category><![CDATA[harvard]]></category>
		<category><![CDATA[nyu]]></category>
		<category><![CDATA[tom hanks]]></category>
		<category><![CDATA[upenn]]></category>
		<category><![CDATA[yale]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=85</guid>
		<description><![CDATA[Graduation season seems to have spurned a whole new genre of YouTube videos: The Graduation Speech. For the actors and politicians we&#8217;ve highlighted below, it&#8217;s clear this is an occasion worthy of some hefty reflection and carefully calculated jokes. If you have some time to spare this Memorial Day, take a minute to indulge in [...]]]></description>
			<content:encoded><![CDATA[<p>Graduation season seems to have spurned a whole new genre of YouTube videos: The Graduation Speech. For the actors and politicians we&#8217;ve highlighted below, it&#8217;s clear this is an occasion worthy of some hefty reflection and carefully calculated jokes. If you have some time to spare this Memorial Day, take a minute to indulge in some free inspirational monologues.</p>
<p>And if you have another minute, could you please tell us what it might take for a famous person to talk at a school with slightly less pedigree?</p>
<p><strong>The Ever-Delightful, Amy Poehler at Harvard</strong></p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/T7N_L_pu74k?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/T7N_L_pu74k?version=3" type="application/x-shockwave-flash" width="640" height="385" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>The Deeply Personal, Denzel Washington at UPenn</strong></p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/vpW2sGlCtaE?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vpW2sGlCtaE?version=3" type="application/x-shockwave-flash" width="640" height="505" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>The Surprisingly Tech-Savvy, Tom Hanks at Yale</strong></p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/baIlinqoExQ?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/baIlinqoExQ?version=3" type="application/x-shockwave-flash" width="640" height="385" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>The Sound Sage, Bill Clinton at NYU</strong></p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/rSfSk92wDog?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/rSfSk92wDog?version=3" type="application/x-shockwave-flash" width="640" height="385" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2011/05/30/a-round-up-of-2011s-best-graduation-speeches/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
	</item>
		<item>
		<title>Do you believe in miracles?</title>
		<link>http://blog.bell-n-whistle.com/2011/05/19/bell-and-whistle-launches-sit/</link>
		<comments>http://blog.bell-n-whistle.com/2011/05/19/bell-and-whistle-launches-sit/#comments</comments>
		<pubDate>Thu, 19 May 2011 22:07:16 +0000</pubDate>
		<dc:creator>Inés Peschiera</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.bell-n-whistle.com/?p=69</guid>
		<description><![CDATA[Bell &#038; Whistle launches site, faith in miracles restored.]]></description>
			<content:encoded><![CDATA[<p>Well, as of today, I do. BECAUSE BELL &amp; WHISTLE FINALLY LAUNCHED ITS FRACKING NEW SITE!!!</p>
<p>After months of being swamped with client projects, we finally got our act together long enough to launch our company site. I for one am most excited about the part where I will no longer have to come up with lame explanations for why we, a digital agency dedicated to building complex platforms, didn&#8217;t have even the simplest portfolio site up. No more pdf&#8217;ing work samples, quoting adages like &#8220;You know, the cobbler&#8217;s children&#8230;&#8221;, or hoping that no one would actually arrive at our bare splash page.</p>
<p>But here we are. Thursday May 19th, 2011, launching this site. We have detailed plans to keep it up to date with our latest projects, insights and diversions. Additionally, we&#8217;ll be tapping incredible, creative and bright minds to contribute on a regular basis. (If you would like to learn more about contributing, drop us a line.)</p>
<p>We would absolutely love to hear your thoughts, feedback, suggestions, praise, etc. It&#8217;s been a long time coming and we hope it is worth the wait.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bell-n-whistle.com/2011/05/19/bell-and-whistle-launches-sit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
	</item>
	</channel>
</rss>

