BobSnap: Generating WebSnap Custom Adapters

By: Bob Swart

Abstract: BobAdapt is a special WebSnap Custom Adapter source Generator, which is now available to try on-line at http://www.drbob42.com/BobAdapt

There are a number of Adapter components available, but I often feel the need for custom adapters (much like the LoginPageAdapter), such as a CreditCardValidationAdapter, or a CustomerInfoAdapter. However, it takes a lot of source code to write a good custom adapter (and sometimes a bit of debugging as well) - I know, I've been there, done that, and now got myself a custom adapter source generator: BobAdapt.

BobAdapt is a special WebSnap Custom Adapter source Generator, which is now available to try on-line at http://www.drbob42.com/BobAdapt

The use of the on-line version of BobAdapt is really simple: just enter the name of your unit filename, the name of your custom WebSnap adapter (it will get a TB42 prefix), and finally up to 9 Adapter Field names (you also get one Adapter Action).
The Adapter Fields will implement the GetValue in such a way that they retain their value (useful when entering data, but raising an exception in the OnValidate event handler). This prevents the irritating clearing of all fields (which may be useful in the LoginFormAdapter, but not in a CustomerInfoAdapter).

For more information and details about the resulting custom Adapter source code, I can recommend my "Extending WebSnap" session at DCon 2002, which shows how to get more out of your WebSnap applications by creating powerful custom adapters (using the GUI version of BobAdapt).

I have installed and tested the resulting WebSnap Adapters with Delphi 6 as well as Kylix 2, and they seem to work fine (and should also work fine with C++Builder 6 - although the generated code is ObjectPascal for now).
However, please understand that the resulting source code is provided as-is, without warranty of any kind. And as always, I welcome all feedback and comments (by e-mail). Thanks in advance!


Server Response from: ETNASC04