Progress
Developer’s Toolkit
Advantages of R-code
R-code provides several 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 Progress applications, see the Progress Translation Manager Guide.
- Prevents database modifications
Time-stamp-based r-code is tightly coupled to the application database 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.
CRC-based r-code is less tightly coupled to the application database than time-stamp-based r-code. However, CRC-based r-code is still more tightly coupled to the database than encrypted or unencrypted source. For each table in the database, Progress calculates a CRC value that represents the structure of the table. Like a time stamp, a CRC value ensures that the tables in the database match those in the r-code. However, because a CRC value is not specific to a particular database, it is more flexible than a time stamp.
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 the "Restricting Database Access" section in Deployment Topics and Tasks."
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |