« Google App Engineで予約管理アプリケーションを作ってみた
» OSXにLaTeX環境(Emacs+YaTex+LaTex+TeXShop)を構築してPDFプレビューする

Article (記事)

GoogleAppEngineOil 0.1安定板 0.2アップデート

09.27.08 | Comment?

ようやくベータが外れ、GoogleAppEngineOil(GAEO)のバージョン0.1の安定板リリースされています。

更に進行中の0.2には次のような機能が追加されています。

1. respond_toサポート

ルーティングルールに r.connect(’:controller/:action/:id.:format’)と書くことで、次のようにrespond_toメソッドを利用できます。

self.respond_to(
html=lambda: self.render('<h1>Hello World</h1>'),
js=lambda: self.render(script='alert("hello, world")')
)

http://www.example.com/foo/bar.htmlの場合は<h1>Hello World</h1>の行をhttp://example.com/foo/bar.jsの場合はjavascriptの行を実行させることができます。

2. XHRリクエスト判別

GAEOはX-Requested-WithをつかってXMLHttpRequestオブジェクトによってリクエストされたか調べます。

self._is_xhrでTRUE/FALSEを判別できます。

3. renderメソッドにscriptタイプ追加

self.render(script=”alert(’!'”)のようにして、text/javascriptデータを送信できます。

4. RESTメソッド

self._request_methodを使用して’get’, ‘put’, ‘head’などのリクエストメソッドを判別できます。

Railsにできるだけ近づこうとしているのでしょうか。今後ともGAEO楽しみです。

Tags: ,

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« Google App Engineで予約管理アプリケーションを作ってみた
» OSXにLaTeX環境(Emacs+YaTex+LaTex+TeXShop)を構築してPDFプレビューする