Monday, October 10, 2011

Motorola Solutions acquires Rhomobile


It is officially announced yesterday that Motorola Solutions has acquires Rhomobile. So this ruby based Mobile Framework is now part of  Motorola Solution. Few week back it was announced that HTML5 based Mobile Framework Phonegap is acquire by Adobe.  So is it Mobile/HTML5 buzz?
Motorola  announced the availability of Motorola RhoElements, a state-of-the-art web-based application framework. It is designed to allow businesses to quickly and cost-effectively develop and deploy web-based applications on existing Motorola Windows Embedded Handheld (formerly known as Windows Mobile) and Windows Embedded Compact (Win-CE) mobile computers as well as Motorola’s recently announced ET1 Android-based enterprise tablet.

These are the key notes of acquisition:
  • All Rhomobile products will continue to be sold and supported globally.  
  • Rhodes will continue to be available open source under the MIT License.
  • They are committed to supporting the Rhomobile community and continuing the open source heritage of Rhodes
  • They also announced their updated Windows Mobile focused mobile browser  now called RhoElements. 
  • Motorola Solutions will provide the scale, resources, industry knowledge, and broader base of partners and channels to accelerate universal adoption of Rho technology



Reference :
http://mediacenter.motorolasolutions.com/Press-Releases/Motorola-Solutions-Offers-Industry-s-First-Framework-for-Developing-HTML5-Applications-on-Windows-Embedded-Handheld-and-Windows-CE-Devices-3741.aspx

http://www.marketwatch.com/story/motorola-solutions-offers-industrys-first-framework-for-developing-html5-applications-on-windows-embedded-handheldtm-and-windows-cetm-devices-2011-10-10

http://techcrunch.com/2011/10/10/motorola-launches-rhoelements-an-html5-framework-for-building-mobile-apps-for-enterprise/

Thursday, September 22, 2011

git branching

There is very nice example given by Satish Talim on git Branch on Google +. Though it is basic but I like the example, that's why sharing the link:


Satish Talim - Google+ - The Free, Online Git / GitHub 101 Course ( Link to Day 7 -…:

'via Blog this'

Thursday, September 1, 2011

Rhomobile Ipad Example- You Tube Client

We will create a Rhomobile ipad application which will search youtube videos and will playback this videos. It is just an example and our purpose is to explore Rhomobile AsyncHttp methods. We will connect to You tube search API. 


Step 1.) Create Rhodes application :
              rhogen app youtube_client
   
Step 2.)  Go to application directery:
              cd youtube_client/

Step 3.)  Create a controller Youtube

Step 4.) Create action search and search_result in youtube_controller.rb



   def search

   end

    def search_result
        you_tube_url = "http://gdata.youtube.com/feeds/api/videos?q=" + @params['name'] + "&max-results=5&v=2&alt=jsonc"
        @youtubes= Rho::AsyncHttp.get(
                                       :url => you_tube_url
                                       )["body"]["data"]["items"]
    end

 We are using AsyncHttp to call You Tube search API. And @params['name'] contain the search term.

5.) Create search.erb 


<div data-role="page">


  <div data-role="header" data-position="inline">
    <h1>Search You tube</h1>
    
  </div>


  <div data-role="content">
    <form method="POST" action="<%= url_for :action => :search_result %>">    
          <div data-role="fieldcontain">
            <label for="name" class="fieldLabel">Name</label>
            <input type="text" id="youtube[name]" name="name" />
          </div>
      
      <input type="submit" value="Update"/>
    </form>
  </div>


</div>




6.) Create search_result.erb and add following code:


<div data-role="page" data-add-back-btn="false">


  <div data-role="header" data-position="inline">
    <h1>Search result</h1>
  </div>


  <div data-role="content">
    <ul data-role="listview">
      
         <% @youtubes.each do |youtube| %>
        <li>
      <center>
            <span class="title">
<%= youtube["title"] %></span><br>
<iframe width="400" height="400" src="http://www.youtube.com/embed/<%= youtube["id"]%>" frameborder="0" allowfullscreen></iframe></center>
<span class="disclosure_indicator"></span>
      
        </li>
    
    <% end %>      
    </ul>
  </div>


</div>







7.) Link the search.erb to home page(by default it is index.erb in app folder.

8.) If you creating it for ipad add following line in build.yml under iphone.
      emulatortarget: ipad
If you creating this app for iphone or Android you can skip this step.

You can Download this code from : https://github.com/nalwayaabhishek/YouTubeClient 

Tuesday, August 16, 2011

Connect Rails and Redis

These days Redis is getting very popular because of its document style storage and high performance. It is a persistent in-memory key-value store written in C by Salvatore Sanfilippo. Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

