I am starting a new type of community site app. Humble beginnings: No Rails, Shared host. This app is directed for building small community sites without rails, on a generic shared host with the usual (My)SQL database. And of course ruby 1.8-1.9 would be installed. What would you recommend for "abstracting away" the MySQL layer? Is Ruby/MySQL my lib, or is there something more.. abstract? And what does one use for Session management? I cannot find anything to solve this one. Everywhere I turn its just 'rails, rails, rails'. Sorry, this one is for people who cannot run rails. :) Thanks, TW
on 2007-02-25 06:36
on 2007-02-25 12:34
> What would you recommend for "abstracting away" the MySQL layer? Is > Ruby/MySQL my lib, or is there something more.. abstract? > > And what does one use for Session management? I cannot find anything to > solve this one. If you're looking to write your own software to do this, you might find inspiration in the Camping micro-framework: http://camping.rubyforge.org/files/README.html Camping uses ActiveRecord for its DB abstraction and also has a simple session management system : http://code.whytheluckystiff.net/camping/wiki/Camp... Best regards, Chris
on 2007-02-26 00:54
As in the other response to this post, I'd recommend Camping as a good Rails alternative for smaller sites. Also as mentioned in the other response, the Rails **library** for abstracting away the SQL layer is very very good in and of itself, and Camping uses it, it's called ActiveRecord.
on 2007-02-26 01:55
a On Sun, 25 Feb 2007 20:35:00 +0900, Chris Lowis wrote: > > Chris Thanks for the lead Chris and Giles, I immediately got Chris's advice, and am digging through the ActiveRecord classes in the api. :) Evening read is the Camping source... I want everything to be as simple and small as possible, but with security all over the place. Despite reading the Camping files through, I still get the impression that Camping requires its own mini-server, root access to server or Rails (and/or ActiveRecord) running in the server memory. This is not possible with many shared hosters, and in fact, to make code as universal as possible (aim here), it has to be php/perl-cgi type of app. Am I reading wrong into the Camping module description? My motivation for this project is exactly this type of misguided thinking that does *not* meet the needs of the larger web-community. Some of the typical questions that constantly pop up before me, in form of Ruby APIs and classes, are: Why is it with Ruby open source developers not supporting the most common hosting solution on the net (shared hosting)? In my experience 90% of all web projects could very well use a average shared hosting service (=web hotel) in terms of bandwidth, memory or database usage. Are these guys too "pro" to write software thats not running on a dedicated server? (lol) Or is it just too difficult for them to get it all working as fast and small as needed? Or is it all just a javanile inferiority? :p joking here Well, may be the solutions are out there, and I am barking up the wrong tree. The search goes on, thanks for the leads, I hope I can contribute my findings on this forum. TW
on 2007-02-26 02:33
> Why is it with Ruby open source developers not supporting the most common > hosting solution on the net (shared hosting)? Well, with Ruby in general, there's a **lot** of other stuff you can do with Ruby. There are plenty of Ruby open source developers who aren't even dealing with Web stuff in the first place. With Rails, the Rails leadership isn't afraid to just say no if there's some feature other people want them to add which they won't ever personally use. And there's always the stock answer with open source, which is that "you must be the change you wish to see" (to quote Gandhi), or, to give you the non-New-Agey translation, "if you care so much, get off your butt." The whole point of open source is that these things are built primarily by the people who need them. Seriously, though, I don't understand the question. I think there's missing information. Your situation isn't just limited by your host being a shared host, because I learned Rails on a shared host. Also, even in a situation where you can't install gems or otherwise act as root, I'm pretty sure you can use ActiveRecord or Camping (or any other pure-Ruby libraries) just by putting them in your include path.