powerbuilder strategic direction 4gls web professional development tools software construction...

89
倍倍倍倍 倍倍倍 倍倍倍 倍倍

Upload: aiden-nichols

Post on 27-Mar-2015

242 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

倍力資訊 羅慶祖第一事業部 協理

Page 2: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PowerBuilder Strategic DirectionPowerBuilder Strategic Direction

Page 3: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

4GLs

Web Professional Development Tools

Software Construction Components

$ Millions

8,000

7,000

6,000

5,000

4,000

3,000

2,000

1,000

0

State of the Development Tools MarketState of the Development Tools Market

3GLS

Analysis/Model/ Design/ Construction

2001 2002 2003 2004 2005 2006

Source: IDC, 2003

Page 4: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Primary Approaches to Application DevelopmentPrimary Approaches to Application Development

4GL/RAD36%

OO 3GLs28%

3GLs23%

Other13%

Source: IDC

Page 5: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Priority: What Are the Strategic Application Development Initiatives for End Users?

Priority: What Are the Strategic Application Development Initiatives for End Users?

Source: IDC, SW Strategies & Investment Survey, Final, Users, Fall 2001, n = 218

% responding “extremely” or “highly” likely

Rank each of the following strategic business initiatives

0% 20% 40% 60% 80%

Integrate applications with online exchange

Utilize open source solutions

Build and deploy mobile/handheld applications

Integrate applications with external suppliers

Build e-commerce solutions

Increase productivity of development process

Build, deploy, customize new applications

Integrate internal applications

Maintain/enhance existing applications

Page 6: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Uses for PowerBuilder: Today and in the FutureUses for PowerBuilder: Today and in the Future

Source: Novalys Inc.; 3,400 Respondents; 101 Countries

PowerBuilder Today

3%

17%

80%Client-Server Only

Some Web Projects

Most Web Projects

PowerBuilder Future

8%

42%

50%Client-Server Only

Some Web Projects

Most Web Projects

Page 7: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

What is Important to Your Organization Today?What is Important to Your Organization Today?

• Protect your existing technology investment• Stay current with industry trends and new technology

• Gain a competitive advantage• Incorporate new technology into existing applications• Minimize costs

• Protect your existing people investment• Utilize their existing skills• Give them a platform for the future

Page 8: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PB and .Net - Phased ImplementationPB and .Net - Phased Implementation

WebServices

WebServices

DataWindow.NET&

DataStore.NET

DataWindow.NET&

DataStore.NET

PB’s .NETCompiler

PB’s .NETCompiler

Simplified.NET Objects

Simplified.NET Objects

PowerBuilder

11

22 33

44

Page 9: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PB and J2EEPB and J2EE

PowerBuilder 8.0:• EAServer• EASI• Web Services Toolkit

PowerBuilder 9.0:• EJB Clients• PB Web Services• RAD Java Server Pages

Future:• NVO’s in 3rd Party

Application Servers

Page 10: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

2004+Today -> 2003 J2EE

.NET

• 4GL JSP support

• Build, access, and consume Web services

• DataWindow XML

• XML services

• Access EJBs in major application servers

• Deploy NVO’s directly to major application servers

• Continue enhancing JSP authoring and XML capabilities

• Web Services• Accessing components in .NET framework in PB IDE

• .NET Compiler

Development in Heterogeneous EnvironmentsDevelopment in Heterogeneous Environments

• DataWindow.NET• DataStore.NET• Enhanced Web DW

Page 11: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

SummarySummary

• Sybase pioneered 4GL and will continue to lead in application development through IDE2, giving you “Exponential Power” with the 4GL+

• Sybase is strongly committed to PowerBuilder; version 9.0 is available today and planning is underway for 9.5, 10.0 and beyond

• Customer needs span from client-server to next-generation, to best development practices and PB will meet these requirements

• Sybase will extend RAD for enterprise applications to RAD for mobile applications with Pocket PowerBuilder for handheld devices; release in 2003

Page 12: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PowerBuilder 9.0 New Features

• RAD Java Server PagesTM (JSPTM) Authoring• XML (Extensible Markup Language)

• DataWindow (Export and Import)• PB DOM (XML Parsing in PowerScript)

• PowerBuilder Native Interface (PBNI)• EJB Client Support• Web Services Support

Page 13: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

RAD JSPRAD JSPCreating JSP Web Applications with

PowerBuilder

Page 14: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Introduction to JSP TechnologyIntroduction to JSP Technology

• JSP is…– A technology for delivering dynamic content– Based upon Java Servlet technology

