Skip to content
Jeremy edited this page Jun 19, 2013 · 4 revisions

Instead of throwing these words around all wantonly, we wish to be clear about their meanings within the phpWebSite context.

Configuration

Configuration means software configuration. It is which class should be loaded to handle a particular situation. It is extremely relevant to developers, and somewhat relevant to the system administrator. It is stored in configuration files on the filesystem. It is something that end-users should not be concerned with, and system administrators should only need to touch in exceptional circumstances. The one exception is that database configuration is part of software configuration, but we create that for the end-user anyway. Generally, configuration is not changed after software has been installed somewhere, and changing configuration probably means a lot of other work (like if you change database connection information, you're also dumping the database and loading it somewhere else.)

Think long and hard before you put something in Configuration, because the only interface to change configuration is editing files on the server filesystem. 99% of the time, what you actually meant was a Setting.

Some examples of configuration:

  • Database connection information (this is a borderline setting, but you have to have this before you can load settings, so it falls in configuration)
  • Which specific logger, database backend, request object, etc should be used by the core system
  • Software Constants NOTE: Be careful with this, because some things you may think should be constant are actually settings or preferences. As an example, I made a thing that generates a PDF, and set constants for where the fields go to line up with the paper form it is printed on. Turns out, it was perfectly set up for my own printer, and did not work ANYWHERE else. This particular situation was a place where I used 'define' and should have exposed it as a preference.

Settings

Settings are things about the software that can be changed for a particular instance of the software. They are generally stored in the database, and are easily modified by the website administrator within the user interface.

Some examples of settings:

  • Theme
  • Authn/authz scripts, which can each also have their own settings of course
  • How many blog posts to show on front page
  • Which CAPTCHA plug-in to use
  • Editor settings (i.e. CKEditor settings)

Preferences

These are things that the end-user can change about their personal experience, and are tied to that specific user. It can be a preference that only affects that particular user, such as which editor you want to use to edit HTML; or it can be a preference that affects things related to that user, such as how their name is shown when someone views content that the user created.

Some examples of preferences:

  • Theme preferences like what color you want to see
  • How many items show up in a list by default
  • Display Name
  • Authn/authz script for your particular user
Clone this wiki locally