March 15, 2000

Validate Form Input on the Client Side

If you are developing Web pages that provide HTML forms to the user, then you may notice that many times invalid data gets submitted. To reduce such invalid input, you can easily implement some basic validation at the client side. This way you will save some extra hits to the

Use Singleton Objects to Reduce Garbage Collection

Performance tuning of Servlets is a major criteria as a servlet is expected to simultaneously handle dozens, if not hundreds, of threads depending on the requests. These coexisting threads have to share the resources of the JVM. One way to tune the performance of the Servlets is to use Singleton

Loading the JDBC driver

When a Java applet or application loads a JDBC driver, the code is dynamically retrieved from the network. Loading the Sybase JDBC driver requires a simple line of code: Class.forName(“com.sybase.jdbc.SybDriver”); JConnect requires this hierarchy of classes (comsybasejdbc) to be placed in the same subdirectory as the applet. For Java applications,

Use Java’s Vector Class for Faster Performance

When performance is an issue, static arrays perform better than dynamic storage structures. However, if a static structure won’t work, consider using Java’s Vector class instead of the LinkedList class. Vectors provide dynamic storage and easy access, just as linked lists do, but they are actually faster for many applications.

Specifying Dependencies

When writing Java-based services we occasionally require dependencies. That is, our services must start in a certain order. You can specify what services your code is dependent on by overriding the getServiceDependencies method in your service class. For example, to create a service that is dependent on RPC being started,

Using Names for Java Methods that Differ from the Name the DLL Uses

You can use a name for a Java method that is different from the name the DLL uses when it exports the function. For example. you may need to conform to naming conventions prescribed by your own site. In that case, just use the @dll.import directive along with the entrypoint