[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby web application without Rail

anne001

1/27/2006 4:25:00 PM

I would run a web application which displays images in a timed fashion,
and returns view info (IP, name... ) and the viewers response (response
time, key press)...

Can I do this with ruby and XXX? All I need is a text listing with all
the info per session, so I don't really need a database. I have done it
with flash but I would like it to be programmable, so we don't have to
deal with flash and how it thinks.

I was looking at http://www.railt... and read on a blog on it
"The key is periodically_call_remote, since there is no way to directly
tell someone elses browser when you make a move."

But in my case, the server side would wait until a response was given
to show the image, so there is no real time communication between the
server and the client.

thanks for your advice. I thought rails would do it, but now I think
maybe it is way overkill.

9 Answers

anne001

1/27/2006 7:28:00 PM

0

"Ruby is extremely general-purpose, so we can't really call it a "Web
language;" but in fact it is very well-suited for Web applications. Web
frameworks blossom in the Ruby community like violets in the spring:
IOWA, Borges, Amrita, Nitro, Cerise, Rails, and others."

Some packages like Cerise was updated nov 2005, iowa and borges have
not been updated since 2004, not a good sign, Nitro seems to be active,
supporting Ajax whatever that is.

Can someone help me find my way to the best alternative to Rails for my
application? I don't know much about web application, so examples,
documentation etc are important

konsu

1/27/2006 7:41:00 PM

0

hello,

suppose someone suggested that you do your application using the framework
called "refrigerator", or whatever, would this help you? i mean you would
still need to look at this refrigerator thing and decide by your self
whether you should use it. so noone really can make a valuable advice for
you. i myself studied or read about almost all of the applications that you
listed and found that all of them are overkill so i am writing stuff from
scratch. but i am from russia, we have a tendency to create problems from
thin air and then solve them. ;-)

konstantin

"anne001" <anne@wjh.harvard.edu> wrote in message
news:1138390081.049325.30190@g44g2000cwa.googlegroups.com...
> "Ruby is extremely general-purpose, so we can't really call it a "Web
> language;" but in fact it is very well-suited for Web applications. Web
> frameworks blossom in the Ruby community like violets in the spring:
> IOWA, Borges, Amrita, Nitro, Cerise, Rails, and others."
>
> Some packages like Cerise was updated nov 2005, iowa and borges have
> not been updated since 2004, not a good sign, Nitro seems to be active,
> supporting Ajax whatever that is.
>
> Can someone help me find my way to the best alternative to Rails for my
> application? I don't know much about web application, so examples,
> documentation etc are important
>


anne001

1/27/2006 8:06:00 PM

0

"I myself studied or read about almost all of the applications that you

listed and found that all of them are overkill"

Does that mean that ruby by itself can run a web application?

konsu

1/27/2006 8:37:00 PM

0

i think the answer is yes, unless i misunderstood the question.

i think what you are asking is whether it is possible to write a web
application in ruby using nothing but the standard ruby libraries and no
gems such as rails or nitro. yes it is possible. for example, if you run a
web server that supports cgi, you can write a program in ruby that outputs
text that conforms to the cgi standard. then, if you tell your web server to
run this program when a http request arrives, the server will do it and will
send the program's output to the client. this is it. so you can write just
any code as long as it emits valid text. this can be done in "pure" ruby.

konstantin


"anne001" <anne@wjh.harvard.edu> wrote in message
news:1138392376.509361.107130@g49g2000cwa.googlegroups.com...
> "I myself studied or read about almost all of the applications that you
>
> listed and found that all of them are overkill"
>
> Does that mean that ruby by itself can run a web application?
>


jsp408

1/27/2006 11:50:00 PM

0

