NetObjects
Products and Services Partners Support
Company Purchase
Integrating Netscape LiveWire

subheadline
INTRODUCTION

This technical note explains how to use Netscape LiveWire with NetObjects Fusion 2.0. While NetObjects Fusion is the web design tool of choice, web developers often need to create interactive web applications using other web development tools, such as LiveWire. We strongly recommend that you use NetObjects Fusion 2.0 or a later version if you're developing LiveWire applications, because new features in version 2.0 make it easier than ever to use LiveWire with NetObjects Fusion. For example, NetObjects Fusion 2.0 for Windows includes Acadia Infuse, the premier JavaScript editor, which offers support for editing and compiling LiveWire programs. (Acadia Infuse 1.0 is included with NetObjects Fusion 2.0 for Windows. NetObjects Inc. acquired Acadia Infuse in February 1998, and now ships the latest version as NetObjects ScriptBuilder 2.0. For more information, see the NetObjects ScriptBuilder page.)

If you're already familiar with LiveWire, you might want to skip the next section. If you're new to LiveWire, you'll have to learn how to use it by reading Netscape's documentation and/or available LiveWire books. However, for LiveWire newbies, the following section briefly describes the tool and its uses. It also gives a brief explanation of the difference between using LiveWire and using the database publishing features in NetObjects Fusion 2.0.

Back to Top 

subheadline
WHAT IS LIVEWIRE?

LiveWire is a web development platform from Netscape that you can use to create and deploy interactive web applications on Netscape web servers. It can't deploy applications on other web servers, such as Apache, because it depends on special server-side extensions that are available only in Netscape FastTrack and Enterprise web servers.

A primary use of LiveWire is to build web applications that access external databases running on UNIX and Windows NT servers. LiveWire supports the following databases: Informix, Microsoft SQL Server, Oracle, and Sybase. It also supports any products you can access under Windows through an ODBC driver (including Microsoft Access and Excel). The difference between using LiveWire and the database publishing features that are included in NetObjects Fusion 2.0 is that LiveWire allows an application to access a live database dynamically, while a web application is running. The database publishing features in NetObjects Fusion let you generate a set of web pages from database tables, but this is done statically, at a given point in time, rather than dynamically, as a site visitor? interacts with a LiveWire application.

In addition to LiveWire's great utility as a web database-access tool, it offers other features that are useful in addition to, or independent of, its database connectivity. At the core of LiveWire is a server-side JavaScript engine that allows you to write and deploy applications that run on your Netscape web server. This allows you to execute program logic on your server to access server-side resources, including external files. You can also use LiveWire to maintain site visitor and session state informationfor example, to track a visitor through a session as the visitor moves from one page to another. LiveWire is also useful for sharing information within an application across multiple user sessions, or among a group of applications on a single server.

In general, it's very difficult to store or share information across multiple page accesses by using HTML. Although you can use CGI scripts to do this, the development of web applications using CGI programs is very awkward and time-consuming. In contrast, LiveWire provides a well-supported method for implementing interactive web applications quickly using the industry-standard JavaScript language. Because LiveWire is a built-in extension to the Netscape web server, calling a LiveWire program is more efficient than starting a new process, which is required to run a CGI program.

Back to Top 

subheadline
OPTIONS FOR USING NETOBJECTS FUSION WITH LIVEWIRE

A developer who wants to use NetObjects Fusion to create a LiveWire application can take several approaches. The following scenarios are both reasonable:

  • Using NetObjects Fusion, you can create your web site and at the same time add server-side JavaScript code using external HTML files as well as in the Layout and Element Scripts.
  • Using NetObjects Fusion, you can create web pages with the static text and graphics for your web site, stage or publish the HTML files, and then add the LiveWire server-side JavaScript code afterward.

Independently of using NetObjects Fusion, you can use Acadia Infuse, which is bundled with NetObjects Fusion 2.0 for Windows, as a JavaScript editor. Because it has good support for LiveWire, it is a particularly good editor for developing LiveWire applications. The next section describes Infuse in more detail.

Back to Top 

subheadline
USING ACADIA INFUSE

