After all the installations are done using Instant rhodes, one click installations to Rhodes, Rhosync, ruby, make and what not 😉
Dont have it yet download it from here : Installations
Generate rhodes application
$ rhodes app storemanager http://localhost:9292/application
This will generate an application directory called “storemanager” with several files. Note also that the third argument above is the URL to the RhoSync server data source (“required only in the case u will be using rhosync server, one can omit the URL for pure RHODES app”)
After creating our application, lets generate model for our app, go to the app folder :
$ cd storemanager
Test it by building the app for your device simulator, i work on blackberry so let me rake it for BB for iphone just replace BB by iphone
$ rake run:bb
or $ rake run:iphone
U’ll nother its a blank application right now, we need a model for it, so lets generate one :
$ rhodes model product brand,name,price,quantity,sku
Model name is Product and rest are various attributes it has, if you are families with ruby on rails this is similar to scaffolding, but even if you are not it does not matter.
Lets get back to what this post is all about saying “Hello World”
Edit the app/index.erb
to create some content or app/index.bb.erb in case of BlackBerry, link your index page to another erb page :
<div class="toolbar">
<h1 id="pageTitle">
Small demo app
</h1>
</div>
<ul id="home" selected="true" title="Hello">
<li><a href="another.erb">Hello, world which links to another page</a></li>
</ul>
Lets test it :
$ rake run:bb
or $ rake run:iphone
u can also run the same app for your Android.
Is it done, Yes it is : Its that simple 🙂