• JavaServer Pages– Contain standard HTML– Can contain Custom tags– Can contain JSP elements

• JSP Actions• JSP Directives• Scripting Elements

– At run time, are compiled into Servlets

Page 15: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Why use PowerBuilder to create JSPs?

• Integrated development environment for creating and deploying web applications

• Leverage the power of JSP language• Standard• Portable• Stable• Easy to learn

• Incorporate the power of the DataWindow into your web applications

Page 16: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PowerBuilder JSP FeaturesPowerBuilder 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

Page 17: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

JSP Web Target WizardJSP Web Target Wizard

– This wizard creates a JSP target that has build and source folders and a deployment configuration.

Page 18: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

JSP Web Services Proxy WizardJSP Web Services Proxy Wizard

– This wizard creates a custom tag library with the information necessary for calling a Web service in a JSP .

Page 19: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

JSP Deployment ConfigurationJSP Deployment Configuration

• 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

• Deployment Target

– EAServer’s JSP Container

– Apache Tomcat

– Command Line Deployment

• The Web application is automatically deployed to the server you

selected in the target wizard

Page 20: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

JSP Authoring in PowerBuilderJSP Authoring in PowerBuilder

• Allows developers to create JSPs using any of the page wizards

• WYSIWYG editing of JSP pages

• Builds upon the existing Web Targets User Interface– New Wizard - JSP Target– Extensions to the Page Editor– System Tree Additions

• Full access to the page source through the editor

Page 21: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

RAD JSPRAD JSPSeeing the Technology in Action

Page 22: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML DataWindowXML DataWindowImporting and Exporting XML with the

DataWindow

Page 23: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Review of XMLReview of XML

Extensible Markup Language• Extends the ability to represent data• Metadata language=tags and layout can be

customized• Data can be hierarchically structured with nesting• Easily parsed across applications, platforms,

enterprises, and Web for data interchange• World Wide Web Consortium (W3C) XML 1.0

Recommendation at http://www.w3.org/TR/REC-xml

Page 24: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML DocumentXML Document

• Well-Formed if structure follows XML syntax rules– Contains one or more elements

• Element is a tree containing start-tag, content, end-tag• Start-tag is a name, enclosed by angle brackets, with

optional attributes• Attribute names must be unique for element; order

insignificant• Attribute values must be quoted

– One root; all element tags properly nested• Parsed element cannot contain recursive reference to

itself• Valid if structure conforms to a DTD or Schema

– DTD defines grammar for XML document• Subset can be internal or external

Page 25: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML Document ExampleXML Document Example

<?xml version="1.0" encoding="UTF-8"?><tag_name> root element

<tag_name2 attribute="female"> <name> <emp_fname>Fran</emp_fname> text content <emp_lname>Whitney</emp_lname> </name> <empty_element></empty_element> empty element <another_empty_element/> alternative notation </tag_name2>

</tag_name>

Page 26: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML ParsingXML Parsing

DOM Parser• DOM provides API access to XML tree model• Useful if manipulating or re-traversing the

documentSAX Parser• Event-driven• Useful if extracting data once in single traversalCore Interfaces Specified by W3C• Extensions denoted by ‘DOM Level 2’, ‘DOM

Level 3’

Page 27: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Why use PowerBuilder and XML?Why use PowerBuilder and XML?

• Easily generate XML for your data through the DataWindow

• Import XML data into your application through the DataWindow (apply validations, etc.)

• Process XML in PowerScript without having to write low level code

Page 28: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML DataWindowXML DataWindow

• XML generated by PowerBuilder is compliant with the XML 1.0 specification

• XML generated by PowerBuilder is well-formed and can be processed by an XML Parser

• PowerBuilder lets you use Template to define the mapping between values from a DataWindow and XML

Page 29: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML DataWindowXML DataWindow

• Generated using:– Save Rows As (DataWindow Painter – XML! SaveAs type)

– dwcontrol.SaveAs() method in PowerScript (XML! SaveAs type)

– dwcontrol.Object.Data.XML (dot notation in PowerScript)

Page 30: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML DataWindow PowerScript SupportXML DataWindow PowerScript Support

• New DataWindow object properties– Export.XML.UseTemplate– Export.XML.MetaDataType– Export.XML.SaveMetaData

• Data access– dwcontrol.Object.Data.XML– dwcontrol.Object.Data.XMLSchema– dwcontrol.Object.Data.XMLDTD

Page 31: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML DataWindowXML DataWindowSeeing the Technology in Action