LiveWire developers will find that an immediate benefit of owning NetObjects Fusion 2.0 is that a great JavaScript editor is bundled with NetObjects Fusion 2.0 for Windows. Acadia Infuse is ideal for editing both client- and server-side (LiveWire) JavaScript. Infuse includes a JavaScript reference manual that's well integrated with the editor, and it conveniently organizes this documentation into separate categories for describing Navigator, Language, and LiveWire components. The Language category covers elements of the JavaScript language that are common to both the client- and server-side implementations.

If you're using JavaScript at all, you'll want to install Acadia Infuse. If you're using LiveWire, you should find this tool even more useful for developing LiveWire applications. Besides its utility as a JavaScript editor, Infuse includes menu commands for building LiveWire applications or opening Netscape's Site Manager program. Another useful feature of Infuse is the inclusion of two menu commands for previewing your JavaScript code in either Navigator or Internet Explorer.

Back to Top 

subheadline
INSTALLING ACADIA INFUSE

Although Acadia Infuse is included on the NetObjects Fusion 2.0 for Windows CD-ROM, you do need to install Infuse independently. That is, it isn't installed as part of the full NetObjects Fusion installation. On the top level of the NetObjects Fusion 2.0 CD-ROM, you should find a folder called Infuse. To install Infuse, you open this folder and double-click Setup.exe, then follow the simple installation instructions. Infuse doesn't need to be installed in the same directory as NetObjects Fusion.

Back to Top 

subheadline
SETTING ACADIA INFUSE AS YOUR DEFAULT HTML EDITOR

You can set Infuse as your default HTML editor in NetObjects Fusion. This is especially recommended for LiveWire and JavaScript developers. Simply follow these steps:

  • Choose Edit | Preferences in NetObjects Fusion 2.0 to display the Preferences dialog.
  • At the bottom of the General tab panel, enter the pathname for Infuse or click Browse to locate the application file (Infuse.exe) on your computer's hard disk.
  • Click OK when you're finished.

You can verify that this works by adding an external HTML document to a NetObjects Fusion 2.0 project and then double-clicking the element to launch your default HTML editor. The document should load inside a window within the Infuse editor. Follow these steps if you're not sure how to do this in NetObjects Fusion 2.0:

  • In a NetObjects Fusion 2.0 project, create a new page in the Site view. For example, you can add a page to the "KVYB" web site described in the Getting Started tutorial, assuming you've already created the tutorial site. Otherwise, create a new page in any project or see the Getting Started tutorial to learn how to do this.
  • Open the new page (you should be in Page View now) and click the Layout object on the page (for a new page, it will be empty). You should also see the Properties palette.
  • Click the External HTML checkbox in the Layout tab in the Properties palette. Then click Browse to locate an HTML document you want to use as an external file for your new web page. For example, you can use marseille.htm by browsing in your NetObjects Fusion 2.0 folder until you locate the file in the following path: Tutorial\Assets\HTML Page\marseille.htm. After you select an HTML file to add, you'll see a large X in the page's Layout area, indicating that an external file has been added. If you double-click inside the Layout area, the external file should open in the default HTML editor. This editor should be Acadia Infuse if you followed all the steps above correctly. If you edit the file, the changes will automatically be propagated to your NetObjects Fusion project when you're ready to preview or publish it.

Back to Top 

subheadline
CONFIGURING INFUSE TO RUN STIE MANAGER AND THE LIVEWIRE COMPILER

You can run Netscape's Site Manager or the LiveWire compiler from Infuse's menu bar by choosing either Tools | Run LiveWire Site Manager or Tools | Compile LiveWire Application. After you install Infuse, you'll notice that these commands are always disabled, because you have to configure Infuse to know the locations of the LiveWire programs. Assuming the LiveWire development tools are installed on the same machine as Infuse, follow these simple steps:

  • Choose Tools > Preferences to open the Preferences dialog.
  • Click the LiveWire tab. It displays two Browse buttons.
  • Click Browse and locate the Site Manager application on your computer's hard drive. By default, if you're running a Netscape Enterprise server, Site Manager is stored in Netscape\Server\bin\https\sitemgr.exe. If you installed FastTrack on Windows 95 before LiveWire, the path will likely be FastTrack\server\bin\httpd\sitemgr.exe.
  • Click Browse and locate the LiveWire command-line compiler on your computer's hard drive. The file, called lwcomp.exe, should be in the same directory as sitemgr.exe.
  • Click OK to save your changes.

