3State of the Development Tools Market 8,0007,0006,0005,0004,0003,0002,0001,000$ Millions4GLsWeb Professional Development ToolsSoftware Construction Components3GLSAnalysis/Model/ Design/ ConstructionSource: IDC, 2003
4Primary Approaches to Application Development Other13%3GLs4GL/RAD23%36%OO 3GLsSource: IDC28%
5% responding “extremely” or “highly” likely Priority: What Are the Strategic Application Development Initiatives for End Users?Rank each of the following strategic business initiativesMaintain/enhance existing applicationsIntegrate internal applicationsBuild, deploy, customize new applicationsIncrease productivity of development processBuild e-commerce solutionsIntegrate applications with external suppliersBuild and deploy mobile/handheld applicationsUtilize open source solutionsIntegrate applications with online exchange0%20%40%60%80%% responding “extremely” or “highly” likelySource: IDC, SW Strategies & Investment Survey, Final, Users, Fall 2001, n = 218
6Uses for PowerBuilder: Today and in the Future 80%Client-Server OnlySome Web Projects17%Most Web Projects3%PowerBuilder FutureClient-Server Only50%Some Web Projects42%Most Web Projects8%Source: Novalys Inc.; 3,400 Respondents; 101 Countries
7What is Important to Your Organization Today? Protect your existing technology investmentStay current with industry trends and new technologyGain a competitive advantageIncorporate new technology into existing applicationsMinimize costsProtect your existing people investmentUtilize their existing skillsGive them a platform for the future
9PB and J2EE PowerBuilder 8.0: PowerBuilder 9.0: Future: EAServer EASI Web Services ToolkitPowerBuilder 9.0:EJB ClientsPB Web ServicesRAD Java Server PagesFuture:NVO’s in 3rd Party Application Servers
10Development in Heterogeneous Environments Web Services.NETAccessing components in .NET framework in PB IDE.NET CompilerDataWindow.NETDataStore.NETEnhanced Web DW4GL JSP supportBuild, access, and consume Web servicesDataWindow XMLXML servicesAccess EJBs in major application serversAccess to web services in powerscript will be via web service proxies and the new PBNI SoapConnection class. Access to web services in JSP targets will be through custom tags that the PowerBuilder developer creates using a wizard.On the second slide, it's not clear to me what is meant by "call PowerBuilder from any application server" in 2004.Deploy NVO’s directly to major application serversContinue enhancing JSP authoring and XML capabilitiesJ2EEToday -> 20032004+
11SummarySybase 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 beyondCustomer needs span from client-server to next-generation, to best development practices and PB will meet these requirementsSybase will extend RAD for enterprise applications to RAD for mobile applications with Pocket PowerBuilder for handheld devices; release in 2003
12PowerBuilder 9.0 New Features RAD Java Server PagesTM (JSPTM) AuthoringXML (Extensible Markup Language)DataWindow (Export and Import)PB DOM (XML Parsing in PowerScript)PowerBuilder Native Interface (PBNI)EJB Client SupportWeb Services Support
13Creating JSP Web Applications with PowerBuilder RAD JSPCreating JSP Web Applications with PowerBuilder
14Introduction to JSP Technology JSP is…A technology for delivering dynamic contentBased upon Java Servlet technologyJavaServer PagesContain standard HTMLCan contain Custom tagsCan contain JSP elementsJSP ActionsJSP DirectivesScripting ElementsAt run time, are compiled into Servlets
15Why use PowerBuilder to create JSPs? Integrated development environment for creating and deploying web applicationsLeverage the power of JSP languageStandardPortableStableEasy to learnIncorporate the power of the DataWindow into your web applications
16PowerBuilder JSP Features PowerBuilder 9.0 Provides the following JSP features:JSP Web Target WizardJSP Web Services Proxy WizardJSP Page AuthoringJSP Web Target Object ModelCustom Tag Library for the Web DataWindowJSP Deployment Configuration
17JSP Web Target WizardThis wizard creates a JSP target that has build and source folders and a deployment configuration.
18JSP Web Services Proxy Wizard This wizard creates a custom tag library with the information necessary for calling a Web service in a JSP .
19JSP 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 wizardDeployment TargetEAServer’s JSP ContainerApache TomcatCommand Line DeploymentThe Web application is automatically deployed to the server you selected in the target wizard
20JSP Authoring in PowerBuilder Allows developers to create JSPs using any of the page wizardsWYSIWYG editing of JSP pagesBuilds upon the existing Web Targets User InterfaceNew Wizard - JSP TargetExtensions to the Page EditorSystem Tree AdditionsFull access to the page source through the editor
21Seeing the Technology in Action RAD JSPSeeing the Technology in Action
22Importing and Exporting XML with the DataWindow XML DataWindowImporting and Exporting XML with the DataWindow
23Review of XML Extensible Markup Language Extends the ability to represent dataMetadata language=tags and layout can be customizedData can be hierarchically structured with nestingEasily parsed across applications, platforms, enterprises, and Web for data interchangeWorld Wide Web Consortium (W3C) XML 1.0 Recommendation at
24XML Document Well-Formed if structure follows XML syntax rules Contains one or more elementsElement is a tree containing start-tag, content, end-tagStart-tag is a name, enclosed by angle brackets, with optional attributesAttribute names must be unique for element; order insignificantAttribute values must be quotedOne root; all element tags properly nestedParsed element cannot contain recursive reference to itselfValid if structure conforms to a DTD or SchemaDTD defines grammar for XML documentSubset can be internal or external
25XML 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>
26XML Parsing DOM Parser DOM provides API access to XML tree model Useful if manipulating or re-traversing the documentSAX ParserEvent-drivenUseful if extracting data once in single traversalCore Interfaces Specified by W3CExtensions denoted by ‘DOM Level 2’, ‘DOM Level 3’
27Why use PowerBuilder and XML? Easily generate XML for your data through the DataWindowImport XML data into your application through the DataWindow (apply validations, etc.)Process XML in PowerScript without having to write low level code
28XML DataWindowXML generated by PowerBuilder is compliant with the XML 1.0 specificationXML generated by PowerBuilder is well-formed and can be processed by an XML ParserPowerBuilder lets you use Template to define the mapping between values from a DataWindow and XML
29XML 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)
30XML DataWindow PowerScript Support New DataWindow object propertiesExport.XML.UseTemplateExport.XML.MetaDataTypeExport.XML.SaveMetaDataData accessdwcontrol.Object.Data.XMLdwcontrol.Object.Data.XMLSchemadwcontrol.Object.Data.XMLDTD
31Seeing the Technology in Action XML DataWindowSeeing the Technology in Action
32Manipulating XML in PowerBuilder with PBDOM XML ServicesManipulating XML in PowerBuilder with PBDOM
33What 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.
34What is DOM ? Document root child_1 child_2 child_3 Text_1 Text_2
35What 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.
36PBDOM 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 masterPBDOM presents a much higher-level set of functions which incurs a shorter learning curve and provides a much greater level of productivity
37PBDOM OverviewPBDOM lays out a standard set of PowerBuilder objects with properties and functionalities that allow for XML document navigation and content manipulationIt 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
43Seeing the Technology in Action XML ServicesSeeing the Technology in Action
44Using the PowerBuilder Native Interface to Extend Your Applications PBNIUsing the PowerBuilder Native Interface to Extend Your Applications
45Three 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?I don’t know if you have asked the three questions. The questions boil down to one question, is it possible to make PowerBuilder more open, so that third parties can extend the functionality of PowerBuilder?
46Extending PowerScript PowerBuilder can call external C functions from PowerScriptBut 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
47What 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 worldPBNI is a standard programming interface for writing PowerBuilder Extensions (or PB extension), and embedding the PowerBuilder virtual machine in C++ applications.PBNI opens two doors from PowerBuilder to outside world. You can write PB extensions that can be used as normal PowerBuilder visual or non-visual objects. You can also embed PowerBuilder virtual machine into your C++ applications in order to call PowerScript functions.C++/JavaApplicationIPB_VMPBVMIPB_SessionPBExtensionIPB_SessionIPBX_NonVisualObject
48What can be done with PBNI? With PBNI, you canWrite PB non-visual extensions and use them in PB just as normal NVOsWrite PB visual extensions and use them just as custom user objectsWrite PB marshaler extensions to call external components and use them in PB just like what you do with Jaguar componentsEmbed the PBVM in external C++ applications to call PowerScript functions
49Generating the PBD file Run pbx2pbd90.exe in Command consoleExample:Pbx2pbd90 simplext.pbd simplext.dllWhat Happens?pbx2pbd90.exe loads the simplext.dllcalls the PBX_GetDescription() functionparses the description and generates a PBD file holding the class definition for the simpleExt class
50Using a PB extensionAdd the PBD file in the library list of the PB targetPut the DLL file in the directory that is in the PATHUsing the native class as a normal NVO or custom user object
51Embedding the PBVMWith 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 DataStoreThrough JNI (Java Native Interface) and PBNI, a Java application can call PowerScript functions
52Seeing the Technology in Action PBNISeeing the Technology in Action
53Accessing Enterprise Java Beans from a PowerBuilder Client EJB ClientsAccessing Enterprise Java Beans from a PowerBuilder Client
55EJB Client Support in PowerBuilder 9.0 Provides the ability to call components in 3rd party EJB serversUses Java Native Interface (JNI) for interoperabilitySupports 1.0, 1.1, and 2.0 EJBsSupports client-managed transactionsSupports system and application exception handlingImplementation will be through a PBNI DLLSupplemented by EJB Proxy GeneratorPowerBuilder IDEEJB2PB90 command line utilityJava data types will be mapped to PowerBuilder data types
56EJB Client Support – Data Type Exchange Java TypePB TypeBytecharShortintIntlongLonglonglong (to be added)FloatrealDoubledoublechar (16bit unsigned)char?BooleanbooleanStringstringJava/util/DatedatetimeArray of primitive typeArray of primitive type for parameters, ANY for return valueArray of String, Date, Time objectsArray of string, date, time for parameters, ANY for return valueArray of Arraysany*(not map to PB type)Java Classes return from EJBObject (EJBs) or taken as parameterspowerobjectOthersany
57Take advantage of EJB Client EJB Client makes PowerBuilder glue with any application server - J2EE compliantDevelopment 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
58Overview of EJB Client Implementation EJB Client PowerBuilder Native Interface(PBNI) implementationPowerBuilder Java VM ServiceCreates and manages a Java Virtual Machine(VM) within its own process space and communicate with Java objectsPowerBuilder proxy Objects
59Definitions - EJB Proxy EJB Proxy In PowerBuilder 9A PB object to represent the remote EJB Interface and local Java classIt includes:All public functions exposed by EJB interface&local Java class and their signatureExceptions that Java method throwsJava class name that PB proxy represents as instance property
60EJB Client PBNI implementation EJB Client provides a bridge from PowerBuilder into EJBEJB ClientPBEJBCLIENT90.DLLPBEJBCLIENT90.PBDPBEJBCLIENT90.JARJavaVMPowerBuilder VMJNIPBNIEJBNVONVOJava Object
61EJB Client PBNI Classes JavaVMload or attach to a Java VMwork with Java interface and class hierarchiesEJBConnectionconnect to the J2EE serverlocate EJB via JNDIinstantiate other Java classesEJBTransactionManage the transaction
62Coding a PowerBuilder EJB Client Application Setting up your environmentAdding the EJB client implementation to your targetGenerating proxiesBasic client coding stepsInitialize the Java VMConnect to the EJB ServerLookup an EJBInvoke methods on the EJBDisconnect from the EJB Server
63Coding a PowerBuilder EJB Client Application Adding the EJB Client implementation to your targetInclude PBEJBCLIENT90.PBD in your target’s library list
65Coding a PowerBuilder EJB Client Application Initialize the Java VMTRYg_JavaVM = CREATE JavaVMCHOOSE CASE g_JavaVM.CreateJavaVM(is_ClassPath, false)CASE 0// JVM just loadedCASE 1// JVM was already loaded, is_ClassPath ignoredCASE -1// failure, likely due to not finding JVM.DLLCASE -2// failure, do to not finding EJBLocator classEND CHOOSECATCH (PBXRuntimeError prte)// catch any exception raised in PBNI extensionEND TRY
66Coding a PowerBuilder EJB Client Application Connect to the EJB ServerTRYg_EJBConn = CREATE EJBConnection// set initial context propertiesls_props = "javax.naming.Context.INITIAL_CONTEXT_FACTORY=" + & "com.sybase.ejb.InitialContextFactory“ls_props = "javax.naming.Context.PROVIDER_URL=iiop://localhost:9000"ls_props = "javax.naming.Context.SECURITY_PRINCIPAL=jagadmin“ls_props = "javax.naming.Context.SECURITY_CREDENTIALS=“// connect to EJB serverg_EJBConn.connectToServer(ls_props)CATCH (NamingException ne)…END TRY
67Coding a PowerBuilder EJB Client Application Lookup an EJBTRYg_HelloHome = g_EJBConn.lookup("HelloHome", "PB9/Hello", "pb9.HelloHome")g_hello = g_helloHome.create()CATCH (NamingException ne)// raised if EJB not locatedCATCH (CreateException ce)// raised if problem in instantiating EJBCATCH (RemoteException re)// raised whenever there is a unchecked exception on serverCATCH (PBXRuntimeError prte)// raised whenever there is an exception in the PBNI extensionEND TRY
68Coding a PowerBuilder EJB Client Application Invoke methods on the EJBTRYMessageBox("Hello", g_hello.sayHello())CATCH (YourCustomException yce)// handle user-defined exception raised by EJBCATCH (RemoteException re)// raised whenever there is a unchecked exception on serverCATCH (PBXRuntimeError prte)// raised whenever there is an exception in the PBNI extensionEND TRY
69Coding a PowerBuilder EJB Client Application Disconnect from the EJB serverTRYg_EJBConn.disconnectServer()CATCH (NamingException ne)// naming exception is unlikely here, but could be thrown by underlying Java InitialContext objectCATCH (PBXRuntimeError prte)// raised whenever there is an exception in the PBNI extensionEND TRY
70Seeing the Technology in Action EJB ClientsSeeing the Technology in Action
71Creating and Consuming Web Services with PowerBuilder 9.0 Web Services and .NetCreating and Consuming Web Services with PowerBuilder 9.0
72Web ServicesWeb Services allow applications written in different programming languages to communicate with each otherWeb Services are:Platform independentLanguage independentBased on XML
73Introduction to Web Service Client How Web Services workClient Side Server Side5. Create WS proxyfrom WSDL6. Use proxy toinvoke Web Services1. Create Server Sidecomponents2. Wrap to WS3. Generate WSDL4. Publish3WSDLFilesPowerScript5NVO or Othercomponents216InvokeWeb serviceProxyWeb serviceStubData
74Web Services SupportPowerBuilder 9.0 supports access to web services using SOAP through HTTPAllows developers to integrate web services into PowerBuilder applications quicklyHides much of the complexity of:WSDLXML grammarSOAP development
75Standards Used In PB Web Service Client Standards supported in PB 9XML Schema 1.1WSDL 1.1SOAP 1.1 over HTTP
76Web Services Support High level process: Create web service proxy Import SOAP connection classUse SOAP connection and proxy in PowerScript
77Seeing the Technology in Action Web Services and .NetSeeing the Technology in Action
78Developing Applications for Pocket PC Devices Pocket PowerBuilderDeveloping Applications for Pocket PC Devices
79新的行動時代 新的商業規則 Mobile Phone and PDA 3G Mobile Media Video Conference eMobile EnterpriseeMobile Managerment說明有那些新的3G mobile device，如何衝擊舊有的商業規則
82Current difficult in developing mobile applications 缺乏功能完整或是開發介面強大的開發工具若使用J2ME，門檻較高，而且生產力不高Page Layout和傳統開發Windows程式不同行動裝置上的資料庫不一定是關連式資料庫，增加開發困難必須考慮行動裝置和後端資料庫的整合必須開發同步系統解決資料同步的問題
83Pocket PowerBuilder Core Features 高生產力與低學習門檻的4GL整合開發環境 延伸PowerBuilder DataWindow於行動商務應用上 與行動資料庫領導品牌SQL Anywhere Studio緊密結合企業資料庫同步整合支援（MobiLink Server） 精靈導引開發環境 PowerBuilder應用移植Note: PocketBuilder – no Win98 support.Note: Device – means handheld like PocketPC, HPC Pro, iPaq etc.Note: No support for version 2.11 of WinCE.Tested on iPaq, Jornada 540, Jornada handheld (720).PocketPC 2000 and PocketPC 2002 are WinCE based, so should work on these platforms.XScale should work, we will try it soon.Typically XScale is 400MHz compared to 206MHz for other ARM and SH3 chips.Deploy to all 3 targets for this demo.Trim the IDE – On PocketPC we use a lite version of the PowerBuilder runtime environment.WinCE is a subset of Windows. PocketBuilder is a subset of PowerBuilder.
84Pocket PowerBuilder environment Pocket PowerBuilder is supported on Windows 2000 and Windows XPTarget devices are PocketPC and HPC ProfessionalTarget operating system WinCE 3.0 or laterSupported processors ARM and XscaleSupport UnicodeNo Pocket PowerBuilder runtime licensesDevelop using the same PowerBuilder IDE formatDeploy to desktop, device or emulatorSupport Microsoft Pocket PC, Pocket PC 2002 and Pocket PC 2003 emulatorNote: PocketBuilder – no Win98 support.Note: Device – means handheld like PocketPC, HPC Pro, iPaq etc.Note: No support for version 2.11 of WinCE.Tested on iPaq, Jornada 540, Jornada handheld (720).PocketPC 2000 and PocketPC 2002 are WinCE based, so should work on these platforms.XScale should work, we will try it soon.Typically XScale is 400MHz compared to 206MHz for other ARM and SH3 chips.Deploy to all 3 targets for this demo.Trim the IDE – On PocketPC we use a lite version of the PowerBuilder runtime environment.WinCE is a subset of Windows. PocketBuilder is a subset of PowerBuilder.
85Windows and Controls Controls are similar to desktop CheckboxRadiobuttonListboxPushbuttonDatawindowEtc…No mouse, no cursorsUsually the only available cursor is the wait-cursorMost Datawindow Presentation StyleFreeform, Graph, Grid, Group, TabularDifferences are more visual than action.Usually no mouse, so no cursor support, except “Wait”.We will change the way we build and display menus. PocketPC uses MenuBar, others devices use CommandBar.Popup menu is handled differently, there is no Right Mouse Button. Use a timer/delay/tremble factor.
86Database Synchronization ODBCHandheld ASA DatabaseorConnection to Enterprise DB as ‘Always Connected’MobiLinkASA DatabasesThe DBMLSYNC application on the device manages the synchronization of data between the desktop and the deviceUse Sybase Central to define the synchronization operationAlthough ActiveSync allows import/export of (almost) any odbc source, synchronization only seems to work with MDB files. This may be a Microsoft bug, or a limitation on the ActiveSync manager.
89Post Pocket PowerBuilder 1.0: Possible Enhancements XML Support for DataWindows and PowerScriptMore Database SupportIR SupportWireless.NetMuch of this will become clearer after initial user testing and feedback.XML support as in PowerBuilder (DataWindows and PowerScript).Some graphics DataWindow capability is a must.Other database support e.g. Microsft SQL Server CESome support for UDO’s not sure what, needs feedback/researchInfrared access from a PocketBuilder application would be nice.Wireless access from PocktBuilder app maybe. I’m not sure what this means or if it would conflict with other communications functionality.Dot Net considerations, whatever that means…..