Page 32: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML ServicesXML ServicesManipulating XML in PowerBuilder with

PBDOM

Page 33: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

What is DOM ?What is DOM ?

DOM.– DOM stands for Document Object Model. – DOM is a W3C standard.– A standard way of representing the contents of an XML

document as a tree of interconnected objects.– The next slide demonstrates this.

Page 34: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

What is DOM ?What is DOM ?

root

child_1 child_2 child_3

Text_1 Text_2 Text_3

Document

Page 35: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

What is PBDOM ?What is PBDOM ?

High-level DOM Management API.A complete API set to create, read, write and manipulate XML documents.

– A large collection of non-visual classes. – Classes are hierarchical in nature and allow for

polymorphic usage.

Page 36: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBDOM OverviewPBDOM Overview

• PBDOM is supported in Wintel as well as Unix platforms

• Parsers like MSXML primarily expose the low-level W3C DOM APIs which are hard to learn and master

• PBDOM presents a much higher-level set of functions which incurs a shorter learning curve and provides a much greater level of productivity

Page 37: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBDOM OverviewPBDOM Overview

• PBDOM lays out a standard set of PowerBuilder objects with properties and functionalities that allow for XML document navigation and content manipulation

• It does this by presenting a view of the contents of an XML document as an interconnected collection of objects which can be searched for, read, modified, appended to and deleted from a document

Page 38: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBDOM OverviewPBDOM Overview

pbdom_builder pbdom_exception pbdom_object

pbdom_attribute pbdom_characterdata

pbdom_comment pbdom_text

pbdom_cdata pbdom_doctype pbdom_document pbdom_element pbdom_entityreference pbdom_processinginstruction

Page 39: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBDOM ClassesPBDOM Classes

The PBDOM_BUILDER

• The following code fragment is an example of building a PBDOM_DOCUMENT from a file.

Page 40: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBDOM ClassesPBDOM Classes

The PBDOM_BUILDER

• The following code fragment is an example of building a PBDOM_DOCUMENT from a string.

Page 41: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBDOM ClassesPBDOM Classes

Page 42: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBDOM ClassesPBDOM Classes

The PBDOM_ATTRIBUTE

Page 43: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

XML ServicesXML ServicesSeeing the Technology in Action

Page 44: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBNIPBNIUsing the PowerBuilder Native Interface to

Extend Your Applications

Page 45: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Three QuestionsThree Questions

Have you ever asked the following questions?• Is it possible to call C/C++ functions from

PowerScript?

• Is it possible to call external components, such as EJBs, WebServices, Java classes, and so on, from PowerScript?

• Is it possible to call PowerScript from C++/Java?

Page 46: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Extending PowerScriptExtending PowerScript

• PowerBuilder can call external C functions from PowerScript

• But there are some limitations with external functions:– It is not possible to declare an external function that

requires a callback function. E.g. BOOL EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam);

– Some C data types cannot be mapped to PB data types, such as double*

– An external function cannot callback into the PBVM.– Using external functions is not object-oriented

Page 47: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

What is PBNI?What is PBNI?

• PBNI (PowerBuilder Native Interface) is a standard interface that allows third parties to extend the functionalities of PowerBuilder.

• PBNI opens two doors from PowerBuilder to outside world

C++/JavaApplication

PBVMPB

Extension

IPB_Session

IPBX_NonVisualObject

IPB_VM

IPB_Session

Page 48: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

What can be done with PBNI?What can be done with PBNI?

• With PBNI, you can

– Write PB non-visual extensions and use them in PB just as normal NVOs

– Write PB visual extensions and use them just as custom user objects

– Write PB marshaler extensions to call external components and use them in PB just like what you do with Jaguar components

– Embed the PBVM in external C++ applications to call PowerScript functions

Page 49: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Generating the PBD fileGenerating the PBD file

• Run pbx2pbd90.exe in Command console

– Example:• Pbx2pbd90 simplext.pbd simplext.dll

• What Happens?

– pbx2pbd90.exe loads the simplext.dll

– calls the PBX_GetDescription() function

– parses the description and generates a PBD file holding the class definition for the simpleExt class

Page 50: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Using a PB extensionUsing a PB extension

• Add the PBD file in the library list of the PB target

• Put the DLL file in the directory that is in the PATH

• Using the native class as a normal NVO or custom user object

Page 51: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Embedding the PBVMEmbedding the PBVM

• With PBNI, it is possible to embed the PBVM in an external C++ application in order to call PowerScript functions to perform certain jobs, e.g. showing a DataWindow, updating a database, or printing a DataStore

