|
Tools Guide |
The SilverStream Main Designer is the jumping-off point for accessing the other Designers that enable you to create forms, views, tables, pages, business objects, and supporting files.
Some information is cached The Main Designer caches some of its information, so if you make changes outside of the Designer (such as using SilverCmd to set a default URL), you won't see the change in the running instance of the Designer. To see the change, close the Designer and open a new instance.
This chapter describes the following:
|
Keystroke |
Description |
|---|---|
You can log in from the Main Designer.
For information on providing user name and password, see the chapter on setting up security in the Administrator's Guide of the server's Core Help.
You can configure your SilverStream development environment in the following ways:
The Preferences dialog appears.
Set your preferences. See the following sections for information about the preferences.
Specify General preferences as follows.
|
Setting |
Description |
|---|---|
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. | |
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.
| |
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 (SilverHelp) 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). |
Specify Compiler preferences as follows:
|
Setting |
Description |
|---|---|
Directory containing the compiler. Change the directory if you are not using the default compiler. | |
Arguments you want passed to the compiler (such as -verbose). See your compiler documentation for more information. | |
If checked, debugging information will be included in the compiled Java code. | |
Directory containing the compile cache.
|
Specify Editor preferences as follows:
|
Setting |
Description |
|---|---|
Name of font to use in the SilverStream Programming Editor and Business Object Designer. | |
Size of font to use in the SilverStream Programming Editor and Business Object Designer. | |
Style of font to use in the SilverStream Programming Editor and Business Object Designer. | |
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).
NOTE Regardless of the setting you choose here, the underlying generated code is the same. | |
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. |
Specify printing preferences as follows:
|
Setting |
Description |
|---|---|
Print in monochome or chromacode. If you have a color printer, you can print your Java source file as a chroma-coded listing. A chroma-coded listing displays the colors SilverStream uses to highlight important code elements.
| |
Font size for printed output. Values range from 6 through 24. | |
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:
Highlight the SilverStream server that you want to add the existing database to.
Select the Add Database icon from the toolbar that appears at the top of the SilverStream Designer window or choose File>Add Database.
A dialog displays prompting you to enter information about the database.
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 |
|---|---|
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. | |
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 the chapter on database configuration in the Administrator's Guide of the server's Core Help. | |
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. | |
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.) | |
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:
|
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 using SilverCmd. For more information, see the chapter on SilverCmd in the Facilities Guide of the server's Core Help.
If you are not using a SilverStream driver set, you must supply additional information.
The following describes each of the fields on this dialog.
See your JDBC driver documentation for more details.
If you don't need to maintain a connection between a database and the SilverStream server, you can remove the connection.
To remove a database connection with the server:
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).
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.
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.
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:
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.
Enter the server name and port number unless it's the default port, 80.
If you are using separate ports, you may need to get the design port number from your administrator. If the server is not listening at the default HTTP design port, specify server:design_port. For example,
https://server:RSA_port
For more information on using separate ports, see the chapter on running the server in the Administrator's Guide of the server's Core Help.
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.
To shut down or restart the server:
Highlight the SilverStream server that you want to shut down or restart.
The Shut down or Restart dialog displays.
Select Deactivate server first if you want the server deactivated before it is shut down or restarted (see below for more information).
What happens next depends on whether you selected Deactivate server first.
For information on programmatically handling server deactivation, see the chapter on server-triggered business objects in the Programmer's Guide.
You use the Main Designer and the other designers to create, save, rename, and delete objects, such as forms and pages.
From the Main Designer, create a new object or open an existing object.
To create a new object, select the object type in the left panel and click the New icon (
). A wizard displays.
To open an existing object, select it and click the Design icon (
). The corresponding designer opens.
For more information, see the chapter in this guide for the corresponding designer.
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.
Select Edit>Delete or press the Delete key.
You are asked to confirm the deletion.
Click Yes to delete the object.
The object is permanently deleted.
You can specify a default page for a database or for a server.
To set server or database default pages:
On the Page tab, do the following.
|
Click this button |
Result |
|---|---|
The page will be displayed if the user specifies the URL for the database. | |
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.
SilverStream provides two consoles that you can use to help debug your application.
|
Console |
Description |
|---|---|
Used for server-side debugging. Displays the following:
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.
| |
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.
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.
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.
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.
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:
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.
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 appears.
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.
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.
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.
If you are publishing tables, the Table Changes list box appears. It lists the table modifications (if any) that will be made.
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.
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.
You can also export items from the Media Store to disk with the PublishToFile SilverCmd.
For more information about SilverCmd, see the chapter on SilverCmd in the Facilities Guide of the server's Core Help.
To use the Media Store with the Designer:
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.
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:
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.
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.
Upload Media Items uploads image, sound, HTML, and other miscellaneous file types to SilverStream. When you select this option, the Upload Media Items dialog appears. Select the file or files you want to upload. Press Control and click to select multiple non-contiguous items; press Shift and click to select multiple contiguous items. Click Open. SilverStream puts the object(s) in the corresponding directory (objects other than images and sounds are placed in the General directory).
Upload JAR, ZIP, or EJB uploads one or more JAR or ZIP files to SilverStream. When you select this item, the Upload JAR, ZIP, or EJB dialog displays. Select the file or files you want to upload. Press Control and click to select multiple non-contiguous items; press Shift and click to select multiple contiguous items. Click Open. SilverStream places the file in the Jars directory.
Create JAR and Create EJB JAR accesses the SilverStream Jar Designer which allows you to create your own standard JAR files or EJB JAR files. For more information, see JAR Designer.
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.
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:
Select the object whose properties you want to view from the right pane of the SilverStream Designer and select the Inspector icon from the SilverStream toolbar or select View>Property Inspector.
The Property Inspector dialog displays. It contains information about the object.
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.
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.
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.
Select the database where the directory is located that you want to compile.
Choose the appropriate directory (Forms, Views, Objects, or Pages).
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.
Select the directory containing the item that you want to compile (Forms, Views, Objects, or Pages).
Select the specific item(s) from the list that appears in the right pane.
Select Build from the File menu. The Build cascading menu appears.
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.
You can place your SilverStream objects under source control using the Main Designer.
For more information, see
SilverStream Source Control.
|
Tools Guide |
Copyright © 2001, SilverStream Software, Inc. All rights reserved.