WebHub Release Notes for v1.770 to v1.999
This file was last updated 8-April-2001 17:27 PST
Key Patches between v1.770 and v1.999
-
Memory Leak Fixed
- Thanks to the research by Ken Green of Tibersoft we were able to pinpoint
and eliminate a set of small memory leaks in TwhSession. This leak only
occurs when a new session is created.
ISAPI Runner Improved
- The v2.007 ISAPI runner fixes all known problems and is highly recommended
for anyone doing file upload or electronic file delivery. Contact
customerservice@href.com for a copy if you are a registered v1.77 customer.
Here is what's new in WebHub v1.770
-
-
- Here's the list of all the changes that made its way into the v1.770 WebHub
VCL, and the standard forms that we supply to get your application going
faster and more secure than ever. We've found and corrected a Y2K related
bug involving IE5 that affected cookies and page-expiration, so this is a
must-upgrade release!
-
- Free, even for commercial use!
Click to read more about this exciting new release, then come back here
to read about the refinements and added capabilities in 1.770.
In a nutshell, WebHub Lite includes enough to compile generic
web application servers such as "aserver."
Improvements by Category
People upgrading must take action on everything in RED.
tPack
- utMainFM v1.77
- Restorer was not acting properly.
The main-form's restorer would be replaced internally and you were not able
to store some settings anywhere else than tpack.ini. This has been corrected. In
the process the order in which the INIT; and LOAD; procedures
are called was refined and the following should be taken note of:
- In WebHub panels, e.g. forms derived from utPanFrm's TutParentForm, the
INIT; procedure is called before the restorer reloads variables.
If, for example, you are initializing database connections based on these settings
from INIT; you will now have to write a public procedure
init(Restorer:TFormRestorer); override; and move initialization logic
there.
- In mainforms, e.g. forms deriverd from utMainFm's TtpMainForm or
[trayunit/class], you can program against the inherited load/save events
and the same order applies: INIT before LOAD.
The upshot of this is that you can now set the restorer's
UseDefaultFile option to false and have the INI file automatically
be (exe-dir)(exe-name).ini
- /NoMenu Commandline parameter v1.77
- This used to be called from the init procedure where it could lead
to GPFs under certain conditions. It was moved to utMainFm.OnFormCreate.
If you rely in this logic in copies of utMainFM.pas, please make this change.
- procedure ucWinApi.TrimMem; v1.77
- procedure for reducing the apparent memory use of
all delphi applications. It's called from utMainFC so
that all tPack PanelWare applications automatically benefit.
- utIpcObj.TCriticalSection v1.77
- CSect: TRTLCriticalSection has been made a public property
- function uCode.ParamValue(const Key:ShortString; var Value:String):Boolean; v1.77
- now returns the original case of the commandline parameter. (used to capitalize)
- tTpAction.Test:Boolean v1.77
- now returns false/isUpdated is not updated.
This is primarily for consistency in the designer.
- popouts diabled v1.77
- disabled the popout feature by commenting out the 'detach' line in utpanfrm.
This is the new default and it's easy to revert to using auto detach by re-enabling that line.
- renamed or dropped v1.770
- Debug.pas renamed to tpDbg.pas
- Debugctl.pas no longer shipping.
TWebApp
- Cookies v1.77
- Reconciled differences between AddCookie and Cookiemacro procedures.
- Fixed support for a 'Domain' AppDefault in the AddCookie procedure.
- Y2K v1.77
- Switched all date formating codes from 2 to 4 digit years!
- HREF macro v1.77
- Extended to support targets starting with '#','.' and '/'.
(these strings used to get prepended with http://)
- HEADER macro v1.77
- changed to accept arbitrary, expandable strings.
(a ':' had to be present in the parameter string.)
- page-sections v1.77
- switched the processing loop from for to while
to recognize new/removed page-sections during page-execution.
previously add/remove of sections while a page was running without triggered an exception.
- CheckBoxes, FrameSets and .CKB
- .CKB has long been one a crucial yet terribly annoying 'aspect' of dealing with
checkboxes in WebHub. This release gives you new options in dealing with the pending
list so that you have far greater control over when it is processed and cleared.
- At the heart of this is a new event. TWebApp.OnProcessCheckBoxes: TProcessCheckBoxEvent;
- The TProcessCheckBoxEvent=procedure(Sender:TObject;var ProcessCheckBoxes,ClearPending:Boolean);
takes 2 boolean var parameter and is called for every page request.
- ProcessCheckBoxes defaults to True if '.CKB' or 'CKB' is present on the commandline, and
ClearPending defaults to True is '.KEEPCKB' is not present. For existing applications
this is all exactly what you need to keep the pending list clear and the checkboxes current.
- Future developments might now rely on the presence of a hidden field in order to fine-tune
the checkbox processing and even to manage multiple lists of pending checkboxes.
This is the first good use that we've found for hidden fields to date.
- Here is what you can now do when putting forms containing checkboxes into a frameset:
Add a hidden field to the form and put the following logic into your code:
procedure MyForm.OnProcessCheckboxes(Sender:TObject;var ProcessCheckBoxes,ClearPending:Boolean);
begin
with tWebApp(Sender) do
if Literal['Hidden']<>'' then begin
Literal['Hidden']:='';
ProcessCheckBoxes:=True;
ClearPending:=True;
end;
end;
- From this, you can grow the logic to implement screens
which used to be impossible without altering WebVars.pas directly. Here
are the two ideas you need:
- Never clear the pending array unless you are processing the checkboxes when in a frameset.
This allows you to get rid of '.KEEPCKB' entirely!
- Swap a named list of checkboxes from TextAreas into the Pending in order to process multiple
forms containing checkboxes. (The Pending lists would need to be stored there during OnSaveSession.)
- property CheckedState[..] v1.77
- added property CheckedState[Sender:TComponent;const
Key,Value:String]: Boolean; which can be used to retrieve/delete a
'true' (and only 'true') setting of a 'dotted' checkbox.
'Value' is a string/char representing the true/false default value for the property.
- function CmdHas(const Value:String):Boolean;
- added. functions like the macro.
- AppDefault['BadIPPage']
- If you have TWebApp.CheckSurferIP set to True, and a surfer fails the check,
standard code in dmWebHub will now bounce the surfer to the PageID specified by
this appdefault. If no such default exists, the built-in logic will deliver a
'standard' access denied page unless you explicitly allow passage.
- A feature like this had been in the shared datamodules, where a constant
'pgBadIP' had been used. The example has been streamlined and now uses the AppDefault.
- AppDefault['BadBrowserPage']
- If you have TWebApp.CheckBrowser set to True, and a surfer fails the check,
WebHub will bounce the surfer to the PageID specified by this appdefault.
- This is a new 'policy' decision that might well drive you crazy during development.
Please review the assumptions in dmWebHub.pas and adjust the defaults for your development
circumstances.
- property UrlDivider:char
- Added property and made small changes made in the url logic including
the runner (runner not shipping yet) to allow
creation of urls which use '/'s in place of ':'s in webhub URLs. This will
be of immediate use to people running with the Coolness Layer.
- Fix for errors-on-exit v1.770 9 August 1999
- For anyone who downloaded prior to August 9, edit ht\lib32\htwebapp.pas
and move this line
DestroyAppHandlers;
out of finalization and into the app's destructor like this:
destructor ThtWebApp.Destroy;
begin
//Destroy the take-over lists
//to reconnect the handlers taken over. This prevents gpfs that
//might happen if objects subscribed are now also being freed.
DestroyAppHandlers;
inherited Destroy;
end;
- This fix is being incorporated into the shipping files now.
In the WebHub VCL
- TWebCommandLine v1.77
Changed to check if
hub-notifications are due at the end of each request. (The update
interval remains at 1.5 seconds betwen notifications). This prevents
applications from dropping of the connected panel!
At present this has a nasty side-effect that requires you to
manually delete the application's entry from the hub-connected panel
every time that you change AppID's.
- TWebStoreList extended v1.77
- Several procedures were added to simplify coding against this ultrafast
stringlist derivative. These are
- procedure AddStrings(Strings: TStrings); override;
prior versions required you to add strings one by one or risk having the
object pointer which is ususally used to track the hash-value of the stored
string go out of date. This override respects all settings of the list and
closes that loophole.
- function AssertString(const Text:String):Integer;
makes sure a string exists in the list and returns the position.
- function StringByHash(Value:Integer):String;
and function StringByObject(Value:TObject):String;
make it easy to access a string by hash or object. A blank string is
returned if nothing is found.
- WpeEdit- Editor Base Class v1.770
- The editor base class previously contained an inilink and a restorer,
both of which were removed at run-time when they promoted themselves above
those of the main forms.
If you use a plain Delphi form in a WebHub project, and you
don't have a restorer component, then the editors (e.g. HTML|Files panel)
will no longer be able to remember their positions. Add one
restorer/inilink combo to your main form to remedy this.
If you are using ht\htfrm\whMain.pas then no changes are required.
- TWebDBListBox v1.770
- Fixed a small bug that prevented the selected item from highlighting.
Thanks Seth Wagoner for the report.
- TwhBrowserInfo v1.77
- ExpireWithPragmaNocache was not recognizing IE5 leading to
%=Exires|-1=% failing to create pages that properly expired between browser
versions.
- AnchorInQueryString
- TWebOutput.KeepCookiesOnBounce:Boolean v1.77
- This new property (default:True) will retain all headers present at the
time that WebOutput.SendBounceTo is called, and, altering only the status
code force the browser to redirected. it might be used like this:
pWebApp.AddCookie(..); //add first cookie
pWebApp.AddCookie(..); //add second cookie
pWebApp.WebOutPut.SendBounceTo(pWebApp.Jump['There','Command]);
- TWebOutput, file sharing and usage improved v1.770
- Files are now opened such that they may be shared-for-reading by
other processes, such as web servers and editors.
- This helps the exporting routines, and means that TWebOutput.Open
no longer throws an exception just because Microsoft IIS has a read-lock
on the file.
- TWebDCom fix v1.772
- DoExecute procedure fixed so that result is only calculated once.
Make this change yourself in ht\lib32\webdcom.pas:
procedure TWebDCom.DoExecute;
var
a1:string;
begin
inherited DoExecute;
if lowercase(Command)='free' then
Free
else begin
a1:=getResultText;
if assigned(WebOutput) then
WebOutput.Send(a1);
end;
end;
- This fixes makes the counter example count by-1 instead of by-2, among
other things. The fix is to your web application (recompile with above fix),
not to the counter app itself.
- Renamed for Delphi 5 compatibility v1.770
- TWebBrowser renamed to TwhBrowserLink.
- TWebOutput.WebBrowser renamed to TWebOutput.BrowserLink.
- TWebHtmlMemo.WebBrowser renamed to TWebHtmlMemo.BrowserLink.
- TWebBrowserFileProperty renamed to TwhBrowserLinkFileProperty.
In the Forms and Datamodules
- appMain.pas and appMaiDB.pas obsolete v1.770
- If you were using these units in your projects, save your copy.
- We have discontinued AppMain and AppMaiDB in favor of the combination of whMain, dmWebHub and a datamodule with an application object.
- whMain.pas v1.77
- New icons to indicat five application states in color, in the tray
The standard main form, now changes the tray icon
to indicate which of the following states the application is in:
- PARKED - in the tray - Transparent
- BUSY - serving surfers - Yellow
- PING - serving surfer #1000-1010, presumably a web site monitoring
robot - Green
- STOPPED - suspended or disconnected from The Hub - Red
- RESTORED - form is open on the screen - Blue
- Sample resource files are included in ht\lib32:
- whAppIco.ico -- great icons for you to use
- whAppIco.res -- same in a resource file; reference in your DPR
- whAppDpr.res -- copy this to myproject.res for your MAINICON if you
want the WebHub shell logo.
- dmWebHub.pas v1.770
- Removed UpdateMenu, UnUpdateMenu and InitMenuAndTitle procedures.
If you have your own custom app-datamodule,
you will need to remove calls to these procedures that had been in
ht\htfrm\dmWebHub.pas.
- If you get errors on opening any datamodules that say the WebIniFileLink
component is gone, choose the "remove" option and then save and reopen your
project.
- Commandline parameter changes:
- The "/active" and "/inactive" parameters are no longer implemented. They have been
replaced by the new "NoHub" parameter. "NoHub" should be passed if you want your
application to start with twebcommandline.usewebhub set to False, which disconnects
the application from the Hub and lets you update/edit W-HTML on
WinNT, Win95 and Win98.
- dmWebHub.pas, htWebApp.pas, webSend.dcu v1.771
- Fixed problem where refreshing the app would throw an exception and
make the process unavailable to the Hub. The Hub's connected panel would
show MAILISAPI HELO instead of the process name and AppID.
- This means remove refresh via %=htwebapp.refresh=% works now too.
- Fixed GPF on exit problem for people who had used additional app event
handlers, e.g. whMail panel.
- dmWhApp.pas and dmWHDBAp.pas v1.770
- Changed the settings of the instantiated WebApp components away from
the component defaults in order to optimize for running single module,
single instance applications 'out of the box'. Here is what we did:
- TheAppIDSave= False -- prevent initializing to appid='AppID'
- tpOptions= [tpUpdateOnGet] -- do not updateonload (not until you lock in an appid)
- BuiltInsEnabled= False -- disable the builtin pages
- ShareSessions= False -- select in-memory sessions
- ShareByFile= False
To override, put values into the app's INI file, e.g.
[TWebApp.Defaults]
CgiUseHandle=true
ShareSessions=true
ShareByFile=true
- The demos all have overrides in the INI files.
- WebHub Lite does not support CgiUseHandle or CgiHideHandle.
- Control TheAppID from the DPR v1.770
- Support for /ID has been removed from dmWebHub.pas.
- If you use the /ID parameter, use this example code to control the Application ID from the DPR:
uses
webapp, ucString, uCode; // add these 3 units if you don't already have them
//
with pWebApp do begin
AppID:=DefaultsTo(ParamString('ID'),'dbEdit');
Refresh;
end;
- btw.. the INI file used by the app can be controlled using
the '/APPINI=' parameter to make it independent of Hub|Edit Setups
- As-service, no exit feature fixed v1.770
- If you use the as-service units
(which is simple to do.. request source files by email and
list ScvApp.pas in the project's uses clause right after Forms.pas)
and compile your application with utTrayFm,
the application will not terminate unless stopped with NET STOP
or through the Services panel.
This prevents logged-in users from accidentally exiting the application.
- One liners.. v1.77
- fmDecode.pas renamed to whDecode.pas for Consistency
- fixed bug where suspend message was reversed in old datamodule
- updated default file extension list in editor dropdown (added .whtm)
- fixed double-click on restorer gpf, both in restorer and tpaction
- fixed gpf on edit pages
- fixed gpf on unloading tpack?0/whub?0 packages!
- Need to know! v1.770
- The example code for TWebCommandline.OnBadPageID in dmWebHub.pas has been polished and
you have to read this slowly to believe it. It enables you to 'JUMP TO A MACRO'.. the macro
will run and the example code will bounce you back to the page you just came from. Got that?
Use this concept to TOGGLE BOOLEANS! Simply define
mcUseBrowserCheck=%=TOGGLE|_bCheckBrowser=%
and jump to it! as if it was a page.
You can even use the command parameter to parameterize something from there! Immensely useful!
Wizards
- WebHub Project and Form Wizard v1.770
- The wizard was updated to better support the shared WebHub panels and
datamodules that install to ht\htfrm.
- It now generates the INIT statements automatically, as well as the
code to support the /ID parameter, directly from your DPR file.
- The project definitions and form descriptions were revised for
simplicity and clarity. Try the "full project", it'll give you a
complete WebHub application with all panels in just a few seconds.
- The wizard file was renamed from whWizard.dll to whWiz##.dll to
indicate the version number and provide easier compatibility for people using
more than one version of Delphi on their machine.
- WebHub HTML Import Wizard v1.770
- This is a separate free download.
- This wizard was updated August 7, 1999.
New Units in v1.770
The following units are being shipped for the first time in v1.770:
- whJPEG.pas
- new optional component and demonstration code to illustrate streaming
JPEG images directly from a BMP. see zip file
- whIBOds.pas
- TWebDataSource derivative capable of cloning IB_* tables and their
transactions!
- Supports Delphi 5 and IBO 3.3 as of v1.773
- dmBasic.pas -- ancestor level datamodule with init procedure.
- if you base all datamodules off this one you could polymorphically run
the init procedure in all datamodules in your app from a central place.
(beats enumerating each datamodule)
- dmBuffer.pas
- dmBasic derivative with a built-in property list:TWebStoreList.
together with the simplified list access methods this makes it easy to create
in-memory caches for string translations. study the interface files, this is hot!
- ucCookie.pas
- 'sign' numeric AccountID with passwords.
create and check strings useful for logging in by cookie without
revealing the password.
- ucExcept.pas
- replaces the system level error handler to give you a hook into
otherwise untrappable exceptions. complete with log2file and log2eventlog capabilities
as well as support for switches that allow you to RestartOnError and HaltOnError.
- htAvg.dcu -- (source in htPlus Pack) provides classes for
- Simple and time-based averaging (with properties like sum, count, avg, stddev, sqsum, dTau[])
- Smoothed average with feedback (based on Van Jacobsen's TCP Retransmission Timer logic)
- Random Early Detection (based on work by Sally Floyd) for detecting overload situations
- TCP Jitter detection algorithm, on the web is useful for identifying robots
- DisContinuous Exponential Averaging, useful for forward load prediction
- whAvg.dcu -- (source in htPlus Pack)
- using the htDCEA class defined in htAvg defines the TwhMetaRefreshTimer logic which is
of extreme use when forecasting the actions of individual surfer along with the
TwhMetaRefreshScheduler which is a must have for refresh intensive, high traffic situations.
TwhMetaRefreshScheduler schedules refresh interals for single instances so that load is
projected evenly into the future.
(Detailed Docs are in webhub.hlp)
The newly released technologies in whAvg and ucCookie are probably of
interest to all advanced WebHub programmers. ucExcept is a *must have* jewel
handy for all WebHub projects that must run unattended on a server.
htPlus Pack
New Sources for hire in v1.770:
- htAvg.pas and whAvg.pas
- high power statistical math units described above.
- htLogApp.pas
- a ThtWebApp derivative that includes extensive support for logging activity,
referes and useragents used to dated textfiles while fully integrating the statistical and meta-refresh scheduling capabilities made possible through the ??Avg units.
- htEvtLst.pas
- enhanced destructor and released as source. Enables you to take-over any event-handler, anywhere. See whMain.pas and htWebApp.pas for applications of this code.
- whPool.pas
- create games. a simple cache implementing an object pool
which frees inactive objects after a customizable time.
- whAsync.pas
- previously slip-streamed and documented, this unit makes writing asynchroneous
webhub application a breeze. complete pages and queries in the background using meta-refresh or
open connections! to deliver the results.
In the Demos
- Shared Panelware v1.770
- All demo projects were edited to use whMain.pas, dmWebHub.pas, and
then either dmWhApp.pas or dmWhDBAp.pas. AppMain.pas and AppMaiDB.pas are
obsolete and no longer shipping.
- All demo projects now use *.RES and their MAINICON is set to the new
green default WebHub application icon.
- INI files updated v1.770
- The following AppDefaults were added to all demos, through the INI file
- ShareSessions=true
- ShareByFile=true
- BadIPPage=pgBadIP
- HTQ2 demo, counter fixed v1.772
- The counter incremented + 2 each time instead of +1 because the
OnNewSession event did not exit and ignore session 0. Fixed.
- Requires patch to webdcom.pas and ht\htexe\com\cntr.exe; both
included in v1.773.
Installation
v1.773 fixes the installation so that you really can use
long path names, e.g. \program files\whatever\.
Known Problems
Single surfer mode does not work in v1.770 thru v1.773 (in aserver.dpr,
and in general in dmWebHub.pas.)
There is a problem with TWebDataSource (used for TWebDataGrid and
TWebDataScan) in v1.77 with Oracle. Please see message on the WebHub Listserv
for a fix you can implement yourself. That message is From Michael Ax, dated
Sept. 16, 1999, subject "TWebDataSource v1.77 Oracle errata".
Back to the top of the release notes
HREF Tools Corp.,
Santa Rosa, California USA
Contact us!