Design-Level Considerations

Although stricter compiler enforcement for the .NET environment can catch coding errors typically tolerated by the PowerScript compiler, the .NET environment might also require changes in application design that are not necessarily caught by the compiler.

Use the DESTROY statement

The .NET garbage collection service does not trigger the Destructor event for PowerBuilder objects. If you need to trigger the Destructor event for a nonvisual object, you must explicitly call the PowerScript DESTROY statement for that object.

Use multiple text patterns for string matching

If you want to test whether a string’s value contains any of a multiple set of matching text patterns, you can use the pipe character ( | ) in your .NET applications or components. The pipe character is a metacharacter in the .NET environment that functions as an OR operator, although it is not a metacharacter in the standard PowerBuilder client-server environment.

Therefore, when you call the Match function in the .NET environment, you can use pipe characters to determine if either of two (or one of many) text patterns match a string you are evaluating. In standard client-server applications, you can use the Match function to evaluate only one text pattern at a time.

Work around unsupported features

Avoid hindrances to application performance

Some functions and features that are fully supported can hinder application performance. Use these functions and features sparingly and avoid them where possible.