Previous Page TOC Next Page See Page



- 11 -
LiveWire and LiveWire Pro


With the increase in complex client-server applications being deployed on the Web, ranging from shopping basket applications to complete database systems, it's increasingly necessary to have robust server-based development environments.

Netscape meets this need with LiveWire, a server-based, online development environment.

LiveWire provides both site management through a site manager and application development facilities with an application manager.

In addition, LiveWire can wholly replace the need for CGI programming, allowing for the development of more tightly-integrated client-server applications.

LiveWire Pro is an extended version of LiveWire that offers additional features for integration with relational databases.

This chapter covers the basics of LiveWire and LiveWire Pro, including the following topics:


LiveWire Features


LiveWire is a complete server-based site management and application-development environment offered by Netscape.

It requires an installed Netscape server running on Windows NT or certain versions of UNIX (only Solaris was available at the time this book was written), and extends the server to provides the following features:

LiveWire Pro adds the following functionality:

These two features of LiveWire Pro are beyond the scope of this book. Netscape provides documentation for them when LiveWire Pro is purchased.

Acquiring LiveWire and LiveWire Pro


At the time of writing this book, the release version LiveWire for NT was available. A 60-day demo version can be downloaded from http://home.netscape.com/comprod/mirror/server_download.html.

In addition, a beta version for HP-UX, IRIX, and Solaris was available to members of Netscape's DevEdge developer's program. For information about joining the DevEdge developer's program, check out http://developer.netscape.com/.

Additional Information


Additional information about LiveWire is available on Netscape's Web site in the LiveWire Developer's Guide at http://developer.netscape.com/library/documentation/livewire/index.html.

The Application Manager


The LiveWire application provides the ability to manage applications installed on the server.

Using the Application Manager, it is possible to add new applications, modify an application's configuration, stop and start it, debug and test the application, and uninstall it if needed.

The Application Manager is itself deployed as a LiveWire application and is accessed through a copy of Navigator. The Windows NT version of LiveWire provides a special icon to launch Netscape Navigator and directly connect to the Application Manager.



Note:

Non-Windows NT versions of LiveWire enable the Application Manager to be launched by accessing http://host.name/appmgr/ from any copy of Navigator.



The Main Application Manager Window


Once the Application Manager is launched, the main screen is displayed. This screen is divided into two frames: a control frame and an information frame. Figure 11.1 shows the main LiveWire window.

Figure 11.1. The main LiveWire screen.

The Control Frame

The left frame of the main window provides the controls necessary for using the Application Manager. The frame provides a scrolling list of installed applications as well as buttons to perform the following actions:

The details of these actions are covered later in this chapter.

The Information Frame

The right frame of the main window is used to display information about the currently-selected application. The information displayed includes:

In addition to presenting information about the current application, the right frame is used to perform the tasks associated with the control buttons in the left frame of the main window.

Adding an Application to the Server


To add a new application, simply click on the Add button in the control frame. This causes a form like the one in Figure 11.2 to be displayed in the right frame.

Figure 11.2. The Add application form.

The form asks for the following information:

The Default Page, Initial Page, and External Libraries entries are optional and can be left blank.

When the page is done, simply click on the Add button.

How URLs Work in LiveWire

You will notice in the description of the Name field above that application URLs in LiveWire take the form

http://host.name/application_name

Following this logic, individual pages in an application can be accessed using the following form:

http://host.name/application_name/page.html

It's important to realize that LiveWire applications are independent of the normal document tree in the Netscape Web server. That is, Web application files can be stored outside the normal document tree of the server.



Note:

Because applications aren't always part of the normal document tree, it's important to ensure that application names don't conflict with existing document or directory names in the server's normal document tree. If they do, they over-ride the documents from the server's tree.



Modifying an Installed Application


To modify an application, select it from the list in the left frame and click on the Modify button. This opens a form in the right frame similar to the one used to add a new application with all the information filled in to match the current application settings.

It is possible to change any of the values except for the name of an application.

Removing, Starting, Stopping, Restarting, and Running Applications


To remove, start, stop or restart an application, simply select its name from the list in the left frame and click the appropriate control button.

When an application is removed, its files aren't deleted. An application must be started in order for users to access it.

Running an application opens the application in a new Navigator window. Applications also can be run by directly entering the application's URL in Navigator.

Debugging Applications


The Application Manager provides the ability to debug applications. To debug an application, simply select its name from the list in the control frame and click on the Debug button. This displays a trace of the application in a separate frame in the same window as the application or in a separate window altogether. This can be set in the Application Manager's configuration settings.

A separate frame trace looks like Figure 11.3.

Figure 11.3. An application trace in a separate frame.

The Site Manager


The Site Manager is a stand-alone application. It doesn't require a Web server or Web browser to use. The Windows NT version can be used on Windows 95, extending LiveWire's site management capabilities to Windows 95 users.

Site Manager provides the following features:

The next section guides you through a brief tour of Site Manager's features, starting with the basics of the Site Manager interface. More detailed information about Site Manager is available in the LiveWire documentation.

The Site Manager Interface


The basic Site Manager interface consists of a window divided into two frames. The interface is show in Figure 11.4.

