Getting Started-JetNet |
When you begin to build a database application, you need to create a repository. A repository that resides on the server lets you as well as other members of the development team take advantage of its contents. You can directly, or via the screen wizard, use the database-derived objects in the repository to create client screens and service components.
In this lesson, you learn how to create a remote repository using the editor and populate it with imported database objects. The import process creates a screen, or repository entry, in the open repository for each database table that you import. The repository entry contains widgets representing each column defined in the database table.
In this lesson you learn how to:
When you start one of Panther's editors, such as the screen editor, menu bar editor, or JIF editor, and you want to access libraries through the middleware, you need to open a middleware connection. After you connect to the middleware, you can access libraries and repositories located on the server machine, and the data base specified in the server configuration.
Windows – The Connect dialog opens and displays the information you provided in your Windows initialization file. Choose OK to accept the settings.
UNIX – Choose FileOpenMiddleware Session. The Connect dialog displays the location of the configuration file (broker.bin) as you specified in your environment setup.
If the information is correct–that is, it matches the entries in your server setup–you are connected to the middleware. Otherwise, you have no access to the remote libraries on the server which are required for the tutorial.
The editor workspace opens.
Many commonly used commands and tasks can be executed by choosing the appropriate toolbar item. This tutorial acquaints you with most of the File menu commands that are associated with these toolbar buttons:
More About Toolbars
The editor's toolbar:
You can also use the Panther menu bar editor to create menus and toolbars to attach to individual screens or to the application as a whole.
Create a remote repository where you can store imported database objects.
The New Remote Repository dialog opens.
data.dic
as the name of a repository in the Repository field.
On startup, the editor automatically opens any local repository with the name data.dic
.
On Windows, to automatically open the remote repository, set the SMDICNAME
variable to host!data.dic in your prtut.ini
initialization file.
Creating a new repository automatically closes any repository that is open.
More About Repositories
You can create local as well as remote repositories when you are connected to the middleware and running a file access server. Remote repositories can be accessed by the development team and thereby provide a consistent appearance and behavior to your application. You can control the look and feel of application objects by modifying objects in a repository. From this centralized location, you can use and reuse the objects throughout the development of your application. Changes that you make to repository objects automatically propagate to the various screens that contain copies of the objects. This greatly simplifies both application development and maintenance.
A direct connection to the database (that is, not connecting through the middleware) allows you to import database definitions. A direct connection also lets you test a simple client/server model (two-tier processing) or the service component behavior in a three-tier, distributed application model.
The Choose Engine dialog opens.
jdb
is the engine and the connection is dm_jdb0_conn
). A database-specific dialog appears.More About JDB
JDB is Panther's single-user SQL database. You can use it to quickly prototype your application and refine multi-user database applications without the need for an external third-party database.
You are now connected directly to the local copy of the database. You also have a connection, via the middleware, to the remote database on your server which was made available when the server was activated.
Note: If the vidsales database is not in your current directory, locate it with the dialog.
When you import database objects into the repository, you can take advantage of the data definitions already in the database. The import process creates one screen in the repository for each selected database object. The contents of the resulting repository screens can be used to build application screens that access data. The next few steps show how to import database information into Panther.
More About Importing Database Objects
You can import database table definitions into the repository at the outset of your development process, and reimport whenever the database schema changes. Also, if your database engine supports other database object types, such as views and synonyms, you can import those as well.
All screen objects that inherit from repository objects are maintained without your having to access the database or manually edit client screens and service components. Development can continue even when the database is inaccessible or unavailable.
The Import Database Objects dialog opens. All tables in the vidsales database are listed.
When you select a table, the detail information for the table is displayed in Column Descriptions: column name, data type, and length. You can select multiple tables simultaneously: click+drag or Shift+click to select contiguous objects; Ctrl+click to select noncontiguous objects.
The status line informs you of each table imported into the repository and notifies you when the import process is completed.
You can use the repository table of contents (TOC) to select and open repository entries successively for copying and editing purposes. The TOC can remain open during your editing session.
This menu option toggles the display of the Repository table of contents. The TOC opens and displays a list of all entries in the open repository.
In this lesson, you invoked the editor and:
You learned:
What did you learn?