<?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>Radamanthus Batnag &#187; web</title>
	<atom:link href="http://rad.batnag.org/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://rad.batnag.org</link>
	<description>Random thoughts on web and indie game development.</description>
	<lastBuildDate>Thu, 20 Dec 2012 11:27:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Project update: roots.cx</title>
		<link>http://rad.batnag.org/2012/12/project-update-roots-cx/</link>
		<comments>http://rad.batnag.org/2012/12/project-update-roots-cx/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 11:24:33 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=189</guid>
		<description><![CDATA[Just like a typical Architect, I started this project with the Infrastructure and a few but firm decisions on what technologies to use: - Web, not desktop - CoffeeScript and jQuery - save the App/Pages in JSON format - Jasmine for testing - a directory structure, to be consistent in where source files and compiled files [...]]]></description>
				<content:encoded><![CDATA[<p>Just like a typical Architect, I started this project with the Infrastructure and a few but firm decisions on what technologies to use:<br />
- Web, not desktop<br />
- CoffeeScript and jQuery<br />
- save the App/Pages in JSON format<br />
- Jasmine for testing<br />
- a directory structure, to be consistent in where source files and compiled files will be placed<br />
- a Guardfile to automate compilation of CoffeeScript files to Javascript, and Sass files to CSS<br />
- Jasmine installed as a gem to automatically run the test suite</p>
<p>After spending a little more than a week working on this, I&#8217;ve discovered <a href="http://roots.cx">roots.cx</a>, from an <a href="http://jenius.me/">awesome guy</a> at <a href="http://carrotcreative.com/#!/">Carrot Creative</a>.</p>
<p>It integrates almost everything I&#8217;ve done on the project so far, and more:<br />
- automatically compile coffeescript files to js<br />
- provide a facility for splitting the source coffee/js files into multiple smaller files<br />
- compress the js files into one file<br />
- write css files in a coffeescript-like syntax, then compile them to css<br />
- view partials<br />
- write the views in a coffeescript/haml-like syntax</p>
<p>The only thing I found missing was Jasmine integration.</p>
<p>After playing with it for a few minutes, it felt right. Just like Rails, OpenACS, and Delphi in the early days. The easy things are easy, and it&#8217;s transparent enough that I can imagine that it doesn&#8217;t throw any roadblocks to make the hard things harder.</p>
<p>I threw away all my previous work. No hard feelings there. What&#8217;s more valuable from that work was the low-level stuff that I learned. I&#8217;m sure I&#8217;m going to need that knowledge somewhere down the road. And the Jasmine issue was easily resolved &#8211; I just moved over my Jasmine files and the Guardfile.</p>
<p>Onward!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2012/12/project-update-roots-cx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XMPP Development in Ruby</title>
		<link>http://rad.batnag.org/2010/10/xmpp-development-in-ruby/</link>
		<comments>http://rad.batnag.org/2010/10/xmpp-development-in-ruby/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 13:53:40 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=152</guid>
		<description><![CDATA[Recently I wasted a day and half in debugging an XMPP-based service I&#8217;m working on. As is usual, the real reason I lost so much time was because I was totally unfamiliar with the terrain. I should have spent an hour or two on XMPP basics before I waded into this unfamiliar territory. If you&#8217;re [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I wasted a day and half in debugging an XMPP-based service I&#8217;m working on. As is usual, the real reason I lost so much time was because I was totally unfamiliar with the terrain. I should have spent an hour or two on XMPP basics before I waded into this unfamiliar territory.</p>
<p>If you&#8217;re just starting on XMPP development with Ruby, here are some tips and resources that you might find useful.</p>
<p><strong>One client at a time</strong><br />
For each account, there should only be one XMPP client logged in at any time. If client A is already logged in, and then client B logs in, client A will be disconnected and will stop receiving notifications. Just like in Yahoo! Messenger: when you login from a second client, the first client will be disconnected. It&#8217;s so basic, but I managed to waste the better part of a day on debugging perfectly working code before I realized that this was what&#8217;s going on in my system.</p>
<p><strong>Use <a href="http://github.com/mojodna/switchboard/tree">switchboard</a> for testing</strong><br />
When debugging network applications, you want to make sure that the application is indeed the problem and not the network. For web applications, you use <a href="http://en.wikipedia.org/wiki/CURL">curl</a> for testing. switchboard aims to be the curl for XMPP development.  curl is a command-line (hence scriptable!) http client; XMPP is a command-line XMPP client.</p>
<p>github page: <a href="http://github.com/mojodna/switchboard/tree">http://github.com/mojodna/switchboard/tree</a><br />
command-line usage: <a href="http://mojodna.net/2009/07/16/switchboard-curl-for-xmpp.html">http://mojodna.net/2009/07/16/switchboard-curl-for-xmpp.html</a></p>
<p><strong>Useful Resources</strong><br />
If you&#8217;re going to do XMPP development in plain Ruby, there&#8217;s a <a href="http://peepcode.com/products/xmpp">peepcode screencast</a> that you might find useful. It might be a bit dated, though, and most likely there are higher-level libraries that you can use.</p>
<p>In my case, I was working on harvesting blog entries from Superfeedr, so I use the Superfeedr gem, <a href="http://github.com/superfeedr/superfeedr-ruby">superfeedr-ruby</a>. An alternative is the more streamlined and highly opinionated <a href="http://github.com/superfeedr/superfeedr-rb">superfeedr-rb</a>.</p>
<p>Even if you&#8217;re not doing Superfeedr work, it&#8217;s worth spending the time to study superfeedr-ruby, if only to study how it uses Skates. <a href="http://github.com/julien51/skates">Skates</a> (formerly Babylon) is a framework for building XMPP applications in Ruby, using EventMachine for handling connections.</p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/10/xmpp-development-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
