Tuesday, August 27, 2013

PHP Project : How to handle general configuration data?

PHP Project : How to handle general configuration data?

I'm currently starting the conception of a new project that will use
either Zend Framework 2 or Symfony 2.
I am currently wondering, as I'm quite a newbie in data modeling and
application conception, how to handle general configuration data that
wouldn't be linked to my entities. For example, I have constants, numbers,
and maybe even texts and medias that should be configurable via an
administration and that concerns the whole application, but that is not
related to my Model data (for example, the maximum price of products, some
general ranges, etc.. that I don't know at all how to store). So, should I
:
Create a "parameter" table or something related, that would store all my
global parameters of my application?
Use INI files or YML files (like in Symfony, if I finally use this one) to
store my parameters? If so, how to handle them? What are the best
practices?
Any better solution for that task?
The only possibility I found was with Symfony, using config.yml files or
generally YML files to store my general configuration. But what are the
best practices for this kind of storage? How to securely manage them?
I hope this question is not too general.
Thank you.

No comments:

Post a Comment