# Is Rails the Right Choice?

**URL:** <https://www.ruby-forum.com/t/is-rails-the-right-choice/166366>\
**Category:** Rails\
**Created:** [April 24, 2009, 10:43am UTC](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366 "2009-04-24T10:43:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carmine\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@Carmine\_P](https://www.ruby-forum.com/u/Carmine_P)\
**Post date:** [April 24, 2009, 10:43am UTC](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366/1 "2009-04-24T10:43:31Z")

</div>

We are a group of developers that are about to start a project and so  
we are searching for the best tools and languages for the job. The  
project is essentially a “server” web application that holds data in  
XML, and answer to queries on that data through a REST interface, and  
a “client” web application that queries the server’s data and displays  
the results.  
But we have some restrictions that _we can’t do anything about_ (so  
please don’t discuss these choices):

1. We already have the URLs and XSDs for the REST interface, but the  
first are quite different from a correct REST implementation (no GET /  
person, but GET /getperson, and so on).
2. The philosophy behind this project is “Use the XML technologies as  
much as possible”, so a major requirement is to not use a db _at all_  
(no berkeley db xml, please).

So the questions are:

1. is ActiveResource flexible enough to allow us to customize URLs and  
XMLs for the REST interface, in the “server” and in the “client”?
2. is possible to do a Rails application without db? Are there any ORM  
things that will do the same job for XML data instead? If not, is  
possible to do that for mere mortals (with xpath/dom/sax as the  
preferred ways)?
3. is possible for RoR to validate the XML of every single REST query  
(input and output) using XSD?
4. is possible to render views using xslt? or better render in xml,  
leaving the xslt work to the browser?

And the 10-million dollars question: is Rails the Right Choice for  
that project? Is better suitable to write both the “server” and the  
“client” in Rails, or do just one (the “client” I think) in Rails and  
the “server” in another language/framework?  
If it’s not the RIght Choice for anything (“server” and “client”),  
there are any alternatives that will fit better for the job?

Sorry for the long post.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Carmine\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@Carmine\_P](https://www.ruby-forum.com/u/Carmine_P)\
**Post date:** [April 24, 2009, 10:50am UTC](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366/2 "2009-04-24T10:50:33Z")

</div>

On Apr 24, 9:39 am, Carmine P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> person, but GET /getperson, and so on).  
> 2. The philosophy behind this project is “Use the XML technologies as  
> much as possible”, so a major requirement is to not use a db _at all_  
> (no berkeley db xml, please).
> 
> So the questions are:
> 
> 1. is ActiveResource flexible enough to allow us to customize URLs and  
> XMLs for the REST interface, in the “server” and in the “client”?

you should be able to do this. you will have to do a little bit more  
work (to change from the defaults to what you want) but i think it  
would work (obviously talking in generalities here).

> 1. is possible to do a Rails application without db? Are there any ORM  
> things that will do the same job for XML data instead? If not, is  
> possible to do that for mere mortals (with xpath/dom/sax as the  
> preferred ways)?

You don’t have to have a database. There are a few projects like ROXML  
which I suppose you could describe as an ORM for xml.  
There are also specialised xml databases (eg mark logic, and i think  
ibm’s db9 does this too)

> 1. is possible for RoR to validate the XML of every single REST query  
> (input and output) using XSD?

Nothing builtin, but i’m sure that you could write before/after  
filters that would shove data through xmllint or libxml

> 1. is possible to render views using xslt? or better render in xml,  
> leaving the xslt work to the browser?

you can render xml views. many moons ago an app I worked on rendered  
xml and used an after\_filter to apply an xslt stylesheet to it (the  
plan had initially been for client side xslt but apparently there were  
browser compatibility issues)

Fred

---

<div class="post-metadata">

**Author:** ![Carmine\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@Carmine\_P](https://www.ruby-forum.com/u/Carmine_P)\
**Post date:** [April 26, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366/3 "2009-04-26T17:54:11Z")

</div>

On Apr 24, 4:39 am, Carmine P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. The philosophy behind this project is “Use the XML technologies as  
> much as possible”, so a major requirement is to not use a db _at all_  
> (no berkeley db xml, please).

I know that you said not to discuss it, but seriously, why on earth  
would this be a requirement?

Your other requirements specify that you’ll be search this “XML-not-  
DB” for data, possibly using parameters sent by the client. To me, it  
sounds awfully similar to a… database. The only thing using XML for  
storage will get you is buzzword-compliance, and slow results. Even  
with a fast XPath parser, why throw away decades of effort to build  
scalable, reliable databases?

Actually, I’m most amazed that you’re even allowed to consider Ruby.  
I’d have guessed that any management system that specifies all the  
URLs and imposes arbitrary restrictions would have specified an  
implementation language as well. Like, say, COBOL '68 on VMS handling  
EBCDIC…

–Matt J.

---

<div class="post-metadata">

**Author:** ![Carmine\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@Carmine\_P](https://www.ruby-forum.com/u/Carmine_P)\
**Post date:** [April 27, 2009, 9:05am UTC](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366/4 "2009-04-27T09:05:06Z")

</div>

On Fri, Apr 24, 2009 at 4:39 AM, Carmine P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 1. The philosophy behind this project is “Use the XML technologies as  
> much as possible”, so a major requirement is to not use a db _at all_  
> (no berkeley db xml, please).

I would check out Exists [http://exist.sourceforge.net](http://exist.sourceforge.net) It should meet  
your  
requirements as an XML technology and is fully accessible through  
RESTful  
protocols.

Michael

---

<div class="post-metadata">

**Author:** ![Carmine\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@Carmine\_P](https://www.ruby-forum.com/u/Carmine_P)\
**Post date:** [April 26, 2009, 6:22pm UTC](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366/5 "2009-04-26T18:22:53Z")

</div>

Il giorno 26/apr/09, alle ore 17:53, Matt J. ha scritto:

> I know that you said not to discuss it, but seriously, why on earth  
> would this be a requirement?

You’re right, but it’s a university project.
