Custom Apps: Some Strategies For Easy Configuration Files

One of the decisions that has to be made each time an application is written for distribution is how best to set up the configuration files. There are a number of different approaches taken to this: some opt to use the define() function and define constants, while others use large arrays. The purpose of this post is to discuss a couple of configuration options that sometimes are overlooked by developers (including myself until last year).

Class Constants
One of the biggest struggles in OOP programming is how to go about setting up the default values and configuration values. For example, if you have a database class, how do you define the connection parameters?

(more…)

Wednesday, September 16th, 2009 @ 1:00 am | Comment (11) | Categories: Best Practices, PHP 5, System Architecture
Tags: , ,


Copyright © 2022 by Brandon Savage. All rights reserved.