« More Improvements with Authentication and Security | Main | Staff Development, Thursday, August 31, 2006 »
August 30, 2006
Efficient Code
As the Scheduler application will be shared by multiple departments, I am striving to write as much generic code as possible. I am complementing this code with liberal use of parameters among procedures, functions and packages. With this strategy, I will write less code while retaining precise control of the detailed information to be presented throughout the application.
As an example of this goal, students and staff will need to view the appointment calendar and make new appointments, as well as change and cancel appointments. Staff authenticate to the application using their LDAP credentials; students do not. I have only written one copy of the procedures to view, add, change and cancel appointments. Using parameters and making decisions within each procedure based on the values of these parameters, I can use the same procedure for both students and staff, irregardless of how they authenticate to the application.
As another example, I have written only one procedure to actually display the calendar. In order to control the actual data being displayed, I will write specific cursors within the calling procedures instead of the single procedure that displays the calendar.
Posted by goodeld at August 30, 2006 4:08 PM