Tools Guide



Chapter 1   Main Designer

The SilverStream Main Designer is the jumping-off point for accessing the other Designers that enable you to create forms, views, tables, Web pages, business objects, and supporting files.

This page describes the following:

Main Designer keyboard shortcuts   Top of page

Use these keyboard shortcuts:

Keystroke

Description

F1

Open Help

F4

Open Property Inspector

F5

Refresh the display

Logging in   Top of page

You can log in from the Main Designer.

To log in:

  1. Select File>Login.

    The Enter Password dialog displays.

  2. Specify your user name and password.

    For information on providing user name and password, see the Security chapter in the Administrator's Guide.

Setting preferences   Top of page

You can configure your SilverStream development environment in the following ways:

To specify preferences:

  1. Select Edit>Preferences.

    The Preferences dialog appears.

  2. Select the tab you want.

  3. Set your preferences. See the following sections for information about the preferences.

  4. Click OK to save the preferences.

General preferences   Top of page

Specify General preferences as follows.

Setting

Description

Browser

Specifies the browser to use when running pages from within the Designer.

By default, SilverStream lists your default browser. To choose a different browser, change the pathname to the appropriate browser either by typing or the path or clicking Browse and selecting the browser.

Log Designer console output to a file

Select this check box if you want to save your Designer console log in a file. If you select this option, specify the file to save the log in. The Designer console log contains the same information as the Java console, plus information specific to the Designer.

    For more information about the Java console, see Using the Server and Java consoles.

Help files on local file system or in database

Specifies whether you want SilverStream to access help from your local file system or from a database.

NOTE   Running help from a database is available only in Windows.

In Windows, you can run the SilverStream help system in a Sybase Adaptive Server Anywhere database on the server. This gives you full-text search using the Fulcrum engine. Or you can run help from files in your local file system (with no full-text search). By default, the help database is installed and used. You can choose not to install the help database (for example, to save disk space) or not to install the help files (for example, if you will be running help only from the database).

If you did install the help database (and installed Sybase Adaptive Server Anywhere), you can specify here whether you want SilverStream to access help through the database (SilverHelp3) on a server or through the file system (a directory structure in the SilverStream installation directory on your local machine).

If you choose to use the help system from a database, specify a server name (by default, it is the local machine).

Compiler preferences   Top of page

Specify Compiler preferences as follows:

Setting

Description

Compiler

The name of the compiler. Select from the list.

Compiler directory

Directory containing the compiler. Change the directory if you are not using the default compiler.

Compiler flags

Arguments you want passed to the compiler (such as -verbose). See your compiler documentation for more information.

Include debugging information

If checked, debugging information will be included in the compiled Java code.

Compile-cache directory

Directory containing the compile cache.

    For more information, see the description of the compile cache in the chapter about coding Java in the Programmer's Guide.

Editor preferences   Top of page

Specify Editor preferences as follows:

Setting

Description

Font name

Name of font to use in the SilverStream Programming Editor and Business Object Designer.

Font size

Size of font to use in the SilverStream Programming Editor and Business Object Designer.

Font style

Style of font to use in the SilverStream Programming Editor and Business Object Designer.

Form Designer generates simple actions or Java code

Select Simple actions to have the Form Wizard generate simple actions. You can use simple actions to simplify your coding.

Select Java code to have the Form Wizard generate only the actual Java code. If you select this option, you cannot use simple actions in forms (that is, you can work only in Java mode in the Programming Editor).

    For more information about Simple Actions mode and Java mode, see the Programming Editor.

NOTE   Regardless of the setting you choose here, the underlying generated code is the same.

External editor command line

Command line that SilverStream issues when you invoke an external editor from the Programming Editor or Business Object Designer.

NOTE   If you invoke an external editor and have not specified a command line here, the file will be opened in whatever editor is specified for the .JAVA file type in the Windows Explorer.

Adding a database to use with SilverStream   Top of page

