views:

88

answers:

3

Hey guys,

This is a bit of a weird meta-programming question, but I've realized that my new project doesn't need a full MVC framework, and being a rails guy, I'm not sure what to use now.

To give you a gist of the necessary functionality; this website will display static pages, but users will be able to log in and 'edit their current plans'. All purchasing and credit card editing is being handled by a recurring payment subscriber, I just need a page to edit their current plan. All of that will be done through (dynamic) XML API calls, so no database is necessary.

Should I stick with my typical rails/nginx stack, or is there something I could use that would lighten the load, since I don't need the Rails heft. I'm familiar with python and PHP but would prefer not to go that route. Is Sinatra a good choice here?

tl;dr: What's a good way to quickly serve mostly static pages, preferably in Ruby, with some pages requiring dynamic XML rendering?

+4  A: 

If you want to stick with Ruby, Sinatra would be fine, as would Rails Metal.

x1a4
I actually haven't heard of Rails Metal before, thanks!
danny z
A: 

If you know Rails, then why not just stick with it? That way you can use all authentication features, etc. that you're used to without having to learn another platform and incur the implementation risks that that includes. If the application ever grows beyond what's expected you're already on a solid base.

Trevor Tippins
My reasoning for looking outside rails is that I don't need the weight of the entire codebase for something so simple. The only dynamic content here is through API calls, and that includes authentication. All I have to do is quickly serve the static pages, and then be able to dynamically generate XML into views, and parse XML from requests.
danny z
@Danny Z: I understand what you're saying but when you add another framework into the mix though, you're increasing the overall complexity of your solution portfolio that you have to support as you've got to learn the new framework, work out deployment, track changes to it, etc. Unless you've really tight constraints on the runtime being imposed by the customer you're sometimes best to just stick to what you know. Just my $0.02 worth.
Trevor Tippins
This line of thinking leads to 'all I have is a hammer so every problem is a nail.'
x1a4
+2  A: 

If you're feeling a bit adventurous and want to get some useful experience with the technology that rails uses you could try building a Rack application. It's a pretty simple API to be able to respond to generic HTTP queries, and from there you can quickly build static file handling and XML processing. It's also considerably faster to start up and serve pages than rails.

http://github.com/cloudhead/toto is an example of a decent Rack based application.

Ceilingfish
Looking into it, thanks! Do you have any suggestions for a good 'how-to' read? Or anything of the sort
danny z
There's a railscast on this actually. That'd possibly be a good place to start http://railscasts.com/episodes/151-rack-middleware. He's integrating it into rails in that episode, but it introduces you to the API.
Ceilingfish