When to use Redis :
  • You want to access the data very fast.
  • Your data set is not big and it can fit in available RAM
  • And your data is not very critical if it loose due to any failure 

Install redis:
Download and install from http://redis.io/download


Start Redis
Go to terminal and type :
./redis-server
By default it will run on port 6379

Connecting Redis with Rails 
Once Redis is installed and running follow these steps:
1.) Open gemfile
gem 'redis', '2.1.1'
2.) Then go to your application directory from terminal and execute:
bundle install
3.)Go to following directory /config/initializers/ and create a file redis.rb
4.) Write the following code in redis.rb
$redis = Redis.new(:host => 'localhost', :port => 6379)
By default redis run on 6379, if you are running on different port change this port attribute.

All configuration is completed and now you can use $redis global variable from your rails application.
Checking the connection :
Go to rails console and type following command
 >$redis
=> Redis client v2.1.1 connected to redis://localhost:6379/0 (Redis v2.2.2)

Some Redis Examples
> $redis.set("website","itsallaboutruby")
=>"OK"
>$redis.get("website")
=>"itsallaboutruby"
>$redis.set("count",1)
=> "OK"
>$redis.incr("count")
=>2

Monday, August 1, 2011

Rhomobile Book

Finally My Book on Rhomobile has been publish with pactpub.

Now Its time to say Thanks.


I would like to express my gratitude to my family and friends especially Akshat Paul, Manu Singhal, and Anuj Bhargava who saw me through this book, who provided support, talked things over, read, wrote, offered comments, without which conceiving this book wouldn't have been possible.

Also, I would like to thank Sarah, Neha, Kartikey, Shubhanjan, and the PacktPub team who allowed me to quote their remarks and assisted in the editing, proofreading, and design. Writing a book was not my cup of tea but they made this complicated journey effortless.


Also I want to say big thanks to Reviewers:
Brian Moore :
Brian Moore is a Senior Engineer at Rhomobile, father of two, and quintessential hacker.
Brian began coding at the age of 12. His early love for everything technological led to a job with Apple shortly after high school. Since that time Brian has worked at a series of start-ups and tech companies taking on interesting technical challenges. Brian has become the
technical face of Rhomobile as he leads the Rhodes community in the latest Rhomobile innovation during the Friday webinars. When not guiding the next generation of Rhodes developers or hacking on a new debugger, Brian can be found climbing a hill in a remote Southern California desert in his baja bug.


Deepak Vora is a consultant and a principal member of the NuBean.com Software Company. Deepak is a Sun Certified Java Programmer and Web Component Developer, and has worked in the fields of XML and Java programming and J2EE for over five years. Deepak is the co-author of the Apress book Pro XML Development with Java Technology and was the technical reviewer for the O'Reilly book WebLogic: The Definitive Guide. Deepak was also the technical reviewer for the Course Technology PTR book Ruby Programming for the Absolute Beginner, and the technical editor for the Manning Publications book Prototype and Scriptaculous in Action. Deepak is also the author of the Packt Publishing book JDBC 4.0 and Oracle JDeveloper for J2EE Development, Processing XML documents with Oracle JDeveloper 11g, and EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g.

Other contributors:


Acquisition Editor
  • Sarah Cullington
Development Editor
  • Neha Mallik
Technical Editors
  • Ajay Shanker
  • Mohd. Sahil
Project Coordinator
  • Shubhanjan Chatterjee
Proofreader
  • Linda Morris
Indexer
  • Geetanjali Sawant
Graphics
  • Melwyn D'Sa
Production Coordinator
  • Melwyn D'sa
  • Cover Work
  • Melwyn D'sa


This is the link to buy the book :Rhomobile Book





Sunday, July 3, 2011

$(‘#form_id’).submit() does not work with Rhomobile+ jQtouch

If you are using Rhomobile and jQtouch together you may find that  $(‘#form_id’).submit();  will not work.  Use jQT.submitForm(‘.current form.yourFormClass’); instead of submit.

Thursday, May 5, 2011

Rhomobile IDE


 You may be wondering which IDE should I use for Rhomobile Development?

I’m writing this mainly as a guide for people just getting started with Rhomobile, so don’t freak out if you don’t see any editor. These are just some that I recommend you try if you’re first starting. 
All of these are free. 

You can use any IDE of your choice which support ruby.
One of the Best IDE for ruby are:
  • TextMate
  • NetBeans
  • Eclipse
  • Rhohub Online Editor
  • RhoStudio

I love to use Textmate on my Mac. For Windows you can use RhoStudio.

RhoStudio Beta,the IDE for Rhomobile technology is launched recently. It is a local Eclipse IDE that performs app generation, editing, and build of all Rhodes projects. 

So Start coding..enjoy...