• Through JNI (Java Native Interface) and PBNI, a Java application can call PowerScript functions

Page 52: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

PBNIPBNISeeing the Technology in Action

Page 53: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

EJB ClientsEJB ClientsAccessing Enterprise Java Beans from a

PowerBuilder Client

Page 54: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Definitions - Enterprise JavaDefinitions - Enterprise Java

• EJB -- Enterprise JavaBeans– Stateful Session Beans– Stateless Session Beans– Entity Beans– Message-driven Beans

• JNDI -- Java Naming and Directory Interface• JTS -- Java Transaction Service• JDBC -- Java Database Connectivity• RMI -- Remote Method Invocation

Page 55: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

EJB Client Support in PowerBuilder 9.0EJB Client Support in PowerBuilder 9.0

• Provides the ability to call components in 3rd party EJB servers

• Uses Java Native Interface (JNI) for interoperability• Supports 1.0, 1.1, and 2.0 EJBs• Supports client-managed transactions• Supports system and application exception handling • Implementation will be through a PBNI DLL• Supplemented by EJB Proxy Generator

• PowerBuilder IDE• EJB2PB90 command line utility

• Java data types will be mapped to PowerBuilder data types

Page 56: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

EJB Client Support – Data Type ExchangeEJB Client Support – Data Type Exchange

Java Type PB Type

Byte char

Short int

Int long

Long longlong (to be added)

Float real

Double double

char (16bit unsigned) char?

Boolean boolean

String string

Java/util/Date datetime

Array of primitive type Array of primitive type for parameters, ANY for return value

Array of String, Date, Time objects Array of string, date, time for parameters, ANY for return value

Array of Arrays any*(not map to PB type)

Java Classes return from EJBObject (EJBs) or taken as parameters

powerobject

Others any

Page 57: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Take advantage of EJB ClientTake advantage of EJB Client

• EJB Client makes PowerBuilder glue with any application server - J2EE compliant

• Development cycle with EJB client is much shorter than using Java(short time-to-market)

• Reuse the source code written in PB and attach the PB strong power in manipulating DB

Page 58: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Overview of EJB Client ImplementationOverview of EJB Client Implementation

• EJB Client PowerBuilder Native Interface(PBNI) implementation

• PowerBuilder Java VM Service– Creates and manages a Java Virtual Machine(VM) within

its own process space and communicate with Java objects

• PowerBuilder proxy Objects

Page 59: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Definitions - EJB ProxyDefinitions - EJB Proxy

• EJB Proxy In PowerBuilder 9

– A PB object to represent the remote EJB Interface and local Java class

– It includes:

• All public functions exposed by EJB interface&local Java class and their signature

• Exceptions that Java method throws

• Java class name that PB proxy represents as instance property

Page 60: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

EJB Client PBNI implementationEJB Client PBNI implementation

• EJB Client provides a bridge from PowerBuilder into EJB

EJB Client

PBEJBCLIENT90.DLLPBEJBCLIENT90.PBDPBEJBCLIENT90.JAR NVO

NVO

PowerBuilder VM

Java Object

EJB

Java

VM JNI PBNI

Page 61: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

EJB Client PBNI ClassesEJB Client PBNI Classes

• JavaVM– load or attach to a Java VM– work with Java interface and class hierarchies

• EJBConnection– connect to the J2EE server– locate EJB via JNDI– instantiate other Java classes

• EJBTransaction– Manage the transaction

Page 62: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

• Setting up your environment– Adding the EJB client implementation to your target– Generating proxies

• Basic client coding steps– Initialize the Java VM– Connect to the EJB Server– Lookup an EJB– Invoke methods on the EJB– Disconnect from the EJB Server

Page 63: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

Adding the EJB Client implementation to your target

• Include PBEJBCLIENT90.PBD in your target’s library list

Page 64: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

Generating proxies• Use EJB Client Proxy Wizard

Page 65: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

Initialize the Java VMTRY g_JavaVM = CREATE JavaVM CHOOSE CASE g_JavaVM.CreateJavaVM(is_ClassPath, false) CASE 0 // JVM just loaded CASE 1 // JVM was already loaded, is_ClassPath ignored CASE -1 // failure, likely due to not finding JVM.DLL CASE -2 // failure, do to not finding EJBLocator class END CHOOSE CATCH (PBXRuntimeError prte) // catch any exception raised in PBNI extensionEND TRY

Page 66: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

