Is it possible to avoid using the MVC pattern when using Rails?

Some of the answers to the question I asked today today led me to question my assumption of the possibility of using Rails in a non-MVC mode as opposed to simply using microframes like Sinatra for barebone non-MVC applications.

Has anyone used Rails in a non-MVC fashion without any major problems, or could you imagine a suitable case for this?

+1


source to share


4 answers


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

If you just want a part of it, most often the activerecord, you can happily use it in any way you want.



But rails themselves are MVC, you will be working against it, trying to force it into a different paradigm.

+3


source


Yes it is possible, but the architects of the Rails Framework made it difficult to deviate from the MVC path for any reason. They want to reward "good" behavior and discourage "bad" behavior.



+2


source


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

If you're just writing a one-off application, you might want to look at Rails Metal or, as you mentioned, Sinatra.

+1


source


Again, why do you want to avoid MVC? MVC is a great thing.

+1


source







All Articles