Now if you check the Tools menu, you should see that the commands to run LiveWire programs are both enabled.

Back to Top 

subheadline
COMPILING LIVEWIRE APPLICATIONS USING ACADIA INFUSE

After you configure Infuse to run Site Manager or the command-line interpreter, you can compile LiveWire applications using either utility. If you want to use Site Manager to build your LiveWire applications, you simply open it by choosing Tools | Run LiveWire Site Manager, by clicking on the Site Manager icon on the Infuse toolbar, or by any other means available in Windows 95 and NT. See your Site Manager documentation if you're using it to build your LiveWire programs. Alternatively, you can run the command-line compiler (lwcomp.exe) directly from a Windows 95 DOS or NT command prompt, but unless you have a good reason to do this, it's much easier to use the visual interface in Infuse. To use Infuse's visual interface to the LiveWire compiler, follow these steps:

  • Click on the command-line compiler icon in the Infuse toolbar (it's the one with two blue gears) or choose Tools | Compile LiveWire Application. This should display the Build LiveWire Application dialog.
  • Enter, or browse to, the location of the LiveWire directory that contains the files you want to compile.
  • Enter or select the Output Web File (the file extension should be .web).
  • Add the files in the list box on the left to the right side (Selected Files box) by either double-clicking each file name in the Available Files box on the left or selecting each filename and clicking Add.
  • If you want to select any of the Compiler Options checkboxes, do so now. When you're ready to build the LiveWire application (or check its syntax), click OK.

The command line window should appear, but don't be surprised if it appears very briefly and then disappears (this is its current behavior with Infuse 1.0.1). If there are no compiler errors, your LiveWire application (.web file) should be built now. See your Netscape LiveWire documentation if you're not sure how to run a LiveWire application after it's built.

Back to Top 

subheadline
CREATING AND EDITING LIVEWIRE FILES WITH INFUSE

Acadia Infuse is an ideal editor for creating, viewing, and editing LiveWire files. It provides the following useful features for the HTML and JavaScript developer:

  • Color syntax highlighting for JavaScript keywords, comments, and strings•Menu commands for quickly inserting JavaScript code fragments, special characters, and frequently used scripts
  • A menu command for finding and matching braces, and other language-specific aids for working with HTML and JavaScript•Convenient and fast access to online JavaScript documentation, organized in general language, client, and server-side (LiveWire) categories
  • A visual interface for the LiveWire command-line compiler, integrated directly into the editor

Infuse is an easy-to-use editor and most of its functions can be grasped intuitively. The Help menu includes quick access to Acadia's top ten tips for using Infuse and an online help system that describes the editor in detail. See the online documentation to learn how to use any feature in Infuse. If you have further questions, visit Acadia's web site at http://www.acadians.com or send email to support@acadians.com.

Infuse is a great tool for editing HTML and JavaScript files, but if you want to use NetObjects Fusion to create the layout of your pages and insert client- and/or server-side JavaScript in NetObjects Fusion, you'll need to insert your JavaScript code fragments inside the NetObjects Fusion Layout and Element Script editing boxes. For longer scripts, you might want to use Infuse to enter and edit your code, then copy and paste it into the appropriate NetObjects Fusion script editing box. For short JavaScript code fragments, however, it might be more convenient to enter your code directly in NetObjects Fusion. Either way, any files you create that contain LiveWire (server-side JavaScript) code must be compiled before previewing them or deploying them to a LiveWire server. If the JavaScript code is contained within NetObjects Fusion pages, follow the steps described in the next section. If you already have a set of HTML and JavaScript files that you're ready to compile, see the section above on compiling LiveWire applications using Infuse. Alternatively, you can use Netscape's Site Manager or command-line compiler to build your LiveWire application.

Back to Top 

 

 

Search
 

 

© 2001 NetObjects, Inc. All rights reserved. Privacy Policy