Connect to the EJB ServerTRY g_EJBConn = CREATE EJBConnection // set initial context properties ls_props[1] = "javax.naming.Context.INITIAL_CONTEXT_FACTORY=" + &

"com.sybase.ejb.InitialContextFactory“ ls_props[2] =

"javax.naming.Context.PROVIDER_URL=iiop://localhost:9000" ls_props[3] = "javax.naming.Context.SECURITY_PRINCIPAL=jagadmin“ ls_props[4] = "javax.naming.Context.SECURITY_CREDENTIALS=“ // connect to EJB server g_EJBConn.connectToServer(ls_props) CATCH (NamingException ne) …END TRY

Page 67: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

Lookup an EJBTRY g_HelloHome = g_EJBConn.lookup("HelloHome", "PB9/Hello",

"pb9.HelloHome") g_hello = g_helloHome.create() CATCH (NamingException ne) // raised if EJB not located CATCH (CreateException ce) // raised if problem in instantiating EJB CATCH (RemoteException re) // raised whenever there is a unchecked exception on server CATCH (PBXRuntimeError prte) // raised whenever there is an exception in the PBNI

extensionEND TRY

Page 68: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

Invoke methods on the EJBTRY MessageBox("Hello", g_hello.sayHello()) CATCH (YourCustomException yce) // handle user-defined exception raised by EJB CATCH (RemoteException re) // raised whenever there is a unchecked exception on

server CATCH (PBXRuntimeError prte) // raised whenever there is an exception in the PBNI

extensionEND TRY

Page 69: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Coding a PowerBuilder EJB Client ApplicationCoding a PowerBuilder EJB Client Application

Disconnect from the EJB serverTRY g_EJBConn.disconnectServer() CATCH (NamingException ne) // naming exception is unlikely here, but could be

thrown by underlying Java InitialContext object CATCH (PBXRuntimeError prte) // raised whenever there is an exception in the PBNI

extensionEND TRY

Page 70: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

EJB ClientsEJB ClientsSeeing the Technology in Action

Page 71: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Web Services and .NetWeb Services and .NetCreating and Consuming Web Services with

PowerBuilder 9.0

Page 72: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Web Services Web Services

• Web Services allow applications written in different programming languages to communicate with each other

• Web Services are:

• Platform independent

• Language independent

• Based on XML

Page 73: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Introduction to Web Service ClientIntroduction to Web Service Client

• How Web Services work

5. Create WS proxyfrom WSDL6. Use proxy to invoke Web Services

Web service Proxy

1. Create Server Side components2. Wrap to WS3. Generate WSDL4. Publish

Web service Stub

Invoke

Data

PowerScript NVO or Other components

12

3WSDL

Files

Client Side Server Side

5

6

Page 74: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Web Services SupportWeb Services Support

• PowerBuilder 9.0 supports access to web services using SOAP through HTTP

• Allows developers to integrate web services into PowerBuilder applications quickly

– Hides much of the complexity of:• WSDL• XML grammar• SOAP development

Page 75: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Standards Used In PB Web Service ClientStandards Used In PB Web Service Client

• Standards supported in PB 9

– XML Schema 1.1

– WSDL 1.1

– SOAP 1.1 over HTTP

Page 76: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Web Services SupportWeb Services Support

High level process:

• Create web service proxy

• Import SOAP connection class

• Use SOAP connection and proxy in PowerScript

Page 77: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Web Services and .NetWeb Services and .NetSeeing the Technology in Action

Page 78: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Pocket PowerBuilderPocket PowerBuilderDeveloping Applications for Pocket PC

Devices

Page 79: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

新的行動時代 新的商業規則新的行動時代 新的商業規則

• Mobile Phone and PDA• 3G Mobile Media• Video Conference• eMobile Enterprise• eMobile Managerment

Page 80: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Mobile Database 市場趨勢無線網際網路環境Mobile Database 市場趨勢無線網際網路環境

“目前在美國約有 8000 萬無線設備使用者 . 至 2003, 增至 1 億 4600 萬使用者 .” Cahners In-Stat

Group

“至 2003 年 , 雙向無線網際網路服務爆増至 6,150萬使用者 , 而 1999 年不過 740 萬使用者 .”

IDC

“目前有 23% 的企業用戶在遠端連接其總公司的資料庫 , 這個比例預期在兩年內增加至 35%.”

Forrester Research

“行動設備的市場將以接近桌上型裝置兩倍的速度持續成長 .”

GIGA Group

Page 81: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

