WorkNet - an OnLine Employment Service

Overview

WorkNet is a LiveWire Pro application that can really be looked at as a composite of several, reusable components that many sites designed with LiveWire will most likely want to incorporate in some form. The purpose of the WorkNet application is not only to show how these common components can be constructed using LiveWire, but it also allows LiveWire developers to take code directly from WorkNet and make a few modifications to fit their needs. In other words, if your site needs User Management features, Login/Security features, etc. rather than creating them from scratch, you can use the code and documentation in WorkNet either directly, or as a guide to developing your applications.


Passwords and UserID's you will need to test out the application:


WorkNet Architecture

WorkNet is divided into several major components:

The site is divided up into several subdirectories in an effort to keep each component and it's functions as distinct and reusable as possible. Most functions for a component reside within a single subdirectory whereever possible.

User Management

The User Management component allows basic data entry operations on database tables. Adding new users (of distinct user types), editing user attributes, listing current users (which can depend on security - i.e. who is given permission to look at particular user information), etc. Most of the data entry forms for WorkNet deal, of course, with fields that are specific to the WorkNet database on the back-end. However, the concepts for adding, updating and listing users is exactly the same as what you will see in the WorkNet code. All that needs to be changed are the names of the form elements and the cursor field names, and the code can be easily re-used.

The User Management component consists of the following files under the worknet directory:

Under the "root" directory worknet:

Under the profile subdirectory:

Under the lib subirectory:

Login/Security

The security component of the WorkNet application allows a LiveWire Pro developer to add security to their application without having to rely upon the server administrator to set up allowable users or IP addresses. With the security component, the LiveWire developer has control over what users are allowed or disallowed in certain pages. Essentially, the security feature uses one function in a library (.js) file, along with the Informix database that contains userid's and passwords, to check for authorization at the page level. In fact, this security component can be used at even deeper levels, disallowing viewing of particular fields of the database to different users, for example. Users are authorized via a login screen which checks the userid and password against what the user enters.

The files involved are:

Site Management

The Site Management functions allow the administrators of the site to perform special operations that are restricted to those with administrative privileges. For example, in WorkNet, administrators are allowed to activate and deactivate particular Employers and Advertisers. Obviously, not just anyone should have this kind of power over the user database.

Site Management consists of the following files:

Matching Engine

The Matching engine allows job seekers to find jobs offered by employers. However, it is not merely a site-specific searching engine. The code demonstrates how one can construct a component that allows one thing to be matched with another. The rules used to match seekers to jobs are specific to WorkNet, but the structure of the code in the searching engine shows how to construct if-else statements to implement the matching rules, it illustrates a scoring system for weighting matches, and much of the code could be reused in other searching or matching applications.

The Matching Engine consists of:

Advertising Component

The Advertising component allows LiveWire Pro developers to manage advertiser accounts within a database. Many sites have sponsors with small, hot-linked graphics on the site in return for payment. The advertising functions allow site administrators to add, modify and activate/deactivate advertisers quickly and easily. Since the database stores information about the GIF file to be used for the sponsor ad and the url that it should link to, it would be a simple task for devlopers to write a short function that would randomly pick an advertiser graphic, and construct the link on a page.

The Advertising component consists of:


Other Support Functions

In the lib subdirectory, there are several .js files which contain some useful functions that are used throughout the WorkNet application. For instance, before data can be sent to the Informix database via SQL, some processing must be done on the data to "escape" non-printable characters, like carriage returns. In the sqlstr.js file, you will find several functions used to process data both before it is loaded into the SQL statment, and when data is retrieved from the database. LiveWire devleopers may find them very useful as they are completely generic and will work with any SQL statement. These functions are fully documented and it is recommended that developers take a look and see how to use them.

Also present are some functions to dynamically create some form elements which would otherwise be laborious, or which are used often in many sites. There are functions to:

Each function is very configurable and will save a lot of time. Also, each of these functions are ready-to-use with no modifcations necessary whatsoever. Just "plug and play" reading the function documentation first to determine how to call the functions and what arguments are necessary.


Back to the WorkNet Home Page