Did You Know? -- March 2000

By Hervé Deschamps, Oracle Corporation.

Did you know that this book is really good? (I don't say this very easily) - Oracle 8i Web Development, Bradley D. Brown, Oracle Press.

Did you know that you can type this URL to get straight to the source HTML code?
This is very useful to debug modules without affecting what users see. You can construct debug messages as HTML comments.

Did you know that you can make your link menus more productive for users by adding keyboard shortcuts and/or tab order? Use HTML attributes accesskey and tabindex.
<A href="http://www.disgruntled.com/discussions.html" accesskey=w tabindex=2>Discussions</A>

Did you know that if you have changed to code of a package body but not its header, you should only re-compile the body and leave the header alone. Recompiling the header would invalidate any object that references the package. Re-compiling a package header may invalidate your entire application unnecessarily. Oracle will attempt to revalidate objects when they are required at execution time - the system will still work but it will be very slow for the first user.

Did you know that you can execute your web packages in SQL*Plus for debugging purposes?
set serverout on
execute myPackage.myStartup
execute owa_util.show_page

Did you know that Oracle's LiveHTML is simply some Perl mixed up with HTML? Just like Microsoft does asp with Visual Basic mixed in with HTML.

Did you know that you can trace the number of network hops that it takes to get across to another machine? If performance is slow for you web app and you suspect network performance, try this:
On NT: tracert <base URL>, e.g. tracert www.yahoo.com
On UNIX: traceroute <base URL>, e.g. tracert www.yahoo.com
You should get something like this (the less hops, the better):

Tracing route to www.yahoo.com [] over a maximum of 30 hops:
  1   181 ms   170 ms   160 ms  arc-58a.atl2.mindspring.net []
  2   170 ms   160 ms   161 ms  foundry-23-ve2.atl2.mindspring.net []
  3   170 ms   161 ms   160 ms  cisco-1-g12-0-0.atl2.mindspring.net []
  4   171 ms   160 ms   170 ms  h2-0.atlanta1-cr1.bbnplanet.net []
  5   170 ms   160 ms   160 ms  f1-0.atlanta1-cr2.bbnplanet.net []
  6   180 ms   180 ms   181 ms  s12-1-1.br1.ATL1.gblx.net []
  7   181 ms   180 ms   180 ms  pos2-1-155M.cr2.ATL1.gblx.net []
  8   230 ms   220 ms   221 ms  pos6-0-622M.cr2.SNV.gblx.net []
  9   230 ms   221 ms   230 ms  pos1-0-2488M.hr8.SNV.gblx.net []
 10   231 ms   220 ms   220 ms  bas1r-ge3-0-hr8.snv.yahoo.com []
 11   230 ms   231 ms   230 ms  www2.yahoo.com []
Trace complete.

Did you know that you can override the functionality behind the buttons generated by Designer in a web page? All you have to do is write a bit of JavaScript like:
document.forms[0].elements[1].onclick = new Function ("myFunction();")

Did you know that you can use cookies store the page from which users came so that you can provide links back to it? Check page 698 of Oracle 8i Web Development, Bradley D.  Brown, Oracle Press.

Did you know that when you see https:// in a URL that means that the web site is using SSL (Secure Socket Layer) to encrypt the data from end to end?

Did you know that if you need to provide credit card services over the web you can start by check out http://www.CyberCash.com? They have been in the secure Internet credit card business since 1995.

Did you know that the PL/SQL cartridge hits the database twice when you call a package or procedure? The first time is to check its existence, the second to execute it. You can force the cartridge to make only one hit by using a caret sign in front of the package or procedure name in the URL like so:
This gets you into positional parameter passing in 8i.

Did you know that with 8i you can use Flexible Parameter Passing? You do not have to match you HTML form parameters with the stored procedure parameters. You can use an array of parameters like in C (data type owa.vc_arr). For an example check page 698 of Oracle 8i Web Development, Bradley D. Brown, Oracle Press.

Did you know that you can flush the HTML buffer constructed by commands like htp.p by using owa_util.showpage? This sends everything to the dbms_output buffer and never gets displayed to the browser users.

Did you know that you can customize the login to your web site? You have to customize the package owa_custom.authorize and choose one of the four security options provided by OWA_SEC. For an example check page 403 of Oracle 8i Web Development, Bradley D. Brown, Oracle Press.

Hervé Deschamps is a Technical Manager with Oracle Corporation. Over the years he has developed a number of applications using Oracle Development Tools and others.  He has an extensive experience of all phases of the development life cycle. He is also known in the technical community for his article publications centered around best custom development practices and for his user group presentations. You can reach him by e-mail at hdescham@us.oracle.com. He also maintains a web site full of articles, scripts, tips and techniques at http://www.iherve.com.