SybaseSybase 為為行動運算資料庫市場行動運算資料庫市場領導者領導者SybaseSybase 為為行動運算資料庫市場行動運算資料庫市場領導者領導者Sybase以成熟的資料庫、資料交換技術及無線軟體伺服平

台 ,為企業架構無線及行動運用解決方案1996 行動運算資料庫市場領導者 : SYBASE1997 行動運算資料庫市場領導者 : SYBASE1998 行動運算資料庫市場領導者 : SYBASE1999 行動運算資料庫市場領導者 : SYBASE2000 行動運算資料庫市場領導者 : SYBASE

在 2000 年 ,市場佔有率由 61% 提昇至 68%

*來源 : Norma Schroder, "Overview of 1999 DBMS Market Size, Vendor Shares and Forecast," GartnerGroup’s Dataquest.

Page 82: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Current difficult in developing mobile applicationsCurrent difficult in developing mobile applications

• 缺乏功能完整或是開發介面強大的開發工具• 若使用 J2ME ,門檻較高,而且生產力不高• Page Layout 和傳統開發 Windows 程式不同• 行動裝置上的資料庫不一定是關連式資料庫,增加開發困

難• 必須考慮行動裝置和後端資料庫的整合• 必須開發同步系統解決資料同步的問題

Page 83: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Pocket PowerBuilder Core FeaturesPocket PowerBuilder Core Features

• 高生產力與低學習門檻的 4GL 整合開發環境 • 延伸 PowerBuilder DataWindow 於行動商務應用上 • 與行動資料庫領導品牌 SQL Anywhere Studio 緊密結合 • 企業資料庫同步整合支援( MobiLink Server ) • 精靈導引開發環境 • PowerBuilder 應用移植

Page 84: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Pocket PowerBuilder environmentPocket PowerBuilder environment

• Pocket PowerBuilder is supported on Windows 2000 and Windows XP

• Target devices are PocketPC and HPC Professional• Target operating system WinCE 3.0 or later• Supported processors ARM and Xscale• Support Unicode• No Pocket PowerBuilder runtime licenses• Develop using the same PowerBuilder IDE format

– Deploy to desktop, device or emulator– Support Microsoft Pocket PC, Pocket PC 2002 and

Pocket PC 2003 emulator

Page 85: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Windows and ControlsWindows and Controls

• Controls are similar to desktop– Checkbox– Radiobutton– Listbox– Pushbutton– Datawindow– Etc…

• No mouse, no cursors– Usually the only available cursor is the wait-cursor

• Most Datawindow Presentation Style– Freeform, Graph, Grid, Group, Tabular

Page 86: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Database SynchronizationDatabase Synchronization

• ODBC– Handheld ASA Database– or– Connection to Enterprise DB as ‘Always Connected’

• MobiLink– ASA Databases

– The DBMLSYNC application on the device manages the synchronization of data between the desktop and the device

– Use Sybase Central to define the synchronization operation

Page 87: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

MobiLink ServerMobiLink Server 資料同步技術資料同步技術MobiLink ServerMobiLink Server 資料同步技術資料同步技術

Syb

ase

Mob

iLin

k S

erve

rS

ybas

e M

obiL

ink

Ser

ver

OD

BC

Dri

ver

OD

BC

Dr i

ver

hotsync.exe

Bi-directional & Transactional Data Synchronization

MS SQL SVR

Oracle

Sybase

IBM DB2

Other DBs

Page 88: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

MobiLink ServerMobiLink Server 資料同步之資料同步之重要特性重要特性MobiLink ServerMobiLink Server 資料同步之資料同步之重要特性重要特性

• 雙向資料交換• 遠端行動設備上的資料可以與後端企業內部資料做雙向

的資料交換• 專屬資料處理

• 每位使用者只處理屬於自己的資料• 資料衝突偵測及解決

• 多人同時修改相同資料時即產生資料衝突,當衝突發生時的偵測及解決方法將由 Mobilink Server所提供

• 安全性• 資料交換的過程中使用 128 bit加解密功能

• 優異的效能• 只針對修改過的資料與後端資料庫做資料交換• 一個 Server可同時支援 6,000使用者上線

Page 89: PowerBuilder Strategic Direction 4GLs Web Professional Development Tools Software Construction Components $ Millions 8,000 7,000 6,000 5,000 4,000

Post Pocket PowerBuilder 1.0: Possible EnhancementsPost Pocket PowerBuilder 1.0: Possible Enhancements

• XML Support for DataWindows and PowerScript

• More Database Support

• IR Support

• Wireless

• .Net