Complete Contents
Introduction
Chapter 1 About Netscape Application Server Extensions
Chapter 2 About the Netscape Extension Builder
Chapter 3 Introduction to Netscape's Interface Definition Language
Chapter 4 Designing a Netscape Extension
Chapter 5 Generating Output Files
Chapter 6 Completing Method Stubs
Chapter 7 Using Template Streaming
Chapter 8 Managing State and Session Information
Chapter 9 Using Object Pools
Chapter 10 Compiling the Extension Source Code
Chapter 11 Deploying and Managing a Netscape Extension
Chapter 12 Example Extension: HelloWorld
Appendix A C++ Helper Functions
Appendix B Java Helper Static Methods
Appendix C Java Class Decorations
Appendix D Reserved Words
Appendix E The ConnManager.cpp File
Glossary
Previous Next Contents Index


About the Netscape Extension Builder

This chapter describes the Netscape Extension Builder, a collection of tools and services provided so that you can quickly design, build and deploy Netscape Application Server Extensions.

The following topics are included in this chapter:


What is the Netscape Extension Builder?
Netscape Extension Builder allows you to create Netscape Application Server extensions which extend the functionality of the Netscape Application Server to integrate existing client/server and third-party solutions. For more information about extensions, see What is a Netscape Application Server Extension?.

This section describes the components of Netscape Extension Builder and what services each component provides to you as you design, build and deploy a Netscape extension.


Components of Netscape Extension Builder
Netscape Extension Builder is composed of the following components:

Netscape Extension Builder works in conjunction with Netscape Application Builder to allow fast development and deployment of Netscape extensions. You use Netscape Extension Builder for development of the Netscape extensions, whereas Netscape Application Builder is used for deploying the completed extension.

More information about deploying Netscape extensions is provided in Deploying and Managing a Netscape Extension.

Netscape Extension Builder Designer
Netscape Extension Builder Designer is a graphical user interface (GUI) tool that guides you through the process of defining the interfaces and coclasses that compose an extension. Interfaces and coclasses are specified using Netscape's Interface Definition Language, called KIDL. For more information about KIDL, see Introduction to Netscape's Interface Definition Language.

Netscape Extension Builder Designer generates the IDL for you from the choices you make in the tool. The output of Netscape Extension Builder Designer is a set of IDL files, so named because they contain IDL code and have a .idl suffix.

Netscape Extension Builder Designer also generates a source code directory tree and makefiles, which are used to compile the IDL and extension (.cpp and .java) files. For more information about using Netscape Extension Builder Designer, see Designing a Netscape Extension.

KIDL Compiler
KIDL Compiler is a source code generation and pre-compilation tool. It takes IDL input from either Netscape Extension Builder Designer or from hand-written IDL and generates source code within a source code tree as dictated by makefiles. The makefiles are generated by Netscape Extension Builder Designer at the same time as the IDL files.

KIDL Compiler uses the makefiles as compilation guidelines. The makefiles keep track of all the files that compose a particular extension. The compiler generates the appropriate files and directories based on the contents of the makefile. For example, depending on values in the makefile, KIDL Compiler produces either C++ code or Java code tree structures.

KIDL Compiler also generates the method stubs in which you write the implementation code that defines the functionality of your extension. Once completed, the method stubs link the Netscape extension to the technology being extended. More information about method stubs is provided in a later section of this guide.

Netscape Extension Builder Runtime Features
Netscape Extension Builder also includes several value-added features that enrich the extension during runtime. These features, called Netscape Extension Builder Runtime Features, save you from writing the code for the value-added functionality.

Netscape Extension Builder Runtime Features provide solutions to scalability and performance issues commonly associated with building high-performance applications that integrate third-party and legacy technology. Netscape Extension Builder Runtime Features include the following:

You specify that you want to use these features in Netscape Extension Builder Designer as you are designing your extension. For some of the features, you must write some additional implementation code when you are completing the method stub files. The procedural information about doing this is explained in Completing Method Stubs.

During runtime, the Netscape Extension Builder Runtime Features are implemented in the Netscape Extension Builder Runtime Layer, which provides the "under-the hood" processing and functionality for those features.

When you design and build an extension, consider whether you need to use these runtime features.

Method Locking
Method locking provides thread safety for single-threaded extensions. Most legacy systems are built on technology that is not multi-threaded. Integrating this technology into the Netscape Application Server environment, which is multi-threaded, can create thread safety issues.

Method locking eases the task of integrating non-thread safe technologies into a Netscape Application Server application by ensuring that only one call can be made to a locked method. If you are integrating single threaded functionality into Netscape Application Server, you probably want to use method locking.

Method locking is usually used in conjunction with Netscape Application Server's multi-process/single-threaded (MP/ST) configuration to provide increased multiple client support of a single threaded service. Configuring an MP/ST environment requires collaboration with the Netscape Application Server system administrator.

Enabling method locking is covered in more detail in Designing a Netscape Extension.

Template Streaming
Template streaming enhances the performance of applications that use extensions. Extensions enabled for template streaming allow the Netscape Application Server Template Engine to stream results obtained by the extension back to the client. Template streaming is useful for extensions that return large amounts of data or that take a significant amount of time to process results.

For more information on template streaming and how to enable this feature, see Using Template Streaming.

Extension State and Session Management
Extension state and session management maintains user session and application state information for the extended technology. You most likely want to enable this feature when your legacy solution tracks user information on a user by user basis, or the legacy solution is part of an application that is distributed across multiple servers.

More information about enabling extension state and session management is provided in Managing State and Session Information.

Object Pooling
Object pooling alleviates bottlenecks in application performance by allowing clients to share limited-resource objects, thereby reducing the time applications must wait while physical objects are created and destroyed.

Use object pooling if your extension may cause a performance bottleneck. To enable object pooling, you use Netscape Extension Builder Designer and then complete method stubs of a Netscape-defined interface.

For more information about object pooling and how to enable this feature, see Using Object Pools.

Extension Make Harness
The extension make harness is an important tool included in Netscape Extension Builder for compiling the extension source code files. The make harness consists of several files that refer to all of the extension source code files, such as completed method stubs and .cpp or .java files created by Netscape Extension Builder Designer.

The make harness uses the makefiles and a standard C++ compiler to compile the generated source code and the completed method stubs into the runtime extension. Running the design-time files through the make harness is the last process required to complete the extension. More information about compiling the extension source code is provided in Compiling the Extension Source Code.

 

Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.