easyweb

  • Thread starter Eko Budi Setiyo
  • Start date
G

George Moschovitis

Congrats, for the release.
For you all that doing web programing usinng ruby and For you all that
comming from PHP may be interested with

Please allow me to add, that Nitro
(http://www.rubyforge.com/projects/nitro) is also a good choice for PHP
programmers comming to the Ruby world. If you like, you can avoid using
the MVC infrastracture (Rails style) or the programmatic renderer (Wee
style) and just write php-like scripts.

As a simple example just drop this file in the public directory of the
web server (typically called 'root'):

index.xhtml:

<html>
<body>

<?r if name = request['your_name'] ?>
Hello #{name}, how are you?
<?r else ?>
<form>
<b>What is your name?</b><br />
<input type="text" name="your_name" />
<br />
<input type="submit" />
</form>
<?r end ?>

</body>
</html>

and just hit:

localhost:9999/

However I would not suggest writing big application using this
style. Your best choice is to leverage Nitro's advanced MVC
infrastructure. But it is nice to have to get going (or for a small
hack).

(Just for the record, Nitro converts this file to a Rails style
controller behind the scenes).


regards,
George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,609
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top