When you start the SilverStream Designer, a list of registered SilverStream servers appears. To see a list of databases that reside on a server, select the plus sign (+) that appears to the left of the server icon. The SilverMaster database should appear. It contains data used by all the SilverStream applications that reside on that server.

If you want to use a database of your own, you must tell SilverStream what database to use. (For information about setting up database accounts, see the Installation Guide.) You also have the option of storing the system tables that SilverStream creates in a separate database from tables you have created (the system tables contain the objects that comprise your SilverStream application, such as the pages and business objects).

To set up an existing database for use with SilverStream:

  1. Highlight the SilverStream server that you want to add the existing database to.

  2. Select the Add Database icon from the toolbar that appears at the top of the SilverStream Designer window or choose Add Database from the File menu.

    A dialog box displays, prompting you to enter information about the database.

  3. Use the table below to enter the information for the database. If you need help, see the chapter in the Installation Guide that covers your DBMS.

    Field

    Entry

    Name of the database

    For an ODBC database, the database name must be an already existing ODBC data source name. If you are using non-ODBC access, see the Driver set field below.

    User name and password

    Enter a user name and password pair that the SilverStream Server can use for a database user connection to your native database. These values cannot be null.

    This user name must already be known to the native database and have the appropriate read/write permissions.

    NOTE   Your administrator should have defined a unique "user" for each application database (all users can have the same password). For more information, see Setting up a supported database in the Administrator's Guide.

    Database platform

    Choose from the list of supported database platforms.

    Driver set

    Choose the driver set to use from the list (a driver set is a combination of a JDBC driver and SilverStream-specific files).

    The listed driver sets are specific to the database platform you selected. The driver set recommended for your database type is displayed by default.

    If you select a non-SilverStream driver set (that is, a driver set whose name does not begin with SilverStream), then see Using non-SilverStream driver sets.

    Store system table separately from data tables

    If you plan to use a production database that other applications access, you may not want to add SilverStream system tables to it. This option allows you to store the SilverStream system tables in another database.

    If you check this option and click Next a dialog displays asking you to name the system table database. (This database must already exist.)

    Include only a subset of tables

    You might not want to use all the tables in the database you are adding. By selecting this option, you can specify a subset of tables to make available on the server.

    If you select this option and click Next, a dialog displays with two list boxes. In the top box, you can manually name each table you want to use. In the lower box, you can specify patterns to indicate sets of tables. For example, you could specify cust% to use all tables starting with cust. Click Next to continue. You will be shown which tables are no longer available and which are. Make any changes you want and click Finish.

    You can later change which tables are available:

    1. In the Main Designer, expand the database you are working with.

    2. Select the Tables icon in the left pane of the Main Designer for the database.

      A list of tables that are available in the database you specified appears.

      The Modify Table List icon ( ) appears in the Action Gallery located at the bottom of the right pane.

    3. Select the Modify Table List icon. Specify which tables you want available, as described above.

What happens

When you add a database, SilverStream adds an entry in the SilverMaster database and also adds SilverStream system tables to your database (unless you specified to keep system tables separate from your data, in which case, the system tables are added to the other database).

Storing system tables separately from the data

If you are storing the SilverStream system tables separately from the data, SilverStream will store all the application components (such as pages, forms, and business objects) in the specified system database. However, you work with the application database as if the objects were being stored in it. You use the Designer to open and save objects from within the application database. The system database doesn't display in the Designer. The Designer lists all the application objects as if they were stored in the application database, even though they are stored in the separate system database.

Adding a database from the command line

You can also add a database to the server from the command line or from a batch file. For more information, see SilverCmd Reference.

Using non-SilverStream driver sets

If you are not using a SilverStream driver set, you must supply additional information.

The following describes each of the fields on this dialog.

Field

Entry

JDBC Driver

(Read-only) The fully qualified name of your JDBC driver class. For example:

  com.sybase.jdbc.SybDriver 

NOTE   Package names, like all Java names, are case-sensitive.

JDBC URL

