<?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>Ruby On Mobile</title>
	<atom:link href="https://rubyonmobile.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://rubyonmobile.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 10 Apr 2009 10:39:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='rubyonmobile.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s0.wp.com/i/buttonw-com.png</url>
		<title>Ruby On Mobile</title>
		<link>https://rubyonmobile.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://rubyonmobile.wordpress.com/osd.xml" title="Ruby On Mobile" />
	<atom:link rel='hub' href='https://rubyonmobile.wordpress.com/?pushpress=hub'/>
	<item>
		<title>Questions to Rhodes developers</title>
		<link>https://rubyonmobile.wordpress.com/2009/04/10/questions-to-rhodes-developers/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/04/10/questions-to-rhodes-developers/#respond</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Fri, 10 Apr 2009 10:39:57 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/?p=58</guid>

					<description><![CDATA[I&#8217;ve been always curious to know what other Rhodes developers background and their interest on Rhodes and Mobile App development in general. Since Rhomobile google group reached its 100 members, now is the good time to ask questions. Let me know if you have other questions, so that I can add more polls.]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve been always curious to know what other Rhodes developers background and their interest on Rhodes and Mobile App development in general. Since <a href="http://groups.google.com/group/rhomobile?hl=en">Rhomobile google group </a>reached its 100 members, now is the good time to ask questions. Let me know if you have other questions, so that I can add more polls.</p>
<a name="pd_a_1528919"></a><div class="CSS_Poll PDS_Poll" id="PDI_container1528919" data-settings="{&quot;url&quot;:&quot;https:\/\/secure.polldaddy.com\/p\/1528919.js&quot;}" style=""></div><div id="PD_superContainer"></div><noscript><a href="https://polldaddy.com/p/1528919" target="_blank" rel="noopener noreferrer">Take Our Poll</a></noscript>
<a name="pd_a_1528924"></a><div class="CSS_Poll PDS_Poll" id="PDI_container1528924" data-settings="{&quot;url&quot;:&quot;https:\/\/secure.polldaddy.com\/p\/1528924.js&quot;}" style=""></div><div id="PD_superContainer"></div><noscript><a href="https://polldaddy.com/p/1528924" target="_blank" rel="noopener noreferrer">Take Our Poll</a></noscript>
<a name="pd_a_1528921"></a><div class="CSS_Poll PDS_Poll" id="PDI_container1528921" data-settings="{&quot;url&quot;:&quot;https:\/\/secure.polldaddy.com\/p\/1528921.js&quot;}" style=""></div><div id="PD_superContainer"></div><noscript><a href="https://polldaddy.com/p/1528921" target="_blank" rel="noopener noreferrer">Take Our Poll</a></noscript>
<a name="pd_a_1528926"></a><div class="CSS_Poll PDS_Poll" id="PDI_container1528926" data-settings="{&quot;url&quot;:&quot;https:\/\/secure.polldaddy.com\/p\/1528926.js&quot;}" style=""></div><div id="PD_superContainer"></div><noscript><a href="https://polldaddy.com/p/1528926" target="_blank" rel="noopener noreferrer">Take Our Poll</a></noscript>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/04/10/questions-to-rhodes-developers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>
	</item>
		<item>
		<title>Stanford U to open up their iphone dev lecture for free</title>
		<link>https://rubyonmobile.wordpress.com/2009/04/05/stanford-u-to-open-up-their-iphone-dev-lecture-for-free/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/04/05/stanford-u-to-open-up-their-iphone-dev-lecture-for-free/#respond</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Sun, 05 Apr 2009 11:00:11 +0000</pubDate>
				<category><![CDATA[iPhone]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/?p=50</guid>

					<description><![CDATA[On April Fool day, Stanford university announced something too good to be true, they are going to take video of their iPhone developer lecture and open it up on iTune for free. CS193P &#8211; Cocoa Programming &#124; Announcements The course schedule is here, and they are going to put the video a few days after [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>On April Fool day, Stanford university announced something too good to be true, they are going to take video of their iPhone developer lecture and open it up on iTune for free.</p>
<ul>
<li><a href="http://www.stanford.edu/class/cs193p/cgi-bin/index.php">CS193P &#8211; Cocoa Programming | Announcements</a></li>
</ul>
<p>The course schedule is <a href="http://www.stanford.edu/class/cs193p/cgi-bin/syllabus.php">here</a>, and they are going to put the video a few days after each lecture.</p>
<p>I looked at<a href="http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.2024353965.02024353968"> the iTune store</a> and the first lecture is already up.</p>
<p>I just bought &#8220;iPhone in Action&#8221; book and started reading it.</p>
<p>The book covers both iPhone Web app development and iPhone SDK development. It&#8217;s actually great book to learn when you have to understand core concepts, but it is a bit difficult when it comes to using IDE when it&#8217;s explaining like &#8220;click 3rd left button from bottom&#8221;.</p>
<p>One interesting thing is their sample application. They are going to create an app called &#8220;Presense&#8221; in first 4 weeks, which is basically Twitter client application.</p>
<p>If you  followed my tutorial of creating Twitter client app in Rhodes, it would be interesting to actually try doing the same thing using iPhone SDK &amp; Objective C and see the difference.</p>
<p>I will definitely follow this lecture and may write an article about comparing development in Rhodes vs it&#8217;s native development toolkit.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/04/05/stanford-u-to-open-up-their-iphone-dev-lecture-for-free/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>
	</item>
		<item>
		<title>Making Twitter mobile client with Ruby using Rhodes And Rhosync (Part 4)</title>
		<link>https://rubyonmobile.wordpress.com/2009/03/01/making-twitter-mobile-client-with-ruby-using-rhodes-and-rhosync-part-4/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/03/01/making-twitter-mobile-client-with-ruby-using-rhodes-and-rhosync-part-4/#comments</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Sun, 01 Mar 2009 14:33:33 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/2009/03/01/making-twitter-mobile-client-with-ruby-using-rhodes-and-rhosync-part-4/</guid>

					<description><![CDATA[Previously Part One &#8211; Syncing public Tweet on Rhosync server Part Two &#8211; Displaying public Tweet on iPhone Simulator Part Three &#8211; Posting your Tweet via Rhosync Simulator At the previous post, we created MyTimeline to display your friends tweet as well as posting your own tweet from Rhosync server. Today&#8217;s tutorial to show and [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>Previously</h3>
<ul>
<li><a href="https://rubyonmobile.wordpress.com/2009/02/10/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-1/">Part One &#8211; Syncing public Tweet on Rhosync server</a></li>
<li><a href="https://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/">Part Two &#8211; Displaying public Tweet on iPhone Simulator</a></li>
<li><a href="https://rubyonmobile.wordpress.com/2009/02/21/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-3/">Part Three &#8211; Posting your Tweet via Rhosync Simulator</a></li>
</ul>
<p>At the previous post, we created MyTimeline to display your friends tweet as well as posting your own tweet from Rhosync server. </p>
<p>Today&#8217;s tutorial to show and post tweet from iPhone simulator through Rhodes. This is similar to <a href="https://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/">Part2</a>, but I will also cover how to change and debug views.</p>
<h3>rhogen model</h3>
<p>We already created an app called Twitter, so we can go straight into making model. If you haven&#8217;t done so, go back to <a href="https://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/">Part2</a></p>
<pre><code>  $cd Twitter 
  $rhogen model MyTimeLine "http://localhost:3000/apps/6/sources/12" 12 text,user_screen_name,user_name,user_profile_image_url,source
  Generating with model generator:
    [ADDED]  MyTimeLine/config.rb
    [ADDED]  MyTimeLine/index.erb
    [ADDED]  MyTimeLine/edit.erb
    [ADDED]  MyTimeLine/new.erb
    [ADDED]  MyTimeLine/show.erb
    [ADDED]  MyTimeLine/controller.rb
</code></pre>
<p>As you did at Part2, let&#8217;s insert link to the &#8220;MyTimeLine/index&#8221; and &#8220;MyTimeLine/new&#8221; pages at at &#8220;Twitter/index.erb&#8221; like below.</p>
<pre><code>  &lt;ul id="home" selected="true" title="Twitter"&gt;
    &lt;li&gt;Something interesting here...&lt;/li&gt;
    &lt;li&gt;&lt;a  href="MyTimeLine"&gt; My Tweet&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a  href="MyTimeLine/new"&gt; New Tweet&lt;/a&gt;&lt;/li&gt;
</code></pre>
<h3>View</h3>
<p>Next part is a view. This is index page. Rhodes uses <a href="http://code.google.com/p/iui/">iui</a> javascript/css library which shows UI just like iPhone. This is great to get instant iPhone like look &amp; feel. As I look further into the css of iUi, I learnt that iUi offers very basic layout and does not have anything extra to adjust font size and so on. As you saw at Part2, all tweet messages are in big bold font. I added extra css to make date, user name and source field smaller.</p>
<h4>/apps/Twitter/MyTimeline/index.erb</h4>
<pre><code>&lt;ul id="MyTimeLines" title="MyTimeLines"&gt;
&lt;%@MyTimeLines.each do |x|%&gt;

&lt;li class ="row"&gt;
  &lt;div class ="photo"&gt;
    &lt;img src=&lt;%= x.user_profile_image_url %&gt; alt=&lt;%= x.user_screen_name %&gt; /&gt;
  &lt;/div&gt;
  &lt;div class ="status"&gt;
    &lt;div class ="text"&gt;
     &lt;%= x.text %&gt;
    &lt;/div&gt;
    &lt;div class ="user"&gt;
     &lt;%= x.user_name %&gt; &lt;%= x.created_at %&gt; via &lt;%= x.source %&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/li&gt;
&lt;%end%&gt;
&lt;/ul&gt;
</code></pre>
<h4>/apps/Twitter/shared/css/common.css</h4>
<pre><code>  .photo{
    float: left;
  }
  .status{
    margin-top: 5px;
    margin-left: 10px;
    width: 290px;

  /*  float : left; */
  }
  .text{}
  .user {
  /*  float: left;*/
    color:#999999;
    font-size:13px;
    font-weight:normal;
  }
</code></pre>
<p>You can put the above css under /apps/shared/css or combine with /apps/shared/js/iui/iui.css. I personally prefer to put css into my directory (Twitter), so that I can put only Twitter directory into versioning system, but it&#8217;s up to you. If you follow the same path as mine, don&#8217;t forget to import the file you just created at /apps/Twitter/layout.erb</p>
<pre><code>  &lt;style type="text/css" media="screen"&gt;
    @import "/shared/js/iui/iui.css"; 
    @import "/shared/css/rho.css";
    @import "/Twitter/shared/css/common.css"; 
  &lt;/style&gt;
</code></pre>
<h4>/apps/Twitter/MyTimeline/new.erb</h4>
<p>At new page, I got rid of all input besides &#8220;text&#8221;, as all other attributes are going to be created by Twitter when the post is created.</p>
<pre><code>  &lt;form title="New MyTimeLine" 
      class="panel"
      id="MyTimeLine_new_form" 
      method="POST" 
      action="&lt;%=url_for(:action =&gt; :create)%&gt;"&gt;
    &lt;fieldset&gt;
        &lt;input type="hidden" name="id" value="&lt;%=@MyTimeLine.object%&gt;"/&gt;

          &lt;div class="row"&gt;
              &lt;label&gt;Text: &lt;/label&gt;
              &lt;input type="text" name="MyTimeLine[text]"/&gt;
          &lt;/div&gt;

    &lt;/fieldset&gt;
    &lt;input type="submit" value="Create"/&gt;
  &lt;/form&gt;
</code></pre>
<h3>Displaying on Emulator</h3>
<p>Now it&#8217;s time to open the project at Xcode and do the build. As we did at Part2, make sure you reset iPhone simulator and Xcode, so that you can do clean build.</p>
<h4>Top page</h4>
<p><a href="http://picasaweb.google.co.uk/lh/photo/O_CVI4m74zyVFZSofw7Hzw?feat=embedwebsite"><img src="https://i0.wp.com/lh5.ggpht.com/_k-QRXbUACBU/SZ_ZgkcvUxI/AAAAAAAABV4/K8-VW2RYKpY/s400/twitter_part_04_top_page.png" /></a></p>
<h4>Show page</h4>
<p><a href="http://picasaweb.google.co.uk/lh/photo/aZOu75K7dr2adNah8yJOPA?feat=embedwebsite"><img src="https://i0.wp.com/lh4.ggpht.com/_k-QRXbUACBU/SZ_ZfgF2UwI/AAAAAAAABV0/COCNebAE09k/s400/twitter_part_04_mytimeline_page.png" /></a></p>
<h4>Create page</h4>
<p><a href="http://picasaweb.google.co.uk/lh/photo/jzrTxONV7Az8Xab8bt86iA?feat=embedwebsite"><img src="https://i0.wp.com/lh6.ggpht.com/_k-QRXbUACBU/SZ_Zhn0oIaI/AAAAAAAABWA/5fTGTHPL6hk/s400/twitter_part_04_create_page.png" /></a></p>
<h4>New Tweet on Twitter</h4>
<p><a href="http://picasaweb.google.co.uk/lh/photo/IPOPkEPDFdR_3aTyF32oPw?feat=embedwebsite"><img src="https://i0.wp.com/lh3.ggpht.com/_k-QRXbUACBU/SZ_ZjBV3CKI/AAAAAAAABWI/e9G5FMCaY48/s400/twitter_part_04_new_tweets_from_rhodes.png" /></a></p>
<h3>Debugging view.</h3>
<p>When I first added some styling, I kept doing &#8220;reset iPhone, clean Xcode target, Build &amp; Go&#8221;, just to see minor view change. This drove me crazy!!</p>
<p>Then I copied view logic from erb to normal html and started debugging using Firefox &amp; Firebug. After I completed my view change, I discovered that I can see the exactly same view from my browser just hitting <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a></p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/LCAqfNTKQsW1U8FAx7nlEg?feat=embedwebsite"><img src="https://i0.wp.com/lh5.ggpht.com/_k-QRXbUACBU/SZ_ZiRBQjlI/AAAAAAAABWE/XFHu_4Xmd0Y/s800/twitter_part_04_debugging_view.png" /></a></p>
<h3>Next</h3>
<p>Next, I will try utilizaing mobile system&#8217;s GPS capability. I will fetch geo location and list tweets around your area. A few function to achieve this is not implemented at 0.3, so I will use 1.0 which is still at unstable release.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/03/01/making-twitter-mobile-client-with-ruby-using-rhodes-and-rhosync-part-4/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>

		<media:content url="http://lh5.ggpht.com/_k-QRXbUACBU/SZ_ZgkcvUxI/AAAAAAAABV4/K8-VW2RYKpY/s400/twitter_part_04_top_page.png" medium="image" />

		<media:content url="http://lh4.ggpht.com/_k-QRXbUACBU/SZ_ZfgF2UwI/AAAAAAAABV0/COCNebAE09k/s400/twitter_part_04_mytimeline_page.png" medium="image" />

		<media:content url="http://lh6.ggpht.com/_k-QRXbUACBU/SZ_Zhn0oIaI/AAAAAAAABWA/5fTGTHPL6hk/s400/twitter_part_04_create_page.png" medium="image" />

		<media:content url="http://lh3.ggpht.com/_k-QRXbUACBU/SZ_ZjBV3CKI/AAAAAAAABWI/e9G5FMCaY48/s400/twitter_part_04_new_tweets_from_rhodes.png" medium="image" />

		<media:content url="http://lh5.ggpht.com/_k-QRXbUACBU/SZ_ZiRBQjlI/AAAAAAAABWE/XFHu_4Xmd0Y/s800/twitter_part_04_debugging_view.png" medium="image" />
	</item>
		<item>
		<title>Ruby &#038; Ruby Cocoa runs on iPhone, too</title>
		<link>https://rubyonmobile.wordpress.com/2009/02/27/ruby-ruby-cocoa-runs-on-iphone-too/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/02/27/ruby-ruby-cocoa-runs-on-iphone-too/#comments</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Fri, 27 Feb 2009 23:41:40 +0000</pubDate>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone rubycocoa]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/2009/02/27/ruby-ruby-cocoa-runs-on-iphone-too/</guid>

					<description><![CDATA[Just after the news about Jruby running on Android, here comes news about Ruby &#38; RubyCocoa running on iPhone. iphone-rubycocoa: Ruby / RubyCocoa for the iPhone SDK According to the blog of the author who created this project (Takuma Mori ), he started this experiment after inspired by the fact that several iPhone applications are [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Just after the news about Jruby running on Android, here comes news about Ruby &amp; RubyCocoa running on iPhone.</p>
<ul>
<li><a href="http://wiki.github.com/takuma104/iphone-rubycocoa">iphone-rubycocoa: Ruby / RubyCocoa for the iPhone SDK</a></li>
</ul>
<p><img class="hatena-fotolife" title="f:id:takuma104:20090226022028p:image:w200" src="https://i0.wp.com/f.hatena.ne.jp/images/fotolife/t/takuma104/20090226/20090226022028.png" alt="f:id:takuma104:20090226022028p:image:w200" width="200" /></p>
<p>According to the blog of the author who created this project (Takuma Mori ), he started this experiment after inspired by the fact that several iPhone applications are now written in C#.</p>
<ul>
<li><a href="http://arstechnica.com/open-source/news/2009/01/open-source-mono-framework-brings-c-to-iphone-and-wii.ars">Open source Mono framework brings C# to iPhone and Wii</a></li>
<li><a href="http://cplus.about.com/b/2009/01/11/the-biggest-iphone-development-surprise-yet-c.htm">The Biggest iPhone Development Surprise yet &#8211; C#</a></li>
</ul>
<p>The current work is not based on the latest RubyCocoa, but 0.4.2. This is because one of the library(libffi) does not work on iPhone, and he had to use the version which does not rely on libffi. However, <a href="http://inexdo.com/JSCocoa">JSCocoa</a> also has same problem and they are trying to make it work, so it may be supported on more recent RubyCocoa once the problem is solved.</p>
<p>Mori san translated <a href="http://d.hatena.ne.jp/takuma104/20090225/1235584788">his initial Japanese blog post</a> into English at his Wiki page. However, his Japanese slide seems not translated, so I added a few extra info here.</p>
<ul>
<li>Dynamic linking does not work on iPhone, so it’s all <a href="http://phaseit.net/claird/comp.programming/linking.html">statically linked</a></li>
<li>Sumbmited IRB app to appstore(there is a screen capture at p49 of his <a href="http://www.slideshare.net/takuma104/rubyrubycocoa-for-iphone-uicoderz4">slide</a>), but got rejected. Mori san thinks it’s probably get accepted if he submits another Ruby app(not like iRB) which code code is pre-compiled prior to the submission as C# got away.</li>
</ul>
<p><a href="https://rubyonmobile.wordpress.com/2009/02/07/hello-world/">When I first looked at Ruby mobile environment</a>, <a href="http://rhomobile.com/">Rhodes</a> was pretty much the only choice. Even though Jruby on Android and RubyCocoa on iPhone are far from production use at this moment, this will bring lots of Rubyiest’s attention to mobile app development, encourage competition among different implementations, and I hope it accelerates lots of innovation in this field.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/02/27/ruby-ruby-cocoa-runs-on-iphone-too/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>

		<media:content url="http://f.hatena.ne.jp/images/fotolife/t/takuma104/20090226/20090226022028.png" medium="image">
			<media:title type="html">f:id:takuma104:20090226022028p:image:w200</media:title>
		</media:content>
	</item>
		<item>
		<title>Jruby now runs on Android</title>
		<link>https://rubyonmobile.wordpress.com/2009/02/26/jruby-now-runs-on-android/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/02/26/jruby-now-runs-on-android/#respond</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Thu, 26 Feb 2009 09:42:40 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[jruby Android]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/?p=40</guid>

					<description><![CDATA[Rubuto Is Your Friend JRuby 1.2 RC1 Released, Initial support for Android I quickly tried instruction on Charles Nutter&#8217;s blog and managed to do &#8220;Hello World&#8221;, though I got error when I tried to use IRB. I will post more detail and gotchas once I fully managed to run it on my environment.]]></description>
										<content:encoded><![CDATA[<ul>
<li><a href="http://blog.headius.com/2009/02/ruboto-is-your-friend.html">Rubuto Is Your Friend</a></li>
<li><a href="http://www.infoq.com/news/2009/02/jruby12rc1-android-support">JRuby 1.2 RC1 Released, Initial support for Android</a></li>
</ul>
<p>I quickly tried instruction on Charles Nutter&#8217;s blog and managed to do &#8220;Hello World&#8221;, though I got error when I tried to use IRB.</p>
<p>I will post more detail and gotchas once I fully managed to run it on my environment.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/02/26/jruby-now-runs-on-android/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>
	</item>
		<item>
		<title>Making Twitter mobile client with Ruby using Rhodes Rhosync (Part 3)</title>
		<link>https://rubyonmobile.wordpress.com/2009/02/21/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-3/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/02/21/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-3/#respond</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Sat, 21 Feb 2009 09:45:26 +0000</pubDate>
				<category><![CDATA[Rhodes]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/2009/02/21/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-3/</guid>

					<description><![CDATA[Previously Part One &#8211; Syncing public Tweet on Rhosync server Part Two &#8211; Displaying public Tweet on iPhone Simulator At the previous 2 posts, we went through the very basic of how you write code in Rhosync and Rhodes. This time, we go through the similar steps,but additional functionalities to read and create your own [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>Previously</h3>
<ul>
<li><a href="https://rubyonmobile.wordpress.com/2009/02/10/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-1/">Part One &#8211; Syncing public Tweet on Rhosync server</a></li>
<li><a href="https://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/">Part Two &#8211; Displaying public Tweet on iPhone Simulator</a></li>
</ul>
<p>At the previous 2 posts, we went through the very basic of how you write code in Rhosync and Rhodes.</p>
<p>This time, we go through the similar steps,but additional functionalities to read and create your own tweet.</p>
<h3>Creating New source at Rhosync</h3>
<p>Let&#8217;s first create new source, just in the same way as you created the public timeline at Part 1, but new name as &#8220;MyTimeline&#8221;</p>
<pre><code>  $ rhogen source MyTimeline
  Generating with source generator:
       [ADDED]  lib/my_timeline.rb
</code></pre>
<h3>Authentication and My Tweet.</h3>
<p>I initially thought I have to implement some authentication logic at &#8220;login&#8221; method, but realized that none of REST based examples (Basecamp and Lighthouse) have logic at login method.</p>
<p>Instead, it uses Net::HTTP&#8217;s authentication mechanism within query method.<br />
Here is an example of Basecamp adapter.</p>
<pre><code>  def login
    # intentionally left blank
  end

  def query
    uri = URI.parse(@source.url+"/projects.xml")
    req = Net::HTTP::Get.new(uri.path, 'Accept' =&gt; 'application/xml')
    req.basic_auth @source.login, @source.password
    response = Net::HTTP.start(uri.host,uri.port) do |http|
      http.request(req)
    end
    xml_data = XmlSimple.xml_in(response.body); 
    @result = xml_data["project"]
  end
</code></pre>
<p>According to  <a href="http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html">Net::HTTP rdoc</a>, you can call &#8220;basic_auth&#8221; instance method with login and password parameter.</p>
<p>The below is query method for MyTimeline. It&#8217;s pretty much identical. Only the differences are url and response parameter. </p>
<p>Do you remember that you can access url info you added at Rhosync Web interface through @source? Both login and password are also available through it, so you don&#8217;t need to hardcode at the source code.</p>
<p>The rest (sync and other private methods) are exactly same as PublicTimeline</p>
<pre><code>  def query
    url = "/statuses/friends_timeline.xml"
    uri = URI.parse(@source.url+url)

    req = Net::HTTP::Get.new(uri.path, 'Accept' =&gt; 'application/xml')
    req.basic_auth @source.login, @source.password

    res = Net::HTTP.start(uri.host,uri.port) do |http|
      http.request(req)
    end

    xml_data = XmlSimple.xml_in(res.body); 
    @result = xml_data["status"]
  end

  def sync
    log "#{self.class} sync, with #{@result.length} results"
    @result.each do |item|
      item_id = item["id"].first.to_i
      iterate_keys(:item =&gt; item, :item_id =&gt; item_id)
    end
  end

private
  def iterate_keys(option)
    item = option[:item]
    item_id = option[:item_id]
    prefix = option[:prefix] || ""

    # item.keys =&gt; ["user", "favorited", "truncated"...]
    item.keys.each do |key|
      value = item[key] ? item[key][0] : ""
      if value.kind_of?(Hash) &amp;&amp; value != {}
        # eg. :user =&gt; {:url =&gt; 'foo} becomes user_url
        iterate_keys(:prefix =&gt; (prefix + underline(key) + "_"), :item =&gt; value, :item_id =&gt; item_id)
      else
        # This method is from rest_api_helper
        add_triple(@source.id, item_id, prefix + underline(key), value)
      end
    end
  end

  def underline(key)
    key.gsub('-','_')
  end
</code></pre>
<p>Let&#8217;s start up the server and add the source as you did for PublicTimeline, <b>plus actual login and password of your twitter account</b>. If you click &#8220;Show Records&#8221;, you should be able to see your friend&#8217;s tweets. </p>
<h3>Creating Tweet</h3>
<p>Create method does not have a lot of examples at sample apps. Most of REST adapters (BaseCamp and Lighthouse) do not have create method for some reason.</p>
<p>I finally found that &#8220;lighthouse_tickets.rb&#8221; has some examples.</p>
<pre><code>  def create(name_value_list)
    log "LighthouseTickets create"

    get_params(name_value_list)
    xml_str = xml_template(params)

    uri = URI.parse(base_url)
    Net::HTTP.start(uri.host) do |http|
      http.set_debug_output $stderr
      request = Net::HTTP::Post.new(uri.path + "/projects/#{params['project_id']}/tickets.xml", {'Content-type' =&gt; 'application/xml'})
      request.body = xml_str
      request.basic_auth @source.credential.token, "x"
      response = http.request(request)
      # log response.body

      # case response
      # when Net::HTTPSuccess, Net::HTTPRedirection
      #   # OK
      # else
      #   raise "Failed to create  ticket"
      # end
    end
  end
</code></pre>
<p>What they are doing here is passing name_value_list into requrest.body in xml format. Looks get_params method does all conversion work. Let&#8217;s look at the actual method within RestAPIHelpers</p>
<pre><code>  module RestAPIHelpers
    # convert name_value_list to a params hash
    # name_value_list example, "[{'name' =&gt; 'title', 'value' =&gt; 'testing'},{'name' =&gt; 'state', 'value' =&gt; 'new'}]"
    # =&gt; params['title'] = 'testing', etc.
    def get_params(name_value_list)
      @params = {}
      name_value_list.each do |pair| 
        @params.merge!(Hash[pair['name'], pair['value']])
      end
      log @params.inspect
    end
</code></pre>
<p>Ah, here is a useful comment.<br />
The comment says that get_params iterates through each array and converts {&#8216;name&#8217; =&gt; &#8216;title&#8217;, &#8216;value&#8217; =&gt; &#8216;testing&#8217;} hash into {&#8216;title&#8217; =&gt; &#8216;testing&#8217;} hash and set the result into @params instance variable. If you see further bottom of the RestAPIHelpers, you can see &#8220;params&#8221; method which simply returns @params</p>
<pre><code>  def params
    @params
  end
</code></pre>
<p>The below is how I implemented the create method for MyTimeline.</p>
<pre><code>  def create(name_value_list)
    url = "/statuses/update.xml"
    uri = URI.parse(@source.url+url)

    get_params(name_value_list)

    req = Net::HTTP::Post.new(uri.path, 'Accept' =&gt; 'application/xml')
    req.basic_auth @source.login, @source.password

    req.set_form_data('status'=&gt; params["text"])

    res = Net::HTTP.start(uri.host,uri.port) do |http|
      http.request(req)
    end
  end
</code></pre>
<p>This is very similar to &#8220;query&#8221; method, but here are the few differences.</p>
<ul>
<li>Specified url as &#8220;update.xml&#8221;</li>
<li>Net::HTTP::Post.new. Note this is Post class, not Get class.</li>
<li>Passed text value using set_form_data method in Hash format. This way, you don&#8217;t have to convert your data into xml format and you can post to either &#8220;update.xml&#8221; or &#8220;update.json&#8221; url</li>
</ul>
<h3>Final Ryoshnc code</h3>
<pre><code>  class MyTimeline &lt; SourceAdapter

    include RestAPIHelpers

    def initialize(source, credential = nil)
      super
    end

    # Looks not in use
    # def login
    #   
    # end

    def query
      url = "/statuses/friends_timeline.xml"
      uri = URI.parse(@source.url+url)

      # Login authentication. The logic is taken from basecamp_projects.rb
      req = Net::HTTP::Get.new(uri.path, 'Accept' =&gt; 'application/xml')
      req.basic_auth @source.login, @source.password

      res = Net::HTTP.start(uri.host,uri.port) do |http|
        http.request(req)
      end

      xml_data = XmlSimple.xml_in(res.body); 
      @result = xml_data["status"]
    end

    def sync
      log "#{self.class} sync, with #{@result.length} results"
      @result.each do |item|
        item_id = item["id"].first.to_i
        iterate_keys(:item =&gt; item, :item_id =&gt; item_id)
      end
    end

    def create(name_value_list)
      url = "/statuses/update.xml"
      uri = URI.parse(@source.url+url)

      get_params(name_value_list)

      req = Net::HTTP::Post.new(uri.path, 'Accept' =&gt; 'application/xml')
      req.basic_auth @source.login, @source.password

      req.set_form_data('status'=&gt; params["text"])

      res = Net::HTTP.start(uri.host,uri.port) do |http|
        http.request(req)
      end
    end

  private
    def iterate_keys(option)
      item = option[:item]
      item_id = option[:item_id]
      prefix = option[:prefix] || ""

      # item.keys =&gt; ["user", "favorited", "truncated"...]
      item.keys.each do |key|
        value = item[key] ? item[key][0] : ""
        if value.kind_of?(Hash) &amp;&amp; value != {}
          # eg. :user =&gt; {:url =&gt; 'foo} becomes user_url
          iterate_keys(:prefix =&gt; (prefix + underline(key) + "_"), :item =&gt; value, :item_id =&gt; item_id)
        else
          # This method is from rest_api_helper
          add_triple(@source.id, item_id, prefix + underline(key), value, @source.current_user.id)
        end
      end
    end

    def underline(key)
      key.gsub('-','_')
    end
  end
</code></pre>
<h3>Demo</h3>
<p>Let&#8217;s go back to Rhosync server. You should have left it when you displayed your friends tweet. Click &#8220;Create object-value record&#8221;, and add &#8220;text&#8221; attribute and your own tweet message like below.</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/bmJcsZR-TROMvkcRCcElsA?feat=embedwebsite"><img src="https://i0.wp.com/lh3.ggpht.com/_k-QRXbUACBU/SZ_Jl-QUA6I/AAAAAAAABVU/YsqGigBdAwE/s400/twitter_part_03_creating_object_value_record.png" /></a></p>
<p>Once you click &#8220;Create Object Value&#8221;, then you should be redirected to show page with &#8220;Created Object&#8221; flash message.</p>
<p>Now you go to your Twitter website. <em>Congratulations!!</em> Your message from Rhosync is successfully updated into Twitter itself!!</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/fcRE5tuqNcinjxRzbfrHXw?feat=embedwebsite"><img src="https://i0.wp.com/lh5.ggpht.com/_k-QRXbUACBU/SZ_JnDfRGQI/AAAAAAAABVY/Ml-VV40DoyY/s400/twitter_part_04_displaying_new_record_at_twitter.png" /></a></p>
<h3>Next</h3>
<p>You can finally post your own post from iPhone simulator. I will also go through some technics to tidy up your view pages.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/02/21/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>

		<media:content url="http://lh3.ggpht.com/_k-QRXbUACBU/SZ_Jl-QUA6I/AAAAAAAABVU/YsqGigBdAwE/s400/twitter_part_03_creating_object_value_record.png" medium="image" />

		<media:content url="http://lh5.ggpht.com/_k-QRXbUACBU/SZ_JnDfRGQI/AAAAAAAABVY/Ml-VV40DoyY/s400/twitter_part_04_displaying_new_record_at_twitter.png" medium="image" />
	</item>
		<item>
		<title>Aplix: Converting NTT Docomo i-appli to Windows Mobile Android, iPhone, S60 and even to portable game machine</title>
		<link>https://rubyonmobile.wordpress.com/2009/02/17/aplix-converting-ntt-docomo-i-appli-to-windows-mobile-android-iphone-s60-and-even-to-portable-game-machine/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/02/17/aplix-converting-ntt-docomo-i-appli-to-windows-mobile-android-iphone-s60-and-even-to-portable-game-machine/#comments</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Tue, 17 Feb 2009 00:10:39 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[poll]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/?p=27</guid>

					<description><![CDATA[It&#8217;s not ruby related, but I thought this is interesting news. The google translation of this Japanese article is actually not bad, but I will summarize key points. Aplix is a technology solution company to provide Java development platform to Japanese mobilie network providers, such as NTT Docomo, KDDI and Softbank mobile (Used to be J -phone [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>It&#8217;s not ruby related, but I thought this is interesting news. <a href="http://ai.kuru2.st/iphone/du.cgi/iphone-item:cnt=nz:lang=en:item=365002.html">The google translation of this Japanese article</a> is actually not bad, but I will summarize key points.</p>
<ul>
<li>Aplix is a technology solution company to provide Java development platform to Japanese mobilie network providers, such as NTT Docomo, KDDI and Softbank mobile (Used to be J -phone and vodafone).</li>
<li>i-appli is Java development platform for NTT Docomo. More detail is <a href="http://www.geocities.co.jp/SiliconValley-Cupertino/1621/">here</a> </li>
<li>Aplix developed a tool to convert binary files of  i-appli to native application of target platforms.</li>
<li>It automatically support touch panel, view rotation. Also supports flick operation for iPhone only.</li>
<li>Aplix is showing the demo at WMC right now.</li>
</ul>
<p>After a bit more research on this topic, I found interesting note from &#8220;<a href="http://itpro.nikkeibp.co.jp/article/NEWS/20090216/324839">ITPro</a>&#8220;(Japanese)</p>
<ul>
<li>Aplix business model is commission based to software vendor per sales basis(up to 5~6 %)</li>
</ul>
<p>Looks their business model is similar to Rhodes, though they do not seem open source.</p>
<p>When I checked Aplix&#8217;s website, there was press release only in Japanese</p>
<p>There are not much technical detail on the press release, but it&#8217;s worth noting that there are lots of comment from Japanese Game development company such as Capcon, Sega, Bandai and so on.</p>
<p>Looks their main target is Japanese game development companies. Since iPhone game applications are getting so popular, there could be huge business opportunities for Japanese game companies to get into all smartphone market.</p>
<p>But what will be the benefit for NTT docomo which offered technical advice to Aplix?</p>
<p>At a first glance, letting all game companies to provide a way to develop iphone/android apps rather than iAppli sounds silly move , as they can no longer &#8220;lock in&#8221; all vendors. However, I saw one Japanese blog speculating that that&#8217;s the strategy of NTT docomo to take the standard of mobile application development using their Java platform, so that they can protect game vendors to switch their platform out of iAppli.</p>
<p>If you are attending WMC in Barcelona, please visit their booth and let me know how smooth their conversion program is.</p>
<p>It seems Adobe is also making progress for their Flash support to smartphone (iPhone is not to be supported though).</p>
<p>It is interesting that many companies are now trying to support cross mobile development platform. </p>
<p>What would you choose?</p>
<p> </p>
<a name="pd_a_1376168"></a><div class="CSS_Poll PDS_Poll" id="PDI_container1376168" data-settings="{&quot;url&quot;:&quot;https:\/\/secure.polldaddy.com\/p\/1376168.js&quot;}" style=""></div><div id="PD_superContainer"></div><noscript><a href="https://polldaddy.com/p/1376168" target="_blank" rel="noopener noreferrer">Take Our Poll</a></noscript>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/02/17/aplix-converting-ntt-docomo-i-appli-to-windows-mobile-android-iphone-s60-and-even-to-portable-game-machine/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>
	</item>
		<item>
		<title>Making Twitter mobile client with Ruby using Rhodes &#038; Rhosync (Part 2)</title>
		<link>https://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/#comments</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Fri, 13 Feb 2009 00:37:07 +0000</pubDate>
				<category><![CDATA[Rhodes]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/</guid>

					<description><![CDATA[What we have done at previous tutorial. At the previous post, we created an Rhosync adapter to fetch public timeline of Twitter. Take a note of the url where you displayed the record, because you will need it when you build rhodes app. In my case, the url is like this. http://localhost:3000/apps/6/sources/11 &#8220;6&#8221; is id [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>What we have done at previous tutorial.</h3>
<p>At the <a href="https://rubyonmobile.wordpress.com/2009/02/10/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-1/">previous post</a>, we created an Rhosync adapter to fetch public timeline of Twitter. Take a note of the url where you displayed the record, because you will need it when you build rhodes app.</p>
<p>In my case, the url is like this.</p>
<pre><code>http://localhost:3000/apps/6/sources/11
</code></pre>
<p>&#8220;6&#8221; is id for the application(Tweeter), and 11 is id of the source(Public Timeline). The numbers very in your environment.</p>
<h3>Setup</h3>
<p>As specified at <a href="http://wiki.rhomobile.com//index.php?title=Mobilizing_Your_Application_with_Rhomobile#Building_Your_Rhodes_Application">Rhomobile tutorial</a>, let&#8217;s download the latest Rhodes from github. </p>
<pre><code>  git clone git://github.com/rhomobile/rhodes.git rhodes
</code></pre>
<h3>Before building new app</h3>
<p>When I first played with SugarCRM sample which rhomobile provided, I really struggled running it on my iPhone emulator. You can see the full detail at <a href="http://groups.google.com/group/rhomobile/browse_thread/thread/b3536a40f04bf56a?hl=en">this thread</a>, but I will also summarize it again with some visual aid.</p>
<h4>Unify source url into one.</h4>
<p>You will notice that there are lots of sample application directories (Lighthouse, SugarCRM, etc) under &#8220;apps&#8221; directory. I recommend that you  either remove them, move to different directory, or edit &#8220;config.rb&#8221; files of every single models under every single probjects pointing source url from &#8220;<a href="http://rhosyncdev.rhohub.com&#038;#8221" rel="nofollow">http://rhosyncdev.rhohub.com&#038;#8221</a>; to &#8220;<a href="http://localhost:3000&#038;#8221" rel="nofollow">http://localhost:3000&#038;#8221</a>; . This is because Rhodes try to connect to each url at login and fails if it fails to connect to any url specified at the config file. </p>
<pre><code>  $cd rhodes
  $cd apps
  $grep source */*/config.rb
  Basecamp/People/config.rb:#Rho::RhoConfig::add_source("People", {"url"=&gt;"http://rhosyncdev.rhohub.com/apps/1/sources/6", "source_id"=&gt;6})
  Lighthouse/LighthouseSettings/config.rb:Rho::RhoConfig::add_source("LighthouseSettings", {"url"=&gt;"http://rhosyncdev.rhohub.com/apps/4/sources/10", "source_id"=&gt;10})
  Lighthouse/Milestones/config.rb:Rho::RhoConfig::add_source("Milestone", {"url"=&gt;"http://rhosyncdev.rhohub.com/apps/4/sources/6", "source_id"=&gt;6})
  Lighthouse/Project/config.rb:Rho::RhoConfig::add_source("Project", {"url"=&gt;"http://rhosyncdev.rhohub.com/apps/4/sources/5", "source_id"=&gt;5})
  Lighthouse/Ticket/config.rb:Rho::RhoConfig::add_source("Ticket", {"url"=&gt;"http://rhosyncdev.rhohub.com/apps/4/sources/7", "source_id"=&gt;7})

  $mv  Basecamp/ Lighthouse/ RhoSiebel/ RhoSugarCRM/ Phonebook/ ..
</code></pre>
<h4>Do a clean build in xcode.</h4>
<p>sqlite local db holds session information unless you completely wipe<br />
out app from the simulator. Here are the steps to wipe out completely.<br />
Make sure you do this every time you modified your code under rhodes directory<br />
(not just when you are tweaking rhodes framework itself, but also when you write your code under &#8220;app&#8221; directory)</p>
<ol>
<li>
<p>Do &#8220;reset content and settings&#8221; then from the iphone simulator<br />
menu</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/xpVUo7kfPfbubQw5swUg_g?feat=embedwebsite"><img src="https://i0.wp.com/lh5.ggpht.com/_k-QRXbUACBU/SZS8nI9EwzI/AAAAAAAABVQ/BiK-Rz85rEY/s400/twitter_part_02_reset_content_and_settings.png" /></a></p>
</li>
<li>
<p>Remove  iphone/build/Debug-iphonesimulator director from Rhodes<br />
project directory.</p>
</li>
<li>
<p>&#8220;Build&#8221; =&gt; &#8220;Clear all targets&#8221; on Xcode.</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/HZADU18qrJ0kJzemEktHDA?feat=embedwebsite"><img src="https://i0.wp.com/lh4.ggpht.com/_k-QRXbUACBU/SZS8muNNRjI/AAAAAAAABVM/FWhMMJkkHC0/s400/twitter_part_02_clear_all_targets.png" /></a></p>
</li>
<li>
<p>&#8220;Build&#8221; =&gt; &#8220;Build and Go&#8221; from xcode.</p>
</li>
</ol>
<p>The steps are quite tedious. I&#8217;d love to know if there are any other ways to simplify the steps. This is when I miss the simplicity of scripting environment&#8230;</p>
<h4>Log out /login from simulator.</h4>
<p>For some reason, rhodes thinks I was logged in at iphone simulator. If<br />
first login did not work, cancel the login page, go back to main page,<br />
click &#8220;Logout&#8221;, then login again (This used to happen at 0.2.0, but seems fixed at 0.3.0).</p>
<h4>Make sure port 8080 is not in use.</h4>
<p>The iphone simulator uses <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a> for it&#8217;s internal web server to render user interface. I was once running Tomcat at port 8080 for my work related product, and my mobile app window at the simulator was showing <a href="http://tomcat.apache.org/">this message</a>. Took a few minutes figuring out why it was showing such a message.</p>
<h3>rhogen app</h3>
<p>You must remember that you used &#8220;rhogen&#8221; to create an adapter at Rhosync.<br />
You will use the same command, but now with different option.</p>
<pre><code>$rhogen app Twitter
Generating with app generator:
     [ADDED]  Twitter/application.rb
     [ADDED]  Twitter/index.html
</code></pre>
<p>Before moving to the directory, please insert a link to the app page at &#8220;apps/index.erb&#8221; like below.</p>
<pre><code>&lt;h4&gt;Sample Apps&lt;/h4&gt;
    &lt;a href="Twitter"&gt;Twitter&lt;/a&gt;&lt;/br&gt;
</code></pre>
<h3>rhogen model</h3>
<p>Now is the time to create a controller which sync with the resource model you created at Rhosync. </p>
<pre><code>  $cd Twitter 
  $rhogen model PublicTimeLine "http://localhost:3000/apps/6/sources/11" 11 text,user_screen_name,user_name,user_profile_image_url,source
  Generating with model generator:
  [ADDED] PublicTimeLine/config.rb
  [ADDED] PublicTimeLine/index.erb
  [ADDED] PublicTimeLine/edit.erb
  [ADDED] PublicTimeLine/new.erb
  [ADDED] PublicTimeLine/controller.rb
</code></pre>
<p>The syntax should be straightforward. it specify controller name (PublicTimeLine), resource url(<a href="http://localhost:3000/apps/6/sources/11" rel="nofollow">http://localhost:3000/apps/6/sources/11</a>), resource id(11, actually I feel this is duplicated info as resource url contains the resource id itself), and all the attributes(text,user<em>screen</em>name,user<em>name,user</em>profile<em>image</em>url,source).<br />
Make sure you put no space between commas. </p>
<p>You don&#8217;t really need to touch the controller you just created for now, as rhogen made controller with basic CRUD. Just insert link to the &#8220;PublicTimeLine/index&#8221; page at at &#8220;Twitter/index.html&#8221; like below.</p>
<pre><code>  &lt;ul id="home" selected="true" title="Twitter"&gt;
    &lt;li&gt;Something interesting here...&lt;/li&gt;
    &lt;li&gt;&lt;a  href="PublicTimeLine"&gt; Public Tweet&lt;/a&gt;&lt;/li&gt;
</code></pre>
<h3>View</h3>
<p>Last part is a view. The below is PublicTimeLine/index.erb created by rhogen.</p>
<pre><code>  &lt;ul id="PublicTimeLines" title="PublicTimeLines"&gt;
  &lt;%@PublicTimeLines.each do |x|%&gt;

  &lt;li&gt;&lt;%=link_to "#{x.text}", "edit", x.object%&gt;&lt;/li&gt;

  &lt;%end%&gt;
  &lt;li&gt;&lt;font color="blue"&gt;&lt;%=link_to "New PublicTimeLine", "new"%&gt;&lt;/font&gt;&lt;/li&gt;
  &lt;/ul&gt;
</code></pre>
<p>Let&#8217;s change it to show all the info we fetched from rhosync.</p>
<pre><code>  &lt;ul id="PublicTimeLines" title="PublicTimeLines"&gt;
  &lt;%@PublicTimeLines.each do |x|%&gt;
    &lt;li class ="row"&gt;
      &lt;img src=&lt;%= x.user_profile_image_url %&gt; alt=&lt;%= x.user_screen_name %&gt; /&gt;
       &lt;%= x.text %&gt;
       &lt;%= x.user_name %&gt; &lt;%= x.created_at %&gt; via &lt;%= x.source %&gt;
    &lt;/li&gt;
  &lt;%end%&gt;
  &lt;/ul&gt;
</code></pre>
<h3>Displaying on Emulator</h3>
<p>Now it&#8217;s time to open the project at Xcode.</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/NJS0VjzhAAnhz36mcwVd6g?feat=embedwebsite"><img src="https://i0.wp.com/lh5.ggpht.com/_k-QRXbUACBU/SZS8l7VdBYI/AAAAAAAABVI/v_8kX-TGVYE/s400/twitter_part_02_opening_project_at_xcode.png" /></a></p>
<p>Before running &#8220;Build &amp; Go&#8221;, I recommend that you go through the clean up process I explained earlier.</p>
<p>Once build is complete, iPhone simulator will popup, and Rhodes application will launch itself. Also, make sure you Rhosync Rails server is up and running.</p>
<p>It&#8217;s good time to open up console, as well as displaying script/server log, so you can see what&#8217;s going on at the backend.</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/Fq9-cY6_rM9FA45zfl7cJw?feat=embedwebsite"><img src="https://i0.wp.com/lh4.ggpht.com/_k-QRXbUACBU/SZS8leZe9nI/AAAAAAAABVE/hgkC33KU3ic/s400/twitter_part_02_opening_console_at_xcode.png" /></a></p>
<h3>Rhodes on iPhone Simulator</h3>
<p>Finally we managed to display public tweet on our iphone simulator!!</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/Oht2XCn4T8C9pYu2670xdg?feat=embedwebsite"><img src="https://i0.wp.com/lh5.ggpht.com/_k-QRXbUACBU/SZS8kla-ZTI/AAAAAAAABVA/qAJTFaTV9Ok/s400/twitter_part_02_public_timeline_at_rhodes.png" /></a></p>
<p>The view is rendered by <a href="http://code.google.com/p/iui/">iui</a> css and javascript. It will show like normal iPhone UI, as long as you specify each tweet within <code>&lt;li class="row"&gt;</code>. I also made other view changes such as displaying date in time distance (eg: 3 hours ago), but I will cover that at later time.</p>
<h3>Next</h3>
<p>At next post, I will go through similar step we did at Part 1 and 2, but we will display your own friend feed, as well as being able to post tweet from iphone simulator.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/02/13/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-2/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>

		<media:content url="http://lh5.ggpht.com/_k-QRXbUACBU/SZS8nI9EwzI/AAAAAAAABVQ/BiK-Rz85rEY/s400/twitter_part_02_reset_content_and_settings.png" medium="image" />

		<media:content url="http://lh4.ggpht.com/_k-QRXbUACBU/SZS8muNNRjI/AAAAAAAABVM/FWhMMJkkHC0/s400/twitter_part_02_clear_all_targets.png" medium="image" />

		<media:content url="http://lh5.ggpht.com/_k-QRXbUACBU/SZS8l7VdBYI/AAAAAAAABVI/v_8kX-TGVYE/s400/twitter_part_02_opening_project_at_xcode.png" medium="image" />

		<media:content url="http://lh4.ggpht.com/_k-QRXbUACBU/SZS8leZe9nI/AAAAAAAABVE/hgkC33KU3ic/s400/twitter_part_02_opening_console_at_xcode.png" medium="image" />

		<media:content url="http://lh5.ggpht.com/_k-QRXbUACBU/SZS8kla-ZTI/AAAAAAAABVA/qAJTFaTV9Ok/s400/twitter_part_02_public_timeline_at_rhodes.png" medium="image" />
	</item>
		<item>
		<title>Making Twitter mobile client with Ruby using Rhodes &#038; Rhosync (Part 1)</title>
		<link>https://rubyonmobile.wordpress.com/2009/02/10/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-1/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/02/10/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-1/#comments</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Tue, 10 Feb 2009 00:24:49 +0000</pubDate>
				<category><![CDATA[Rhodes]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://rubyonmobile.wordpress.com/2009/02/10/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-1/</guid>

					<description><![CDATA[Once you play with sample applications provided from rhomobile, now you might want to make something on your own. I&#8217;ve seen lots of desktop client app tutorial with &#8220;Creating Sample Twitter App&#8221; examples, so I also tried something similar. I will try to explain my code examples step by step including error messages and mistakes [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Once you play with<a href="http://wiki.rhomobile.com//index.php?title=Mobilizing_Your_Application_with_Rhomobile"> sample applications</a> provided from rhomobile, now you might want to make something on your own.</p>
<p>I&#8217;ve seen lots of desktop client app tutorial with  &#8220;Creating Sample Twitter App&#8221; examples, so I also tried something similar.</p>
<p>I will try to explain my code examples step by step including error messages and mistakes I made, so that you can not only experience what it is like to develop mobile app using Rhodes/Rhosync, but also debug similar problems when you make your own application.</p>
<p>In this tutorial, I will start from minimum functionality to display Twitter&#8217;s public timeline on iPhone simulator. I will then implement authentication and basic Read/Create actions , so that you can show your friends&#8217;s tweet, as well as post your own tweet from the iPhone simulator.</p>
<p>All the codes will be tested against 0.3.1 tags for both <a href="http://github.com/rhomobile/rhosync/tree/0.3.1">rhosync</a> and <a href="http://github.com/rhomobile/rhodes/tree/0.3.1">rhodes</a>.</p>
<p>Before I start, special thanks to Rhomobile support team for answering <a href="http://groups.google.com/group/rhomobile?hl=en">so many questions at google group</a>.</p>
<h3>What is Twitter API?</h3>
<p><a href="http://twitter.com">Twitter</a> is one of the most post popular Ruby On Rails based web app. It is a micro blogging service where you can post your status in small text(140 chars).</p>
<p>Following Ruby On Rails convention, they have very clean (<br />
<a href="http://apiwiki.twitter.com/REST+API+Documentation">REST based APIs</a>). If you have never tried their API, click <a href="http://twitter.com/statuses/public_timeline.xml">http://twitter.com/statuses/public_timeline.xml</a>. You will see list of 20 public tweets in xml format like below.</p>
<pre><code>&lt;status&gt;
  &lt;created_at&gt;Sat Feb 07 23:49:04 +0000 2009&lt;/created_at&gt;
  &lt;id&gt;1187577382&lt;/id&gt;
  &lt;text&gt;
    @ceetee dude! How's it like out there! Been there before?
  &lt;/text&gt;
  &lt;source&gt;
    &lt;a href="http://www.atebits.com/software/tweetie/"&gt;Tweetie&lt;/a&gt;
  &lt;/source&gt;
  &lt;truncated&gt;false&lt;/truncated&gt;
  &lt;in_reply_to_status_id&gt;1187570116&lt;/in_reply_to_status_id&gt;
  &lt;in_reply_to_user_id&gt;8620122&lt;/in_reply_to_user_id&gt;
  &lt;favorited&gt;false&lt;/favorited&gt;
  &lt;user&gt;
    &lt;id&gt;11686132&lt;/id&gt;
    &lt;name&gt;bombayaddict&lt;/name&gt;
    &lt;screen_name&gt;b50&lt;/screen_name&gt;
    &lt;description&gt;Bombay's Addict&lt;/description&gt;
    &lt;location&gt;Bombay. Always. &lt;/location&gt;
    &lt;profile_image_url&gt;
    <a href="http://s3.amazonaws.com/twitter_production/profile_images/63468508/photo2_normal.jpg"><img src="https://i0.wp.com/s3.amazonaws.com/twitter_production/profile_images/63468508/photo2_normal.jpg" style="max-width:100%;" /></a>
    &lt;/profile_image_url&gt;
    &lt;url&gt;http://www.bombayaddict.com&lt;/url&gt;
    &lt;protected&gt;false&lt;/protected&gt;
    &lt;followers_count&gt;462&lt;/followers_count&gt;
  &lt;/user&gt;
&lt;/status&gt;
</code></pre>
<p>If you change file extension from .xml to .json or .rss, they will show in each format. Unlike your private tweets which I cover later, accessing public tweets does not require authentication.</p>
<p>There are <a href="http://twitter.rubyforge.org/">a few Ruby Libraries</a> to handle their API, but the APIs are so easy that you can do most of what you want to do by just using basic Ruby network library, such as <a href="http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html">net/http</a>.</p>
<h3>Using Rhosync</h3>
<p>Rhosync will let you define common CRUD(Create, Read, Update, Delete) interfaces for mobile device via Rhodes.</p>
<p>Rhosync is built as a pure Ruby On Rails based application, so you should not have any problems if you know how to run and develop using Ruby On Rails.</p>
<h4>Registering new source at Rhosync web form.</h4>
<p>After you install Rhosync following the <a href="http://wiki.rhomobile.com//index.php?title=Mobilizing_Your_Application_with_Rhomobile#Install_the_RhoSync_Server">instruction</a>, let&#8217;s startup the server, register your account, login to the server, and create an application called &#8220;Twitter&#8221;. Once application is created, click &#8220;Add Source&#8221; and create an source called &#8220;Twitter Public Timeline&#8221;</p>
<p>Add &#8220;<a href="http://twitter.com&#038;#8221" rel="nofollow">http://twitter.com&#038;#8221</a>; as url, but you can leave login and password for now, as Public Timeline does not require authentication.</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/7Lye5JpOlcJIY3e8uKUxEw?feat=embedwebsite"><img src="https://i0.wp.com/lh4.ggpht.com/_k-QRXbUACBU/SZDHtMXraPI/AAAAAAAABUk/AtXmzerR5Ms/s800/twitter_part_01_public_timeline_source_adapter.png" alt="" /></a></p>
<p>To setup adapter, you can either generate the adapter using &#8220;rhogen&#8221; command, or type source code directly from the web form. I choose generating adapter myself for better debugging purpose. If your adapter code has some bugs, any exception will point the line number which contains the bug. If you type code in the form, your code is kept at database and get evaluated dynamically when required, but exception only says your eval failed, which is harder to debug.</p>
<p>If you go for generating adapter, just type &#8220;PublicTimeline&#8221; at &#8220;Source Adapter Class&#8221;</p>
<h4>rhogen</h4>
<p>you need to create an adapter to talk to Twitter. Rhosync has some built in code generator, so creating the skeleton is very easy.</p>
<pre><code>$ rhogen source PublicTimeline
Generating with source generator:
     [ADDED]  lib/public_timeline.rb
</code></pre>
<p>This creates long list of code defining login, query, sync, create, update, delete, and logoff.</p>
<p>For this very first application, all you need to worry about are &#8220;query&#8221; and &#8220;sync&#8221; methods.</p>
<h4>query method</h4>
<p>Here is my mimimalist code to fetch query from twitter.</p>
<pre><code>def query
  uri = URI.parse(@source.url)
  res = Net::HTTP.start(uri.host, uri.port) {|http|
    http.get("/statuses/public_timeline.xml")
  }
  xml_data = XmlSimple.xml_in(res.body);
  @result = xml_data["status"]
end
</code></pre>
<p>I think it can&#8217;t be as simple as this. It take url from @source instance variable. @source.url is the url you added when you first created the source from web page. Then it fetches tweets and put the body of the response into <a href="http://xml-simple.rubyforge.org/">XMLSimple library</a>. Lastly I put each entry under  into @result instance variable as Array.</p>
<h4>sync method</h4>
<p>Next is &#8220;sync&#8221; method.  The code repopulated by rhogen command iterates through each entry of @result and put value into ObjectValue object. ObjectValue is a table where you can store the result of API response as key =&gt; value pair. This way, you can</p>
<p>The below are the difference between normal ORM(Object Relational Mapping) object table and ObjectValue table.</p>
<p>Normal table</p>
<pre><code>ID                                    |  Industry  | Name
44e804f2-4933-4e20-271c-48fcecd9450d  | Technology | Mobio India
69ae8551-c0bd-0cb3-5c25-48ff9bae965a  | Finance    | vSpring
</code></pre>
<p>ObjectValue table</p>
<pre><code>Object                                | Attribute | Value
44e804f2-4933-4e20-271c-48fcecd9450d    | industry  | Technology
44e804f2-4933-4e20-271c-48fcecd9450d    | Name      | Mobio India
69ae8551-c0bd-0cb3-5c25-48ff9bae965a  | industry  | Finance
69ae8551-c0bd-0cb3-5c25-48ff9bae965a  | Name      | vSpring
</code></pre>
<p>What I did not understand much was where &#8220;entry<em>list&#8221; and &#8220;name</em>value_list&#8221; attributes are coming.</p>
<p>At the <a href="http://wiki.rhomobile.com//index.php?title=Mobilizing_Your_Application_with_Rhomobile#A_RhoSync_Query">rhomobile tutorial</a><br />
, @result is set like below at query method.</p>
<pre><code> result = client.get_entry_list(session_id,'Account','','',0,['name','industry'],10000,0)
</code></pre>
<p>And it also explains that &#8220;client&#8221; variable is available and not for REST API.</p>
<p>The Rhomobile tutorial page shows example using SugarCRM which uses SOAP API. Since Twitter uses REST API, I referred to <a href="http://github.com/rhomobile/rhosync/blob/53782a1e0c310d25a86b6f514d56bb8832aaab3b/lib/lighthouse_tickets.rb">Lighthouse</a> and <a href="http://github.com/rhomobile/rhosync/blob/53782a1e0c310d25a86b6f514d56bb8832aaab3b/lib/basecamp_people.rb">BaseCamp</a> examples which are also Rails based app and uses REST API.</p>
<p>By examining these codes, you notice that there is a helper called RestAPIHelpers . Let&#8217;s use that. I included the helper at the top of the class like this</p>
<pre><code>class PublicTimeline &lt; SourceAdapter

  include RestAPIHelpers
</code></pre>
<p>They use &#8220;add_triple&#8221; method which also adds your API result into ObjectValue, so I decided to use the method to inject my Tweets.</p>
<pre><code>def sync
  @result.each do |item|
    item_id = item["id"].first.to_i
    item.keys.each do |key|
      value = item[key] ? item[key][0] : ""
      add_triple(@source.id, id, key.gsub('-','_'), value)
      # convert "-" to "_" because "-" is not valid in ruby variable names
    end
  end
end
</code></pre>
<p>This is also simple one. @result contains array of Tweet where each tweet contains data in hash format like below.</p>
<pre><code>  {
    "text"=&gt;
    ["@ceetee dude! How's it like out there! Been there before?"],
    "id"=&gt;["1187577382"],
    "created_at"=&gt;["Sat Feb 07 23:49:04 +0000 2009"]
  }
</code></pre>
<p>I iterated through each hash key and send its key and value into &#8220;add_triple&#8221; methods</p>
<pre><code>  @result.first.keys
  =&gt; ["text", "id", "created_at"]
</code></pre>
<p>Now it&#8217;s done. Go back to &#8220;Editing Source Adapter&#8221; page, click &#8220;Show records&#8221;, then &#8220;Refresh object-value records&#8221;. This shouldwill show all recent tweets.</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/W58LsUSWyt3ttYNPtlJANg?feat=embedwebsite"><img src="https://i0.wp.com/lh3.ggpht.com/_k-QRXbUACBU/SZDHsD0OflI/AAAAAAAABUg/JlTPBaPtAkE/s800/twitter_part_01_refresh_public_timeline_1.jpg" alt="" /></a></p>
<p>Ummm, certain values are missing, such as &#8220;user&#8221;. By looking at original xml, you should see that certain attributes are nested, so just going through each key of hash won&#8217;t work. You need to iterate recursively every time value contains hash.</p>
<h4>Final code</h4>
<p>Here is the complete code including the change to recursively iterate through each tweets. I refactored the code by separating iteration part into &#8220;iterate<em>keys&#8221; and calls the method recursively if the hash value contains another hash. When you call iterate</em>keys, it also adds prefix, so &#8220;user&#8221; =&gt; {&#8220;screen<em>name&#8221;} will be stored into  &#8220;user</em>screen_name&#8221; key name at ObjectValue</p>
<pre><code>  class PublicTimeline &lt; SourceAdapter

    include RestAPIHelpers

    def initialize(source)
      super
    end

    def query
      uri = URI.parse(@source.url)
      res = Net::HTTP.start(uri.host, uri.port) {|http|
        http.get("/statuses/public_timeline.xml")
      }
      xml_data = XmlSimple.xml_in(res.body);
      @result = xml_data["status"]
    end

    def sync
      @result.each do |item|
        item_id = item["id"].first.to_i
        iterate_keys(:item =&gt; item, :item_id =&gt; item_id)
      end
    end

  private
    def iterate_keys(option)
      item = option[:item]
      item_id = option[:item_id]
      prefix = option[:prefix] || ""

      # item.keys =&gt; ["user", "favorited", "truncated"...]
      item.keys.each do |key|
        value = item[key] ? item[key][0] : ""
        if value.kind_of?(Hash) &amp;&amp; value != {}
          # eg. :user =&gt; {:url =&gt; 'foo} becomes user_url
          iterate_keys(:prefix =&gt; (prefix + underline(key) + "_"), :item =&gt; value, :item_id =&gt; item_id)
        else
          # This method is from rest_api_helper
          add_triple(@source.id, item_id, prefix + underline(key), value)
        end
      end
    end

    def underline(key)
      key.gsub('-','_')
    end
  end
</code></pre>
<p>This is the complete &#8220;Show Record&#8221;, including nested attributes, such as user_id/name/url</p>
<p><a href="http://picasaweb.google.co.uk/lh/photo/bXCzZHKBfotry1k0_hE_dg?feat=embedwebsite"><img src="https://i0.wp.com/lh4.ggpht.com/_k-QRXbUACBU/SZDHqy64PzI/AAAAAAAABUc/cbpdDZV0bxs/s800/twitter_part_01_refresh_public_timeline_2.jpg" alt="" /></a></p>
<h4>Next</h4>
<p>Since we now have a source adapter which loads public tweet, I will explain the code I wrote to display these tweets on iPhone simulator using Rhodes.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/02/10/making-twitter-mobile-client-with-ruby-using-rhodes-rhosync-part-1/feed/</wfw:commentRss>
			<slash:comments>47</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>

		<media:content url="http://lh4.ggpht.com/_k-QRXbUACBU/SZDHtMXraPI/AAAAAAAABUk/AtXmzerR5Ms/s800/twitter_part_01_public_timeline_source_adapter.png" medium="image" />

		<media:content url="http://lh3.ggpht.com/_k-QRXbUACBU/SZDHsD0OflI/AAAAAAAABUg/JlTPBaPtAkE/s800/twitter_part_01_refresh_public_timeline_1.jpg" medium="image" />

		<media:content url="http://lh4.ggpht.com/_k-QRXbUACBU/SZDHqy64PzI/AAAAAAAABUc/cbpdDZV0bxs/s800/twitter_part_01_refresh_public_timeline_2.jpg" medium="image" />
	</item>
		<item>
		<title>Hello world!</title>
		<link>https://rubyonmobile.wordpress.com/2009/02/07/hello-world/</link>
					<comments>https://rubyonmobile.wordpress.com/2009/02/07/hello-world/#comments</comments>
		
		<dc:creator><![CDATA[inouemak]]></dc:creator>
		<pubDate>Sat, 07 Feb 2009 22:53:59 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[This is my first post at Ruby On Mobile. I do currently work as Ruby On Rails Web developer, but got interested in mobile app development, even though I don&#8217;t own any smartphones, such as iPhone, T-mobile G1 nor Blackberry. Since I don&#8217;t know anything about mobile development nor any of mobile app development languages [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This is my first post at Ruby On Mobile. </p>
<p>I do currently work as Ruby On Rails Web developer, but got interested in mobile app development, even though I don&#8217;t own any smartphones, such as iPhone, T-mobile G1 nor Blackberry.</p>
<p>Since I don&#8217;t know anything about mobile development nor any of mobile app development languages such as ObjectiveC(iPhone), Java(Android, Blackberry), nor C++ (Symbian), first thing I did was to search if there were any way I could write mobile app using web technologies, like <a href="http://www.adobe.com/products/air/develop/ajax/">AdobeAir</a> does for desktop app.</p>
<ul>
<li><a href="http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/#more-330">To WebKit or not to WebKit within your iPhone app?</a></li>
<li><a href="http://ejohn.org/blog/iphone-javascript-apps">JavaScript iPhone Apps</a></li>
</ul>
<p>Embedding WebKit web browser into your mobile app locally seems interesting way to achieve mobile app development, but it seems not matured yet.</p>
<p>Then, I found this article.</p>
<ul>
<li><a href="http://www.infoq.com/news/2008/12/rhodes-iphone-winmobile-rim">Rhodes Brings Ruby Apps to iPhone, Windows Mobile, BlackBerry</a></li>
</ul>
<p>Not only being able to use HTML/CSS/Javascript, you can use Ruby to write mobile app. That sounds great!! The Framework (Rhodes and Rhosync) are inspired by Ruby On Rails, so they use same MVC , ORM, and so on.</p>
<p>As soon as I read the article, I started following <a href="http://wiki.rhomobile.com//index.php?title=Mobilizing_Your_Application_with_Rhomobile">tutorial</a> provided from Rhomobile, the company behind Rhodes and Rhomobile.</p>
<p>At this blog, I will write about my experience playing with Rhodes/Rhosync. </p>
<p>Since I named this blog as &#8220;Ruby On Mobile&#8221;, I will write about other Ruby related mobile projects and libraries as I find. I am also thinking about learning basic of Android, iPhone and Mobile Website development, so that I can compare which approach suits developing what type of mobile services.</p>
<p>Makoto</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rubyonmobile.wordpress.com/2009/02/07/hello-world/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/68c307c35298c5763b37a39bd24df27d8aa1d64a157946aa7fe037cc95f04d5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">inouemak</media:title>
		</media:content>
	</item>
	</channel>
</rss>
