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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.