Progress
on the Web
Modularizing Code by Function
Imagine you have just designed a new application’s procedures and user-defined functions, and you are now assigning each piece of code to a procedure (
.p
) file. (Or perhaps you are examining an existing application and noting how the existing procedures and user-defined functions are assigned to procedure files.). At application-deployment time, you might want only certain components (groups of application files) to download initially and might want other components to download only when they are called for the first time. At design time, you can make deploying the application more efficient by the way you assign code to procedure files. Specifically, avoid assigning to the same procedure file pieces of code that support dissimilar functions, since you might want unrelated modules of an application to download at different times.NOTE: There is no harm, however, in assigning to separate procedure files pieces of code that support similar functions, since a single component can contain multiple files.For example, consider an insurance application that supports several different lines of insurance: life, health, automobile, fire, and disability. Assume the application has separate code supporting each line of insurance, plus general-purpose routines used throughout the application. To modularize this application by function, make sure that:
NOTE: If an existing application consists entirely of procedures and user-defined functions that are completely unmodular, with every routine calling every other routine, it might be difficult to have the application download incrementally. You can, however, deploy the application as a single large component. For more information, see Deploying an Application."
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |