Cy Think Survey

Cy Think Survey

Surveys, Polls, Questionaires, Quizzes & cetera

Home
Help Index
About Codes
About Maintenance
About Parms
About Users
Code Implementation
Code Maintenance
Control Heirarchy
Documentation Maintenance
Function Maintenance
Menu Maintenance
Merge Core Procedure
Merge Client Procedure
Page Add
Page Change
Page Copy
Program Creation
Program Maintenance
Parameter Maintenance
Ring Maintenance
Site Appearance
Site Maintenance
Site Setup
Site Setup Prep
System Maintenance
Table Add
Table Copy
Text Maintenance
Admin

Programmer's Procedure to Add a Data Field  

Adding a data field involves changing the documentation and program modules as well as the affected table in the database. Since this involves changes in the database and the perl program modules, this procedure is aimed at programmers.

It is important that all these steps be done more or less at the same time. The documentation must be updated to reflect the new features and how to use them. And, the code must be implemented.

The general procedure to add a field to any table is generally the same regardless of the field or table. This is the procedure.

  1. Determine the table and field name(s). Be sure the field names are unique in the table.
  2. Access phpMyAdmin in the host control panel: Login >> MySQL Administration >> phpMyAdmin.
  3. Add the field(s) after the last field in the table regardless of semantics or logical order within the table to minimize the amount of rework in the code.
  4. Update the data tier program module. This module is normally the table name preceded by "Jsh", all lower case. E.g. if the table is "abc" the module name will be Jshabc.pm.
  5. Add subs to get the new field(s) from the row.
  6. Make any needed changes to the add and update subs.

  7. Add a parm to the JshPARM.pm to hide the new field from users that won't be using the new field.

  8. Update on the application tier module. This module is normally the table name followed by "s" and ".pl", all lower case.
  9. Add displayed fields to view_row and edit_form. Put fields where they make sense to the user.
  10. Add input fields, as needed, to new_row_form and edit_form. Match the sequence in the previous step.
  11. Make any needed changes to the add and update subs.

  12. Consider the application as a whole and think if any additional changes are needed. Make changes and fix the implementation as needed.

This procedure is abbreviated and high level. It is documented to prompt the programmer as to the needed steps and is not intended to be a detailed step-by-step procedures.

Copyright © 2008 Cy Think, Inc.