Figure 11.4. The Site Manager window.

The left frame is used to select and display an application and its document tree. At the top are two drop-down menus for selecting a drive and directory for a site.

Below this is a hierarchical display of documents and directories in a site. This document tree is presented much like the one used to display a disk drive in the Windows 95' Explorer or the File Manager from Windows 3.1 and Windows NT 3.51.

The right pane provides four tabbed pages for managing Site Properties, Pages links, Site Links, and Unused Pages.

The Properties Tab

The properties Tab (like the one in Figure 11.4) displays the properties of the object selected in the left frame. This includes the site name, the site's development location, and the deployment location for the Web site.

The Page Links Tab

The Page Links Tab, like the one shown in Figure 11.5, displays a list of links to and from an HTML document selected in the left window.

Figure 11.5. The Page Links Tab.

Site Links

Site Manager is able to track links and mark them as valid, invalid, internal, or external links. The Site Links Tab, as shown in Figure 11.6, provides a way to work with links in a site.

Figure 11.6. The Site Links Tab.

On this tab, it is possible to view all links or a subset such as valid, invalid, or unchecked. Four columns present information, including validity, link type, link name, and the date the link was last checked for validity.

Unused Pages Tab

The Unused Pages Tab, like the one shown in Figure 11.7, displays pages in a site that is not being used—pages that have no other pages pointing to them.

Figure 11.7. The Unused Pages Tab.

Creating a New Site


New sites are created in Site Manager using the New Site template window. This is done by selecting New Site from the Site menu.

This opens a New Site Window like the one shown in Figure 11.8.

Figure 11.8. The Creating a site Window.

Sites can be created using one of the following options:

If you create a site from a template then the create site wizard launches the Site Manager Guru, which guides you through creating a site directory, selecting a template, and configuring the template.

If you choose to base your site on a remote site, then the wizard asks for the URL of the remote site and downloads information about the site and sets up your local site to be managed.

Empty sites also can be created.

The New Site wizard is fairly straight-forward, and guides you through the steps for creating a new site using any of these three techniques.

Managing an Existing Site


In addition to creating a new site, it's possible to bring an existing site into Site Manager for management.

This is done by selecting the site's directory in the left frame and then selecting Manage from the Site menu. Site Manager then builds the database of links needed for Site Manager to manager the site.

Managing Links in a Site


Site Manager makes it easy to fix invalid links and ensure that internal links are kept valid when you make changes to a site and its structure.

There are four types of actions that constitute site link management:


Repairing Case Sensitivity Problems

Filenames in links are case-sensitive. Site Manager can repair problems with case sensitivity. Simply select Repair Case Sense Problems from the Site menu. Site Manager then compares links to actual file names in the directory tree and fixes the links to match the actual file names.

Checking Links

Site Manager tracks links as you move documents around in a site, updating its internal database as documents move and ensuring links in documents match current document locations.

However, external links need to be checked to ensure they are valid. Choose Check External Links from the Site menu to make Site Manager check all external links.

Updating the Links Database

If you modify a file using an application other than Site Manager, then the site ceases to correspond to the Site Manager's database for the site.

To fix this, choose Update Site from the Site menu. This causes Site Manager to update its database to match the current status of the site.

The LiveWire Application Compiler


It is briefly necessary to mention the LiveWire compiler.

LiveWire applications are written in server JavaScript, which is actually embedded in the HTML source files of the application.

Where client JavaScript appears between <SCRIPT> and </SCRIPT> tags, server JavaScript needs to appear between <SERVER> and </SERVER> tags:

<SERVER>
   Server JavaScript code
</SERVER>

More information about server JavaScript is discussed in Chapter 12.

JavaScript also can be included in HTML by enclosing it between backquotes. This enables JavaScript to be evaluated in the middle of an HTML tag:

<TAG ATTRIB="some value" ATTRIB=`some JavaScript code`>

Quotes are automatically placed around the attribute value generated by the JavaScript code.

The LiveWire compiler takes the HTML, server JavaScript, and client JavaScript in a file and compiles them into a Web file with a .web extension. This file is used by LiveWire to build the HTML page to send to the client when a page is requested. Only sites that use server JavaScript in some of their files need to be compiled.

There are two ways to compile a Web file:

The command-line compiler is invoked with the command lwcomp using the following syntax:

lwcomp [-c|-v|-?] [-o output_file.web] [script1.html script2.html ...] [javascript1.js javascript2.js ...]

The options do the following:

Option Function
-c: Checks syntax but doesn't compile
-v: Specifies Verbose Output
-?: Displays help information
-o output_file: Specifies target .web file

Multiple HTML files and JavaScript libraries can be compiled at the same time with the command-line compiler.

Summary


This chapter examined the LiveWire site management and server development environment from Netscape. LiveWire offers the ability to develop complex client-server applications for deployment on the Web and offers the following features:

This chapter also looked briefly at how to use these main features in preparation for the next two chapters, which cover the basics of application development for LiveWire. Chapter 12 covers the LiveWire object tree, the core of server JavaScript, and Chapter 13, "Programming with LiveWire and JavaScript," provides a few small examples of client-server programming with LiveWire.

Previous Page Page Top TOC Next Page See Page