Try OpenEdge Now
skip to main content
Managing ABL Applications
Deployment Considerations : Choosing a Code Format : R-code : Advantages of r-code
 
Advantages of r-code
R-code provides the following advantages over other code formats:
*Speed — This format is faster because the r-code does not have to compile at run time.
*Application protection — Like encrypted source, r-code protects your application from possible user changes.
*Good for internationalization — R-code is the only code format that can contain multiple text segments. This means that the same application can contain strings for multiple spoken languages (French and German, for example). For more information about translating OpenEdge applications, see OpenEdge Development: Translation Manager.
*Prevents database modifications — CRC-based r-code is more tightly coupled to the database than encrypted or unencrypted source. For each table in the database, ABL calculates a CRC value that represents the structure of the table. A CRC value ensures that the tables in the database match those in the r-code. However, a CRC value is not specific to a particular database.
Time-stamp-based r-code is even more tightly coupled to the application database than CRC-based r-code because each r-code file contains a time stamp for each database table that it accesses. If the time stamps do not match, then the r-code does not run. Modifying the database schema—by deleting a file, or changing a field's name, or modifying an index—changes the table's time stamp. Users are therefore very limited in what changes they can make to the database without invalidating the application.
With either r-code format, you can further restrict access to your application database with the DBRSTRCT utility. This procedure restricts everyone's access to the database, including your own. After you run this procedure, no one can write or compile code that updates the database or changes the database's schema. The only code that can access the database is r-code that you compiled before running the DBRSTRCT utility. This level of database protection is available only with r-code. For more information about the DBRSTRCT utility, see DeploymentTopics and Tasks.