Concepts and terms – PB Docs 100

Concepts and terms

This section discusses some basic concepts and terms you need
to be familiar with before you start using PowerBuilder to develop
applications and components.

Workspaces and targets

In PowerBuilder, you work with one or more targets in a workspace.
You can add as many targets to the workspace as you want, open and
edit objects in multiple targets, and build and deploy multiple
targets at once.

A PowerBuilder target can be one of two types:

  • PowerScript target A client/server or multitier executable application or
    a server component. Most of this book is concerned with building PowerScript
    applications. See Chapter 5, “Working with PowerScript Targets.”
  • Web target A Web application that can contain all the elements you need to
    build a Web site application—HTML files, scripts, images,
    downloaded components—or a JavaServer Pages (JSP) application.
    A Web target also contains settings for build options, database
    connections, and deployment. Web targets are described in detail
    in a separate book, Working with Web and JSP Targets.

For more information about creating a workspace and targets,
see “Creating and opening workspaces” and “Creating a target”.

note.gif PowerBuilder editions The ability to create Web targets is available in the Enterprise
edition of PowerBuilder. If you have the Professional or Desktop
edition, or if you chose not to install Web target functionality,
Web target options are not available in the user interface.

Objects

Your application is a collection of objects. For PowerScript targets, PowerBuilder
provides many types of objects, including graphical objects such as
windows, menus, and buttons, and nonvisual objects such as datastore, exception,
and timing objects. In a Web target, the objects you work with include
HTML pages, images, and style sheets.

As you work in your application, you create new objects and
open existing objects to continue work on their development.

For more information about creating, opening, and editing
objects, see “Working with objects”.

DataWindow objects

The applications
you build are often centered around your organization’s
data. With PowerBuilder you can define DataWindow objects to retrieve,
display, and manipulate data. For more information about DataWindow
objects, see Chapter 18, “Defining DataWindow Objects “.

PowerBuilder libraries

As you work in a PowerScript
target, the objects you create are stored in one or more libraries
(PBL files) associated with
the application. When you run your application, PowerBuilder retrieves
the objects from the library.

PowerBuilder provides a Library painter for managing your
libraries. For information about creating a new library and working
with libraries in the Library painter, see Chapter 6, “Working with Libraries.”

Painters and editors

Some of the editors you use to edit objects are called painters.
For example, you build a window in the Window painter. There you
define the properties of the window, add controls such as buttons
and labels, and code the window and its controls to work as your
application requires.

PowerBuilder provides painters for windows, menus, DataWindow
objects, visual and nonvisual user-defined objects, functions, structures,
databases, data pipelines, and the application itself. For each
of these object types, there is also a Source editor in which you
can modify code directly. See “Working in painters” and “Using the Source editor”.

There is also a file editor you can use to edit any file without
leaving the development environment. See “Using the file editor”.

For Web targets, there are specialized editors for HTML and
JSP files, frame sets, and style sheets. For more information, see Working
with Web and JSP Targets

.

Events and scripts

PowerScript applications are event-driven: users control the
flow of the application by the actions they take. When a user clicks
a button, chooses an item from a menu, or enters data into a text
box, an event is triggered. You write scripts that specify the processing
that should happen when the event is triggered.

For example, buttons have a Clicked event. You write a script
for a button’s Clicked event that specifies what happens
when the user clicks the button. Similarly, edit controls have a
Modified event, which is triggered each time the user changes a
value in the control.

You write scripts using PowerScript, the PowerBuilder language,
in a Script view in the painter for the object you are working on.
Scripts consist of PowerScript functions, expressions, and statements
that perform processing in response to an event.The script for a
button’s Clicked event might retrieve and display information
from the database; the script for an edit control’s Modified event
might evaluate the data and perform processing based on the data.

Scripts can also trigger events. For example, the script for
a button’s Clicked event might open another window, which
triggers the Open event in that window.

Functions

PowerScript provides a rich assortment of built-in functions
you use to act upon the objects and controls in your application.
There are functions to open a window, close a window, enable a button,
retrieve data, update a database, and so on.

You can also build your own functions to define processing
unique to your application.

Properties

All the objects and controls in a PowerScript target have
properties, many of which you set as you develop your application.
For example, you specify a label for a button by setting its text
property. You can set these properties in painters or set them and
modify them dynamically in scripts.

Source control

If you are working with other developers on a large application,
you can make sure you are working with the latest version of a component
or object by synchronizing the copy of the object you are working
on with the last version of the object checked into a source control
system. PowerBuilder provides a basic check in/check out
utility as well as a standard application programming interface
to more sophisticated source control systems. For more information, see Chapter 3, “Using Source Control.”

PowerBuilder extensions

You can use PowerBuilder extension objects in a PowerScript
target in the same way as you would built-in PowerBuilder objects,
with one difference—you must add the PowerBuilder dynamic
library that the object requires to the library list for the target.
Some extensions are provided with PowerBuilder, but you can also
obtain them from third parties or build your own.

For more information about the extensions provided with PowerBuilder,
see the PowerBuilder Extension Reference
. For
how to build your own extensions, see the PowerBuilder
Native Interface Programmer’s Guide and Reference

.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x