Eleven !!

by tanabe on March 09, 2005

Matzにっき」 さんで紹介されているElevenが面白い。
紹介の記事はこちら。「[言語] Eleven

「面白いのはセッション状態変数をすべてMySQLデータベースに記録するので、セッション管理などは暗黙的に行われる(これをstatesafe variableと呼ぶ)。」

「それぞれのdisplayがWebアプリケーションの各画面に相当しており、ロジックが非常にわかりやすい。画面遷移の記述として非常に直感的だ。すばらしい。」


公式サイトの紹介文句はこのようなもの。

「Eleven is a programming language for creating reliable, scalable web applications. Applications are expressed in a high-level language with a simple, C-like syntax, from which the Eleven compiler generates complete, ready-to-run implementions in PHP or mod_perl.

Eleven is designed for applications in which rapid development, high performance, and stability are critical - but total control over the look and feel is not (since Eleven generates most of the user interface automatically). Good examples are online exams and surveys, electronic voting, and business workflow applications.

Upon receiving each HTTP request, Eleven applications read their state from a relational database, resume the application until the next web page is generated, save their state to the database, then send the HTTP response to the client. This architecture is called statesafe.」

Webアプリケーションの開発に特化したプログラミング言語なのだけど、何が面白いってそのシンプルな表現。もうにやにやしながら読んでしまった。

ぜひまつもと氏の所に掲載されているサンプルコードと動作結果を見てほしい。プログラミングの知識がなくても、ある程度動作の予測ができてしまうのではないだろうか。

下記の言葉の通り、機能性としてはRuby on Railsなどを使えば、なんらRubyが劣るようなものでは(現時点では)ないのだけれど、なんともシンプルで直感的なサンプルコードに叩きのめされた感がある。言語はユーザーインターフェースだというのを思い出さされる体験だ。

プレゼンテーションとロジックの分離のような最近のWebアプリケーションサーバーでのはやりの仕組みはどうなっているのかという点も気にならないではないが、基本的な方向性は非常に共感できる。

この方向性を維持したまま、Webアプリケーションデザインのための言語として発達していった姿をぜひ見てみたいと思った。

一方で、途中から頭を離れなかった「ある考え」をやっぱりまつもと氏も考えた模様。

「で、考えてみると、これって別に新しい言語を導入しなくても、 Rubyのブロックとインスタンス変数を使ってライブラリで実現できそうだ。」

「だれかElevenのアイディアをRubyのライブラリとして実装しようという人はいないだろうか。」

これ、熱望。