Source Even production tested code may contain bugs and or ambiguities that go unnoticed unreported on the classic platform, but interfere with the upgrade process. We typically refer to this as "bad code" and it must be addressed in order get better translations. "Bad Code" is a legacy platform. These problems can cause explicit translation errors or produce undesirable translation results. This is a problem with both ASP and VB6, but it is more common in ASP because the ASP classic processor is not a true compiler. The only ASP code that is ever formally checked by the ASP processor is the code that is actually executed by actual page requests. ASP can have functions that are completely invalid and if they are not called, you would never know about it. When we are translating a site, all the code on all the specified pages and their #includes is compiled. It is not uncommon for hidden problems in the code to be reported by gmBasic. The tool . gmBasic does its best to interpret what whatever code you give it sees, but if there are problems in the source they will often produce lead to problems in .NET. It is also very common for an ASP site to contain files that are no longer consistent with the rest of the site. In many cases, pages that are no longer active should be omitted from the translation project. In this way, the upgrade project is a good opportunity to clean up the site by removing inactive content.
We generally refer to this as "bad source code" and it must be addressed to correct translation errors and improve translations quality.
Of course you can always directly modify your source code to correct or improve "bad code", however doing this causes your source code to diverge from the production code in undocumented and unrepeatable ways. Also if the source is also being updated for other maintenance, your "bad code fixes" can be lost when you update the copy being used for translations. So, the preferred way to deal with "bad code fixes" and other tweaks to the source is to use the gmBasic Pre-editor.
Tip | ||||
---|---|---|---|---|
| ||||
gmBasic has a programmable preprocessor that pre-editor that is fast and precise. It allows migration teams to modify the source code in memory before it is processed for translation. Conceptually speaking, this is a search-and-replace facility. The original source code on disk is not modified. If you are changing your source solely to prepare it for migration, it is a best practice to make changes "by tool" rather than doing them directly "by hand". Using the preprocessor documents the changes, applies them systematically, and makes them repeatable and trackable. This is particularly important if the source code is under active maintenance outside of the migration effort. In its simplest form, the preprocessor may be invoked by the Compile/Fix or Refactor/EditFile commands. 1) Compile/Fix/Replace commands are loaded from your main may placed in your translation script template or in a ScriptRules file:
2) Registry/Edit commands -EditFile commands may be placed in a GlobalSettings file. This is particularly useful for shared files – like #include files with web sites or shared modules in VB6 systems.
|