<?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/" version="2.0">

<channel>
	<title>Burning Star</title>
	
	<link>http://www.burning-star.com</link>
	<description>it's hard to be a trendwhore</description>
	<lastBuildDate>Sat, 26 Jun 2010 14:21:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/burning-star" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="burning-star" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Example for a Minimal Thin App</title>
		<link>http://www.burning-star.com/2010/06/example-for-a-minimal-thin-app/</link>
		<comments>http://www.burning-star.com/2010/06/example-for-a-minimal-thin-app/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 14:09:59 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[1.9]]></category>
		<category><![CDATA[Rails 3]]></category>
		<category><![CDATA[Rake]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Thin]]></category>
		<category><![CDATA[Umlauts]]></category>

		<guid isPermaLink="false">http://www.burning-star.com/?p=307</guid>
		<description><![CDATA[Here you can see an example for a minimal app that can be hooked up using the Thin ruby server (or using the new Rails 3 routing system). It was tested with Ruby 1.9.2-head and (important for me) also handles UTF-8 characters like ÄÖÜ umlauts without problems. Sometimes a clean code example is just better [...]]]></description>
			<content:encoded><![CDATA[<p>Here you can see an example for a minimal app that can be hooked up using the Thin ruby server (or using the new Rails 3 routing system).</p>
<p>It was tested with Ruby 1.9.2-head and (important for me) also handles UTF-8 characters like ÄÖÜ umlauts without problems.</p>
<p>Sometimes a clean code example is just better to understand than a whole tutorial.</p>
<div id="gist-454066" 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;cgi&#39;</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="c1"># This class is an example for a minimal app</span></div><div class='line' id='LC4'><span class="c1"># That can be used with the thin web server.</span></div><div class='line' id='LC5'><span class="k">class</span> <span class="nc">MyApp</span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'>&nbsp;&nbsp;<span class="no">STATUS_OK</span> <span class="o">=</span> <span class="mi">200</span></div><div class='line' id='LC8'><br/></div><div class='line' id='LC9'>&nbsp;&nbsp;<span class="no">STATUS_NOT_MODIFIED</span> <span class="o">=</span> <span class="mi">304</span></div><div class='line' id='LC10'><br/></div><div class='line' id='LC11'>&nbsp;&nbsp;<span class="no">STATUS_NOT_FOUND</span> <span class="o">=</span> <span class="mi">404</span></div><div class='line' id='LC12'><br/></div><div class='line' id='LC13'>&nbsp;&nbsp;<span class="no">STATUS_BAD_REQUEST</span> <span class="o">=</span> <span class="mi">400</span></div><div class='line' id='LC14'><br/></div><div class='line' id='LC15'>&nbsp;&nbsp;<span class="kp">attr_accessor</span> <span class="ss">:content</span></div><div class='line' id='LC16'><br/></div><div class='line' id='LC17'>&nbsp;&nbsp;<span class="kp">attr_accessor</span> <span class="ss">:status</span></div><div class='line' id='LC18'><br/></div><div class='line' id='LC19'>&nbsp;&nbsp;<span class="kp">attr_reader</span> <span class="ss">:query</span></div><div class='line' id='LC20'><br/></div><div class='line' id='LC21'>&nbsp;&nbsp;<span class="c1"># Prepares the resonse for thin server</span></div><div class='line' id='LC22'>&nbsp;&nbsp;<span class="k">def</span> <span class="nf">send_response</span><span class="p">(</span><span class="n">response_status</span> <span class="o">=</span> <span class="no">STATUS_OK</span><span class="p">)</span></div><div class='line' id='LC23'><br/></div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@status</span> <span class="o">=</span> <span class="n">response_status</span></div><div class='line' id='LC25'><br/></div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">headers</span> <span class="o">=</span> <span class="p">{</span></div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">&#39;Content-Type&#39;</span>    <span class="o">=&gt;</span> <span class="s1">&#39;text/html; charset=utf-8&#39;</span><span class="p">,</span></div><div class='line' id='LC28'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1"># NOTE: Use bytesize instead of size/length to get</span></div><div class='line' id='LC29'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1"># the correct size for utf-8 chars, e.g. umlauts.</span></div><div class='line' id='LC30'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">&#39;Content-Length&#39;</span>  <span class="o">=&gt;</span> <span class="n">content</span><span class="o">.</span><span class="n">bytesize</span><span class="o">.</span><span class="n">to_s</span><span class="p">,</span></div><div class='line' id='LC31'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">&#39;Server&#39;</span>          <span class="o">=&gt;</span> <span class="s1">&#39;My App Name&#39;</span></div><div class='line' id='LC32'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC33'><br/></div><div class='line' id='LC34'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1"># NOTE: If you collect the content as a String</span></div><div class='line' id='LC35'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1"># you have to put it into an Array iteral so Thin</span></div><div class='line' id='LC36'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1"># can iterate over it in Ruby 1.9</span></div><div class='line' id='LC37'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">response</span> <span class="o">=</span> <span class="o">[</span><span class="n">status</span><span class="p">,</span> <span class="n">headers</span><span class="p">,</span> <span class="o">[</span><span class="n">content</span><span class="o">]]</span></div><div class='line' id='LC38'><br/></div><div class='line' id='LC39'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC40'><br/></div><div class='line' id='LC41'>&nbsp;&nbsp;<span class="c1"># Parses the query variables into a Hash.</span></div><div class='line' id='LC42'>&nbsp;&nbsp;<span class="c1"># Keys are always Strings.</span></div><div class='line' id='LC43'>&nbsp;&nbsp;<span class="c1"># Doublettes are joined into one String.</span></div><div class='line' id='LC44'>&nbsp;&nbsp;<span class="k">def</span> <span class="nf">parse_query</span><span class="p">(</span><span class="n">query_string</span><span class="p">)</span></div><div class='line' id='LC45'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">begin</span></div><div class='line' id='LC46'><br/></div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">uri_params</span> <span class="o">=</span> <span class="no">CGI</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">query_string</span><span class="p">)</span></div><div class='line' id='LC48'><br/></div><div class='line' id='LC49'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@query</span> <span class="o">=</span> <span class="p">{}</span></div><div class='line' id='LC50'><br/></div><div class='line' id='LC51'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">uri_params</span><span class="o">.</span><span class="n">each</span> <span class="p">{</span><span class="o">|</span><span class="n">k</span><span class="p">,</span> <span class="n">v</span><span class="o">|</span></div><div class='line' id='LC52'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@query</span><span class="o">[</span><span class="n">k</span><span class="o">.</span><span class="n">to_sym</span><span class="o">]</span> <span class="o">=</span> <span class="n">v</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s2">""</span><span class="p">)</span></div><div class='line' id='LC53'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC54'><br/></div><div class='line' id='LC55'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">rescue</span></div><div class='line' id='LC56'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@query</span> <span class="o">=</span> <span class="p">{}</span></div><div class='line' id='LC57'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC58'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC59'><br/></div><div class='line' id='LC60'>&nbsp;&nbsp;<span class="c1"># This method is invoked by thin at every request.</span></div><div class='line' id='LC61'>&nbsp;&nbsp;<span class="k">def</span> <span class="nf">call</span><span class="p">(</span><span class="n">env</span><span class="p">)</span></div><div class='line' id='LC62'><br/></div><div class='line' id='LC63'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1"># parse query string</span></div><div class='line' id='LC64'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">parse_query</span> <span class="n">env</span><span class="o">[</span><span class="s1">&#39;QUERY_STRING&#39;</span><span class="o">]</span></div><div class='line' id='LC65'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1"># reset content</span></div><div class='line' id='LC66'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@content</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span></div><div class='line' id='LC67'><br/></div><div class='line' id='LC68'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@content</span> <span class="o">&lt;&lt;</span> <span class="s1">&#39;######## ECHO START #########&#39;</span></div><div class='line' id='LC69'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@content</span> <span class="o">&lt;&lt;</span> <span class="vi">@query</span><span class="o">.</span><span class="n">to_s</span></div><div class='line' id='LC70'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@content</span> <span class="o">&lt;&lt;</span> <span class="s1">&#39;######## ECHO END #########&#39;</span></div><div class='line' id='LC71'><br/></div><div class='line' id='LC72'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">send_response</span></div><div class='line' id='LC73'><br/></div><div class='line' id='LC74'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC75'><br/></div><div class='line' id='LC76'><span class="k">end</span></div><div class='line' id='LC77'><br/></div><div class='line' id='LC78'><br/></div><div class='line' id='LC79'><span class="n">app</span> <span class="o">=</span> <span class="no">Rack</span><span class="o">::</span><span class="no">Builder</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span></div><div class='line' id='LC80'>&nbsp;&nbsp;</div><div class='line' id='LC81'>&nbsp;&nbsp;<span class="n">use</span> <span class="no">Rack</span><span class="o">::</span><span class="no">CommonLogger</span></div><div class='line' id='LC82'>&nbsp;&nbsp;<span class="n">use</span> <span class="no">Rack</span><span class="o">::</span><span class="no">ShowExceptions</span></div><div class='line' id='LC83'><br/></div><div class='line' id='LC84'>&nbsp;&nbsp;<span class="n">map</span> <span class="s2">"/"</span> <span class="k">do</span></div><div class='line' id='LC85'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">use</span> <span class="no">Rack</span><span class="o">::</span><span class="no">Lint</span></div><div class='line' id='LC86'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">run</span> <span class="no">MyApp</span><span class="o">.</span><span class="n">new</span></div><div class='line' id='LC87'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC88'>&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC89'><span class="k">end</span></div><div class='line' id='LC90'><br/></div><div class='line' id='LC91'><span class="n">run</span> <span class="n">app</span></div><div class='line' id='LC92'><br/></div><div class='line' id='LC93'><span class="c1"># start with</span></div><div class='line' id='LC94'><span class="c1"># thin start -R my_rack_app.ru</span></div><div class='line' id='LC95'><br/></div></pre></div>
          
        </div>

        <div class="gist-meta">
          <a href="http://gist.github.com/raw/454066/4210508bc08f6dbb2e83f3c913f02358d0a21395/my_rack_app.ru" style="float:right;">view raw</a>
          <a href="http://gist.github.com/454066#file_my_rack_app.ru" style="float:right;margin-right:10px;color:#666">my_rack_app.ru</a>
          <a href="http://gist.github.com/454066">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
        </div>
      </div>
    
  
</div>

<p>Have a nice weekend!</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2010/06/use-active-record-3-3-0-0-beta-3-without-rails-and-custom-logger/" title="Use Active Record 3 (3.0.0 beta 3) without Rails and custom Logger">Use Active Record 3 (3.0.0 beta 3) without Rails and custom Logger</a></li><li><a href="http://www.burning-star.com/2009/05/using-mootools-with-ruby-on-rails/" title="Using Mootools with Ruby on Rails">Using Mootools with Ruby on Rails</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2010/06/example-for-a-minimal-thin-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Active Record 3 (3.0.0 beta 3) without Rails and custom Logger</title>
		<link>http://www.burning-star.com/2010/06/use-active-record-3-3-0-0-beta-3-without-rails-and-custom-logger/</link>
		<comments>http://www.burning-star.com/2010/06/use-active-record-3-3-0-0-beta-3-without-rails-and-custom-logger/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 16:20:54 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[active]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Rails 3]]></category>
		<category><![CDATA[record]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby 1.9]]></category>

		<guid isPermaLink="false">http://www.burning-star.com/?p=303</guid>
		<description><![CDATA[Just in case you try to use Active Record 3 without Rails but you want the same fancy logging. You have to require not only active_record, but also active_record/railtie. Took me a while to find this out. Maybe this saves you some time and hassle&#8230; Related PostsExample for a Minimal Thin AppUsing Mootools with Ruby [...]]]></description>
			<content:encoded><![CDATA[<p>Just in case you try to use Active Record 3 without Rails but you want the same fancy logging.</p>
<p>You have to require not only <strong>active_record</strong>, but also <strong>active_record/railtie.</strong> Took me a while to find this out.</p>
<div id="gist-450149" 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;rubygems&#39;</span></div><div class='line' id='LC2'><span class="nb">require</span> <span class="s1">&#39;active_record&#39;</span></div><div class='line' id='LC3'><span class="nb">require</span> <span class="s1">&#39;active_record/railtie&#39;</span></div><div class='line' id='LC4'><span class="nb">require</span> <span class="s1">&#39;logger&#39;</span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="k">class</span> <span class="nc">MyClass</span></div><div class='line' id='LC7'><br/></div><div class='line' id='LC8'>&nbsp;&nbsp;<span class="k">def</span> <span class="nf">initialize</span></div><div class='line' id='LC9'><br/></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@log</span> <span class="o">=</span> <span class="no">Logger</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="no">File</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="bp">__FILE__</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;/../debug.log&#39;</span><span class="p">)</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@log</span><span class="o">.</span><span class="n">level</span> <span class="o">=</span> <span class="n">level</span> <span class="o">=</span> <span class="no">Logger</span><span class="o">::</span><span class="no">DEBUG</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="vi">@log</span><span class="o">.</span><span class="n">datetime_format</span> <span class="o">=</span> <span class="s2">"%Y-%m-%d %H:%M:%S"</span></div><div class='line' id='LC13'><br/></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Base</span><span class="o">.</span><span class="n">logger</span> <span class="o">=</span> <span class="vi">@log</span></div><div class='line' id='LC15'><br/></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">#ActiveRecord::Base.establish_connection ... and so on...</span></div><div class='line' id='LC17'><br/></div><div class='line' id='LC18'>&nbsp;&nbsp;<span class="k">end</span></div><div class='line' id='LC19'><br/></div><div class='line' id='LC20'><span class="k">end</span></div></pre></div>
          
        </div>

        <div class="gist-meta">
          <a href="http://gist.github.com/raw/450149/e67c4ae3cee609e56701ee541fa6c18d8e5206e1/Use_Active_Record_3.0.0_beta_3_without_Rails_with_custom_Logger.rb" style="float:right;">view raw</a>
          <a href="http://gist.github.com/450149#file_use_active_record_3.0.0_beta_3_without_rails_with_custom_logger.rb" style="float:right;margin-right:10px;color:#666">Use_Active_Record_3.0.0_beta_3_without_Rails_with_custom_Logger.rb</a>
          <a href="http://gist.github.com/450149">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
        </div>
      </div>
    
  
</div>

<p>Maybe this saves you some time and hassle&#8230; <img src='http://www.burning-star.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2010/06/example-for-a-minimal-thin-app/" title="Example for a Minimal Thin App">Example for a Minimal Thin App</a></li><li><a href="http://www.burning-star.com/2009/05/using-mootools-with-ruby-on-rails/" title="Using Mootools with Ruby on Rails">Using Mootools with Ruby on Rails</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2010/06/use-active-record-3-3-0-0-beta-3-without-rails-and-custom-logger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Mootools with Ruby on Rails</title>
		<link>http://www.burning-star.com/2009/05/using-mootools-with-ruby-on-rails/</link>
		<comments>http://www.burning-star.com/2009/05/using-mootools-with-ruby-on-rails/#comments</comments>
		<pubDate>Sun, 03 May 2009 17:34:08 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[WebTec]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.burning-star.com/?p=210</guid>
		<description><![CDATA[This one was built and tested, using Rails 2.3.2 and Mootools 1.2.2 I&#8217;ve been playing around with Rails for about two months now and I LOVE it, because they integrate so many best practices for a web developer. The only thing I didn&#8217;t like was the integration of Javascript. I don&#8217;t wanna use Prototype/Scriptacolous Both [...]]]></description>
			<content:encoded><![CDATA[<p><em>This one was built and tested, using Rails 2.3.2 and Mootools 1.2.2</em></p>
<p>I&#8217;ve been playing around with <a href="http://rubyonrails.org/">Rails</a> for about two months now and I LOVE it, because they integrate so many best practices for a web developer.</p>
<p>The only thing I didn&#8217;t like was the integration of Javascript.</p>
<h3>I don&#8217;t wanna use Prototype/Scriptacolous</h3>
<p>Both is already built in. I&#8217;m not saying these are bad libraries, but I prefer <a title="*love*" href="http://mootools.net/">Mootools</a> for my clientside scripting.</p>
<h3>Rail&#8217;s Ajax Helpers ain&#8217;t good JS scripting</h3>
<p>I don&#8217;t see any sense in writing javascript code in rails. I want my Javascript unobtrusive and nicely degrading and want to take all benefits of my js framework. At least at this point, I think it&#8217;s better to write js in a js environment (but mind that I&#8217;m just a rails beginner, maybe there are better ways).</p>
<h3>A Mootools Factory Pattern for Ajax Requests</h3>
<p>Due it&#8217;s raining this sunday, I&#8217;ve put a little class together that makes it much more easier to create Ajax requests against your RESTful Rails ressources, using Mootools.</p>
<p>Let&#8217;s assume, you have a controller for a ressource <em>Customers</em> and you want to call the default scaffolding methods of Rails using Ajax, which would be index, show, new, create and destroy.</p>
<h4>Prepare your Controller</h4>
<p>First of all, you have to add a response format to the methods in your controller. We&#8217;re lucky, because Rails supports the js format and rendering as JSON format by default (pretty much the same like the xml format). So you just have to add a few lines of code for every method, like this:</p>
<p><code><br />
format.js  { render :json =&gt; @customer }<br />
</code><br />
(There is a whole example controller in the download)</p>
<h4>Get the Rails Auth Token in JS</h4>
<p>As a additional security mechanism, Rails added a Auth Token. Matt from madhatted showed us <a href="http://madhatted.com/2008/6/25/mootools-and-rails-csrf-protection">how to get the auth token into Javascript without a need of a form</a>. This is what you also need to do, to use my code.</p>
<p>So insert this into your view, where you load your Javascript:<br />
<code><br />
&lt;%= javascript_tag "var RAILS_AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %&gt;</code></p>
<p>Of course, you should also add Mootools at this point and my lib.</p>
<h3>Use it!</h3>
<p>Now you can use my lib like this:</p>
<h4>New instance for customer controller</h4>
<p><code> customer = new RailsRequest({controller: "customer"});<br />
</code></p>
<h4>Get json formatted string of all customers</h4>
<p><code> customer.index().send();<br />
</code></p>
<h4>Get json formatted string of customer with id 2</h4>
<p><code> customer.show(2).send();<br />
</code></p>
<h4>Create a new customer</h4>
<p><code> customer.create({name: "Elvis", is_cool: true}).send();<br />
</code></p>
<h4>Update customer with id 2</h4>
<p><code> customer.update(2, {is_cool: false}).send();<br />
</code></p>
<h4>Delete customer with id 7</h4>
<p><code> customer.destroy(7).send();<br />
</code><br />
You can add default callbacks for all kinds of methods. Just have a look at  my code.</p>
<h3>Important Notes</h3>
<p>I&#8217;m pretty sure this is far from perfect, either by the rails and the mootools perspective. It was just a tryout, to proof myself that both frameworks can play well together.</p>
<p>If you know a better solution or you&#8217;re happy with this one, please let me know in the comments.</p>
<h3>Download</h3>
<p>Here it is: <a href="http://www.burning-star.com/wp-content/upload/mootools_with_rails1.zip">mootools_with_rails</a> Have fun!</p>
<p><em>Edit: 2009-05-04 Some minor fixes.</em></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2010/06/use-active-record-3-3-0-0-beta-3-without-rails-and-custom-logger/" title="Use Active Record 3 (3.0.0 beta 3) without Rails and custom Logger">Use Active Record 3 (3.0.0 beta 3) without Rails and custom Logger</a></li><li><a href="http://www.burning-star.com/2010/06/example-for-a-minimal-thin-app/" title="Example for a Minimal Thin App">Example for a Minimal Thin App</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2009/05/using-mootools-with-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Take Executor beyond application launching</title>
		<link>http://www.burning-star.com/2008/08/take-executor-beyond-application-launching/</link>
		<comments>http://www.burning-star.com/2008/08/take-executor-beyond-application-launching/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 20:20:23 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[executor]]></category>
		<category><![CDATA[launcher]]></category>
		<category><![CDATA[tweaks]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://www.burning-star.com/?p=171</guid>
		<description><![CDATA[As you can see in my blogroll, I&#8217;m a Lifehacker fanboy. And I&#8217;m also a fan of application launchers, because I think, they can increase the speed of your workflow a lot. For some time, I was using Enso. But since a post on Lifehacker, about using cURL with the famous app launcher Launchy to [...]]]></description>
			<content:encoded><![CDATA[<p>As you can see in my blogroll, I&#8217;m a <a href="http://lifehacker.com">Lifehacker</a> fanboy. And I&#8217;m also a fan of application launchers, because I think, they can increase the speed of your workflow a lot. For some time, I was using <a href="http://www.humanized.com/enso/">Enso</a>. But since a <a href="http://lifehacker.com/software/hack-attack/take-launchy-beyond-application-launching-284127.php">post on Lifehacker</a>, about using <a title="cURL on Wikipedia" href="http://en.wikipedia.org/wiki/CURL">cURL</a> with the famous app launcher <a title="Launchy Homepage" href="http://www.launchy.net">Launchy</a> to control webservices like <a title="me on Twitter" href="http://twitter.com/burning_star">Twitter</a>, <a title="Google Calendar" href="http://www.google.com/calendar">gCal</a> and <a title="Remember The Milk" href="http://rememberthemilk.com">RTM</a>, I knew this was what I looked for. This week, Lifehacker (again) hooked me on <a title="Lifehacker's post about Executor" href="http://lifehacker.com/400566/executor-is-impressive-full+featured-app-launcher">another app launcher</a>: <a title="Executor Homepage" href="http://executor.dk/">Executor</a>, which I personally like more than Launchy. So why not integrate Lifehacker&#8217;s Launchy tweaks in better app launcher Executor?</p>
<h3>Integrating Lifehacker&#8217;s tweaks in Executor</h3>
<p>Just follow the instructions on this <a title="Set up cURL with Launchy" href="http://lifehacker.com/software/hack-attack/take-launchy-beyond-application-launching-284127.php">Lifehacker post</a> step by step:</p>
<ul>
<li>Download cURL and extract it to C:\Windows.</li>
<li>Download the ZIP file with the cURL batches, extract it anywhere on your computer (ignore the Launchy utilities part).</li>
<li>Then go through the steps of the services you want to use (edit files, make friends on Twitter, &#8230;).</li>
<li>If everything is set up, you just have to add the keywords to Executor. Right click on the tray icon of Executor and choose &#8220;Add keyword&#8221;. Now (e.g. if you want to set up Remember The Milk) enter something like &#8220;rtm&#8221; in the field &#8220;Keywords&#8221;, in &#8220;Command&#8221; you enter the path to your batch file and in &#8220;Parameters&#8221; you enter just &#8220;$P$&#8221;, which is special Executor syntax to pass the parameters to the batch file.</li>
<li>When your done, let Executor show up and type &#8220;rtm&#8221;, then hit the left arrow key and enter your task using the (pretty natural) commands listed <a title="Remember The Milk - Twitter Commands" href="http://www.rememberthemilk.com/services/twitter/">here</a>.</li>
<li>The set up of gCal and Twitter updating itself is very similar, just remind to enter &#8220;$P$&#8221; in the Parameters field.</li>
</ul>
<div id="attachment_173" class="wp-caption alignnone" style="width: 492px"><img class="size-full wp-image-173" title="Set up RTM in Executor" src="http://www.burning-star.com/wp-content/upload/executor-and-rtm.jpg" alt="Set up RTM in Executor" width="482" height="210" /><p class="wp-caption-text">Set up RTM in Executor</p></div>
<div id="attachment_174" class="wp-caption alignnone" style="width: 394px"><img class="size-full wp-image-174" title="Add task to RTM via Executor" src="http://www.burning-star.com/wp-content/upload/executor-and-rtm2.jpg" alt="Add task to RTM via Executor" width="384" height="100" /><p class="wp-caption-text">Add task to RTM via Executor</p></div>
<h3>Adding more abilities to Executor</h3>
<p>Now that you already can do this great stuff with Executor, I want to list some Keywords I use. The code represents what you have to fill in the &#8220;Command&#8221; field of your new Keyword, &#8220;Parameters&#8221; can be left blank, of course, &#8220;Keyword&#8221; can be whatever you want. All these commands are browser based, so this will open your browser resp. a new tab.</p>
<h4>Search for Addresses or Points of Interest with Google Maps</h4>
<p><code>http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=$U$</code></p>
<p>Note: This works with terms like &#8220;times square new york&#8221;, but also with &#8220;new york hot dog&#8221;</p>
<h4>Start writing an Email in gmail, providing the subject</h4>
<p><code>https://mail.google.com/mail/?fs=1&amp;view=cm&amp;shva=1&amp;su=$U$</code></p>
<p>Note: I prefer passing the subject instead of the recipient, because therefore gmail offers an autocompletion feature, so this step can be taken pretty fast already. If you want to do it in another way, have a look at the G-Mailto page, where the possible gmail query variables are explained (see Gmail Field Variables). Combining this with the ability of Executor, to pass more than one parameter (see <a title="Executor Documentation" href="http://home25.inet.tele.dk/mb/executor/help.html">documentation</a>: &#8220;$U1$, $U2$&#8221; resp. &#8220;$P1$, $P2$&#8221;) you theoretically could fire a keyword like this: &#8220;mail meeting chris@example.org boss@example.org&#8221; (meaning [keyword] [subject] [recipient] [cc]).</p>
<h4>Search Flickr for Creative Common (Name Attribution) licensed Images</h4>
<p><code>http://flickr.com/search/?l=commderiv&amp;ss=1&amp;ct=6&amp;mt=photos&amp;w=all&amp;z=t&amp;q=$U$</code></p>
<h4>Search any website via Google (in this case php.net)</h4>
<p><code>http://www.google.com/search?hl=en&amp;q=site%3Aphp.net+$U$</code></p>
<h4>Search Leo.org (Dictionary)</h4>
<p><code>http://dict.leo.org/?lp=ende&amp;lang=en&amp;search=$U$</code></p>
<h4>Do more to increase your speed</h4>
<p>With this tricks you can do a lot more than this. Just take a minute to think about, which actions you perform over and over again. For example, I use Executor to launch specific code documentations I need every day or I open my favorite feeds in Google Reader (keyword: lifehacker). Beside the web tricks, have a look at the good old command line functions, so you can build your own batch files e.g. to work in your filesystem. And finally (if you are into this) you can use cURL, like Livehacker did, to interact with the webservices you use. Assuming this service provides an API, but meanwhile most of them do. What about a keyword &#8220;basecamp addtask chris fix-bug123&#8243;?</p>
<p>I hope you enjoyed this article, if you did or if there are some questions left, just drop me a line in the comments.</p>
<p><strong>UPDATE:</strong><br />
In case, you are an <a title="Awesome note-taking service" href="http://evernote.com/">Evernote</a> user (like me), you&#8217;re maybe also interested in a solution to <a href="http://www.howtotuts.com/2008/08/23/how-to-easily-access-evernote-from-executor/">access Evernote via Executor</a>.</p>
<h3  class="related_post_title">More Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/" title="Tierfreundliche Terms of Use">Tierfreundliche Terms of Use</a></li><li><a href="http://www.burning-star.com/2006/12/best-shirt-ever/" title="Best Shirt ever">Best Shirt ever</a></li><li><a href="http://www.burning-star.com/2010/06/example-for-a-minimal-thin-app/" title="Example for a Minimal Thin App">Example for a Minimal Thin App</a></li><li><a href="http://www.burning-star.com/2007/09/das-iphone-kommt/" title="Das iPhone kommt">Das iPhone kommt</a></li><li><a href="http://www.burning-star.com/2007/09/aaaaaaaaah-ipod/" title="Aaaaaaaaah iPod">Aaaaaaaaah iPod</a></li><li><a href="http://www.burning-star.com/2007/02/apple-docklet-mit-mootools/" title="Apple Docklet mit MooTools">Apple Docklet mit MooTools</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2008/08/take-executor-beyond-application-launching/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Relaunch 2008</title>
		<link>http://www.burning-star.com/2008/08/relaunch-2008/</link>
		<comments>http://www.burning-star.com/2008/08/relaunch-2008/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 16:54:16 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[internal]]></category>

		<guid isPermaLink="false">http://www.burning-star.com/?p=167</guid>
		<description><![CDATA[Hi everybody, as you can see, Burning Star is getting relaunched these days. Besides the better embedding of services like  Twitter, Flickr and OpenID (in the comments) the main change is that I&#8217;m going to write in English from now on. This comes with the intention to focus more on publishing of code and code [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everybody,</p>
<p>as you can see, Burning Star is getting relaunched these days. Besides the better embedding of services like  <a href="http://twitter.com/burning_star">Twitter</a>, <a href="http://flickr.com/photos/burning-star/">Flickr</a> and <a href="http://en.wikipedia.org/wiki/OpenID">OpenID</a> (in the comments) the main change is that I&#8217;m going to write in English from now on. This comes with the intention to focus more on publishing of code and code related informations, which should not be encrypted in german for the rest of the world (if they would care).</p>
<p>Unfortunately I&#8217;ll have to give up some projects on this blog, because I just don&#8217;t have the time to take care of them:</p>
<ul>
<li>Fashion Shops</li>
<li>WordPress PlugIn for iPhone (meanwhile, there are a lot of better plug ins around like <a href="http://www.bravenewcode.com/wptouch">wptouch</a>)</li>
<li>Firebug PHP class (also, better alternatives like <a href="http://www.firephp.org/">FirePHP</a>)</li>
</ul>
<p>But I promise to work on new, better projects to fill this gap.</p>
<p>For eyecandy, I&#8217;ve chosen a new template, which is supposed to present me and my blog in a clean and clearly arranged way. At this point, it still lacks of a real logo, because I still have to decide, where it should be situated. Its time will come&#8230;</p>
<p>If you want to comment the recent changes, I would be pleased to hear your oppinions.</p>
<h3  class="related_post_title">More Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2008/08/take-executor-beyond-application-launching/" title="Take Executor beyond application launching">Take Executor beyond application launching</a></li><li><a href="http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/" title="Tierfreundliche Terms of Use">Tierfreundliche Terms of Use</a></li><li><a href="http://www.burning-star.com/2008/01/eigene-icons-fur-iphone-web-clips/" title="Eigene Icons für iPhone Web-Clips">Eigene Icons für iPhone Web-Clips</a></li><li><a href="http://www.burning-star.com/2007/02/apple-docklet-mit-mootools/" title="Apple Docklet mit MooTools">Apple Docklet mit MooTools</a></li><li><a href="http://www.burning-star.com/2006/03/gigabot-first-contact/" title="Gigabot First Contact">Gigabot First Contact</a></li><li><a href="http://www.burning-star.com/2006/04/best-burgers/" title="Best Burgers">Best Burgers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2008/08/relaunch-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tierfreundliche Terms of Use</title>
		<link>http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/</link>
		<comments>http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 20:25:51 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[InterNETional]]></category>
		<category><![CDATA[WebTec]]></category>

		<guid isPermaLink="false">http://www.burning-star.de/2008/01/internetional/tierfreundliche-terms-of-use/</guid>
		<description><![CDATA[Diese Nutzungsvereinbarung für die Verwendung von ExtTLD, welches es erlaubt, Komponenten des Javascript Frameworks Ext JS relativ komfortabel mit der Java-Plattform J2EE zu nutzen, enthält einige äußerst lobenswerte, wenn auch etwas kontext-fremde Bedingungen. More PostsWebServer on a StickGigabot First ContactBeamer selbstgemacht &#8211; Part1Semantisches SkaliereniPhone Wordpress-ThemeUse Active Record 3 (3.0.0 beta 3) without Rails and custom [...]]]></description>
			<content:encoded><![CDATA[<p>Diese <a href="http://www.exttld.com/index.php?content=terms">Nutzungsvereinbarung</a> für die Verwendung von <a href="http://www.exttld.com">ExtTLD</a>, welches es erlaubt, Komponenten des Javascript Frameworks <a href="http://extjs.com/">Ext JS</a> relativ komfortabel mit der Java-Plattform <a href="http://de.wikipedia.org/wiki/J2ee">J2EE</a> zu nutzen, enthält einige äußerst lobenswerte, wenn auch etwas kontext-fremde Bedingungen.</p>
<h3  class="related_post_title">More Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2008/08/take-executor-beyond-application-launching/" title="Take Executor beyond application launching">Take Executor beyond application launching</a></li><li><a href="http://www.burning-star.com/2007/09/das-iphone-kommt/" title="Das iPhone kommt">Das iPhone kommt</a></li><li><a href="http://www.burning-star.com/2007/03/beamer-selbstgemacht-part1/" title="Beamer selbstgemacht &#8211; Part1">Beamer selbstgemacht &#8211; Part1</a></li><li><a href="http://www.burning-star.com/2006/12/best-shirt-ever/" title="Best Shirt ever">Best Shirt ever</a></li><li><a href="http://www.burning-star.com/2008/08/relaunch-2008/" title="Relaunch 2008">Relaunch 2008</a></li><li><a href="http://www.burning-star.com/2007/02/apple-docklet-mit-mootools/" title="Apple Docklet mit MooTools">Apple Docklet mit MooTools</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eigene Icons für iPhone Web-Clips</title>
		<link>http://www.burning-star.com/2008/01/eigene-icons-fur-iphone-web-clips/</link>
		<comments>http://www.burning-star.com/2008/01/eigene-icons-fur-iphone-web-clips/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 20:04:12 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[WebTec]]></category>

		<guid isPermaLink="false">http://www.burning-star.de/2008/01/webtec/eigene-icons-fur-iphone-web-clips/</guid>
		<description><![CDATA[Ein kleiner Tipp für alle Interessierten: Seit dem Update auf Firmware-Version 1.1.3 kann man nun auf dem Home-Bildschirm von iPhone und iPod-Touch auch Links zu Websites als Icons speichern, sogenannte Web-Clips, was den Zugriff auf geliebte Internet-Applikationen sehr erleichtert. Als Icon muss dann ein Screenshot der Seite herhalten, der aber immerhin vom Gerät automatisch auf [...]]]></description>
			<content:encoded><![CDATA[<p>Ein kleiner Tipp für alle Interessierten:</p>
<p>Seit dem Update auf Firmware-Version 1.1.3 kann man nun auf dem Home-Bildschirm von iPhone und iPod-Touch auch Links zu Websites als Icons speichern, sogenannte <a href="http://www.apple.com/de/ipodtouch/features.html#customize" title="Eigene Webseites auf iPhone Startbildschirm">Web-Clips</a>, was den Zugriff auf geliebte Internet-Applikationen sehr erleichtert. Als Icon muss dann ein Screenshot der Seite herhalten, der aber immerhin vom Gerät automatisch auf iPhone-Stil getrimmt wird (glossy, abgerundete Ecken). Das ist natürlich praktisch, aber oft nicht besonders hübsch.</p>
<p>Wer seine eigene Seite &#8211; z.B. seinen Blog mit <a href="http://www.burning-star.de/wordpress-theme-plugin-for-iphone-and-ipod-touch/" title="WordPress Theme für iPhone">iPhone Plug-In</a> &#8211; mit einem eigenen Icon für den Home-Screen von iPhone-Surfern ausstatten will, kann das einfach mit folgendem Tag im HTML-Header tun:</p>
<pre id="line1">&lt;<span class="start-tag">link</span><span class="attribute-name"> rel</span>=<span class="attribute-value">"apple-touch-icon" </span><span class="attribute-name">href</span>=<span class="attribute-value">"apple-touch-icon.png"</span><span class="error"><span class="attribute-name">/</span></span>&gt;</pre>
<p>Es sollte sich um ein Bild im PNG-Format mit einer Auflösung von 158&#215;158 Pixeln handeln.<br />
Auch hier gilt: Der typischen iPhone-Stil wird vom Gerät selbst automatisch hinzugefügt, diesen Arbeitsschritt kann man sich also sparen. <img src='http://www.burning-star.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3  class="related_post_title">More Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2010/06/example-for-a-minimal-thin-app/" title="Example for a Minimal Thin App">Example for a Minimal Thin App</a></li><li><a href="http://www.burning-star.com/2007/09/aaaaaaaaah-ipod/" title="Aaaaaaaaah iPod">Aaaaaaaaah iPod</a></li><li><a href="http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/" title="Tierfreundliche Terms of Use">Tierfreundliche Terms of Use</a></li><li><a href="http://www.burning-star.com/2006/12/best-shirt-ever/" title="Best Shirt ever">Best Shirt ever</a></li><li><a href="http://www.burning-star.com/2007/09/semantisches-skalieren/" title="Semantisches Skalieren">Semantisches Skalieren</a></li><li><a href="http://www.burning-star.com/2006/03/webserver-on-a-stick/" title="WebServer on a Stick">WebServer on a Stick</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2008/01/eigene-icons-fur-iphone-web-clips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone WordPress-Theme</title>
		<link>http://www.burning-star.com/2007/12/iphone-wordpress-theme/</link>
		<comments>http://www.burning-star.com/2007/12/iphone-wordpress-theme/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 19:15:01 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Projekte]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.burning-star.de/2007/12/projekte/iphone-wordpress-theme/</guid>
		<description><![CDATA[!PROJEKT EINGESTELLT! Da das Theme ohnehin nie dem Alpha Status entwachsen war, da ich leider keine Zeit hatte mich darum zu kümmern und da es mittlerweile qualitativ weitaus bessere Alternativen gibt, habe ich beschlossen dieses Projekt endgültig einzustellen. Als Alternative bietet sich bspw. WPtouch an. Es gibt eine neue Seite auf diesem Blog: Ich biete [...]]]></description>
			<content:encoded><![CDATA[<h3>!PROJEKT EINGESTELLT!</h3>
<p><em>Da das Theme ohnehin nie dem Alpha Status entwachsen war, da ich leider keine Zeit hatte mich darum zu kümmern und da es mittlerweile qualitativ weitaus bessere Alternativen gibt, habe ich beschlossen dieses Projekt endgültig einzustellen. Als Alternative bietet sich bspw. <a title="wptouch wordpress plugin" href="http://www.bravenewcode.com/wptouch">WPtouch</a> an.</em></p>
<p>Es gibt eine neue Seite auf diesem Blog: Ich biete ein WordPress Theme/Plugin zum download an!</p>
<p>Sinn und Zweck:<br />
Per 1-Klick Installation kann man ein Plugin aktivieren, dass ein speziell für das iPhone bzw. den iPod Touch angepasstes Layout (welches die Benutzeroberfläche des iPhones imitiert) für eure Blogs anzeigt, wenn eines von den genannten Geräten eure Seite besucht.</p>
<p>Das ganze ist wirklich sehr hübsch anzusehen, also macht euren Blog iPhone-Ready!!!</p>
<p><a title="iPhone Theme" href="http://www.burning-star.de/wordpress-theme-plugin-for-iphone-and-ipod-touch/" target="_blank"></a></p>
<p>P.S.: Ausnahmsweise ist die entsprechende Seite auf englisch verfasst.</p>
<h3  class="related_post_title">More Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2006/04/best-burgers/" title="Best Burgers">Best Burgers</a></li><li><a href="http://www.burning-star.com/2008/01/eigene-icons-fur-iphone-web-clips/" title="Eigene Icons für iPhone Web-Clips">Eigene Icons für iPhone Web-Clips</a></li><li><a href="http://www.burning-star.com/2006/03/webserver-on-a-stick/" title="WebServer on a Stick">WebServer on a Stick</a></li><li><a href="http://www.burning-star.com/2010/06/use-active-record-3-3-0-0-beta-3-without-rails-and-custom-logger/" title="Use Active Record 3 (3.0.0 beta 3) without Rails and custom Logger">Use Active Record 3 (3.0.0 beta 3) without Rails and custom Logger</a></li><li><a href="http://www.burning-star.com/2009/05/using-mootools-with-ruby-on-rails/" title="Using Mootools with Ruby on Rails">Using Mootools with Ruby on Rails</a></li><li><a href="http://www.burning-star.com/2008/08/relaunch-2008/" title="Relaunch 2008">Relaunch 2008</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2007/12/iphone-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP-Klasse für Firebug</title>
		<link>http://www.burning-star.com/2007/10/php-klasse-fuer-firebug/</link>
		<comments>http://www.burning-star.com/2007/10/php-klasse-fuer-firebug/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 20:51:08 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Projekte]]></category>

		<guid isPermaLink="false">http://www.burning-star.de/2007/10/projekte/php-klasse-fuer-firebug/</guid>
		<description><![CDATA[!PROJEKT EINGESTELLT! Da das Projekt ohnehin nie dem Alpha Status entwachsen war, da ich leider keine Zeit hatte mich darum zu kümmern und da es mittlerweile qualitativ weitaus bessere Alternativen gibt, habe ich beschlossen dieses Projekt endgültig einzustellen. Weiter unten im Text findet ihr einige Alternativen. Wenn ihr zu den glücklichen Menschen auf dieser Welt [...]]]></description>
			<content:encoded><![CDATA[<h3>!PROJEKT EINGESTELLT!</h3>
<p><em>Da das Projekt ohnehin nie dem Alpha Status entwachsen war, da ich leider keine Zeit hatte mich darum zu kümmern und da es mittlerweile qualitativ weitaus bessere Alternativen gibt, habe ich beschlossen dieses Projekt endgültig einzustellen. Weiter unten im Text findet ihr einige Alternativen.</em></p>
<p class="MsoPlainText">Wenn ihr zu den glücklichen Menschen auf dieser Welt gehört, denen PHP geläufig ist kennt ihr vielleicht das:</p>
<p class="MsoPlainText">Ihr bastelt gerade eine neue Seite zusammen, schreibt/lest/verarbeitet und übergebt bereits Unmengen an Arrays und Variablen, aber irgendwas klappt wieder einmal nicht. Ärgerlich ist dann, wenn man sich per &#8220;var_dump&#8221; oder &#8220;print_r&#8221; erstmal das ganze Layout zerschiesst, um nachzusehen, wo da was nicht stimmt.</p>
<p class="MsoPlainText">Das ist einfach demovtivierend. Eben war man schon so weit, es sah schon &#8220;fast&#8221; fertig aus. Und jetzt? Jetzt zieht sich ein ellenlanger &lt;pre&gt;-Tag mit 1000 Post-Variablen quer über die Seite.</p>
<p class="MsoPlainText">Definitiv zu uncool für uns. Jetzt hat man schon die besten Tools zur Webentwicklung (z.B. <a title="Firebug" href="http://www.getfirebug.com/" target="_blank">Firebug</a>) und soll trotzdem auf solche Methoden zurückgreifen?</p>
<p class="MsoPlainText">Inspiriert von <a title="MichaelSync" href="http://michaelsync.net" target="_blank">MichaelSyncs</a> <a title="Firebug Tutorial" href="http://michaelsync.net/2007/09/08/firebug-tutorial-overview-of-firebug" target="_blank">Firebug-Tutorials</a> habe ich mich dazu entschlossen, eine kleine PHP-Klasse zu schreiben, die es ermöglicht Daten von PHP heraus in der Firebug-Konsole auszugeben. Die Technik ist alles andere als Revolutionär: Die PHP-Klasse erstellt einfach nur Javascript-Blöcke, die mit Hilfe der <a title="Firebug Console API" href="http://www.getfirebug.com/console.html" target="_blank">Console API</a> von Firebug Ausgaben in dessen Konsole erzeugen. Einfach, aber es erfüllt seinen Zweck.</p>
<p class="MsoPlainText">Denn dadurch bleibt das Layout unbehelligt von unseren Debug-Versuchen, da jede Ausgabe die wie benötigen ordentlich nacheinander in der Firebug Console aufgereiht wird. Es gibt noch ein paar Zusatzfunktionen, wie Timer oder ein Zähler (z.B. für die Anzahl von Schleifendurchläufen), eben alles was die API auf den ersten Blick so hergibt. Schauts euch doch einfach mal an&#8230;</p>
<p class="MsoPlainText">
<p class="MsoPlainText">Es gibt natürlich (wie immer) noch einige Alternativen, bspw. <a title="FirePHP" href="http://www.firephp.org/" target="_blank">FirePHP</a>, ein richtiges Firebug-AddOn für PHP.  Und dann noch <a title="andere Firebug PHP Klasse" href="http://forenblogger.de/2006/10/07/entwicklung-und-tests/" target="_blank">dieses Skript hier</a> von <a title="Forenblogger" href="http://forenblogger.de" target="_blank">forenblogger.de</a>. Er geht noch einen Schritt weiter und fängt sogar PHP-Exceptions ab, um sie in der Konsole anzuzeigen.</p>
<p class="MsoPlainText">Allerdings habe ich selbst das Skript noch nicht getestet, also kann ich nicht viel dazu sagen.</p>
<p>Als nächsten Schritt in dieser Richtung plane ich eigentlich ein Firebug Plug-In für das Smarty-Templatesystem. Denn wenn man damit arbeitet ist es natürlich noch viel stressiger sich einfach mal so eine Variable ausgeben zu lassen (erfordert Änderung in der PHP-, als auch der Template-Datei). Sollte jemand mit daran arbeiten wollen oder es besser vollbringen, sagt mir bitte bescheid. <img src='http://www.burning-star.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3  class="related_post_title">More Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2008/08/take-executor-beyond-application-launching/" title="Take Executor beyond application launching">Take Executor beyond application launching</a></li><li><a href="http://www.burning-star.com/2006/12/best-shirt-ever/" title="Best Shirt ever">Best Shirt ever</a></li><li><a href="http://www.burning-star.com/2007/09/aaaaaaaaah-ipod/" title="Aaaaaaaaah iPod">Aaaaaaaaah iPod</a></li><li><a href="http://www.burning-star.com/2007/12/iphone-wordpress-theme/" title="iPhone Wordpress-Theme">iPhone Wordpress-Theme</a></li><li><a href="http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/" title="Tierfreundliche Terms of Use">Tierfreundliche Terms of Use</a></li><li><a href="http://www.burning-star.com/2008/08/relaunch-2008/" title="Relaunch 2008">Relaunch 2008</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2007/10/php-klasse-fuer-firebug/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Semantisches Skalieren</title>
		<link>http://www.burning-star.com/2007/09/semantisches-skalieren/</link>
		<comments>http://www.burning-star.com/2007/09/semantisches-skalieren/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 19:53:00 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[WebTec]]></category>

		<guid isPermaLink="false">http://www.burning-star.de/2007/09/webtec/semantisches-skalieren/</guid>
		<description><![CDATA[Eine neue &#8220;intelligente&#8221; Methode des Skalierens von Bildern stellt Brady Forrest in diesem Video vor. Hierbei wird z.B. nicht &#8211; wie üblich &#8211; das komplette Bild verschmälert, sondern nur die &#8220;unwichtigen&#8221; Teile des Bildes, so dass das Motiv des Bildes viel weniger verzerrt wird. Schwer vorstellbar, deshalb umbedingt ansehen! Update: Auf rsizr.com hat jemand das [...]]]></description>
			<content:encoded><![CDATA[<p>Eine neue &#8220;intelligente&#8221; Methode des Skalierens von Bildern stellt Brady Forrest in diesem <a href="http://radar.oreilly.com/archives/2007/08/context_aware_i.html" target="_blank">Video</a> vor. Hierbei wird z.B. nicht &#8211; wie üblich &#8211; das komplette Bild verschmälert, sondern nur die &#8220;unwichtigen&#8221; Teile des Bildes, so dass das Motiv des Bildes viel weniger verzerrt wird.</p>
<p>Schwer vorstellbar, deshalb umbedingt ansehen!</p>
<p><em>Update: Auf <a href="http://rsizr.com/" title="Semantisches Skalieren mit Flash" target="_blank">rsizr.com</a> hat jemand das Ganze anscheinend schon als Flash-Application verbaut. Klappt auch mit eigenen Bildern. Dauert zwar eine ganze Weile, ist aber durchaus beeindruckend!</em></p>
<h3  class="related_post_title">More Posts</h3><ul class="related_post"><li><a href="http://www.burning-star.com/2007/03/beamer-selbstgemacht-part1/" title="Beamer selbstgemacht &#8211; Part1">Beamer selbstgemacht &#8211; Part1</a></li><li><a href="http://www.burning-star.com/2008/01/eigene-icons-fur-iphone-web-clips/" title="Eigene Icons für iPhone Web-Clips">Eigene Icons für iPhone Web-Clips</a></li><li><a href="http://www.burning-star.com/2007/09/aaaaaaaaah-ipod/" title="Aaaaaaaaah iPod">Aaaaaaaaah iPod</a></li><li><a href="http://www.burning-star.com/2007/02/apple-docklet-mit-mootools/" title="Apple Docklet mit MooTools">Apple Docklet mit MooTools</a></li><li><a href="http://www.burning-star.com/2008/01/tierfreundliche-terms-of-use/" title="Tierfreundliche Terms of Use">Tierfreundliche Terms of Use</a></li><li><a href="http://www.burning-star.com/2008/08/take-executor-beyond-application-launching/" title="Take Executor beyond application launching">Take Executor beyond application launching</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.burning-star.com/2007/09/semantisches-skalieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 3.930 seconds --><!-- Cached page served by WP-Cache -->
