<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>8th Light Blog: LimeLight at RailsConf 2008</title>
    <link>http://blog.8thlight.com/articles/2008/02/05/limelight-at-railsconf-2008</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>In the minds of the craftsmen...</description>
    <item>
      <title>LimeLight at RailsConf 2008</title>
      <description>&lt;p&gt;Back at RubyConf 2007 I prepared a &lt;a href="http://rejectconf4.confreaks.com/d2t3_4th_annual_reject_conf_8th_light.html" target="new"&gt;1 minute presentation&lt;/a&gt;, well&amp;#8230; more of a teaser, about an application framework called LimeLight.&lt;/p&gt;

&lt;p&gt;What is it?  LimeLight is a selfish dream of mine.  In a nutshell it&amp;#8217;s a light weight ruby framework for building rich client applications.  To explain further, know this. I hate building web applications.  Not because they&amp;#8217;re hard to build or anything silly like that.  It&amp;#8217;s because they&amp;#8217;re so perverted.  Writing web apps makes me feel dirty; as though I&amp;#8217;ve sunk into a pit of waste and decay where the foundation of my work is a pool of sludge.  No matter how hard I may try, the very nature of modern web apps taints my code and leaves me a sour, grumpy developer.&lt;/p&gt;

&lt;div style="border: 1px solid blue; width: 100px; height: 100px; text-align: center; background-color: white; float: right;"&gt;
    &lt;div id="light" style="border: 1px solid black; width: 50px; height: 35px; margin: 10px 24px 10px 24px; 
                            background-color: red; text-align: center; padding-top: 15px;"&gt;
        Stop
    &lt;/div&gt;
    &lt;input id="button" type="submit" value="Start" onclick="stopOrGo();"/&gt;
    &lt;script type="text/javascript"&gt;
        function stopOrGo() {
            var button = document.getElementById('button');
            var light = document.getElementById('light');
            if(button.value == 'Start') {
                start(button, light);
            }
            else {
                stop(button, light);
            }
        }

        function stop(button, light) {
            light.style.backgroundColor = "red";
            light.innerHTML = "Stop";
            button.value = "Start";
        }

        function start(button, light) {
            light.innerHTML = "Go!";
            button.value = "Stop";
            blink();
        }

        function blink() {
            var light = document.getElementById('light');
            if(light.innerHTML == "Go!")
            {
                if(light.style.backgroundColor == "green") {
                    light.style.backgroundColor = "lightgrey";  
                }
                else {
                    light.style.backgroundColor = "green";
                }
                setTimeout("blink()", 500);
            }
        }
    &lt;/script&gt;
&lt;/div&gt;

&lt;p&gt;To understand what I mean, consider the trivial little widget on the right here.  Try clicking the button and watch the light blink. Simple huh? Can you count the number of languages/technologies used in implementing this widget? And don&amp;#8217;t forget the code required on the server side&amp;#8230;.. &lt;/p&gt;

&lt;p&gt;I count 5.  That is, in most cases this widget would require about 5 or more different languages.  Let&amp;#8217;s count.  HTML of course.  CSS to make it look right.  JavaScript.  That&amp;#8217;s 3, but in most cases you&amp;#8217;ve got server-side code which, if you&amp;#8217;re lucky, involves Ruby and ERB.  Think about it.  You need to know 5 difference languages to build that silly widget. Yikes!&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ll include the code below.  Know that I&amp;#8217;ve made every effort to make this code as clean and simple as possible.  Still, I would need to borrow your hands and feet to count all the things I find distasteful about it.  Have a close look.  Ask yourself, &amp;#8220;Couldn&amp;#8217;t there be an easier way to do this?&amp;#8221;  I say there is.    &lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.railsconf.com" style="float: left; margin: 5px;"&gt;
&lt;img src="http://en.oreilly.com/rails2008/public/asset/asset/1174" width="210" height="60"  border="0"  alt="RailsConf 2008" title="RailsConf 2008"  /&gt;
&lt;/a&gt;
If you&amp;#8217;d like to learn more, I&amp;#8217;ll be &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1984" target="new"&gt;presenting on the topic&lt;/a&gt; at RailsConf 2008.  Or you can come back this this blog site later.  I&amp;#8217;ll be sure to post any exciting progress.&lt;/p&gt;

&lt;div&gt;
&lt;pre&gt;
&amp;lt;div style="border: 1px solid blue; width: 100px; height: 100px; 
               text-align: center; background-color: white; 
               float: right;"&amp;gt;
    &amp;lt;div id="light" 
            style="border: 1px solid black; width: 50px; 
            height: 35px; margin: 10px 24px 10px 24px; 
            background-color: red; text-align: center; 
            padding-top: 15px;"&amp;gt;
        Stop
    &amp;lt;/div&amp;gt;
    &amp;lt;input id="button" type="submit" 
              value="Start" onclick="stopOrGo();"/&amp;gt;
    &amp;lt;script type="text/javascript"&amp;gt;
        function stopOrGo() {
            var button = document.getElementById('button');
            var light = document.getElementById('light');
            if(button.value == 'Start') {
                start(button, light);
            }
            else {
                stop(button, light);
            }
        }

        function stop(button, light) {
            light.style.backgroundColor = "red";
            light.innerHTML = "Stop";
            button.value = "Start";
        }

        function start(button, light) {
            light.innerHTML = "Go!";
            button.value = "Stop";
            blink();
        }

        function blink() {
            var light = document.getElementById('light');
            if(light.innerHTML == "Go!")
            {
                if(light.style.backgroundColor == "green") {
                    light.style.backgroundColor = "lightgrey";  
                }
                else {
                    light.style.backgroundColor = "green";
                }
                setTimeout("blink()", 500);
            }
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/div&amp;gt;

&lt;/pre&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 05 Feb 2008 04:32:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ff4a010a-3b9e-4b2e-95b3-e8fce2d24838</guid>
      <author>Micah</author>
      <link>http://blog.8thlight.com/articles/2008/02/05/limelight-at-railsconf-2008</link>
      <category>Coding</category>
      <category>Fun</category>
      <category>Micah</category>
    </item>
    <item>
      <title>"LimeLight at RailsConf 2008" by Andy Maleh</title>
      <description>&lt;blockquote&gt;
    &lt;p&gt;In a nutshell it&#8217;s a light weight ruby framework for building rich client applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Very ambitious and exciting! &lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;Writing web apps makes me feel dirty&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I totally agree. I was telling my colleague the same thing the other day.&lt;/p&gt;

&lt;p&gt;Is Limelight going to be an open-source project? Do you have samples for people to check out yet?&lt;/p&gt;</description>
      <pubDate>Tue, 26 Feb 2008 19:11:42 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4ce644d4-b384-4857-8479-aad3f80c66a9</guid>
      <link>http://blog.8thlight.com/articles/2008/02/05/limelight-at-railsconf-2008#comment-732</link>
    </item>
  </channel>
</rss>
