MobileMeで使われているとされるSproutCoreを試す1
先日のWWDC 2008で発表されたMobileMeに使われているとされるSproutCoreを試してみました。
本家のチュートリアルを参考にしています。
まずはインストール
JavaScriptのフレームワークなのになぜかgemでインストールできるようです。
sudo gem install sproutcore
Macにインストールしたところ以下のように10個もインストールされました。
sudo gem install sproutcore Password: Updating metadata for 142 gems from http://gems.rubyforge.org/ ............................................................................................ .................................................. complete Building native extensions. This could take a while... Successfully installed abstract-1.0.0 Successfully installed erubis-2.6.2 Successfully installed json_pure-1.1.2 Successfully installed rspec-1.1.4 Successfully installed rack-0.3.0 Successfully installed hpricot-0.6 Successfully installed mime-types-1.15 Successfully installed merb-core-0.9.3 Successfully installed rubigen-1.3.2 Successfully installed sproutcore-0.9.9 10 gems installed Installing ri documentation for json_pure-1.1.2... Installing ri documentation for rspec-1.1.4... Installing ri documentation for rack-0.3.0... Installing ri documentation for hpricot-0.6... Installing ri documentation for mime-types-1.15... Installing ri documentation for merb-core-0.9.3... Installing ri documentation for rubigen-1.3.2... Installing ri documentation for sproutcore-0.9.9... Installing RDoc documentation for json_pure-1.1.2... Installing RDoc documentation for rspec-1.1.4... Installing RDoc documentation for rack-0.3.0... Installing RDoc documentation for hpricot-0.6... Installing RDoc documentation for mime-types-1.15... Installing RDoc documentation for merb-core-0.9.3... Installing RDoc documentation for rubigen-1.3.2... Installing RDoc documentation for sproutcore-0.9.9...
プロジェクトの作成
sproutcore hello_world
とすると以下の内容のプロジェクトが作成されます。
README clients frameworks lib log public sc-config.rb
動作確認
作成したプロジェクトディレクトリに移動してsc-serverコマンドを実行し、
http://localhost:4020/hello_world
にブラウザでアクセスすると動作確認ができます。
cd hello_world sc-server
まとめ
まるでrailsのようですね...
まだ、少ししか触っていないですが、面白そうなフレームワークです。
SproutCoreでググってみましたが、日本語ではプログラムするのに参考になるサイトは見つかりませんでした。
本家のドキュメントを参考に少しずつ勉強してみます。