320 likes | 464 Views
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
E N D
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 • 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
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
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
Container Portlet C Listener Portlet A Actioner Portlet B Listener Shared Context Conceptual Implementation
actioner listener listener Shared Context registrar Browser Organisation Top Level Window Masthead Frame Portlet 1 Frame - Source Portlet 2 Frame - Target Portlet 4 Frame - Target Portlet 3 Frame
actioner listener Shared Context registrar Step 1 – Register Listeners Top Level Window Masthead Frame Portlet 1 Frame - Source Portlet 2 Frame - Target listener Register() Portlet 4 Frame - Target Portlet 3 Frame Register()
actioner listener Shared Context registrar Step 2 – Actioner Notifies Top Level Window Masthead Frame Portlet 1 Frame - Source Portlet 2 Frame - Target listener NotifyAll() Portlet 4 Frame - Target Portlet 3 Frame
actioner listener Shared Context registrar Step 3 – Registrar Delivers Top Level Window Masthead Frame Portlet 1 Frame - Source Portlet 2 Frame - Target listener NotifyThis() Portlet 4 Frame - Target Portlet 3 Frame NotifyThis()
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
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
Document Server Servlet Import XML File Request XML Import XML File Deploying To The Portal Using PortalTool 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
Document Server Servlet JSPDeployer Portal Tool WAR File Deploy Templates Request XML Import XML File Deploying JSPs To The Portal Using JSPDeployer
Good News !! • PB 9.0.2 • Will deploy directly JSP to EP • Without writing XML files • Featured as a new wizard.