<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>MoRails</title>
	<atom:link href="http://morails.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://morails.wordpress.com</link>
	<description>Mobile software and Ruby on Rails</description>
	<lastBuildDate>Sat, 21 Jun 2008 00:07:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='morails.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>MoRails</title>
		<link>http://morails.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://morails.wordpress.com/osd.xml" title="MoRails" />
	<atom:link rel='hub' href='http://morails.wordpress.com/?pushpress=hub'/>
		<item>
		<title>the mobile advertising service</title>
		<link>http://morails.wordpress.com/2008/06/20/the-mobile-advertising-service/</link>
		<comments>http://morails.wordpress.com/2008/06/20/the-mobile-advertising-service/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 00:07:42 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/?p=23</guid>
		<description><![CDATA[A few weeks ago I posted about the Ads module within the RMobio ruby gem (which is posted on RubyForge). The ads module allows developers to easily add advertising to their mobile apps written in Ruby (actually it should work for any web app written in Ruby app, but the advertising networks supported are mobile [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=23&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I posted about the Ads module within the RMobio ruby gem (which is posted on <a href="http://rubyforge.org">RubyForge</a>).  The ads module allows developers to easily add advertising to their mobile apps written in Ruby (actually it should work for any web app written in Ruby app, but the advertising networks supported are mobile focused).   You make calls to the get_ad method within your app and can configured the ad network and your publisher ID as you go.</p>
<p>Some of our apps at Mobio are written in Java however.  We needed a way to allow those apps to use the ads module as well. So we needed to create a REST interface to the Ads module.  However the ads service goes further and allows developers and administrators to manage their list of configured ad networks as well as their apps and pages within their apps. Specifically it lets the appropriate ad network and keywords to be used for any app, or specific page within the app, to be configured. Then developers simply call get_ad and identify the app and/or page that they are calling get_ad from. The service then determines the appropriate ad network to connect to.</p>
<h2>Administrator Usage</h2>
<p>The administrator (or developer) that wants to set up the ads service for an app has two primary tasks: set up the ad network and then configure apps and/or pages to work with those ad networks. First they will need to connect to the ads service from their browser. The ads service currently hosted at <a class="external free" title="http://marge.qa.mobiolabs.com/hub/ads/pages/" rel="nofollow" href="http://marge.qa.mobiolabs.com/hub/ads/pages/">http://marge.qa.mobiolabs.com/hub/ads/pages/</a></p>
<h3>Setting Up Ad Networks</h3>
<p>After clicking on Manage Networks the administrator should add networks for the mobile advertising networks they wish to use. Their are currently four types supported: Google (AdSense), mKhoj, Smaato and AdMobs. More advertising networks will be added soon.</p>
<p>First enter an arbitrary name for your network that is unique to you. Then choose the type of network (from those just discussed). Then enter the URL to connect to. Some networks may not use this argument, they may just always be available at the same URL. So this is optional for example with Google AdSense.</p>
<p>Then enter the login (client or publisher ID) for your network. Many ad networks (such as Google AdSense) don&#8217;t require a password.</p>
<h3>Configuring Apps and Pages</h3>
<p>The developer will call the ad retrieval method from their app, typically supplying the call with their app name and the page within their app. If it is planned to use a single ad network AND keywords for retrieval for the entire application, then only apps need to be configured.</p>
<p>In either case, first click on Manage Apps and add the name of your application. Then choose a network for it (generally the one you entered above). If you choose a network that isn&#8217;t &#8220;yours&#8221; (your login ID) you&#8217;ll just end up making money for someone else! (hence the lack of &#8220;security&#8221; for this choice).</p>
<p>If you wish some or all pages of your application to use a different ad network and/or keywords than the one configured for the overall app, then enter some pages as well. Supply the URLs of the page in the &#8220;page&#8221; argument. Or just supply a symbolic name for the page, such as &#8220;Home Page&#8221; or &#8220;Options Page&#8221;. The &#8220;page&#8221; name will only be used to look up pages when the developer makes the get_ad call.</p>
<h2>Developer Usage</h2>
<p>Once networks and apps and pages have been configured the ads service can be used from your applications. Simply make a call to the get_ad method on the pages controller. Supply arguments of the &#8220;app&#8221; and/or the &#8220;page&#8221; within your application. These should match values that have been configured in the previous steps.</p>
<p>Specifically the call looks like this</p>
<pre> <a class="external free" title="http://marge.qa.mobiolabs.com/hub/ads/pages/get_ad?app=" rel="nofollow" href="http://marge.qa.mobiolabs.com/hub/ads/pages/get_ad?app=">http://marge.qa.mobiolabs.com/hub/ads/pages/get_ad?app=</a>&lt;your appname&gt;&amp;page=&lt;some page identifier&gt;</pre>
<p>If the ads service can&#8217;t find the page supplied then it will drop back and use the ad network and keywords set up for the app. The page argument does not even need to be supplied if you are using the same network and keywords for all pages in your app. The app argument also doesn&#8217;t need to be supplied if you&#8217;re just going to use pages for lookups. In other words it can be as &#8220;simple as you want it to be&#8221;, though many developers find having a hierarchy of pages with specific ad networks and keywords and overall apps when pages can&#8217;t be found to be a helpful set of abstractions.</p>
<p>To make this even more concrete, here&#8217;s a more specific sample call:</p>
<pre> <a class="external free" title="http://marge.qa.mobiolabs.com/hub/ads/pages/get_ad?app=" rel="nofollow" href="http://marge.qa.mobiolabs.com/hub/ads/pages/get_ad?app=">http://marge.qa.mobiolabs.com/hub/ads/pages/get_ad?app=</a>&lt;your appname&gt;&amp;page=&lt;some page identifier&gt;</pre>
<h2>Terms of Service</h2>
<p>This is a developer testing instance of the ads service.   We do keep it running.   But we don&#8217;t guarantee any terms of service for it.  Also note that its not &#8220;multitenant&#8221;.  The assumption is that any developer using it will create their own app.  The only thing that will happen by using someone else&#8217;s configured app in your code is that you will end up crediting their publisher ID and giving them money.   So if you do choose to use this for development and experimental purposes you&#8217;ll want to set up your own app. If you want to use this in a production app, contact me and we can arrange for use of one of our production instances.  </p>
<p>In general we will be making all of our platform available for other mobile app developers soon.  So access to a production ready ads service will just be a natural outgrowth of that.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=23&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2008/06/20/the-mobile-advertising-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>a DRYer way to include modules</title>
		<link>http://morails.wordpress.com/2008/04/16/a-dryer-way-to-include-modules/</link>
		<comments>http://morails.wordpress.com/2008/04/16/a-dryer-way-to-include-modules/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 15:29:03 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/?p=22</guid>
		<description><![CDATA[You may have noticed in the previous post that we used the RMobio ads module merely by doing &#8220;require rmobio/ads&#8221; inside our controller class. This is terser than and less repetitive (in the spirit of Don&#8217;t Repeat Yourself) than doing a require followed by doing an include inside the module. The code inside the module [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=22&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You may have noticed in the previous post that we used the RMobio ads module merely by doing &#8220;require rmobio/ads&#8221; inside our controller class.  This is terser than and less repetitive (in the spirit of Don&#8217;t Repeat Yourself) than doing a require followed by doing an include inside the module.</p>
<p>The code inside the module to allow this is</p>
<pre>
if MOBIO_CONFIG['ad_network']
  adlib="rmobio/ads/" + MOBIO_CONFIG['ad_network']
else
  adlib='rmobio/ads/' + 'no_network'
end
require adlib
eval("include " + adlib.camelize)
</pre>
<p>What this does is build up the specific class for the ad_network that is configured in the generic RMobio configuration file (RMobio.yml).   If no ad network is configured, we still want to have calls to getAd and getAdByPage not fail.  So there is a module called no_network.rb with those calls stubbed out. </p>
<p>We then do the require of whatever ad library is chosen.  Finally we generate the code dynamically (using &#8220;eval&#8221;) to do the include of the module name (using the handy camelize function to get the module name from the filename). This generic technique of dynamically determining the right module to include can make your code a briefer and terser.  We use it in the RMobio gem and I&#8217;m hoping it catches on wider in the Ruby community.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=22&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2008/04/16/a-dryer-way-to-include-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>mobile advertising and the RMobio gem</title>
		<link>http://morails.wordpress.com/2008/04/15/mobile-advertising-and-the-rmobio-gem/</link>
		<comments>http://morails.wordpress.com/2008/04/15/mobile-advertising-and-the-rmobio-gem/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 21:13:39 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[mobile platforms]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/?p=21</guid>
		<description><![CDATA[We posted our RMobio gem for mobile Rails development on RubyForge about a month ago. I&#8217;ll be doing a series of blog posts describing how to use the various goodies inside it over the next few weeks. The first one that I&#8217;d like to discuss is the &#8220;ads module&#8221;. This lets you easily add mobile [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=21&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We posted our <a href="http://rubyforge.org/projects/rmobio">RMobio gem</a> for mobile Rails development on <a href="http://rubyforge.org">RubyForge</a> about a month ago.  I&#8217;ll be doing a series of blog posts describing how to use the various goodies inside it over the next few weeks.</p>
<p>The first one that I&#8217;d like to discuss is the &#8220;ads module&#8221;.  This lets you easily add mobile advertising to your Rails apps without being familiar with the syntax for the API of each particular ad network.  The networks that we support include: <a href="https://www.google.com/adsense/www/en_US/mobile/?sourceid=aso&amp;subid=na-us-en-ha-bk-afm&amp;medium=ha&amp;term=adsense%20mobile">Google&#8217;s Mobile AdSense</a>,  <a href="http://admobs.com">AdMobs</a>, <a href="http://www.mkhoj.com">mKhoj</a> (an India-based mobile advertising network) and <a href="http://www.smaato.com">Smaato</a> (an ad aggregator which serves up mobile ads from many other ad networks).</p>
<p>You will need to work with one or more of these ad networks to get a &#8220;publisher ID&#8221; before using our ads module in your Rails apps.  But you will not need to learn any of their APIs.  You&#8217;ll simply embed calls to either &#8220;getAd&#8221; (which takes a keywords argument) or &#8220;getAdByPage&#8221; (which assumes that the ad network &#8220;scrapes&#8221; your page to determine appropriate content) in your controller methods.  Then just use the @ad variable inside your views.  The specific ad network used is configured by setting the ad_network: variable in the rmobio.yml file used to configure all rmobio gem capabilities (the specific instructions appear below).</p>
<p>This whole approach makes it very easy to both start monetizing your applications with ad networks and also switch it easily later without making code changes.</p>
<p><strong>Steps to Add Advertising to Your Apps</strong></p>
<p>Follow the specific steps below to add the ads module to your apps:</p>
<ol>
<li> In environment.rb, add the following two lines to the bottom of the file (we want to load the configuration statically):
<pre>require 'rmobio/config_manager'
</pre>
</li>
<li>Edit the file rmobio.yml in the config directory (creating it if necessary) and add the ad_network property in the appropriate section (development:, test:, or production:).  For example the following sets the ad_network to ad_sense in the development: instance.
<pre>(in file config/rmobio.yml)
development:
  ad_network: ad_sense
  ad_client: pub-0061196910475770  # use your own publisher ID here or the money will go to us!
</pre>
<p>Valid values are: ad_sense, ad_mobs,m_khoj, and smaato.</li>
<li>Embed the ad module in your controller. Specifically add &#8220;require mobio/ads&#8221; to the inside of your controller. Note that your ads module does some &#8220;tricks&#8221; to not have you have to do the &#8220;include&#8221; as well.  We&#8217;ll describe this technique for making &#8220;requires&#8221; and &#8220;includes&#8221; DRYer in a later post. For now here&#8217;s an example of how to use it:
<pre>class HomeScreenController &lt;ApplicationController
  require 'rmobio/ads'  # note no need for include here
</pre>
</li>
<li>Call ad retrieval functions from your controller methods. The function &#8220;getAd(keywords,adClient)&#8221; takes a set of keywords separated by spaces. It also takes your publisher ID. For example the call below will invoke Google&#8217;s Mobile AdSense (if the ad_network is set to that value in rmobio.yml) for ads related to the keywords &#8220;India&#8221; and &#8220;cricket&#8221;.  You can also call &#8220;getAdByPage(adClient)&#8221;
<pre>   def index
     getAd("India cricket",MOBIO_CONFIG['ad_client'])
   end
</pre>
</li>
<li>Use the ad variable in your view. The getAd method populates an instance variable called @ad. You can that use that variable in your view. For example:
<pre>    &lt;h3&gt;Your cool content

  ... the rest of the page...
  &lt;%if @ad%&gt;
  &lt;%=@ad%&gt;
  &lt;%end%&gt;
</pre>
</li>
</ol>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=21&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2008/04/15/mobile-advertising-and-the-rmobio-gem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>Yahoo! Mobile Blueprint</title>
		<link>http://morails.wordpress.com/2008/01/14/yahoo-mobile-blueprint/</link>
		<comments>http://morails.wordpress.com/2008/01/14/yahoo-mobile-blueprint/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 05:00:04 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[mobile platforms]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/2008/01/14/yahoo-mobile-blueprint/</guid>
		<description><![CDATA[Last week Yahoo announced their new mobile platform, Blueprint. It was very gratifying to see that what they have built, is, like our platform, derived from XForms. There are a few significant differences: 1) nothing concrete is available today but the XML schema for controls and elements. That&#8217;s not a bad thing. I applaud Yahoo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=19&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last week Yahoo announced their new mobile platform, <a href="http://mobile.yahoo.com/developers/roadmap;_ylt=AsOg1pYGRB_Ymt.jSjV.lly9tQcJ">Blueprint</a>. It was very gratifying to see that what they have built, is, like our platform, derived from XForms.</p>
<p>There are a few significant differences:</p>
<p>1) nothing concrete is available today but the XML schema for controls and elements.</p>
<p>That&#8217;s not a bad thing. I applaud Yahoo for publishing their roadmap in advance.</p>
<p>2) in &#8220;phase 1&#8243; of the Blueprint platform, no Model-View-Controller capabilities of XForms are present</p>
<p>This is a bit surprising.   MVC is the source of much of XForms&#8217; power.     Clearly its coming eventually. But many developers may decide that the learning curve of another syntax is not worthwhile before they see the key benefits of the XForms approach.</p>
<p>3) the documentation says that XPath is not available now for data binding</p>
<p>Confusingly they say &#8220;the current Blueprint implementation, however, has a limitation of one model and one instance per page, so there is no need to include such details&#8221;.  Even with one model, I still want to be able to use XPath to perform data binding.   In other words, XPath is not only useful in a case of more complex MVC separation, where a view or controller may use multiple models.  Its also useful to grab data from more complex single models, especially where the model (data) may be coming from an existing web service with a nontrivial mapping to your view.</p>
<p>4) unnecessary deviation from the XForms standard</p>
<p>Where XForms has a working syntax for controls or containers, we use it.  We add plenty of proprietary controls and extensions as we need to.</p>
<p>5) the current set of controls  is fairly simplistic.</p>
<p>As they put it &#8220;there are no spinning image cubes&#8221;.  Well and good.  They are phasing things right.  We couldn&#8217;t use Blueprint today though to give the look and feel of the applications that we&#8217;ve built.</p>
<p>Overall I think Blueprint is a great thing for both the industry and for Yahoo.   If I was a mobile developer without benefit of the Mobio platform, I would certainly start using the Yahoo platform over, for example, using a procedural Java-oriented, statically compiled approach like Android.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=19&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2008/01/14/yahoo-mobile-blueprint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>switching to WordPress</title>
		<link>http://morails.wordpress.com/2008/01/08/switching-to-wordpress/</link>
		<comments>http://morails.wordpress.com/2008/01/08/switching-to-wordpress/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 20:09:55 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/2008/01/08/switching-to-wordpress/</guid>
		<description><![CDATA[As much as I would love to stay on Rails-based blogging software, I&#8217;ve been experiencing a bunch of strange Mephisto bugs recently.  And the project seems to not really be actively maintained.  So I&#8217;m switching over to WordPress.  There aren&#8217;t many good options for getting all of the content over, so the comments are lost [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=17&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As much as I would love to stay on Rails-based blogging software, I&#8217;ve been experiencing a bunch of strange Mephisto bugs recently.  And the project seems to not really be actively maintained.  So I&#8217;m switching over to WordPress.  There aren&#8217;t many good options for getting all of the content over, so the comments are lost here.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=17&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2008/01/08/switching-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>Feedback on Android</title>
		<link>http://morails.wordpress.com/2008/01/06/feedback-on-android/</link>
		<comments>http://morails.wordpress.com/2008/01/06/feedback-on-android/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 19:20:12 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[mobile platforms]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/2008/01/06/feedback-on-android/</guid>
		<description><![CDATA[I took some time over the last week to port our CheapGas application (which finds the lowest priced stations near a given vicinity) to Android. I wrote this application in Rails originally. It supports both our runner and arbitrary WAP clients (using just one controller via techniques described in this blog). This port was to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=4&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="article-text">I took some time over the last week to port our CheapGas application (which finds the lowest priced stations near a given vicinity) to Android. I wrote this application in Rails originally. It supports both our runner and arbitrary <span class="caps">WAP</span> clients (using just one controller via techniques described in this blog). This port was to just build an Android client and call back to the my Rails-based controller of the production CheapGas app.</p>
<p>In the bigger picture, the tag-based approach that our platform would be a better way to do this. We could just send out tags and a “forms runner” running on Android could spew out the appropriate Android widgets dynamically. This has the obvious advantage of allowing a single codebase for multiple platforms. But, more fundamentally, it allows for a more dynamically changing user interface on the device, driven by server-based business logic. This also happens to be the approach taken by <a href="http://www.zkoss.org/smalltalks/zkAndroid/index.dsp">ZK Mobile</a>. Certainly this is part of the appeal of web-based applications in general, and given Google as the standard-bearer of web-based apps versus “thick desktop” equivalents, it’s curious to see the out of the box Android bias towards statically designed interfaces.</p>
<p>Exploring that apparent paradox might be another post. Today I’ll just provide some more tactical feedback on what I’ve seen in building a single application, with conventional upfront <span class="caps">XML</span>-based layout and the application running locally (as opposed to a runner interpreting server-delivered UI elements and forms). To start off with, let me say that, given the constraints of wanting to build an application that is laid out up front, I like the Android toolkit. I was able to build a functioning application fairly quickly. The overall Eclipse-based environment is easy to use and debugging was a breeze. That said, I have several bits of feedback of areas for improvement:</p>
<ul>
<li> The <span class="caps">API</span> is just not completely documented. I found myself guessing and experimenting many times to determine the precise behavior and requirements of an <span class="caps">API</span> call. Example: setting underline paint style doesn’t work to create underlined text (e.g. “textField.setPaintFlags(android.graphics.Paint.UNDERLINE_TEXT_FLAG);”). Instead it creates a strange, faintly visible font. There may be some other way to do it, but it just plain isn’t documented. There are ways to set bold and italic styles, but apparently not underline (or its just not done yet)</li>
<li>The componentry is a strange mix of simple low level “simple individual controls” (editable text, spinner, checkbox, radio buttons) and “high level” controls such as imageswitcher and gallery (which are somewhat overlapping). What is needed is more of the “intermediate controls”. For example, more advanced list and grid behavior (such as our “fisheye” control). One guesses that they are waiting for third parties to supply these. Or they just haven’t done them yet themselves.</li>
<li>Would be nice to have XPath with <span class="caps">DOM</span> usage instead of being forced to use just <span class="caps">DOM</span> navigation methods (e.g. getElementsByTagName). This is a potential memory and performance hog.</li>
<li>The Android emulator is astonishingly slow. Yet despite Android’s own slowness, calls to other systems which take reasonable amounts of time result in timeout dialogs popping up. These include not just calls to my own server-based backends over the Internet, but also calls to other Android activities such as their contacts list and phone dialer.</li>
<li>Linkify.addLinks() is a very handy utility method to create links from text (though I’m not even sure how I found it). It would be even cooler if that utility could optionally create onClickListener() methods for those links. The code for creating those onClickListener() methods to respond to those links is repetitive and should be automatable.</li>
<li>It would be very useful to be able to create indexed arrays of elements (that can then be iterated through) through <span class="caps">XML</span> layout</li>
<li>Given Android’s lightly documented state, a drag and drop layout designer would obviously be desirable. DroidDraw is a useful utility but doesn’t expose all options.</li>
</ul>
<p>[Posted Later By Adam in Response to DroidDraw Developer Brendan – Since Mephisto Comments Mysteriously Stopped Working] As far as “unexposed properties” it would be nice to have “maxlines” on TextView control (that’s one that springs to mind, I think there may be a few others). What would also be nice to have is either dropdowns on control height and width properties for wrap_content and fill_parent options. It would also be useful to be able to specify width in other units available (px, ems, etc.) by switching between units from a dropdown list.</p></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=4&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2008/01/06/feedback-on-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>The Ultimate Feature Phone: Nokia&#8217;s N95</title>
		<link>http://morails.wordpress.com/2007/12/26/the-ultimate-feature-phone-nokias-n95/</link>
		<comments>http://morails.wordpress.com/2007/12/26/the-ultimate-feature-phone-nokias-n95/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 19:23:26 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[mobile devices]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/2007/12/26/the-ultimate-feature-phone-nokias-n95/</guid>
		<description><![CDATA[At Mobio, we’re all about supporting every phone in the universe from our apps. Our platform enables one app to target the plethora of J2ME devices, Windows Mobile and Blackberry smartphones – all from a single app and codebase. So we tend not to be too centric on a single device. I carry a varying [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=5&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="article-text">At Mobio, we’re all about supporting every phone in the universe from our apps. Our platform enables one app to target the plethora of <span class="caps">J2ME</span> devices, Windows Mobile and Blackberry smartphones – all from a single app and codebase. So we tend not to be too centric on a single device. I carry a varying set of devices around with me. This fall I had the pleasure of creating and co-teaching a course on mobile application development at <a href="http://west.cmu.edu/">Carnegie Mellon West</a> with Todd Sedano and Vidya Setlur (more on the content of that class later). Nokia graciously supplied all of the students and myself with Nokia N95s just as they arrived on the US market.In a short time, this has become my favorite featurephone (a phone emphasizing lightweight and usually sporting a T9 keyboard versus smartphones which feature <span class="caps">QWERTY</span> keyboards).   It features a 5 megapixel camera with Carl Zeiss optics.   It has support for Wifi, Bluetooth, <span class="caps">GPS</span> and microSD . Among its many other markets, this is the outdoorsman’s device par excellence. I never do an ultra without it. I would take an <span class="caps">N95</span> over a iPhone any day.</div>
<div class="article-text"></div>
<div class="article-text">Specifically here’s what I liked about this phone:</div>
<div class="article-text">
<ul>
<li>high megapixel camera, which can be easily activated by just opening up the lens</li>
<li> upload to Flickr</li>
<li> <span class="caps">GPS</span> with a nice mapping application</li>
<li> very lightweight</li>
<li>video output (this was great for students demonsrating their projects)</li>
</ul>
</div>
<div class="article-text"></div>
<div class="article-text"></div>
<div class="article-text">What could be improved:</p>
<ul>
<li> a better oncamera tagging and photo arranging capability, using all device capabilities, such as <span class="caps">GPS</span> and phone contacts (more on this later)</li>
<li> batch upload of photos</li>
<li> Somehow the camera keeps ending up in video mode although I’ve never specifically set it to do so</li>
<li> The phone app should appear on the home screen. When I’ve leant the phone to people they’ve had a hard time figuring out how to make a phone call</li>
</ul>
</div>
<div class="article-text"></div>
<div class="article-text">Apparently an 8GB version for North American is <a href="http://www.thenokiaguide.com/my_weblog/2007/12/nokia-n95-8gb-n.html">on the way</a> with support for 3G networks as well.</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=5&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2007/12/26/the-ultimate-feature-phone-nokias-n95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>handling multiple mobile clients: from single controller to single view</title>
		<link>http://morails.wordpress.com/2007/08/09/handling-multiple-mobile-clients-from-single-controller-to-single-view/</link>
		<comments>http://morails.wordpress.com/2007/08/09/handling-multiple-mobile-clients-from-single-controller-to-single-view/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 19:31:37 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[mobile platforms]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/2007/08/09/handling-multiple-mobile-clients-from-single-controller-to-single-view/</guid>
		<description><![CDATA[You may have noticed that we release many of our apps as both locally installed rich clients AND on WAP simultaneously. For example we have a rich client “CheapGas” application and a WAP CheapGas. Some users have asked “do you really write two separate codelines for each way that you deliver these applications?”. Well of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=6&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="article-text">You may have noticed that we release many of our apps as both locally installed rich clients <span class="caps"><span class="caps">AND</span></span> on <span class="caps"><span class="caps">WAP</span></span> simultaneously.  For example we have a rich client “CheapGas” application and a <span class="caps"><span class="caps">WAP</span></span> CheapGas. Some users have asked “do you really write two separate codelines for each way that you deliver these applications?”.</p>
<p>Well of course not. Almost any app developer would get some codesharing here. But in a previous post I discussed how you could write single controllers and controller actions and still support multiple client types. And do it in a way that is much terser and more elegant than the standards Rails 1.2 “responds_to” method that tends to lengthen and obfuscate your controller methods.</p>
<p>But you can go even further than that to allow literally writing one application, with the same controller <span class="caps"><span class="caps">AND</span></span> views to support two different client – something I hadn’t seen done before.  Leveraging some of the magic of Rails and <span class="caps"><span class="caps">RXML</span></span> templates combined with our own Rails helper functions we’ve done just that. For example, the CheapGas app (which I worked on quite a bit personally as a “demo app” before its release) does this: just one controller and view for the app whether its delivered as <span class="caps"><span class="caps">WAP</span></span> or <span class="caps"><span class="caps">HTML</span></span> or to the Mobio rich client runner.</p>
<p>The way that we do this is to both use <span class="caps"><span class="caps">RXML</span></span> templates and also replace the standard <span class="caps"><span class="caps">HTML</span></span> tag helper library (which contains functions for creating dropdown boxes, input fields, forms, and so on) with equivalent functions that generate either <span class="caps"><span class="caps">WAP</span></span> code, <span class="caps"><span class="caps">XHTML</span></span> tags, or tags to our own runner, depending on what kind of device is accessing it. The example .RXML template for the CheapGas search page (which supports our runner, <span class="caps"><span class="caps">WAP</span></span> and even <span class="caps"><span class="caps">XHTML</span></span> from just one Rails controller and view) is shown below.</p>
<pre><code>xml=doctype(xml) do |x|
 xml.head { }
 body(x) do |x|
   action="station/list"
   form(action,x) do |x|
     xml.p 'Search by gas stations by named location or zip code'
     xml.table do
       fields=[]
       xml.tr do
               xml.td { xml.text 'Select location '}
               xml.td {  xml &lt;&lt; select_tag("location",options_for_select(@locations)) }
               xml.td {xml &lt;&lt; link_to("&lt;small&gt;(Manage locations)&lt;/small&gt;", :controller=&gt;"location")}
               fields &lt;&lt; "location"
       end
       xml.tr do
               xml.td { xml.text 'Or supply zip code ' }
               xml.td { xml &lt;&lt;text_field_tag('zip')}
               fields &lt;&lt;"zip"
       end
       xml.tr do
               xml.td { xml.text 'Within radius of '}
               xml.td {
                 xml &lt;&lt; text_field_tag('radius',"style1")
                 xml.text 'miles'
                 fields &lt;&lt;"radius"
               }
       end
       xml.tr do
         xml.td { xml.text 'Only prices within last '}
         xml.td { xml &lt;&lt; text_field_tag('filtertime')}
         fields= "filtertime"
       end
       xml.tr { xml.td {submit_tag('Search',action,fields,x)} }
     end # table
   end # form
 end # body
end #doctype</code></pre>
<p>.RXML templates such as the one above let the Rails view be generated as code, instead of the sometimes awkward mixture of tags and code, which of course would then tie the view to a concrete set of tags. Once its all code then “smart helper functions” (select_tag(), text_field_tag(), submit_tag(), form(), body(), head() and doctype()) can be used to generate the tags for each client ype. These functions use the “client type” variable (populated with a Rails :before_filter function as described earlier) to generate the appropriate the appropriate underlying tag output over the wire. The <span class="caps"><span class="caps">HTML</span></span> generation is straightforward. Generating <span class="caps"><span class="caps">WAP</span></span> and our own rich client tags is more involved.</p>
<p>The result for the app developer is one set of code, both controller and views, to deliver multiple output types. This is something I haven’t seen in Rails apps (or other apps for that matter) whether its targeting mobile scenarios or otherwise.</p>
<p>Just what it means to generate tags which generate our rich client interfaces (i.e. what is the output if the client type is “Mobio Runner”) is the subject of several future posts.</p></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=6&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2007/08/09/handling-multiple-mobile-clients-from-single-controller-to-single-view/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>issues with Agile</title>
		<link>http://morails.wordpress.com/2007/04/30/issues-with-agile/</link>
		<comments>http://morails.wordpress.com/2007/04/30/issues-with-agile/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 19:33:25 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/2007/04/30/issues-with-agile/</guid>
		<description><![CDATA[When people hear about the many new mobile services that we have introduced and are continuing to introduce very rapidly they say “so are you doing agile development?”. At one level, we are building a platform that allows our mobile services to be built very quickly and which facilitates easy iteration and development of features [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=7&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="article-text">When people hear about the many new mobile services that we have introduced and are continuing to introduce very rapidly they say “so are you doing agile development?”. At one level, we are building a platform that allows our mobile services to be built very quickly and which facilitates easy iteration and development of features for those services. So we certainly want to facilitate “agile development” of mobile services, where agile has a lowercase a in the beginning. As to whether on our core platform and tools we develop those with the Agile Development model such as Scrum, the answer is probably no, although many of processes that we follow (daily brief status meetings, continuous builds, short release cycles, primacy of the bug database) may seem to have parallels there.That said, here are my “top ten issues with Agile Development and Scrum” especially as applied to the development of services These points came out of a talk today that I gave at the <a href="http://west.cmu.edu/sofcon/5404216.html">New Software Industry conference</a> sponsored by Carnegie Mellon and UC Berkeley.</p>
<h3> bias against upfront analysis in conflict with service-oriented development</h3>
<p>Agile advocates wax poetic about the inability to determine requirements ahead of time. They state its just impossible to know a system’s inputs and outputs and cite reams “industrial process control science” to do so. But service oriented development applied to a large system hinges on doing just this: determining the major services required by a system, and then designing contracts for their implementation. That investment in some small amount of upfront analysis (scoffed at by agile advocates) pays off in allowing multiple teams to build services independently as long as they comply with the designed contracts.</p>
<h3>flaws in the team scaling model</h3>
<p>Agile advocates recommend a “scrum of scrums” with scrum leaders represented to manage cross-team dependency. They actually need this because there is no emphasis on service contracts. Problems need to get hashed out in a broader freewheeling way. With service contracts issues are far more likely to get solved bilaterally between the service provider and the service consumer.</p>
<h3>“old wine in new bottles”</h3>
<p>Much of the better ideas of agile have been done for a long period of time in the more successful development organizations. Such ideas include running projects day to day and driving all work from the bug database (the Product Backlog). At Microsoft and Google and many other companies this is almost a religion. Small teams (7+-2). Daily short status meetings run roundrobin. Continuous builds. Small code reviews before checkins (almost XP). Short releases (less than three months). Due to being fortunate enough to be around some great engineering leaders I’ve been doing projects this way for over 15 years. So why is it a problem to call this agile or Scrum and give these best practice artifacts new names? Teams can lose some of the process maturity and nuance which they’ve built around usage of these techniques.</p>
<h3>wholesale process change or “incrementalism” and “team ownership of process”</h3>
<p>As mentioned, and acknowledged by agile gurus (such as Schwaber and Beedle) in the better shops most of these best process techniques are already being applied. However, there are almost always improvements that can be made in how a team approaches the development cycle and day to day work. I have found that building on what works already and incrementally changing processes (i.e. not every change in one release cycle, which I also like to be short) works best.I’ve also found that the best thing is to have an open and questioning attitude towards the best next incremental process change, involving all team members in deciding on changes, is valuable. The team that feels that they have made a decision about what the process should be has much better buyin, compliance and consistent volunteer enthusiastic participation in the process. This is better than “ok folks, now were doing Scrum”. Another way of putting it is for any team or organization considering introducing a new methodology (or “antimethodology”) is “what problem in the existing process are you trying to solve?”. Then go solve that problem directly rather than starting from scratch.</p>
<h3>arbitrary timeboxes</h3>
<p>Almost all of the timelines and timeboxes for specific events and durations in Scrum are arbitrary. This ranges from daily status meetings, to every other time cycle, meeting or artifact. Doesn’t seem very agile to not react to the exigencies of a specific projects. For example, the one month “Sprints” are a very arbitrary timeline and it is often difficult to build risky and time consuming blocks of features within those timeboxes. Agile advocates acknowledge this and say cite examples of releases with two Sprints: a “feature sprint” and a stabilization sprint. This sounds not just arbitrary but pretty mushy and vague as well. More specifically…</p>
<h3>one month Sprints</h3>
<p>I’ve already mentioned my generic issues with the arbitrariness of one month Sprints. There is the practicability of such timeframes. Anecdotally (after working on dozens of software projects in my career) my experience is that this can work for “end applications” or simpler websites even from “version 1”. My experience is that early releases of platform, infrastructure or tools code this is not quite feasible. I do accept that in either “app” or “platform” code several releases into a products lifetime the one month Sprints are feasible. There is still then the issue of the arbitrariness and optimality of such a timeframe (there is a high overhead of QA and integration effort for such a short cycle). Again, the question is “what problem are you trying to solve?”. Given that stabilization overhead is decreased as a percentage of effort in a two month release, why is one month better. It may be that “the business” (operations, marketing, sales and of course the users themselves) are not ready to make maximum use of a monthly release.Additionally the “way out” is to say that most projects are much larger than one month sprints and that a project is inherently “a bunch of Sprints”. There are already more mature existing best practices for “themed incremental milestones”. And most successful software-focused organizations have evolved more subtlety and insight about how to handle such complexity than is evident in most agile screeds.</p>
<h3>arbitrary guidelines are presented with pseudoscientific justifications of dubious certitude</h3>
<p>Much of agile practices that I’ve seen recommended have a core of common sense. My big issue is that the best organizations are already working at a level of sophistication better than those approximations. And those approximations are dressed with questionable garb from parallels to other sciences. For example, 7 as team size doesn’t have much to do with brains ability to handle 7+-2 objects [Schwaber]. In some prominent agile writings, other parallels are drawn to process control, chaos theory and physics . The problem with the dubious connections is that they are held as evidence for arbitrary decisions, rather than grounding them on evidence from development projects themselves.</p>
<h3>artificial straw man of traditional best practices</h3>
<p>The process and the foibles of “waterfall model” (does anyone really espouse such a completely serial model anymore or use that term to describe how they do things?) mentioned in Fowler’s Agile Manifesto and other books such as Schwaber and Beedle’s Agile Manifesto, doesn’t resemble anything conducted in dozens of projects that I’ve participated in. More normal is that even in the early 90s I worked on teams where product managers prepared requirements, program managers and dev leads wrote specs, devs prototyped code, and QA leads wrote test plans simultaneously early in a project. The desirability of such an approach that was anything but “waterfall” was recognized by most major software companies long before anyone ever used the “agile development”. Microsoft codified this in written form as the Microsoft Solutions Framework. But when I was there it was just “how stuff got done”. Books such as “Rapid Development” summarized what had already become industry wide recognized best practices. But the “words for things” remained the same as they were in the eighties. Much of Agile seems to be an attempt to put new words around widely accepted best practices, and arbitrary guidelines (one month sprints, 7 person teams) around reasonable defaults that most development shops were already more nuanced about.</p>
<h3>optimal software process is an evolution</h3>
<p>The terminology, milestones and deliverables in “conventional” ideas about the software process has evolved over many years in evolutionary (not revolutionary) response to changing technology and customer expectations. It can and should continue to evolve. For example, there may be deliverables that can be abbreviated or intentionally skipped (e.g. a requirements phase may be folded into a smaller specification). But it doesn’t hurt to make that choice consciously.</p>
<h3>modern software tools can make “old artifacts” lightweight and even magnify their original value</h3>
<p>Even more powerful is using modern tools to make such steps in the process much lighter weight, collaborative and distributed. As an example, take the case of two bogeymen of “agile development”: the idea that upfront requirements and specifications are too timeconsuming to be worthwhile. In our shop feature requests collect in the bug database (e.g bugzilla or trac) for a subsequent release (similar to a Scrum Product Backlog). Related sets of features are written up in narrative form on a requirements wiki page often initially by a product manager (this is a chance to include use cases when and where helpful). But they are commented on, and revised (with change control history of course) by many interested team members including the likely assigned developers and QA.After this brief in person requirements review, the feature items are assigned to a responsible engineer for spec and implementation (along with other related features). The dev writes a few paragraphs about the feature set on a specs wiki page, which again invites comments from and revisions by interested parties such as PMs, other devs or QA. As with the requirements wiki page, the value of the spec page is to allowed related features to be discussed, analyzed and described in toto. The scope of just how much specificity is required or optimal is determined by the dev. Often much of the content from the specs page can be leveraged later in a user manual if one is required. More often the specs page is all that is required for anyone who needs to use or maintain the software. When the spec is complete the dev holds a timeboxed spec review with interested parties, and if there is consensus on the approach proceeds with implementation. Its difficult to find the wasted overhead in what is described, and use of tools such as wikis can make these steps introduce very little overhead and slowdown to the process. In my shop we’ve automates the linkages between the wiki and bug database to make this even easier.</p>
<p>There’s nothing magic about this approach. The overall point is that these “traditional artifacts” of requirements and specifications are easier to do with modern tools and their value is I think even higher with the ability of more stakeholders to contribute to and benefit from the process.</p>
<p>In summary, on balance among an existing high performing team, I prefer to see more familiar processes and nomenclature iteratively refined to meet the needs of a particular business, product or team, rather than starting afresh with a new methodology (even one that claims not be a methodology) with a fresh set of names.</p></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=7&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2007/04/30/issues-with-agile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
		<item>
		<title>mobile Ajax</title>
		<link>http://morails.wordpress.com/2007/03/12/mobile-ajax/</link>
		<comments>http://morails.wordpress.com/2007/03/12/mobile-ajax/#comments</comments>
		<pubDate>Mon, 12 Mar 2007 19:48:52 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[mobile platforms]]></category>

		<guid isPermaLink="false">http://morails.wordpress.com/2007/03/12/mobile-ajax/</guid>
		<description><![CDATA[I’ve gotten a lot of response to my posting on WAP. The predominant theme has not actually been defending WAP in any way. But instead has been “ok but what about mobile Ajax?”. Mobile Ajax, of the type capable by browsers such as Opera and Good Technology’s Good Mobile Intranet provides several of the capabilities [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=8&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="article-text">I’ve gotten a lot of response to my posting on <span class="caps"><span class="caps">WAP</span></span>.  The predominant theme has not actually been defending <span class="caps"><span class="caps">WAP</span></span> in any way. But instead has been “ok but what about mobile Ajax?”.  Mobile Ajax, of the type capable by browsers such as <a href="http://www.opera.com/">Opera</a> and Good Technology’s <a href="http://good.com/corp/int_products.php?id=38">Good Mobile Intranet</a> provides several of the capabilities missing in <span class="caps"><span class="caps">WAP</span></span> apps. Specifically it will allow for executing logic locally, such as rich validation and dynamic forms. It also provides some separation of presentation and data in the ability to download data asynchronously without browser roundtrips.While Mobile Ajax is a big step forward over <span class="caps"><span class="caps">WAP</span></span> and provides a much better user experience.  It still has several limitations:</p>
<h3>Working with Data Offline</h3>
<p>Mobile Ajax-based applications do not allow for working with data offline. Native apps can be installed locally and run locally while completely disconnected. Inevitably some platform vendors will try to resolve this with proprietary extensions, similar to AvantGo’s “mobile offline browsing” that they’ve been trying to get adoption of for years. This <i>may</i> work for information feeds (the sweet spot for products like AvantGo). I don’t see it working for transactional applications or websites. Or any apps or web pages with user interaction (which should be a hallmark of web 2.0 properties right?). By contrast, intelligently design natively executing applications handle these offline scenarios quite nicely.</p>
<h3>Taking Advantage of Device Capabilities</h3>
<p>Browsers, including Ajax browsers, are all about making devices seem the same. On desktops, distinguished for the most part only by differences in screen resolution, this assumption has become more and more true. Mobile devices however are extremely heterogeneous: a dizzying array of screen resolutions, input and directional keys and widgets, and differing sound and video capabilities built into the hardware. That diversity is only increasing. To truly take advantage of a device’s native capabilities in any of these areas, a native application written to the device OS’s native APIs is necessary.</p>
<h3>Industry Recognition</h3>
<p>These are not observations unique to us. Large web properties such as Google and Yahoo are aggressively putting out native mobile applications for accessing horizontal consumer services such as maps or email. They are doing this with <span class="caps"><span class="caps">J2ME</span></span> apps, Palm OS apps (despite the dubious future of the Palm OS) and even, horrors, Windows Mobile. This despite their status as highly competent web Ajax sites, who would presumably be in a great position to build mobile Ajax sites for these services.</p>
<h3> Difficulty of Development</h3>
<p>The problem with doing native applications is the difficulty and time to do it well. Beyond the diversity of device operating systems (J2ME, Windows Mobile, <span class="caps"><span class="caps">BREW</span></span>, Symbian, Palm, <span class="caps"><span class="caps">RIM</span></span>), there’s just the inherent step function of writing an actual <i>application</i> in procedural code (and many flavors of them) versus the convenience of maintaining a server-side web application.</p>
<p>The effort in “going native” pays off for truly massively horizontal applications such as email and maps. However, if you go beyond the top dozen or so web applications, to those with less than tens of millions of users, the effort necessary to build a mobile equivalent becomes more difficult to justify. Especially as those web properties or connected applications become more and more about user interaction or transactions.</p>
<p>Does this mean that Mobile Ajax will become predominant in those situations (for those sites or applications that can’t afford to “go native”)? I don’t think so. Most sites are still not aggressively using Ajax. Its just much more work to do so across a diversity of site functions, than to build more ordinary web pages. And once you do so, that mobile Ajax site is still of limited use since it can’t be used offline and is not necessarily taking advantage of unique device capabilities.</p>
<h2>A Better Way?</h2>
<p>So what are we, Mobio, doing? As you can guess, we build mobile applications that do run natively on mobile devices. As you will see from our forthcoming applications, we do manage to do them across many devices, with applications that are not as broadly applicable as email or maps.</p>
<p>We can and will take advantage of mobile Ajax browsers in the future on platforms that we may not choose to target directly. As mentioned you can create attractive applications with mobile Ajax, but it will be missing some of the offline and device-specific capabilities available with native applications.</p>
<p>However in either of these cases we do our authoring and application development in a way that manages to abstract us from much of the drudgery of creating device and OS optimized native applications, and even allows generation of mobile Ajax apps from the same source code. The way that we do this is the subject of future posts.</p></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/morails.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/morails.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/morails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/morails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/morails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/morails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/morails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/morails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/morails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/morails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/morails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/morails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/morails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/morails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/morails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/morails.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=morails.wordpress.com&amp;blog=2475703&amp;post=8&amp;subd=morails&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://morails.wordpress.com/2007/03/12/mobile-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/729b3e4981917dbaede66ad916443b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Adam</media:title>
		</media:content>
	</item>
	</channel>
</rss>