The URL string defined by the driver vendor to connect to your database. The string contains replaceable parameters surrounded by percent signs (%), such as %HOST%.

For example:

  jdbc:sybase:Tds:%HOST%:%PORT%/%DATABASE% 

Substitute these parameters with values appropriate to your database.

JDBC URL attributes

Any additional attributes defined by the vendor that you can use to customize the driver connection. For example:

  cache=100 

    See your JDBC driver documentation for more details.

Removing a database   Top of page

If you don't need to maintain a connection between a database and the SilverStream Server (for example, you have gone through the tutorial and no longer need to use the tutorial database), you can remove the connection.

To remove a database connection with the server:

  1. Select the database in the SilverStream Designer.

  2. Do either of the following:

  3. Confirm the deletion.

What happens

When you remove a database connection from the server, SilverStream removed the entry from SilverMaster but leaves the database itself fully intact (including the SilverStream system tables).

Creating a new database   Top of page

To create a new database:

  1. Create a standard database with the proper user accounts following the normal procedure for your DBMS.

        For more information, see the chapter about your DBMS in the Installation Guide.

  2. Follow the steps in Adding a database to use with SilverStream to add tables and register your new database with the SilverMaster database on your selected SilverStream application server.

Connecting to a different server   Top of page

You can use the Main Designer to connect to additional SilverStream servers and/or to establish a secure connection to a SilverStream server.

To connect to a SilverStream server:

  1. Select the Choose Server icon from the SilverStream Designer toolbar or select Choose Server from the File menu.

    The SilverStream Designer dialog displays, prompting you to enter the name of the new server.

  2. Enter the server name. If the server is not listening at the default port 80, specify server:port.

    Establishing a secure connection    By default, all communication between the Designer and the server is unsecured. If the server you are connecting to is listening on the DSA port, you can create a secure (encrypted) connection to the server by specifying the following for the server:

      https://server:DSA_port 
    

    The default DSA port is 444.

        For more information, see Establishing a secure connection to the server in the security chapter in the Administrator's Guide.

  3. Click OK.

What happens

A new server icon appears in the left pane of the main window. This icon displays the name of the server you selected. To see a list of databases that reside on the server, select the plus (+) sign that appears in front of the icon.

Shutting down or restarting the server   Top of page

To shut down or restart the server:

  1. Highlight the SilverStream server that you want to shut down or restart.

  2. Select File>Shutdown Server.

    The Shut down or Restart dialog displays.

  3. Select either Shut down the server or Restart the server.

  4. Select Deactivate server first if you want the server deactivated before it is shut down or restarted (see below for more information).

  5. Select OK.

What happens next depends on whether you selected Deactivate server first.

Situation

Result

Deactivate server first is not selected.

The server is immediately shut down or restarted.

Deactivate server first is selected.

No new client sessions can be established, but existing client sessions continue to operate normally. In clusters, the deactivated server is unregistered from the Load Balancer so new sessions will not be dispatched to the server (if you are using a third-party load balancer, SilverStream has no way of notifying it that the server is deactivated).

Once the the last client session is closed (typically five minutes after the last client connection is closed), the server is declared deactivated and is shut down or restarted.

    For information on programmatically handling server deactivation, see the chapter on server-triggered business objects in the Programmer's Guide.

Creating, saving, renaming, and deleting objects   Top of page

You use the Main Designer and the other designers to create, save, rename, and delete objects, such as forms and pages.

To create and save an object:

  1. From the Main Designer, create a new object or open an existing object.

  2. Make whatever changes you want, then select File>Save in the designer.

    The object is saved in the database and listed in the Main Designer.

    NOTE   If in Step 2 you specify the name of an existing object of the same type, but specify a different combination of upper- and lowercase letters, you will receive an error due to Java's case sensitivity. Go to the Main Designer, delete the existing object, then save the new object.

To rename an object:

  1. Open it in the corresponding designer.

  2. Select File>Save As and assign the object the new name.

  3. Delete the original object in the Main Designer.

