Liquid Fire Posted March 14, 2008 Share Posted March 14, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/96226-convention-or-configuration/ Share on other sites More sharing options...
dbo Posted March 15, 2008 Share Posted March 15, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/96226-convention-or-configuration/#findComment-492680 Share on other sites More sharing options...
Stopofeger Posted March 17, 2008 Share Posted March 17, 2008 convention. cause that is how ruby on rails or cake is so popular. convention makes things easier for coders. the flexibility is not there but for commercial application time and money is more important than flexibility. Quote Link to comment https://forums.phpfreaks.com/topic/96226-convention-or-configuration/#findComment-493917 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.