<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>solnic on blog &#187; Blog</title>
	<atom:link href="http://blog.solnic.eu/category/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.solnic.eu</link>
	<description>web development, ruby, javascript and other crazy things</description>
	<lastBuildDate>Mon, 19 Oct 2009 06:24:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My development setup</title>
		<link>http://blog.solnic.eu/2009/10/18/my-development-setup</link>
		<comments>http://blog.solnic.eu/2009/10/18/my-development-setup#comments</comments>
		<pubDate>Sun, 18 Oct 2009 08:10:53 +0000</pubDate>
		<dc:creator>solnic</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.solnic.eu/?p=216</guid>
		<description><![CDATA[
			
				
			
		It&#8217;s something I always wanted to write about and also a response to Peter Cooper&#8217;s post on RubyFlow calling to write about tools that we use everyday to do Ruby on Rails development. I like the idea since there are a lot of options and finding right tool for the job is essential.

Let&#8217;s start:

Hardware



MacBook Pro [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a  href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F10%2F18%2Fmy-development-setup">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F10%2F18%2Fmy-development-setup&amp;source=s0lnic&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>It&#8217;s something I always wanted to write about and also a response to <a  href="http://rubyflow.com/items/2865">Peter Cooper&#8217;s post on RubyFlow</a> calling to write about tools that we use everyday to do Ruby on Rails development. I like the idea since there are a lot of options and finding right tool for the job is essential.</p>

<p>Let&#8217;s start:</p>

<h2>Hardware</h2>


<ul>
<li>MacBook Pro 15&#8243; with Intel Core 2 Duo 2.40GHz and 2 gigs of <span class="caps">RAM </span>- absolutely enough. This is a decent laptop, the only thing which bothers me is its temperature, sometime it burns my hands, literally&#8230;</li>
<li>Logitech VX Nano Cordless Notebook Mouse &#8211; <strong>the best</strong> notebook mouse ever, has <strong>the smaller</strong> receiver out there + I change batteries like twice a year, love it</li>
</ul>



<h2>Base software</h2>


<ul>
<li><a  href="http://www.archlinux.org">Arch Linux</a> &#8211; it&#8217;s my 6 day with this distro actually, I&#8217;m a Gentoo fanatic but from time to time I try to use something different. I usually go back to Gentoo after a month or so. We&#8217;ll see how I&#8217;ll end up now. So far I really like Arch, it&#8217;s extremely lightweight, fast and stable. Software availability is as good as in Gentoo. It&#8217;s also easy to make your own packages which is crucial for Ruby developers since it happens that we need various non-standard stuff, like let&#8217;s say Nginx with Passenger support. I&#8217;ve got a feeling that this time I won&#8217;t go back to Gentoo</li>
</ul>




<ul>
<li><a  href="http://www.kde.org"><span class="caps">KDE</span></a> &#8211; it&#8217;s my desktop environment and one of the most important reasons why I&#8217;ve switched back from <span class="caps">OSX </span>to Linux. <span class="caps">KDE&#8217;</span>s window manager is highly configurable and gives you features like moving and resizing of windows via a special key + mouse move/click, custom settings per application / window class so for instance you can configure that console window will always appear on the third virtual desktop snapped to the upper-right corner of the screen, useful desktop effects ie &#8220;Present windows&#8221; which is something like Expose in <span class="caps">OSX </span><strong>but</strong> you can filter out windows by typing key words, cool window transparency (you can alt+mouse scroll to change window&#8217;s opacity&#8230;it&#8217;s useful, believe me) and much, much more&#8230;I just can&#8217;t work without those things. Here are <span class="caps">KDE&#8217;</span>s apps that I use:
<ul>
<li>Konsole &#8211; terminal emulator, very powerful, has tabs, horizontal / vertical view splitting, bookmarks and fully customizable look&#8217;n'feel</li>
<li>KRunner &#8211; something like quicksilver for <span class="caps">OSX</span></li>
<li>Dolphin &#8211; file manager, supports remote protocols, in my opinion the best file manager ever</li>
<li>KDiff3 &#8211; <span class="caps">GUI </span>for displaying diffs and merging, it&#8217;s my mergetool in Git</li>
<li>KColorEdit &#8211; color picker and editor</li>
<li>KRuler &#8211; on-screen ruler</li>
<li>KSnapshot &#8211; for doing screenshots</li>
<li>Klipper &#8211; a handy clipboard manager, supports custom actions</li>
<li>Amarok &#8211; music player</li>
</ul>
</li>
</ul>




<ul>
<li><a  href="http://www.netbeans.org">NetBeans</a> &#8211; I use this great <span class="caps">IDE </span>even for writing tiny scripts, for me it&#8217;s the best choice. I&#8217;ve tried many other <span class="caps">IDE</span>s/editors including Eclipse, JEdit, RubyMine, TextMate and others that I don&#8217;t remember now and NetBeans works best for me. Key features are powerful editor with macros and great shortcuts, ctrl+click navigation, fantastic JavaScript support, debugger, test/spec runner and&#8230;support for multiple projects in the same window, something that most of the <span class="caps">IDE</span>s don&#8217;t have and I really need it. I use following plugins:
<ul>
<li>Ruby and Rails &#8211; what a surprise <img src='http://blog.solnic.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Database &#8211; to access databases via a <span class="caps">GUI</span></li>
<li>OpenFileFast &#8211; written by my friend from <a  href="http://www.lunarlogicpolska.com"><span class="caps">LLP</span></a>, Marcin Kulik. Works like the open file dialog in TextMate, highly recommended. You can read more <a  href="http://sickill.net/projects/off">here</a></li>
</ul>
</li>
</ul>




<ul>
<li><a  href="http://www.firefox.com">Firefox</a> &#8211; I&#8217;ve switched from Opera a long time ago because of Firebug, now I&#8217;m about to try out Chromium for normal web browsing and use Firefox only for the development. Plugins that I find useful:
<ul>
<li>Firebug &#8211; must-have for every web-developer</li>
<li>Web Developer &#8211; easy access to things like clearing cache, disabling JavaScript etc.</li>
<li>Chat Zilla &#8211; <span class="caps">IRC</span></li>
<li>Read it Later &#8211; I never have time to read interesting things from Google Reader in the moment I find them so&#8230;I read them later</li>
<li>Delicious &#8211; I still use it but rather for sharing bookmarks between work and home</li>
</ul>
</li>
</ul>



<h2>Dev tools:</h2>


<ul>
<li><span class="caps">GIT </span>- probably the best <span class="caps">SCM </span>in the world</li>
<li>QGit4 &#8211; sometimes I use this git gui to view history of a project</li>
<li><span class="caps">ZSH </span>with a <a  href="http://github.com/jcorbin/zsh-git">pimped prompt for <span class="caps">GIT</span></a></li>
<li>Nginx with Passanger &#8211; better then script/server</li>
<li>VirtualBox &#8211; I have 3 Windows virtual machines each with different version of Internet Explorer, only for testing of course</li>
</ul>



<h2>Communication:</h2>


<ul>
<li>Skype &#8211; Linux version is very crappy, unfortunately I&#8217;m forced to use it</li>
<li><span class="caps">PSI </span>- great Jabber client</li>
<li>TweetDeck &#8211; powerful Twitter client, Adobe <span class="caps">AIR </span>based</li>
</ul>



<p>That would be it!</p>]]></content:encoded>
			<wfw:commentRss>http://blog.solnic.eu/2009/10/18/my-development-setup/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rack Middleware Contest</title>
		<link>http://blog.solnic.eu/2009/10/12/rack-middleware-contest</link>
		<comments>http://blog.solnic.eu/2009/10/12/rack-middleware-contest#comments</comments>
		<pubDate>Mon, 12 Oct 2009 19:35:11 +0000</pubDate>
		<dc:creator>solnic</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://blog.solnic.eu/?p=207</guid>
		<description><![CDATA[
			
				
			
		CodeRack is a coding contest dreamed up by a group of the Ruby programmers at Lunar Logic Polska who were excited about the possibilities of Rack middleware. The team wants to encourage Ruby developers to explore the possibilities and what better way than to hold a contest? The secondary goal of the contest is to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a  href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F10%2F12%2Frack-middleware-contest">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F10%2F12%2Frack-middleware-contest&amp;source=s0lnic&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>CodeRack is a coding contest dreamed up by a group of the Ruby programmers at <a  href="http://www.lunarlogicpolska.com">Lunar Logic Polska</a> who were excited about the possibilities of Rack middleware. The team wants to encourage Ruby developers to explore the possibilities and what better way than to hold a contest? The secondary goal of the contest is to generate a set of open source solutions that will solve real problems and inspire others. Every entry will be released under the <span class="caps">MIT </span>open source license.</p>

<p>Programmers are encouraged to submit contest entries that will be judged based on the cleverness of the application and the elegance of the code. Entries can be submitted at <a  href="http://www.coderack.org">coderack.org</a> until midnight <span class="caps">EST</span> November 15th. Finalists are scheduled to be announced on the 1st of December and public voting will run for one month. The final winners will be announced on the 5th of January.</p>

<p>The first round of the contest will be judged by an elite panel of judges including Ben Bangert of <span class="caps">O&#8217;R</span>eilly Media, Chris Wanstrath and PJ Hyett of GitHub, Joshua Peek of 37Signals, Yehuda Katz of Engine Yard and Rails core team member, Ryan Tomayko of Heroku, Core Rails team member Matt Aimonetti, and the Rails Envy team of Gregg Pollack and Jason Seifer.</p>

<p>Once the finalists have been selected by the panel, the public will vote for the top prize winners.</p>

<p>Prizes have been donated by Bytemark Hosting, GitHub, Jetbrains, Mindmeister, Freelance Total, Heroku, Rackspace Hosting, Peepcode, <span class="caps">BDDC</span>asts, and Zenbe Shareflow. The top prize includes a dedicated quad core server package and is valued at over $3000. Every entrant will receive a credit from bddcasts.com and $30 credit from Heroku. All finalists will receive a package including Zenbe Shareflow subscriptions, a RubyMine license from JetBrains, and five credits from bddcasts.com. Details of all of the prize packages will soon be available on the coderack.org website.</p>

<p>More information about the contest, including the contest rules, can be found at <a  href="http://coderack.org">coderack.org</a>.</p>

<p>ps. This post is a copy from <a  href="http://www.lunarlogicpolska.com/2009/10/8/lunar-logic-polska-launches-coderack-global-coding-contest">Lunar Logic Polska blog</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.solnic.eu/2009/10/12/rack-middleware-contest/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unobtrusive JavaScript helpers in Rails 3</title>
		<link>http://blog.solnic.eu/2009/09/08/unobtrusive-javascript-helpers-in-rails-3</link>
		<comments>http://blog.solnic.eu/2009/09/08/unobtrusive-javascript-helpers-in-rails-3#comments</comments>
		<pubDate>Mon, 07 Sep 2009 22:10:46 +0000</pubDate>
		<dc:creator>solnic</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails3]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[unobtrusive]]></category>

		<guid isPermaLink="false">http://blog.solnic.eu/?p=186</guid>
		<description><![CDATA[
			
				
			
		A while ago I have written a post about JavaScript helpers in Ruby on Rails and tried to explain why they are a bad idea. It&#8217;s hard to believe for me that it was almost 2 years ago! Since then so many things have happened in the Ruby world&#8230;Now Rails 3 is on its way [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a  href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F09%2F08%2Funobtrusive-javascript-helpers-in-rails-3">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F09%2F08%2Funobtrusive-javascript-helpers-in-rails-3&amp;source=s0lnic&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>A while ago I have written a post about <a  href="http://blog.solnic.eu/2007/10/30/why-javascript-helpers-in-rails-are-evil">JavaScript helpers in Ruby on Rails</a> and tried to explain why they are a bad idea. It&#8217;s hard to believe for me that it was almost 2 years ago! Since then so many things have happened in the Ruby world&#8230;Now Rails 3 is on its way and we already know what significant improvements and changes it will include. One of them is related to JavaScript helpers and the way how remote links and forms will be handled and I must admit that the new idea is absolutely great.</p>

<p>The new way is based on unobtrusive approach to JavaScript. This means that <span class="caps">HTML </span>code will be separated from JavaScript. I have checked out the latest sources of Ruby on Rails and found out that some of the work is already done. There is a new helper called AjaxHelper, it implements link_to_remote method which in the moment of writing this post looks like this:</p>


<div class="wp_codebox"><table><tr id="p1864"><td class="code" id="p186code4"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> link_to_remote<span style="color:#006600; font-weight:bold;">&#40;</span>name, url, options = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  html = options.<span style="color:#9900CC;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:html</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">||</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  update = options.<span style="color:#9900CC;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:update</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> update.<span style="color:#9900CC;">is_a</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Hash</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    html<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;data-update-success&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = update<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:success</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    html<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;data-update-failure&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = update<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:failure</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">else</span>
    html<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;data-update-success&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = update
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  html<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;data-update-position&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = options.<span style="color:#9900CC;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:position</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  html<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;data-method&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>          = options.<span style="color:#9900CC;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:method</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  html<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;data-remote&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>          = <span style="color:#996600;">&quot;true&quot;</span>
&nbsp;
  html.<span style="color:#9900CC;">merge</span>!<span style="color:#006600; font-weight:bold;">&#40;</span>options<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  url = url_for<span style="color:#006600; font-weight:bold;">&#40;</span>url<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> url.<span style="color:#9900CC;">is_a</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Hash</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  link_to<span style="color:#006600; font-weight:bold;">&#40;</span>name, url, html<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>




<p>What you see here will generate a clean markup with <span class="caps">HTML5</span>-compliant attributes prefixed with a word &#8220;data-&#8221;. If you are not familiar with them you can checkout a nice article by John Resig <a  href="http://ejohn.org/blog/html-5-data-attributes"><span class="caps">HTML</span> 5 data- Attributes</a>. Those attributes will instruct the additional JavaScript code how it should handle the behavior. Basically all links, buttons and forms that have the special attribute &#8220;data-remote&#8221; set to &#8220;true&#8221; will issue an <span class="caps">AJAX </span>request. There has been a discussion on <a  href="http://www.mail-archive.com/rubyonrails-core@googlegroups.com/msg09122.html">the Rails on Rails Core group</a> about how to implement corresponding JavaScript code. People are worried about its performance since finding all elements with data-remote=true appears to be slow in case of Prototype and jQuery. Moreover there is a problem of new elements that may be dynamically inserted after the page was loaded and all the event listeners were attached. Fortunately there is no need to be worried as our situation is a perfect example where we should use <a  href="http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/">Event Delegation</a>. <span class="caps">DHH </span>has already showed in his <a  href="http://www.scribd.com/doc/15010095/Rails-3-and-the-Real-Secret-to-High-Productivity">Rails 3 and the Real Secret to High Productivity</a> presentation how links and buttons can be handled by <a  href="http://www.prototypejs.org">Prototype</a> library and it looks absolutely reasonable to me.</p>

<p>I would like to focus on jQuery though as it&#8217;s getting more popular even in the Rails community. Great example is <a  href="http://www.lunarlogicpolska.com">my job</a> where we use jQuery in every of our new projects. So how can we handle new remote links and forms using this popular library? Actually it&#8217;s ridiculously easy. Thanks to <a  href="http://docs.jquery.com/Events/live">jQuery.live</a> function we can easily use <a  href="http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think">Event Delegation</a> to handle <span class="caps">AJAX </span>calls. Just take a look at this sample of a markup that new helpers in Rails 3 will generate:</p>


<div class="wp_codebox"><table><tr id="p1865"><td class="code" id="p186code5"><pre class="html" style="font-family:monospace;">&lt;!-- the new link to remote --&gt;
&lt;a href=&quot;/users&quot; data-remote=&quot;true&quot;&gt;Users&lt;/a&gt;
&nbsp;
&lt;!-- the new remote form --&gt;
&lt;form action=&quot;/users&quot; method=&quot;post&quot; data-remote=&quot;true&quot;&gt;
  &lt;input type=&quot;text&quot; name=&quot;login&quot;/&gt;
  &lt;input type=&quot;submit&quot;/&gt;
&lt;/form&gt;</pre></td></tr></table></div>




<p>Pretty clean, I really like it! Now let&#8217;s see how we can implement jQuery handler that will send <span class="caps">AJAX </span>requests:</p>


<div class="wp_codebox"><table><tr id="p1866"><td class="code" id="p186code6"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> request <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>options<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> url <span style="color: #339933;">:</span> options.<span style="color: #660066;">url</span><span style="color: #339933;">,</span> type <span style="color: #339933;">:</span> <span style="color: #3366CC;">'get'</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// remote links handler</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a[data-remote=true]'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> request<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> url <span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">href</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// remote forms handler</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'form[data-remote=true]'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'submit'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> request<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> url <span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">action</span><span style="color: #339933;">,</span> type <span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">method</span><span style="color: #339933;">,</span> data <span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>




<p>The above code will send an <span class="caps">AJAX </span>request when you click on a remote link or submit a remote form. Note that it will work also with new elements dynamically inserted to the <span class="caps">DOM.</span> The example JavaScript code is the bare minimum of course, we could have something much more sophisticated. We will be able to specify success and failure handlers and also elements that should be updated with an <span class="caps">AJAX </span>response text (and probably much more!), hence the JavaScript is going to be more complicated.</p>

<p>This is definitely a step into the right direction. I&#8217;m looking forward to Rails 3!</p>]]></content:encoded>
			<wfw:commentRss>http://blog.solnic.eu/2009/09/08/unobtrusive-javascript-helpers-in-rails-3/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Back From the Dead &#8211; a batch update</title>
		<link>http://blog.solnic.eu/2009/06/24/back-from-the-dead-a-batch-update</link>
		<comments>http://blog.solnic.eu/2009/06/24/back-from-the-dead-a-batch-update#comments</comments>
		<pubDate>Tue, 23 Jun 2009 23:46:25 +0000</pubDate>
		<dc:creator>solnic</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://blog.solnic.eu/?p=176</guid>
		<description><![CDATA[
			
				
			
		Wow, it&#8217;s been a while since I wrote last post. I guess I suck at writing posts on a regular basis. Hopefully I will be able to change that   So&#8230;a lot has happened recently and I&#8217;ve been quite busy. First of all about 3 months ago I bought my very own apartment. The [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a  href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F06%2F24%2Fback-from-the-dead-a-batch-update">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.solnic.eu%2F2009%2F06%2F24%2Fback-from-the-dead-a-batch-update&amp;source=s0lnic&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>Wow, it&#8217;s been a while since I wrote last post. I guess I suck at writing posts on a regular basis. Hopefully I will be able to change that <img src='http://blog.solnic.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So&#8230;a lot has happened recently and I&#8217;ve been quite busy. First of all about 3 months ago I bought my very own apartment. The whole process of getting a bank credit took 2 months and it was sucking my energy without any mercy. But&#8230;I did it and I&#8217;m alive <img src='http://blog.solnic.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  No more renting, I&#8217;ve got my own home. Me and the bank of course, haha.</p>

<p>Anyway now it&#8217;s time to get back to the Web and let people know what I&#8217;ve been working on.</p>

<h4>Utype</h4>

<p>At Lunar Logic Polska we&#8217;ve migrated <a  href="http://www.lunarlogicpolska.com">our site</a> to <a  href="http://www.utype.org">Utype</a> which aims to be a modern, flexible, user <strong>and</strong> developer friendly <span class="caps">CMS.</span> It&#8217;s currently based on Merb and DataMapper. Our plan is to migrate it to Rails3 later this year. If you are interested in the development please have a look at the official <a  href="http://github.com/LunarLogicPolska/utype">GitHub repository</a></p>

<h4>RubyTime</h4>

<p>Again, at Lunar Logic Polska we&#8217;ve spent last couple of months working on a new version of our time tracking system. Version 3.1 will include some new features and many bug fixes. We should release it in July. You can see the progress <a  href="http://rubytime.lighthouseapp.com/projects/19293/milestones/40471-release-31">at LightHouse site</a>. The release will support external clients too &#8211; an iPhone app (by <a  href="http://psionides.jogger.pl">Kuba Suder</a>) and a <span class="caps">KDE4 </span>plasmoid (by <a  href="http://sickill.net/">Marcin Kulik</a>). RubyTime is an open source project, sources can be found at the official <a  href="http://github.com/LunarLogicPolska/rubytime">GitHub repository</a></p>

<h4>DataMapper related goodies</h4>

<p>That&#8217;s a fresh meat for me. I&#8217;ve resurrected a plugin that I&#8217;ve originally created to use with Utype and now after some hacking <a  href="http://github.com/solnic/dm-is-configurable">dm-is-configurable</a> is compatible with DataMapper 0.10.0 <span class="caps">RC1 </span>and will be officially released whenever DataMapper 0.10 is finished, which should happen soon.</p>

<p>During my recent work for <a  href="http://www.ideeli.com">Ideeli</a> I had to deal with Google Data <span class="caps">API </span>which I&#8217;ve found relatively simple to use via <a  href="http://code.google.com/apis/gdata/articles/using_ruby.html">Ruby GData lib</a>; however I would love to have even better way to access that <span class="caps">API, </span>hence I&#8217;ve created <a  href="http://github.com/solnic/dm-gdata-adapters">dm-gdata-adapters</a>. The only thing that works there is loging in, but stay tuned! I&#8217;m going to write a wrapper around Spreadsheet <span class="caps">API </span>for a good start and hopefully I will find some people to help me with the rest of the <span class="caps">API</span>s. If you are interested just drop me a line.</p>

<h4><span class="caps">KDE4 </span>related goodies</h4>

<p>I&#8217;ve been experimenting with Plasma and trying to write a simple plasmoid (in Ruby or Python) which would replace Skype notifications. Current status is&#8230;double fail. I&#8217;m using an <span class="caps">SVN </span>snapshot of the upcoming <span class="caps">KDE</span> 4.3 and I&#8217;m having various issues with Ruby and Python bindings. pykde4 doesn&#8217;t work well with the <a  href="https://developer.skype.com/wiki/Skype4Py">Skype4Py</a> library so I&#8217;m trying to use Ruby which seems to be unstable at the moment&#8230;oh well. We will see how it goes when <span class="caps">KDE</span> 4.3 <span class="caps">RC1 </span>is released (which will happen in a week <img src='http://blog.solnic.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>

<h4>Me at Lunar Logic Polska</h4>

<p>A couple of weeks ago I became responsible for implementing high standards of development at our company. We&#8217;ve created a list of various best practices that we&#8217;re following and now I&#8217;m one of the persons that make sure we&#8217;re really doing it. The process includes things like organizing regular code reviews, keeping track on the test coverage status for each of the projects that we&#8217;re working on, sharing knowledge between the teams etc&#8230;We will write a blog post on <a  href="http://www.lunarlogicpolska.com/blog">our site</a> soon which will describe everything in detail as we believe it might be useful for other companies.</p>

<p><span class="caps">OK.</span> Batch mode turned off. I&#8217;m glad I finally have the time (and energy) to write something here! G&#8217;nite</p>]]></content:encoded>
			<wfw:commentRss>http://blog.solnic.eu/2009/06/24/back-from-the-dead-a-batch-update/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My brand new blog and WordPress</title>
		<link>http://blog.solnic.eu/2008/12/31/my-brand-new-blog-and-wordpress</link>
		<comments>http://blog.solnic.eu/2008/12/31/my-brand-new-blog-and-wordpress#comments</comments>
		<pubDate>Wed, 31 Dec 2008 13:54:04 +0000</pubDate>
		<dc:creator>solnic</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://blog.solnic.eu/?p=65</guid>
		<description><![CDATA[
			
				
			
		Because of the rails &#38; merb merge thing I have decided to hold off on working on Utype until the merge is finished. Unfortunately I don&#8217;t have enough time to finish Utype using Merb 1.x just to port it to Merb 2.x and then to Rails 3.0. As a side effect of my decision I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a  href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.solnic.eu%2F2008%2F12%2F31%2Fmy-brand-new-blog-and-wordpress">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.solnic.eu%2F2008%2F12%2F31%2Fmy-brand-new-blog-and-wordpress&amp;source=s0lnic&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>Because of <a  href="http://yehudakatz.com/2008/12/23/rails-and-merb-merge">the rails &amp; merb merge thing</a> I have decided to hold off on working on <a  href="http://github.com/solnic/utype">Utype</a> until the merge is finished. Unfortunately I don&#8217;t have enough time to finish Utype using Merb 1.x just to port it to Merb 2.x and then to Rails 3.0. As a side effect of my decision I have migrated my Utype-based blog to Wordpress, which is a scary <span class="caps">PHP</span>-based piece of software with one important advantage &#8211; it does the job right. It&#8217;s not as cool as I thought but I will be using it anyway since it&#8217;s probably the best <span class="caps">CMS </span>out there (at the moment&#8230;:)).</p>

<p>The fact that I&#8217;m using Wordpress now and I don&#8217;t spend hours working on my own <span class="caps">CMS </span>system means that finally I will have time to write something here more frequently.</p>

<p>&#8230;and <span class="caps">BTW </span>- Happy New Year Everyone <img src='http://blog.solnic.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.solnic.eu/2008/12/31/my-brand-new-blog-and-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
