The ALP run-time library is a
huge set of COM objects that the ASP and RAW scripts can use to their
jobs. These objects are all included with Active Local Pages product
and the developer does not need to spare any additional efforts to
check for their availability or version. They are used through Server.CreateObject
or <OBJECT
RUNAT=SERVER ... ></OBJECT>.
ALP Run-time library (AXPack1
family) |
AXPack1
core (newobjectspack1.dll)
|
Streams, Files, File system
newObjects.utilctls.SFMain
, newObjects.utilctls.SFDrive,
newObjects.utilctls.SFStream
,newObjects.binsrv.DirStorage,
newObjects.utilctls.SFRecord,
newObjects.utilctls.ShellLink,
newObjects.utilctls.SFStorage,
newObjects.utilctls.IniFile
,newObjects.utilctls.SFField,
newObjects.binsrv.FileStream,
newObjects.utilctls.SFFilter
Dictionary, collections, arrays
newobjects.utilctls.VarDictionary,
newobjects.utilctls.StringList
Custom script hosting
newObjects.utilctls.ScpAggregate,
newObjects.utilctls.ScriptManager
Structured data transfer, store, read
newObjects.utilctls.ConfigFile
String formatting
newObjects.utilctls.StringUtilities
Threads and synchronization
newObjects.utilctls.COMScriptThread
, newObjects.utilctls.CustomLock
, newObjects.utilctls.Pack1Creator
,
newObjects.utilctls.Event ,
newObjects.utilctls.Mutex ,
newObjects.utilctls.Semaphore
,
newObjects.utilctls.COMSleeper
Binary data and conversions
newObjects.utilctls.SFBinaryData
, newObjects.utilctls.TypeConvertor
Composite objects
newObjects.utilctls.VaryDisp
,
newObjects.utilctls.VaryDispCreator
Advanced COM
newObjects.utilctls.COMApartment
, newObjects.utilctls.COMThread |
NetStreams
(NetStreams.DLL)
|
TCP/IP and IRDA communications
newObjects.net.NSMain ,
newObjects.net.IRDADeviceInfo
,
newObjects.net.SocketStream
,
newObjects.net.NSSocketAddress
,
newObjects.net.SocketSelectHelper
,
newObjects.net.SockOpt |
SQLite
COM (SQLITECOMUTF8.DLL)
|
SQL database engine
newObjects.sqlite.dbutf8
|
|
To access an object from the
run-time library the developer uses one of the following ways:
Using Server.CreateObject
method. With it the an ASP page (or a RAW script) creates an
instance of the desired object by passing its name - ProgID or
ClassID (whichever is preferred by the developer). For example in
VBScript:
Set o = Server.CreateObject("newObjects.utilctls.SFMain")
will instantiate a SFMain object and put it in the variable o.
In JScript this will look this way:
var o = Server.CreateObject("newObjects.utilctls.SFMain");
While this statement looks like the same statement in IIS ASP in ALP
it can be used in more ways. For example the above SFMain
instantiation can be done by using its ClassID:
Set o = Server.CreateObject("{F86AC6C2-5578-4AE8-808A-DC5DAA78082A}")
Which is ALP sepecific.
Using <OBJECT
RUNAT=SERVER ... ></OBJECT> HTML tag. In a regular
ASP page this tag is almost fully equivalent to the
Server.CreateObject statement, but in global.asa
it can be used for much more useful purpose - to extend the ASP
object model of the application by adding additional objects always
accessible to the regular pages under the name specified by the
developer. For example:
<OBJECT RUNAT=SERVER ID="db" PROGID="newObjects.sqlite.dbutf8"
SCOPE="Application"></OBJECT>
Creates an SQLite COM database object that can be accessed from
any ASP page just referring to a pre-defined variable db. For
example in another ASP page you can write db.Execute("SELECT *
FROM MyTable") without need to initialize the db variable in
that page.
The standard ALP run-time library is in fact the newObjects
ActiveX Pack1 family. This is a set of several DLL files that
implement wide range of COM classes. They can be considered as core (AXPack1
core) and additions (NetStreams,
SQLite COM). The entire library
is supplied with ALP, but if the application doesn't use some of the
additions the developer can remove the corresponding DLL from the
application re-distribution packages to lower their size (the core is
used by ALP engine as well and must not be removed).
|