The following Frequently Asked Questions (FAQ) focus on the web and
VisualAge for Smalltalk:
Why do GUIs built with the Web Connection appear differently in different
browsers? |
| HTML is provided to the browser. How the browser displays this tagged text
(HTML) is dependent on how IBM, or NetScape or Microsoft built the browser
program. The charm of a browser is an application can be deloyed across many
platforms. The challenge of a browser is that how the application looks to the
end user cannot be guaranteed. |
Where can I read about the Web Connection? |
| A paper describing technology that allows you to build applications for the
Web using VisualAge is available at the URL
http://www.software.ibm.com/software/ad/visage/vawebwp.htm |
Can I use web and non-web parts together? |
| With the VisualAge Web Connection, you need to rebuild your visual parts.
You can NOT take an existing VisualAge app, press a button, and have it
generate HTML. Besides that, all the other paradigms work, so you could develop
some pages with the VA Web Connection on one platform and load it (at edit time)
onto another platform with no problems. |
What parts are usable with the web connection? |
| All the non-visual parts currently available in VisualAge will be usable
from within VisualAge Web Connection. |
Does the web connection maintain state on the server between web page
requests? |
| We are adding something new called Session Data. Session data is
basically a value holder with a expiration timeout. For VisualAge, you specify
the class name of the part, and then we'll give you that part as a tear-off for
you to do with what you want. Expiration timeouts are configurable. A session
key is generated for every session data object, which is sent between the
browser and VA via hidden input fields. The architecture provides a fixed method
which will be sent to the object when it 'expires'. |
Can I make table entries links to other pages? |
| Unfortunately, there is no way to do this at present. What you will have
to do is create a text part and then dynamically create the HTML for the table
you want. Check out the AbtWebSamplePartLister for an example of how to do this
(it doesn't use a table, but does generate text links dynamically). |
How do I reference graphics images when using the web connection? |
| There are two places you need to 'name' the image corresponding to the two
places it's used. One is the edit-time copy, which is relative to your current
working directory for the VisualAge image. The other is the run-time copy,
which should be a URL. You can actually hardcode a complete URL as in 'http://myServer/graphics/myPicture.gif'.
Or, you can use 'relative' URLs as in '/graphics/myPicture.gif'. You
will (almost always) HAVE to code a '/' at the beginning of even relative URLs,
because otherwise the something like 'myPicture.gif' taken in the
context of the browser's 'current' URL (something like 'http://myServer/cgi-bin/abtcgil.exe/myPart')
would become 'http://myServer/cgi-bin/abtcgil.exe/myPicture.gif', which
is no doubt NOT what you want. When you leave off the 'http://myServer'
part of the URL, the URL is relative to the same server the WebConnection part
was accessed from - this allows you to move the whole kit and kaboodle from
server to server very easily. |
Can I enter HTML that is not currently handled by the web connection? |
| You can accomplish additional HTML functionality, e.g. center text,
through the use of literal text. The idea being that you add text parts to your
page that contain HTML, and then click the 'literal' button in the settings
page. Not visually appealing at edit-time, but accomplishes what you need for
run-time. We are working on layout tools for the next release that would allow
you to center, align, etc. parts on a page. Special characters can be handled
the same way (literal text for &ae;). Or if you are running in an ISO8859-1
code page (like in Windows or AIX; but not OS/2), you can just enter the
'character' that you would normally use. For non ISO8859-1 code pages (like on
OS/2), you can do the same thing, but then you'll have to hope that the
translation from your code page to ISO8859-1 (which occurs when the page is sent
back to the server) does the translation correctly. |
How can I support multiple client requests to a VA web server? |
| VA supports "threads". If you use a "co-routine call"
instead of just a "call", to call a platform function, VA will fork a
new process for that platform function. It will terminate that process when the
platform function completes. The "call" function blocks the Smalltalk
virtual machine, thus making everything wait until the platform function
completes. The "co-routine call" does not block the VM. The
co-routine call does not required a lot of overhead so, in practice, it might
replace the single routine call for most applications. The co-routine call will
come in very handy for web apps that need to invoke platform functions for
one-to-many asynchronous web users. |
How should I handle exceptions when using the web connection? |
The VA Web Connection Feature has some intelligent exception handling code
built-in. Web app developers should consider using it to improve
user-friendliness in exception situations. There are class methods(setters)
in the class AbtCGILinkServer. If you supply them with WebConnectionPart 's
that contain HTML pages, those HTML pages will be served to the user in the
event of an exception condition. Those methods are:
errorHandler:
notFoundHandler:
It is best to set the above class vars during the image start-up routine.
Each "hit" on the VA Web Connection server causes a new process to
fork. If an exception occurs during that process, only that process is
affected. Other processes(i.e., other users hitting on the server) are not
impacted. |
How can I validate my client data? |
| Though not automatic, this is still quite doable. You will need to add a
CGILinkRequest part to your handler page to intercept the submitted form. You
will then need to query the form data, convert the data as needed (HTML only
returns strings) and based upon your converter error handling, either accept the
data and continue on or return message. |
Does web connection support multimedia? |
| VAST is only available using the web parts via the CGI interface. What this
means is that HTML is sent to the client and VAST stays on the server. The HTML
allows Java applets to be downloaded and MM resources to be used (sound, video,
bitmaps). VAST MM is *not* available on the client. However, all the non-visual
parts, CICS access, Notes Access, Oracle access, DB2 access, business domain
objects, are available during the creation of the HTML. You can have "multi-media".
Using a Web Connection text part I have a link to an OS/2 AVI file. My browser
is configured to run, C:\MMOS2\MPPM.EXE, when it receive the AVI file. So, the
user of my application has multi-media, and it is done using Web Connection
parts. However, is not done through the VA/ST multimedia functions. |
Are web connection transactions secure? |
| VAST and secure Web transactions are orthogonal issues. The web parts
feature works through the web server software's CGI interface. Once it leaves
VAST, it is out of VA's control and is "unsecure". So, how do you get
security on the web? You use other products. E.g., you can use Netscape's
secure server with Netscape's Navigator browser on the clients' systems. This
uses a combination of techniques including encryption to make sure the
transaction information is not compromised. The way VAST + web parts works
today, IBM can never provide complete security by themselves - only through
combination with other products. Distributed Smalltalk *does* provide secure
transactions. |