PHP
  Home arrow PHP arrow Configuration Manipulation With PHP Co...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Configuration Manipulation With PHP Config
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 58
    2003-09-04

    Table of Contents:
  • Configuration Manipulation With PHP Config
  • Plug And Play
  • Your Friendly Neighbourhood Hulk
  • Different Strokes
  • Array Of Hope
  • Up A Tree
  • Changing Things Around
  • Giving Birth
  • Link Zone

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Configuration Manipulation With PHP Config
    (Page 1 of 9 )

    One of the most important tasks when building software applications is gaining a clear understanding of which parts of the application can be configured by the user, and which parts cannot. For example, if you're building a generic tool to administer databases, you would obviously want the DBA to be able to configure the application for different databases by inputting the database names and access parameters for each. However, you might not want to give the DBA control over other aspects of the application - for example, the protocol version used for communication with the RDBMS, or the method of RDBMS file access - as these would be internal to your code and also perhaps too complex for user-level configuration.

    Although making such decisions might appear trivial and largely a matter of common sense, they are no small task, especially for complex applications - deciding which aspects of your software are configurable by the user is something that requires a thorough understanding of both the software's goals and the end-user requirements it is built to address, and it can take even experienced developers a fair amount of soul-searching to get it right.

    Once the configuration variables within your application have been identified, it is traditional to separate them from the standard variable namespace and place them in a separate area, such that they may be manipulated independently. Most often, these variables are placed in one or more configuration files, and a user interface is built to interact with these variables, to read them, and to modify them as required.

    That's where this article comes in. Over the next few pages, I'm going to introduce you to a toolkit designed specifically for manipulating configuration files, thereby reducing the number of lines of code needed to read and modify application variables. This toolkit is written in PHP, one of my favourite languages, and implemented as a class, suitable for use in any PHP-based application and accessible via standard OO techniques. Flip the page, and let me introduce you to Config.

    More PHP Articles
    More By icarus, (c) Melonfire


     

       

    PHP ARTICLES

    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery
    - Using Timers to Benchmark PHP Applications
    - Benchmarking Applications with PHP
    - Setting Up a Web-Based File Manager: PHPfile...
    - Developing a Modular Class For a PHP File Up...
    - Setting Up a Web-Based File Manager: bfExplo...
    - Defining a Custom Function for File Uploader...
    - Parsing Child Nodes with the DOM XML extensi...
    - Creating an Error Handling Module for a PHP ...
    - Accessing Attributes and Cloning Nodes with ...
    - Retrieving Information on Selected Files wit...
    - Handling HTML Strings and Files with the DOM...
    - Building File Uploaders with PHP 5
    - Working with Multiple Document Nodes with th...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway