# Rails : HTML only?

**URL:** <https://www.ruby-forum.com/t/rails-html-only/72329>\
**Category:** Rails\
**Created:** [October 16, 2006, 3:00pm UTC](https://www.ruby-forum.com/t/rails-html-only/72329 "2006-10-16T15:00:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Joram](https://www.ruby-forum.com/u/Joram)\
**Post date:** [October 16, 2006, 3:00pm UTC](https://www.ruby-forum.com/t/rails-html-only/72329/1 "2006-10-16T15:00:33Z")

</div>

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/](http://weblog.rubyonrails.org/2005/01/25/rich-clients-with-rails-and-xul/)  
and [http://www.zedshaw.com/projects/cookbooxul/](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!

---

<div class="post-metadata">

**Author:** ![Joram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Joram](https://www.ruby-forum.com/u/Joram)\
**Post date:** [October 16, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/rails-html-only/72329/2 "2006-10-16T16:03:41Z")

</div>

On 10/16/06, Joram [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![Joram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Joram](https://www.ruby-forum.com/u/Joram)\
**Post date:** [October 16, 2006, 11:21pm UTC](https://www.ruby-forum.com/t/rails-html-only/72329/3 "2006-10-16T23:21:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Joram](https://www.ruby-forum.com/u/Joram)\
**Post date:** [October 16, 2006, 11:47pm UTC](https://www.ruby-forum.com/t/rails-html-only/72329/4 "2006-10-16T23:47:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Joram](https://www.ruby-forum.com/u/Joram)\
**Post date:** [October 17, 2006, 12:43pm UTC](https://www.ruby-forum.com/t/rails-html-only/72329/5 "2006-10-17T12:43:05Z")

</div>

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.
