Jump to content

convention or configuration


Liquid Fire

Recommended Posts

I am at the end of finishing my framework I have been building for the past 6 months and have a general question to ask, you you guy prefer convention, configuration, or a even mix of both?  I personally prefer configuration over convention mainly because it does not force a programmer to program a certain way however I do believe there are case where conventions are useful.  For instance in my framework you should be able to link a table with field 'ljfg', 'kjsdg', 'asherd', 'nsvruf' that is named 'im7bgv3d' to a model called user_model, with members 'id', 'username', password', 'status_id' or vice versa(even tho i have not fully tested anything like this).  The reason is that i configure the model class to the structure of the database table.  Now where i do using convention is model files have to have _model at the end of them and model controller files have to be the name of the model file without th e_model at the end but instead _controller at the end so something like user_model and user_controller.

 

So which do you prefer, convention of configuration or even mix of both and more importantly, why?

Link to comment
https://forums.phpfreaks.com/topic/96226-convention-or-configuration/
Share on other sites

Configuration, for the same reason you mentioned. I like the flexibility in coding style that it provides. I guess that's probably why I like Zend more than Cake/Code Igniter. Zend is more like a library of useful tools than a way of doing things.

 

Now that being said, I think that for large projects and commercial applications a convention approach is more appropriate. Interestingly enough, it's good for the same reason I dislike it. It makes people develop in the same way, so that developers can come and go, but be able to quickly jump into what was done before.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.