rhaco2でhello, world

なにやらrhacoがおもしろそう。ちょっと試してみた。無謀にも絶賛開発中のrhaco2で!

実行環境の確認。

$ uname -a
Linux thinkpad 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux

$ apache2 -V
Server version: Apache/2.2.11 (Ubuntu)
Server built:   Apr  1 2009 16:03:38
Server's Module Magic Number: 20051115:21
Server loaded:  APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT=""
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

$ php --version
PHP 5.2.6-3ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23 2009 14:35:05) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Xdebug v2.0.4, Copyright (c) 2002-2008, by Derick Rethans

まずはrhacoリポジトリから取得。

$ svn co https://rhaco.svn.sourceforge.net/svnroot/rhaco/trunk/ rhaco2
$ svn info rhaco2
パス: rhaco2
URL: https://rhaco.svn.sourceforge.net/svnroot/rhaco/trunk
リポジトリのルート: https://rhaco.svn.sourceforge.net/svnroot/rhaco
リポジトリ UUID: 838d834a-3123-0410-b9a5-8bcc0e2cc032
リビジョン: 4627
ノード種別: ディレクトリ
準備中の処理: 特になし
最終変更者: rhaco
最終変更リビジョン: 4627
最終変更日時: 2009-05-29 17:40:15 +0900 (金, 29  5月 2009)

r4627だった。

__settings__.phpを作成。

<?php
require_once dirname(__FILE__).'/rhaco2/rhaco2';
application_settings(__FILE__, 'http://localhost/');

index.phpを作成。

<?php
require_once '__settings__.php';
$flow = new Flow();
$flow->output('index.html');

templates/index.htmlを作成。

hello, rhaco2.

http://localhost/にアクセスすると「hello, rhaco2.」と表示される。
ひとまず今日はここまで!

ためしたいこと

  • DBアクセス(O/Rマッパ)
  • 入力・確認・完了的なこと

いままで触ったフレームワークと違った感触でおもしろい、かも。