Thứ Hai, 12 tháng 10, 2009

Debugging in Online servers without access to Core files

In some case you will find that it will be useful to get debugging information from Tequila core files in an environment you don't have access to modify, you have 2 options for this scenario:
Files that are inheritable
Most Tequila classes are descendant of other Tequila classes, i.e. Dao, application_controller, application_view. In this case you will normally have access to the child class (part of the application) but not to the parent file (part of core)

Case: Debug person_DAO() method save

1. Open DAO.php from your local copy of Core
2. Open person_DAO
3. Copy all methods you are interested in debugging from (1) to (2)
4. Add Tequila debugging information
5. Execute locally to verify your new code doesn't introduce new errors and that debugging information is valuable
6. Upload to testing/real environment
7. Execute using by case activation(Check debugging page if you need help with this)


You will now have full view of what's happening without needing to have access to DAO or any other Core class
Files that are not inheritable
Other times you will need to have access to framework files, here the recommendation splits again:

1. Systems under development
2. Long time running systems


For systems under development, I recommend to add and keep a core with basic debugging functions (production copy has all debugging info commented). Only once the system is released the debugging information is removed

For long time running systems, if there's really no option, the debugging file should be prepared and replaced on server so per instance conditional debugging can be run.

Another last option for servers with many systems will be to keep on server 2 copies of the framework, one with debugging instructions and a production one, it's very easy to update the configuration of a single system to use one or the other.

Find php framework and more useful information about RAD workflow open source.

Không có nhận xét nào:

Đăng nhận xét