To delete an object:

  1. Select the object in the Main Designer.

  2. Select Edit>Delete or press the Delete key.

    You are asked to confirm the deletion.

  3. Click Yes to delete the object.

    The object is permanently deleted.

Setting default pages   Top of page

You can specify a default page for a database or for a server.

Page

Description

Default database page

The page that displays when the user requests the URL for the database, such as http://localhost/SilverBooks/. If there is no default database page defined, the user would see a directory listing for the database (if this is allowed by the administrator).

This is also the page that displays when you select the Run Database icon in the Main Designer.

Default server page

The page that displays when the user requests the URL for the server, such as http://localhost/. If there is no default server page defined, the user would see a directory listing for the server (if this is allowed by the administrator).

To set server or database default pages:

  1. Open the Main Designer.

  2. Select the page you want to set as the default page.

  3. Open the Property Inspector.

  4. On the Page tab, do the following.

    Click this button

    Result

    Make default database page

    The page will be displayed if the user specifies the URL for the database.

    Make default server page

    The page will be displayed if the user specifies the URL for the server.

    The default pages can also be set or cleared from the Server and Database tabs in the Property Inspector.

The Main Designer shows the default server page and default database page using a house icon.

Using the Server and Java consoles   Top of page

SilverStream provides two consoles that you can use to help debug your application.

Console

Description

Server Console

Used for server-side debugging. Displays the following:

  • Debugging information (such as http GET, PUT, and POST requests from each client) if debugging levels have been set in the SilverStream Management Console (SMC).

        For more information, see the section on low-level debugging in the Administrator's Guide.

  • Output to System.out and System.err from pages and business objects.

    So one way to debug your pages and business objects is by including System.out.println statements in your code and viewing the Server Console.

NOTE   This console shows the same information as the window that opens when you start the server (if the server is not started as a service). The advantage of opening the Server Console from the Designer is that you can easily save the output in a file.

Java Console

Used for client-side debugging. Displays the following:

  • Compiler messages.

  • Output to System.out and System.err from Java clients to the server, such as forms.

    So one way to debug your forms is by including System.out.println statements in your code and viewing the Java Console.

To use the consoles:

  1. Select View>Server Console or View>Java Console from the SilverStream Designer.

    The Server Console displays http://server-name/ in its title bar. The Java Console displays Console in its title bar.

  2. To save the console logs to a file, click Save to File and specify a file. The console log is saved as a text file.

  3. To clear the console log, click Clear.

  4. To close the console, click Close.

Backing up your data   Top of page

A SilverStream database consists of your existing database tables plus SilverStream system tables. The SilverStream system tables are ordinary database tables that are either added to your application database or are stored in a separate database. They can be backed up like any other table in your database using your DBMS's backup utility.

Replicating databases    Top of page

SilverStream stores all application information (including SilverStream metadata such as forms, views, and scripts) in the database, so you can use the standard replication features of your DBMS to upgrade and maintain replica copies. Replication involves duplication and distribution. It's important to make sure your data and structure remain in synch with each other.

    See your DBMS documentation for details.

Publishing   Top of page

You can use Publish to copy objects from one database to another. For example, you can use Publish to copy your application from a development server to a production server. You can copy an entire database or selected objects.

    For more information about publishing objects, including issues that can arise when publishing, see the deployment chapter in the Programmer's Guide.

