CHAINS
Modern Pascal supports chaining, a technique common in the 80's in Turbo Pascal. Chaining is actually perfect for today's stateless web server environments. A common security risk of most open source web scripts is the approach PHP developers take. Writing code snippets then pulling them together during the execution of other scripts. By introducing chaining, we can enforce that developers can still take the same approach of reusable snippets, however, with chain signatures, you cannot run a disparate script and back-door into a site.We feel this feature is so important that the TChain class is auto-instantiated as a global object called Chain available at all times. And it has been implemented internally to look and feel like an Object without the overhead of automatically loading Classes, e.g. it has no ancestor nor descendants and cannot be streamed nor stored.
Reminder, you do not need to create an instance of this class, there is a global object called Chain for all versions of Modern Pascal.
Usage
From a Security Perspective: You can restrict all access to a single URL if you would like, and this URL quickly unloads and chains to another module of your application via the Chain.Run(filename); call. The filename, of course, can check for the existence of Chain.Store() variables - if they are not found, reject the client request.From a Modular Design Perspective: By keeping your overall product designed as hot-swappable modules, you reduce run-time overhead as code that is not relative is not being loaded for every web request. This means faster response time to client connections, which means more concurrent connections are possible.
From a Memory Footprint Perspective: By designing for hot-swappable modules, you reduce the memory footprint normally found with so many existing web scripts. Smaller memory footprint means less memory paging, less memory fragementation, and thus improved system performance and reliability.
Globals
None
Classes
Chain==TChain
Functions
TChain.VarExists(String):Boolean
Procedures
TChain.Clear TChain.Release(VariableName:String) TChain.Retreive(VariableName:String,Var Value) TChain.Run(Filename:String) TChain.Store(VariableName:String,Value:Constref)