[thelist] Ruby on Rails: why?

Paul Bennett Paul.Bennett at wcc.govt.nz
Thu Nov 15 14:20:10 CST 2007

Hi Mark,

Thanks for your responses. I think it is valuable to challenge the 'latest and greatest' thing and thinking about your points has caused me to challenge and clarify some of my thoughts around MVC vs. 'library' development.

In response:
MVC differs from library development in that the structure of the framework explicitly separates business logic, data extraction & manipulation and presentation. By the sounds of things, your own library may be closer to the spirit of MVC than you may think.

MVC frameworks do include a set of helpful classes / helpers to abstract away such things as data insertion / extraction, validation (although cakePHP's inbuilt validation model often needs tweaking / extending), printing html content etc. As such, you're correct in saying they may need extending or altering to fit your project needs. In a way I'm sure this is similar for your own library - it gets extended or altered according to the needs of the application you're working on.

One benefit of MVC frameworks (apart from logical separation) for 'newer' developers is that the function 'library' is already there, so they don't have to roll their own.

I'm not sure I understand your point regarding production and Wordpress. Wordpress is free open-source software, but apart from that isn't really related to MVC frameworks. Can you clarify?

As an aside, a few negatives of MVC I've found in cakePHP development are (feel free to correct me):
- code reuse
MVC isn't great for promoting code reuse. Things like behaviours and components aid in this but sharing classes between models isn't as simple as I'd like.

- validation
I've found the validation model in cakePHP to be buggy / hard to use. I usually build my own.

- documentation
cakePHP is a great framework but the learning curve could be lessened by better documentation. RoR has a definite edge here, as 37Signals and the rails core group have done a great job or not only promoting Rails but providing clear documentation and help resources. cakePHP's material to me is representative of a 'typical open source PHP project' - a great piece of software poorly promoted, poorly presented and with less than fantastic documentation...


More information about the thelist mailing list