To publish objects from one database to another:

  1. Select the Publish icon from the SilverStream Designer or select Publish from the File menu. A dialog box appears that prompts you to select the source and destination servers and databases.

  2. Select the source server and database from the directory tree that appears in the left pane. Select the destination server and database from the directory tree in the right pane. Click Next>. A dialog box appears.

  3. Select the objects in the source database that you want to publish to the destination database. You can copy entire directories at once.

    If you want to publish the database schema, highlight Tables and add it to the Publish To list. Publishing the tables schema is an all-or-nothing choice; you cannot select individual tables.

    NOTE   Publishing tables does not copy table data or elements that the SilverStream Designer can't build. For example, it doesn't copy indexes or stored procedures from the source database to the destination database.

  4. Check the Remove source code and design information from published version check box to protect your source code and any design information that you do not want edited.

    For example, say you are creating a SilverStream application for a customer. You want to give them the compiled application but you do not want to include the source code because it contains trade secrets in the form of special code and your own comments. By default, SilverStream publishes both the compiled binary form of the application and the Java source code. Check this box to publish only the compiled form of the application.

  5. When you finish making your selections, click Finish.

    A message appears warning you that similar objects that already exist in the destination database could be overwritten.

  6. Click OK.

    If you are publishing tables, the Table Changes list box appears. It lists the table modifications (if any) that will be made.

  7. If the changes are acceptable, click OK to begin the publish process. Click Cancel to stop.

    SilverStream displays a messsage box when the publishing is complete.

Using the Media Store    Top of page

The SilverStream Server supports the use of JavaBeans, Enterprise JavaBeans, image files, sound files, and other objects in your applications. These items are maintained in the SilverStream Media Store.

You can add or delete items from the Media Store by accessing the Media Store from the SilverStream Designer or by using the ImportMedia or Delete SilverCmd.

NOTE   Use ImportMedia to import multiple files at once (with the Designer, you can only import one file at a time).

You can also export items from the Media Store to disk with the PublishToFile SilverCmd.

    For more information about SilverCmd, see the SilverCmd Reference.

To use the Media Store with the Designer:

  1. Select the database you want to use from the SilverStream Designer. To see a list of the objects available with that database, select the plus sign (+) that appears to the left of the database icon.

  2. Select the EJB JARs & Media icon to see the list of objects stored in that database. The following list appears in the right pane of the main window:

  3. Select the plus sign (+) that appears to the left of each icon to see a list of available objects of that type. If there are no objects available, the plus sign does not appear.

  4. To upload an object from your hard disk or the network to the SilverStream Media Store, select the New icon ( ) from the action gallery that appears at the bottom of the right pane.

    A pop-up menu displays.

  5. Select one of the following:

  6. To delete a resource from the Media Store, select it from the list and then select Delete from the Edit menu, or press the Delete key. Confirm the deletion.

Using the Property Inspector    Top of page

You can use the Property Inspector to view the properties for objects contained in a selected database.

    For more information about properties, see About Properties and Events in the Property and Event Reference.

To use the Property Inspector:

Using the Build command   Top of page

Use the Build command to compile code for:

Whenever you do a Get from Source Control, you should use the Build command to compile the code.

Note that Build does not resave the SilverStream object. It simply compiles the existing source.

To build a database:

  1. Select the database you want to build from the left pane of the SilverStream Designer. Choose Build from the File menu. A cascading menu appears.

  2. Select Build Database. The Build dialog box appears. It lists all of the items in the database that are compiling. It also displays any warning or error messages that might be generated.

  3. Press Close to return to the Main Designer.

To build a directory:

  1. Select the database where the directory is located that you want to compile.

  2. Choose the appropriate directory (Forms, Views, Objects, or Pages).

  3. Select Build Directory from the Build cascading menu. The Build dialog box appears and lists all of the items in the directory that are compiling.

  4. Press Close to return to the Main Designer.

To build specific items:

  1. Select the directory containing the item that you want to compile (Forms, Views, Objects, or Pages).

  2. Select the specific item(s) from the list that appears in the right pane.

  3. Select Build from the File menu. The Build cascading menu appears.

  4. Choose Build Selected.

    The Build dialog box appears. It contains information about the specific items that are being compiled. It also displays any compile errors or warnings that might be generated.

  5. Press Close to return to the Main Designer.

Using source control   Top of page

You can place your SilverStream objects under source control using the Main Designer.

    For more information, see SilverStream Source Control.






Copyright © 2000, SilverStream Software, Inc. All rights reserved.