Rails : HTML only?

Hi,

Last week, someone asked me if Rails is limited to (r)html (so webapps)
only.
My first answer was ‘yes’ - because I think the inner workings of Rails
is http-specific.
After some googling, I came up with this link :
http://weblog.rubyonrails.org/2005/01/25/rich-clients-with-rails-and-xul/
and http://www.zedshaw.com/projects/cookbooxul/ , where Zed S. does
a little rails-hacking and uses XUL for the V in the MVC… and got a
bit excited.

So I was just wondering… Is Rails really limited to html?
I believe it would be nice to use Rails - or more the philosophies of
Rails - for a desktop-application oriented framework.
It would mean to lose a bit of simplicity, but gaining a lot more
flexibility.

Just wondering - Is this possible with Rails?

Don’t get me wrong - I enjoy Rails for developing webapps, but I would
love it even more if I could use it all the time!

On 10/16/06, Joram [email protected] wrote:

Hi,

Last week, someone asked me if Rails is limited to (r)html (so webapps)
only.
My first answer was ‘yes’ - because I think the inner workings of Rails
is http-specific.

Well its HTTP specific, but that means that it is easily applied to
anything
that you could normally send over HTTP, which does include web-services
a-like stuff, XML and dynamically formatted text files.

In fact there is a proliferation of View technologies in Rails. rhtml
templates
are probably the most familiar technology, but by no means the only one.

That’s correct. And I could do that - but that means also more work
when creating the GUI (as by using the http protocol all the time) with
the ruby gtk-bindings.
What I mean is a system like Rails: the variables of the controller are
visible in the view for example.

Rails is a web framework. It’s geared toward responding to internet
requests, whether through a browser or machine-to-machine as web
services or email responders.

However, Ruby can be used for anything any other mainstream high-level
language can be used for, including GUI apps… and most relevant to your
original question, you can use parts of the Rails framework in non-web
applications. A component of Rails that makes sense for many people for
non-web applications is ActiveRecord, which is useful for any kind of
SQL database work.

It’s like any other language. People create desktop GUI apps with Java,
VB and Python all the time, but nobody makes desktop GUI apps with JSP
or whatever (Java), ASP (VB) or Zope (Python).

I have no idea whether or not there’s an MVC Ruby framework for GUI
apps. If you don’t find that answer here or on Google, you may want to
ask a Ruby list.

Joram wrote:

That’s correct. And I could do that - but that means also more work
when creating the GUI (as by using the http protocol all the time) with
the ruby gtk-bindings.
What I mean is a system like Rails: the variables of the controller are
visible in the view for example.

Thanks for the clarification,
that makes a lot of sense. It’s not that I needed it for my current
project, but the person who guides my project did ask that question.