Extending PowerBuilder to the Web

thickbugΛογισμικό & κατασκευή λογ/κού

28 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

138 εμφανίσεις

Extending PowerBuilder to the Web

Javier Cuerva

cuerva@sybase.com

Sr Technical Evangelist

Sybase Engineering


Topics


Web Application Development and PB 9


JSP Web Application Development in PB 9


DWs and JSPs


Portal Studio


Portal Configuration


Visual Portlet Creation


Driving A Shared Portal Context


Using Click
-
Across Navigation


Automatic Deployment


JSP/Web Application Deployment


Portal and Portlet Deployment

Web Application Development

and PB 9

Web Application Development and PB 9


PowerBuilder Web Application Development Through Web
Targets


Deployable to

A JSP container ( EAS / TOMCAT …)


Simplified Web
Application Creation


Wizards


Automatic Deployment (more later)


Open Architecture and the Web Target Object Model

JSP Authoring


What Are JSPs?


JavaServer Pages (JSP)


Technology that provides a quick, easy way to create Web pages with both
static and dynamic content


JSP Content


JSPs are text
-
based documents that contain static markup, usually in HTML or
XML, as well as Java content in the form of scripts and/or calls to Java
components


JSPs and Servlets


JSPs extend the Java Servlet API and have access to all Java APIs and
components

PowerBuilder JSP Features


JSP Authoring


PowerBuilder 9 offers the same robust and rapid development that customers
have come to expect from PowerBuilder


Automation


Automates as many of the development tasks as possible and offer users an
easy to use development environment for JSP authoring

PowerBuilder JSP Features


PowerBuilder 9.0 Provides the following JSP features:


JSP Web Target Wizard


JSP Web Services Proxy Wizard


JSP Page Authoring


JSP Web Target Object Model


Custom Tag Library for the Web DataWindow


JSP Deployment Configuration

Web DWs


Web DataWindow


Is a thin client DataWindow implementation


The Web DataWindow does not require any runtime components on the client
-
-
only a standard Web browser


Web DataWindow DTC (Design Time Control)


lets you create Web applications that include new and existing DataWindow
objects

Web DWs and JSPs


Web/JSP DataWindow Page Wizard


Create a new JSP Web page with a DataWindow on it


For existing pages


Use the Web Target toolbar or the Insert>Form Field menu in Page view or
Source view of the HTML editor


Or drag and drop a DataWindow (or a Web DataWindow Container
component) onto a Web page in the HTML editor


Web/JSP DataWindow Page Wizard

Portal Studio

New Generation Portal Tools

New Tools


Open Portal Server


User Creatable Portlets


Portal Studio IDE


Intelligent Integration Tools


Automatic Application
Extensions


Packaged Application Function
Self
-
Discovery

New Generation Portal Tools


Portlet Studio to simplify the
creation of Portlets


Template Managers to simplify
the presentation of content


Catalog Managers to simplify the
deployment to multiple portals


All Integrating With Developer
Friendly Editors

Portlets Without Programming


Create Portlets in minutes

using a simple point and click

interface


Create Portlets from these sources:


Web applications


JSP, XML, HTML


Databases


Web Services

Driving A Shared Portal Context

mPortlets Requirements


The Requirement


Common Customer Need

Shared Portlet Context
-

Related Portlet Content
Refreshes

‘Intelligent Navigation’ and Dashboard Controls


Capture Services Provide Power of Portlets

But Independent Portlets Have No Knowledge Of
Each Other


A New Form of Web
-
Application

When Independent Portlets Are Integrated as
Messaging Portlets

Conceptual Implementation

Container

Portlet A

Actioner

Portlet B

Listener

Portlet C

Listener

Shared Context

Browser Organisation

Top Level Window

Masthead Frame

Portlet 1 Frame
-

Source

Portlet 2 Frame
-

Target

Portlet 3 Frame

Portlet 4 Frame
-

Target

Shared Context

registrar

actioner

listener

listener

Step 1


Register Listeners

Masthead Frame

Portlet 1 Frame
-

Source

Portlet 2 Frame
-

Target

Portlet 3 Frame

Portlet 4 Frame
-

Target

Shared Context

registrar

actioner

listener

listener

Register()

Register()

Top Level Window

Step 2


Actioner Notifies

Masthead Frame

Portlet 1 Frame
-

Source

Portlet 2 Frame
-

Target

Portlet 3 Frame

Portlet 4 Frame
-

Target

Shared Context

registrar

actioner

listener

listener

NotifyAll()

Top Level Window

Step 3


Registrar Delivers

Masthead Frame

Portlet 1 Frame
-

Source

Portlet 2 Frame
-

Target

Portlet 3 Frame

Portlet 4 Frame
-

Target

Shared Context

registrar

actioner

listener

listener

NotifyThis()

NotifyThis()

Top Level Window

Making a Portlet Messageable


From the Studio


Use the GUI to define Listeners and Actioners



Using the Javascript API directly


Just Include the Javascript API within your content.

Javascript Functions


Listeners Call:


Register(targetframe, form, parameter, registeras);

UnRegister(targetframe, form, parameter, registeras);




Actioners Call:


Notify(srcframe,notifyas,value,notifyNow,NotifyAP);

NotifyAll(srcframe,notifyas,value,notifyNow,NotifyAP);



Other Examples and Uses


Drill
-
Down Analysis (or Drill
-
Across Analysis)


Master/Detail Type Displays


Linking Completely Unrelated Content Sources Together


Without The Sources Being Modified Or Knowing About Each Other


Dashboard Controls


New Portlets Maintaining Context of Other Portlets

Automatic Deployment

PB 9 JSP Deployment Configuration


You can create a deployment configuration for deploying a
JSP Web Application to either EAServer or the Apache
Tomcat Server


Other Application Servers can be deployed to via using PB 9
Custom Command Line deployment options


When you deploy the JSP target, PowerBuilder builds a Web
Archive (WAR) file in the deployment configuration folder
created by the JSP Web Target wizard


PB 9 JSP Deployment Configuration


The WAR file contains:


JSP files you added to the target


Any classes or JAR files you added to the Source folder


A web.xml file that conforms to the Document Type Definition (DTD) for Web
applications


The Web application is automatically deployed to the server
you selected in the target wizard


Other Deployment Descriptors may be added to the Target for
other application servers, e.g. weblogic.xml or web
-
borland.xml

Deploying To The Portal


Portal Studio Architecture


Browser/Document server architecture


Portlets, Pages and Catalogs are XML documents


Studio is effectively an XML document editor


Leverages the same playback services as the Portal to assist with portlet/page
creation and preview


Import/Export catalogs to isolate development from production environments


PortalTool Utility


Provides access to all functions available in the Portal Studio through a
command line interface


Interoperable with the Ant build tool and scripts as a custom Task


Deploying To The Portal Using PortalTool

Document

Server

Servlet

Import XML File

Request XML

Import XML File

Portal

Tool

Deploying JSPs To The Portal


JSPDeployer


Used to Deploy (Create) Portlets for JSPs in a WAR file


Interrogates a War file and automatically generates Import XML File for
specified JSPs


Interoperable with the Ant build tool and scripts as a custom Task


Uses Customisable Deploy Templates For:


Portlet Type Definitions


Page Types and Layouts


Catalog Layouts


Templates

Deploying JSPs To The Portal Using
JSPDeployer

Document

Server

Servlet

WAR File

Deploy Templates

Request XML

JSP

Deployer

Portal

Tool

Import XML File

Good News !!


PB 9.0.2


Will deploy directly JSP to EP


Without writing XML files


Featured as a new wizard.