Introduction of Rhodes
-
Upload
hitoshi-kuroyanagi -
Category
Technology
-
view
3.640 -
download
2
Transcript of Introduction of Rhodes
![Page 1: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/1.jpg)
Rhodesで遊んでみよう
@yas62kuro
![Page 2: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/2.jpg)
Rhodesの特徴
• マルチプラットフォームに対応したフレームワーク iOS開発時には OSXが必要
• ロジックを「Ruby」で記述できる
• ネイティブアプリケーションとして動作する
• ユーザーインタフェース開発はHTML/CSS/Javascriptで作成
• MVCアーキテクチャの採用等、Webアプリケーションフレームワーク「Ruby on Rails」の思想を継承
• ライセンスはMITライセンス
• ロイヤリティフリー、作成アプリの有料販売もOK
![Page 3: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/3.jpg)
マルチプラットフォーム
• Android Android 2.1 and greater
• iOS All versions of iPhone 3.0 or greater, iPad
• Windows Phone 7 Latest Windows Phone devices
• BlackBerry BlackBerry 4.6, 4.7, 5.0, 6.0, 7.0
• Windows Mobile Windows Mobile 6.x Professional, 6.0 Standard
![Page 4: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/4.jpg)
アーキテクチャ
![Page 5: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/5.jpg)
開発イメージ
RubyでWebアプリを作るイメージ
ビューは、ERBテンプレート使ったHTMLレンダリング、CSS、Javascript(JQuery,JQuery Mobile)
任意のJavascriptライブラリも使える。
それじゃぁ、WEBアプリじゃん (ー_ー)!!
![Page 6: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/6.jpg)
スマホ機能へのアクセス
• カメラ、GPS、Barcode、BlueTooth、NFC • 電話帳、カレンダー操作 • XML、Json解析は標準提供 • ローカルDB制御機能は標準提供 • 用意されてないものは、Java,Objective-Cで作成した
extensionで拡張できる。
詳しくは、 公式ドキュメントを見てください。 http://docs.rhomobile.com/rhodes/device-caps
![Page 7: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/7.jpg)
必要な環境
• OS
Windows XP/Vista/7 Linux OSX
• 必須アプリ
JDK 1.6.0_2以降 make 3.80以降 Ruby 1.8.7以降 RubyGems 1.3.4以降 AndroidSDKなどの各プラットフォーム用SDK
![Page 8: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/8.jpg)
まずはRuby環境から
• http://rubyinstaller.org/ からWindows用インストーラーをダウンロードしてインストール インストール先は C:¥Ruby193
• 今回は Ruby 1.9.3-p194 を選択 • 後で使うのでDevKitもダウンロードしておく
DevKitは C:¥DevKitに解凍しておく
![Page 9: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/9.jpg)
Ruby環境の確認
• スタートメニューから Ruby 1.9.3-p194/Start Command Pronpt with Ruby をクリック
• コマンドラインから ruby –v を入力する
![Page 10: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/10.jpg)
次にDevKitの設定 • 設定後にgem インストールができて、 実行できればOK
![Page 11: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/11.jpg)
Android 開発キットも忘れずに
• JDK6 Titaniumもそうだけど JDK1.7は非推奨です。 環境変数に、JDKの PATH JAVA_HOMEを設定しておく 環境変数設定したら念のためログインし直した方がいいと思います。
• Android SDK • Android NDK ※ インストール場所はフォルダ名に空白や日本語含まない場所にしておく
![Page 12: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/12.jpg)
そしてRhodes
• スタートメニューから Ruby 1.9.3-p194/Start Command Pronpt with Ruby をクリック • > gem install rhodes 文字コード関係でワーニング出るけど無視 • > rhodes-setup We will ask you a few questions below about your dev environment. JDK path (required) (C:/jdk1.6.0_33): Android SDK path (blank to skip) (): C:¥Android¥android-sdk Android NDK path (blank to skip) (C:/Android/android-ndk-r8): Windows Mobile 6 SDK CabWiz (blank to skip) (): BlackBerry JDE 4.6 (blank to skip) (): BlackBerry JDE 4.6 MDS (blank to skip) (): BlackBerry JDE 4.2 (blank to skip) (): BlackBerry JDE 4.2 MDS (blank to skip) (): インストールしたパスを設定する。 BlackBerryとか聞いてくるけど、入れてないからそのままリターンキーでスキップする
![Page 13: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/13.jpg)
更にRhoStudio
• Motorola RhoMobile Suite Installer for Windowsをhttp://docs.rhomobile.com/rhodes/install のページの Installing on Windows あたりのリンクから ダウンロードしてインストール
• Eclipseなのでpluginとしてもインストールできます
![Page 14: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/14.jpg)
RhoStudio使ってみる
• スタートメニューからMotorola RhoStudioのアイコンクリックして立ち上げる
こういうスプラッシュで起動します。
![Page 15: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/15.jpg)
RhoStudio使ってみる • Windows>Preferenceを開いてJDKのパスを設定する
![Page 16: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/16.jpg)
RhoStudio使ってみる
• Android SDK,NDKのパスを設定する
![Page 17: Introduction of Rhodes](https://reader034.fdocument.pub/reader034/viewer/2022052602/55a05ca91a28abf4678b4846/html5/thumbnails/17.jpg)
参考記事
http://docs.rhomobile.com/ -- Rhodesドキュメント
ツールで楽々!Androidアプリ開発 -- ITPro 連載記事
https://github.com/rhomobile -- Github
Background Picture credit Title: Fender Rhodes Mark I http://www.flickr.com/photos/27485954@N07/4944195629/ By rockheim