About Web targets
A Web target is a collection of files and components used
to create a Web application. A Web application can represent part
or all of a Web site. Web applications created using PowerBuilder
Web targets deliver dynamic, interactive content by integrating
database data, scripting for client- and server-side events, and
access to components stored on middle-tier servers. Using the PowerBuilder
development environment simplifies how you develop and maintain
these types of Web applications.
Development environment
PowerBuilder lets you develop both PowerScript and Web targets
in a workspace. You can add as many targets to a workspace as you
want, and open and edit objects in multiple targets. If your Web
application uses DataWindow® and EAServer components,
you can work with all of them in a single workspace. PowerBuilder provides
an intuitive user interface, combined with wizards that step you
through complex or repetitive tasks to help you develop pages faster
and spend less time on Web site maintenance.
Deployment environment
You can deploy Web applications to JSP page servers or Active
Server Pages (ASP). JSP targets can be deployed to Apache Tomcat,
Sybase EAServer, or other
JSP 1.2 compatible servers. ASP or Web Site targets can be deployed
to a static file system folder or to an FTP server directory.
The page servers can in turn access components on transaction
servers such as EAServer or
Microsoft COM+. If you use Tomcat as a JSP server, you
can still access components running on EAServer in
your Web applications. With JSP targets, you can use 4GL Web technology
to manage page data and easily integrate middle-tier components
into Web pages.
For more information on 4GL Web technology, see Chapter 9, “Developing 4GL JSP Pages”
About the Web target object model
What is an object model?
Object models provide Web developers with a scripting environment
by providing objects–and their properties, methods, and
events–for easier Web development.
Object models can be server side or client side. In a client
script, objects belong to the Document Object Model of the client
browser. In a server script, objects belong to the object model
existing on or deployed to the selected server.
You can view representations of client-side and server-side
object models in the Language page of the System Tree.
About the Web Target object model
The Web Target object model streamlines the process of developing
and deploying Web applications. During the development phase, the
object model hides many of the platform-specific details you would
otherwise need to know to write server pages. At deployment time,
the object model takes care of mapping your platform-independent
code to each application server platform you choose to target.
The structures and objects
in the Web Target object model are defined in Java classes for JSP
targets and in JavaScript for ASP targets.
When you deploy a Web page that uses the Web Target object
model, the Web target automatically adds an object model file to
your deployed application and imports the contents of that file
into your page. The object model file resolves references you make
to Web target objects to appropriate objects in the target application
server. The deployment controller imports an object model file into any
HTM, ASP, or JSP file containing one or more server scripts that
use the Web Target object model.
For more information about the Web target object model, see “Using the Web Target object
model”.
What kinds of applications can you develop?
The applications you build with PowerBuilder for JSP targets
and ASP targets can include simple text-based Web pages
as well as complex Web pages with:
- Client- and server-side scripting
- Database content
- Web DataWindows
- Components, such as EAServer components
(including Enterprise JavaBeans) or ActiveX controls - Component transaction server access
Dynamic, data-driven applications
Dynamic business-critical Web applications typically use application
servers to display data stored in a database and present interactive
interfaces through which users execute business transactions in
real time. The Web DataWindow, easily created within the Web Target
development environment, gives your page real-time access to databases
for retrieval and update.
Open applications
Web targets you build in PowerBuilder support an open architecture.
The basic Web Target object model supports server-side programming
for multiple application servers, enabling you to develop Web targets
for deployment to multiple servers. To provide dynamic content for
your Web applications, you can create server-side scripts in Java
for JSP targets, or you can create scripts in JavaScript or any
ECMA-compliant script (VBScript, JScript, and others).
4GL applications
4GL extensions to the Web Target object model provide server-side
event processing and generate server-side code automatically from
selections you make in the Web Target user interface. For Web site
targets, 4GL applications must be used with EAServer. For JSP targets, 4GL
applications can be deployed to EAServer,
Tomcat, or other JSP 1.2 compatible JSP servers.
Do you need to know Java or HTML?
HTML is one of the underlying technologies for your Web site,
so it helps to know what it can and cannot do. However, you can
edit pages in the Web target HTML editor without knowing HTML syntax.
Page view (one of three views) in the HTML editor feels more like
a word processor than a code editor.
You can also create styles in the Style Sheet editor without
knowing the syntax for style definitions. If you do know HTML, the
editors help you create more complex HTML layouts like tables and
forms.
For JSP targets, you can edit pages in the HTML editor without
knowing Java syntax. When you drag and drop controls onto a page,
the HTML editor adds code that you can see in the Source view. For
4GL pages, this includes Java code to construct the control using
4GL object model classes.
If you need to create scripts, you certainly need to know
about the objects on your page and their events, as well as the
syntax of your scripting language. In addition to providing an object
view of your document, the System Tree shows you the HTML object
model.
Advantages of the Web Target development environment
The Web Target development environment simplifies the configuration
and coding tasks for your applications. Wizards and dialog boxes
let you provide the information an application needs while the development
tool takes care of implementation details.
Simplifies Web application creation You can use three wizards to create a new Web target: the
JSP Target wizard, the Web Site wizard, and the Source Controlled
Web Target wizard.
The JSP Target wizard prompts you to select a JSP server and
select connection properties for the server. The wizard also steps
you through the Deployment Configuration wizard screens.
The Web Site wizard prompts you for a target name and suggests
default Source and Build folders.
The Source Controlled Target wizard creates a Web target that
is checked in to source control.
Helps automate deployment configuration After you create a Web Site target, you can manually run the
Deployment Configuration wizard. You access the Deployment Configuration
wizard through the Web target properties sheet. When you set up
a deployment configuration, you specify the type of server you want
your Web files to run on–the available choices depend on your
target type.
For JSP targets, you can choose either Tomcat or EAServer as your JSP server. For
Web site targets, your deployment target can be Active Server Pages
or Basic (a file system that can be used by a Web server of your
choice).
Dynamically extends supported object models The Web Target object model extends the programming interface
for your Web pages by simplifying how you include connections to
databases, Web DataWindows, and EAServer components,
and how you handle error reporting. The entries you make in dialog
boxes generate server scripts that you can extend and customize.
The Web Target object model supports an open architecture.
However, 4GL extensions cannot be used with ASP Web site targets.
Automates link management The build process for Web targets verifies the links between
files, writing warnings for broken links or bad syntax to the Output
window. It does not attempt to fix the links and it does not prevent deployment
of the target files.
Enables the use of a team environment If you create Web targets in a team environment, you can control
file access though the source control system you have configured
for your workspace. You work with the source control system the
same way as for PowerScript targets in PowerBuilder, except that for
Web targets, you do not need to compile the files you obtain from
the source control server.