Building an application
This section describes the basic steps you follow when building
a traditional client/server application. After completing
step 1, you can work in any order. That is, you can define the objects
used in your application in any order, as you need them.
Using other books This book tells you how to use PowerBuilder painters and tools.
For more information about the process of building applications
in PowerBuilder, see Application Techniques
.
For an overview of the kinds of applications you can build
in PowerBuilder and the building blocks you can use, see Building
Internet and Enterprise Applications
.
To build a traditional client/server
application:
-
Create the application (using a Start wizard)
and specify the library list for the application.When you use a Start wizard, you create the Application object,
which is the entry point into the application. The Application object
contains the name of the application and specifies the application-level
scripts. -
Create windows.
Place controls in the window and build scripts that specify
the processing that will occur when events are triggered.See Part 3, “Working with Windows”.
-
Create DataWindow objects.
Use these objects to retrieve data from the database, format
and validate data, analyze data through graphs and crosstabs, and
update the database.See Part 4, “Working with Databases”.
-
Create menus.
Menus in your windows can include a menu bar, dropdown menus,
and cascading menus. You can also create popup menus in an application.
You define the menu items and write scripts that execute when the
items are selected. -
Create user objects.
If you want to be able to reuse components that are placed
in windows, define them as user objects and save them in a library.
Later, when you build a window, you can simply place the user object
instead of having to redefine the components. -
Create functions, structures, and events.
To support your scripts, you probably want to define functions
to perform processing unique to your application and structures
to hold related pieces of data. You can also define your own user
events.See Chapter 5, “Working with User-Defined Functions “, Chapter 6, “Working with User Events “, and Chapter 7, “Working with Structures “.
-
Test and debug your application.
You can run your application at any time. If you discover
problems, you can debug your application by setting breakpoints,
stepping through your code, and looking at variable values during
execution. You can also create a trace file when you run your application
and use PowerBuilder’s profiling tools to analyze the application’s
performance and logical flow. -
Prepare an executable.
When your application is complete, you prepare an executable
version to distribute to your users.
If you are creating a component The procedure for building an application applies to a traditional
application. If you are creating a component, such as a Jaguar component
or a COM/MTS component, you can use a Start wizard to create
the component (an Application object and a custom class user object).
Then you code the component, test it, debug it, and deploy it.
For information about creating and deploying components, see Chapter 26, “Creating Executables and Components”.