Introducing FirstClass Application Services
About FirstClass Application Services
FirstClass® Application Services (FCAS) is a protocol module that connects to your FirstClass server via a gateway, like Internet Services or Voice Services.
Using FCAS, you can extend the functionality of FirstClass by building applications that are then stored on the server machine. FCAS starts when the server is started, and stops when the server is shut down. FCAS applications can access the resources and databases available on the server without requiring their installation or configuration on client machines.
Developing an FCAS application once makes it available on all supported FirstClass platforms.
FCAS can run in a distributed environment. This allows you to run FCAS on a dedicated computer or, if required for high load sites, as a clustered service.
The development environment can be launched by anyone who is given a copy of the FCAS application, and can be used from any FirstClass client.
The link between the user, developer, and server is fully encrypted and secure. If you use FCAS to connect to databases, the database connection is made from the server. This means the database can remain safely behind a firewall and FirstClass permissions can be used to restrict users' access to the data.
The most basic FCAS application is a simple console to which you can print information. To make applications more useful and interactive, you must create forms. These forms are like any other custom forms, and can be distributed in the same ways.
To create FCAS applications, you first create the required forms using FirstClass Designer, then (using the BASIC language) program event procedures (such as button clicks) for the objects on the forms in FCAS.
Note
FCAS ignores spaces in your code.
Uses for FCAS applications
There are many ways you can use FCAS applications to enhance your FirstClass site's functionality. For example, FCAS applications can:
• link to customer, contact, and sales databases
• integrate user information with external databases
• extract database information and incorporate it into automatically generated messages
• import and export FirstClass information to other applications
• provide fast change password ability
• gather and process system or web statistics on the fly
• automate repetitive tasks
• create and parse FirstClass scripting scripts
• start and stop FirstClass Internet Services remotely.
Server applications
You can also create server applications that run within the server without using the client. These applications are commonly used as "watcher" applications, allowing FCAS to constantly monitor the server or databases and make changes as needed. These applications are especially useful when used with server statistics events.
Server applications can:
• query a personnel database regularly, and automatically create new FirstClass accounts for all new employees
• get server statistics event information that a new user had been created, and update the database
• create and schedule notifiers.
You can also use the SLEEP BASIC command to halt execution of a program until a specified time period has elapsed, or a specified date or time has been reached.
Server applications will ignore any FCAS code, such as displaying forms, that can't be run outside the client.
Calendar applications
Like server applications, calendar applications run within the server without using the client. They are launched through events on the FCAS gateway's calendar.
The event description must contain the application to be launched and any startupstring needed by the application. The event reminder must be set to At Time of Event, to trigger the application to launch.
If a noncalendar application is launched through the calendar, or the description doesn't match a valid calendar application, an error is reported to the FCAS console.
Calendar applications can be treated identically to server applications when programming.
Helper applications
Helper applications run either from a FirstClass rule or a central repository that associates an FCAS cluster and an application to be launched with a form ID.
In the case of rules, the association is only true when the rule is triggered. In the case of a central repository, all form IDs of that type will launch the application.
Most FCAS applications use forms that don't have an associated object on the server. Helper applications actually run whenever an "existing" object is open. Any changes made by a user are sent to the application as well as being saved to the FirstClass object.
The application can also make changes that are reflected on the server object as well as the user's client. These are useful for enhancing existing FirstClass objects and content by adding programmatic functionality to static content. For example, you could add a few fields to the User Info form which would be populated by a helper application from a personnel database or student information system.
Note
Although a rule can be configured with many "when" actions, the FirstClass server only supports the Open Item action at this time. A 301 or greater server is needed in order to prevent spurious error dialogs when using message boxes together with rules-launched helper applications. Be sure to rebuild any helper applications you have developed under previous versions after checking the status of the application type in the Options dialog.
What you should already know
This help is intended for FirstClass administrators responsible for supporting FCAS on Mac, Windows, or Linux.
You should be familiar with the capabilities and terminology of:
• the FirstClass server
• the FirstClass client
• FirstClass Designer
• the BASIC programming language
• SQL, database design, and creating ODBC data sources (open database connectivity), if you will be using FCAS with databases
• your operating system.
This help is not a programming manual. For information on programming, we recommend you read additional materials.
Basic FCAS components
Project Manager
The FCAS Project Manager ties together all the elements that you develop to create an application. It provides access to:
• information about the project as a whole
• information about the forms in the project
• code modules
• database connection information, for applications that connect to databases
• information about the database tables to use, for applications that connect to databases.
Application Monitor
The FCAS Application Monitor displays the FCAS applications that are installed on the server, and provides usage information for those that are active. An LED beside each application indicates the status of that application.
Using the Application Monitor, you can load or unload applications, and view information about each application.
Setting up FCAS
After you have installed FCAS, you need to:
• set a password on the gateway that enables FCAS to talk to the server, for security
• update the fcas.fc settings file that connects you to the FCAS administrator's Desktop.
Setting the FCAS gateway password
1 Open the Gateways & Services folder on the administrator's Desktop.
2 Open the FCAS gateway form.
By default, "Service Name" is FCAS and "Service account number" is 5000000000 (5 billion). If you have several clustered FCAS services, each will have a unique name.
3 Click Directory.
4 Type a password at "Password".
Updating fcas.fc
1 Double-click the fcas.fc settings file in the FCAS folder.
This folder is on the dedicated machine or in the FCServer/FirstClass Server folder.
2 Click Setup on the FirstClass Login form.
3 Fill in the following information:
User ID |
5000000000 |
Password |
The password you entered for the FCAS gateway. |
Server |
The IP address of your FirstClass server. If FCAS is installed on the server machine, this is 127.0.0.1. |
Starting FCAS
Windows
The FCAS installation places an FCAS executable in the FCAS folder.
To start FCAS, double-click the FCAS icon, or a desktop shortcut to it. The FCAS console opens. When the console displays "FCAS initialized and ready", you are ready to use FCAS.
Mac and Linux
The FCAS installation places an FCAS executable called fcasd in the FCAS folder. You can start fcasd directly using fcasd -d, but we recommend that you use the fcasctl shell script provided.
The fcasctl shell script lets you manually start, stop, and check the status of FCAS. To run fcasctl:
1 Open a Terminal window.
2 Type /usr/sbin/fcasctl and end with one of these commands:
To |
Use this command |
Start FCAS. |
start |
Shut down FCAS normally. |
stop |
Stop FCAS immediately. |
force |
Check whether FCAS is running. |
status |
List fcasctl commands. |
help |
Note
If prompted for a password, type the fcadmin user's password.
FCAS and RAD
FirstClass Rapid Application Developer (RAD) was the predecessor to FCAS.
Compatibility with RAD.DLL
Applications built with the RAD.DLL version will continue to function on FCAS with no changes, rebuilding, or code changes in most cases. There are a few exceptions due to the fact that FCAS can be run on a separate machine from the server:
• You will have to update applications that are coded to do file access on files that:
• are located on the server machine
• can't be moved to the FCAS machine or have changed paths hard coded into the application.
• Data sources on the new machine will need to be updated to match the server's configuration.
If data sources are hard coded into the application, the application may need to be updated.
The FCPOFolder command now returns the directory that FCAS.exe was launched from, so that applications using this can continue to function without modification.
Migrating RAD applications to FCAS
RAD can run concurrently with FCAS, so there is no need to use one or the other exclusively.
The steps documented here assume that RAD is installed and running some applications, and that you also have FCAS installed and want to migrate the RAD applications to FCAS.
To migrate a RAD application to FCAS:
1 Unload the RAD application.
Open the Application Monitor in FirstClass RAD on the administrator's Desktop. Make sure there are no sessions in use before you select the application and click Unload.
2 Remove the application from RAD.
Remove the .fcx file from the FCNS/FCRAD folder, but don't delete the file.
3 Upload the application to the FCAS Online Applications folder in Clustered Services/FCAS Config.
4 Move any related data files to the FCAS environment.
This only applies if the application connects to a file-based ODBC data source such as Microsoft Access Database. It's only necessary if FCAS is installed on a different machine from the server, but is recommended so that it's clear which data sources belong to RAD applications and which to FCAS applications.
Move the data files from the data folder in RAD (typically FCNS/FCRAD/DATA) to the corresponding FCAS folder.
5 Recreate the ODBC DSN.
This only applies if the application connects to a file-based ODBC data source. Unless the ODBC data source is embedded within the application itself, there will be an ODBC Data Source Name (DSN) associated with it.
6 Load the application under FCAS.
Open the FCAS Application Monitor, select the application, and click Load.
7 Change the extension for the installed stationery that launches the application.
RAD applications use the RAD.DLL extension on installed modules. FCAS applications use the name of the gateway (normally FCAS in single clustered environments).
To change the extension, clear "Read only" in the stationery's properties. Double-click the stationery, and the Rapid Application Installer will open. Change the extension name to the name of your FCAS gateway. Finally, select the "Read only" property once more.
Note
If you are migrating all RAD applications to FCAS, you can make a global change to the application extensions. To do this, open the FCAS Configuration form and select "Emulate RAD.DLL".
Folders and files installed with FCAS
FirstClass installs these items in the FCAS Config folder in the Clustered Services conference on the administrator's Desktop:
Application Monitor |
Displays information about the FCAS version you are running, as well as information about current usage. CautionLeave this form protected or it won't work. |
Console application |
Displays the same information as the console on the FCAS machine, plus menus that let you control logging and debugging. |
Online Applications folder |
Contains the applications you create. The following applications are installed by default and must always be in this container: • rad.fcx (required to run FCAS) • appmonitor.fcx (required to run the Application Monitor). |
FirstClass RAD folder |
CautionThis form must be protected and read only or it won't work. NoteThe administrator is not a member of the RAD Developers group by default. If you are trying to access the project form and you receive an error message stating that you do not have access, you have not given the
administrator RAD development privileges. Add the RAD Developers group to the User Groups/Directory tab of the administrator's User Information form. |
FCAS Configuration |
The Configuration form is used to set configuration, debug and logging options. |
Language Support folder |
By default, this folder contains English.lang and Strings.rad files. These text files contain the English strings which would be translated to create a localized FCAS version. |
Profiles folder |
Contains information about each user who accesses the rad.fcx application. It stores the client ID and current application a user is working on. |
|