I have use the set of ruby codes called "Catapult" (
http://www.jamesbritt.com/code... ) for many of months to
prototype and test web based codes.

Synopsis
=======
Catapult is a simple WEBrick instance intended to execute code defined
by URL paths.
A Catapult instance assumes URLs follow a known structure
http://localhost:8080/classname/path/info/stuff
This essentially translates to calling
obj ||= Classname.new()
obj.run( "path/info/stuff" )

The results of calling run are then send back via WEBrick

Happy computing, John

anne001

1/28/2006 2:05:00 PM

0

What is RubyScript? Where can I find info about it?
Can ajax be used directly with ruby, without rails?

Here is a post I found:

> >I have done some searching on the web and have found very little about RubyScript. Any browsers support this?
>
> This worked for me in IE6:
>
> <html>
> <head>
> <script for=window event=onload language=RubyScript>
> @window.alert "Hello World !"
> </script>
> </head>
> <body>Hello World!</body>
> </html>
>
> See:
> http://arton.hp.infoseek.co.jp/...
> http://www.mvps.org/scripting/...
>
> I don't like the Javascript in Ajax, using RubyScript as a replacement would be cool.

>Of course, this will only work if the user has RubyScript installed on their system - not necessarily practical for public web applications.

konsu

1/28/2006 8:29:00 PM

0

hello,

this link might help: http://arton.hp.infos...

rails is a server side framework. rubyscript is a client side software. they
are independent.

i would not rely on rubyscript because your users would have to install it
on their machines to run your programs, thus making your web site less
attractive.

konstantin

"anne001" <anne@wjh.harvard.edu> wrote in message
news:1138457078.677845.182770@o13g2000cwo.googlegroups.com...
> What is RubyScript? Where can I find info about it?
> Can ajax be used directly with ruby, without rails?
>
> Here is a post I found:
>
>> >I have done some searching on the web and have found very little about
>> >RubyScript. Any browsers support this?
>>
>> This worked for me in IE6:
>>
>> <html>
>> <head>
>> <script for=window event=onload language=RubyScript>
>> @window.alert "Hello World !"
>> </script>
>> </head>
>> <body>Hello World!</body>
>> </html>
>>
>> See:
>> http://arton.hp.infos...index.html
>> http://www.mvps.org/scripting/...
>>
>> I don't like the Javascript in Ajax, using RubyScript as a replacement
>> would be cool.
>
>>Of course, this will only work if the user has RubyScript installed on
>>their system - not necessarily practical for public web applications.
>


anne001

1/29/2006 12:15:00 AM

0

Thanks konsu

I found some evidence that cgi might be the way to go, at least at
first:
"CGI programs are designed to run on a web server, and, unlike standard
HTML web pages, these programs can be used to create a dynamic,
interactive web experience for the user. "
found in a description of the book
How to Conduct Behavioral Research over the Internet : A Beginner's
Guide to HTML and CGI/Perl (Methodology In The Social Sciences)

Once I see how what this person does with CGI/Perl, I should be able to
figure it out with CGI/Ruby

I found a website that should get me started
"This month, we take an initial look at Ruby, examining simple ways to
create Web applications with the basic Ruby language and libraries. "
http://www.linuxjournal.com/ar...

Thank you for all your help

konsu

1/29/2006 1:20:00 AM

0

hello.

i am happy i was able to help a bit.

this article seems to be precisely what one needs to start with writing cgi
with ruby. the standard cgi.rb library that the article uses provides all
the functionality needed. the fancy libraries such as rails et all are all
based on this cgi.rb code. at least in my opinion. hence they are not
necessary.

konstantin

"anne001" <anne@wjh.harvard.edu> wrote in message
news:1138493720.484087.53720@z14g2000cwz.googlegroups.com...
> Thanks konsu
>
> I found some evidence that cgi might be the way to go, at least at
> first:
> "CGI programs are designed to run on a web server, and, unlike standard
> HTML web pages, these programs can be used to create a dynamic,
> interactive web experience for the user. "
> found in a description of the book
> How to Conduct Behavioral Research over the Internet : A Beginner's
> Guide to HTML and CGI/Perl (Methodology In The Social Sciences)
>
> Once I see how what this person does with CGI/Perl, I should be able to
> figure it out with CGI/Ruby
>
> I found a website that should get me started
> "This month, we take an initial look at Ruby, examining simple ways to
> create Web applications with the basic Ruby language and libraries. "
> http://www.linuxjournal.com/ar...
>
> Thank you for all your help
>