views:

182

answers:

4

Some of the responses to a question I asked today earlier today have caused me to question my assumption that it should be possible to use Rails in a non-MVC manner as opposed to simply using a microframework like Sinatra for barebones non-MVC-type apps.

Has anyone used Rails in a non-MVC manner without it causing major problems or could you imagine an appropriate case for doing so?

+1  A: 

Not only should you use MVC with Rails, but MVC is a good idea in general.

If you're just writing some one-off-ish app then you might look at Rails Metal or, as you already mentioned, Sinatra.

thenduks
+3  A: 

What do you want to build? If you want to use all of rails, MVC is the way to go. Even a tiny framework like camping is MVC.

If you just need a part of it, most commonly, activerecord, you can happily use it any way you want.

But rails itself is MVC all the way, you'd be working against it trying to coerce it into another paradigm.

kch
+2  A: 

Yes, it is possible, but Rails framework architects made it difficult to stray from the MVC path for a reason. They want to encourage 'good' behavior and discourage 'bad' behavior.

MedicineMan
+1  A: 

Again, why do you WANT to avoid MVC? MVC is an excellent thing

cpjolicoeur