Your Presenter - PowerPoint PPT Presentation

1 / 83
About This Presentation
Title:

Your Presenter

Description:

ORCA / SCC integration (new) Batch build procedure with no operation intervention ... Scripting language for ORCA API. OrcaScript example - Create PBDs and ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 84
Provided by: cory54
Category:
Tags: orca | presenter

less

Transcript and Presenter's Notes

Title: Your Presenter


1
(No Transcript)
2
Your Presenter
  • Dfish_at_sybase.com
  • Sybase PowerBuilder Evangelist
  • Member of TeamSybase since 1994
  • Started using PowerBuilder 2.0 in 1993
  • Co-author
  • Using PowerBuilder 4.0
  • Using PowerBuilder 5.0
  • Advanced Client Server Development with
    PowerBuilder 9.0 (May 2003)
  • Various Software Publications (Database Advisor,
    PBDJ, Open Systems Journal, etc.)

3
And I understand Cricket!
4
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

5
RAD JSP
  • Creating JSP Web Applications with PowerBuilder

6
Introduction 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

7
JSP Authoring in PowerBuilder
  • New PowerBuilder Target Type (JSP Target)
  • Builds upon the existing Web Targets User
    Interface
  • New Wizard - JSP Target
  • Extensions to the Page Editor
  • System Tree Additions
  • Deployment Changes
  • EAServers JSP Container
  • Apache Tomcat
  • Command Line Deployment

8
JSP Authoring in PowerBuilder 9.0
  • PowerBuilder 9 provides a powerful object model
    for
  • Data transfer between the web client and the
    application server
  • HTML generation
  • JavaScript generation for server scripts

9
JSP Authoring in PowerBuilder 9.0
  • Wizard for
  • Creating JSPs that call Web Services
  • WYSIWYG editing of JSP pages
  • Full access to the page source through the editor

10
XML DataWindow
  • Importing and Exporting XML with the DataWindow

11
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

12
XML 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 create your own declarations

13
XML Document Example
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • lttag_namegt ? root element
  • lttag_name2 attribute"female"gt
  • ltnamegt
  • ltemp_fnamegtFranlt/emp_fnamegt ? text
    content
  • ltemp_lnamegtWhitneylt/emp_lnamegt
  • lt/namegt
  • ltempty_elementgtlt/empty_elementgt ? empty
    element
  • ltanother_empty_element/gt ? alternative
    notation
  • lt/tag_name2gt
  • lt/tag_namegt

14
XML Parsing
  • DOM Parser
  • DOM provides API access to XML tree model
  • Useful if manipulating or re-traversing the
    document
  • SAX Parser
  • Event-driven
  • Useful if extracting data once in single
    traversal
  • Core Interfaces Specified by W3C
  • Extensions denoted by DOM Level 2, DOM Level 3

15
DataWindow Export/Import Template
  • Defines the mapping between values from a
    DataWindow and locations in an external document
    format, like XML
  • References can be
  • DataWindow control values (text)
  • Column
  • Computed column
  • Text control
  • Computed field
  • Nested report
  • DataWindow Expressions (evaluated at runtime)
  • Data source column

16
DataWindow Export/Import Template
17
Importing XML Data into DataWindow
  • Analogous to XML export
  • DataWindow Import methods enhanced
  • XML Default Import
  • Assumes coincident column data in XML document
  • XML Template Import
  • Piggybacks off same XML Template as for export to
    interpret logical structure and DataWindow
    mapping of XML document to import
  • Internally uses SAX parser for performance

18
XML Services
  • Manipulating XML in PowerBuilder with PBDOM

19
PBDOM Overview
  • With no native XML support, existing PB apps that
    need to process XML would use third party parsers
    like MSXML.
  • This required the use of OLEObjects.
  • This immediately raises the problem of platform
    issues. E.g. MSXML is only supported in Wintel
    platforms.

20
PBDOM 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.

21
PBDOM 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

22
PBDOM Overview
  • When PBDOM is used to manage an XML document, the
    first thing it does is parse the document and
    break it down into individual objects that
    represent the elements, attributes, comments,
    etc. as found in the document

23
PBDOM Overview
  • As it parses the document, PBDOM analyzes and
    maintains the innate relationships between the
    objects in the document
  • In other words, the PBDOM models the items of an
    XML document as a logical structure of objects
    that resembles a tree

24
PBDOM Example
25
PBNI
  • Using the PowerBuilder Native Interface to Extend
    Your Applications

26
Definition
  • PBNI, the PowerBuilder Native Interface, is a
    standard interface for writing PB extensions,
    including PB non-visual extension, PB visual
    extensions, and PB marshaler extensions, and for
    embedding the PBVM into external C applications.

27
Extending 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.

28
PBNI is a better solution
  • To solve these limitations, PBNI has been
    implemented in PB90
  • Using PBNI, you get the following benefits
  • The data passed between PowerScript and PB
    extensions are in PBs native data types
  • PB extensions can callback into the PBVM to
    perform various jobs, such as creating an object,
    invoking a PowerScript function, triggering an
    event, accessing a variable, accessing an array
    item, and so on
  • Once the PBD file representing a PB extension is
    included in a PB target, the classes implemented
    by the PB extension can be used just like normal
    NVOs or custom user objects

29
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

30
Using 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
  • PBNI works on both Windows and Unix platforms

31
PBNI Visual Extension
32
EJB Clients
  • Accessing Enterprise Java Beans from a
    PowerBuilder Client

33
J2EE Example
J2EE Server
EJB Container
Home Interface
Home Object
Enterprise Information System
Client
bean
Remote Interface
Services Provided by Server to bean
Naming Transactions Security .
34
Take advantage of EJB Client Support
  • EJB Client support 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 PowerBuilder

35
Overview 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

36
EJB Client PBNI implementation
  • EJB Client provides a bridge from PowerBuilder
    into EJB

EJB Client PBEJBCLIENT90.DLL PBEJBCLIENT90.PBD PB
EJBCLIENT90.JAR
Java VM
PowerBuilder VM
JNI
PBNI
EJB
NVO
Java Object
NVO
JNI (Java native interface) http//java.sun.com/j
2se/1.4/docs/guide/jni/
37
EJB Client PBNI Objects
  • 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

38
JVM Service in PB IDE
  • Sun JDK 1.4 is installed within
    shared/PowerBuilder directory by PowerBuilder as
    default
  • Modify this default setting using JDK Location
    dialog
  • It is accessible from the Java tab of the Systems
    Options Dialog access from PowerBuilders Tools
    Menu, click the Set JDK Location button

39
EJB Proxy Object
  • EJB proxy object is a way to delegate requests to
    and from the underlying Java classes
  • Each EJB proxy is inherited from nonvisualobject
    or exception class like other PowerBuilder
    proxies
  • Proxy includes all of the public methods defined
    on its associated Java class

40
Generates EJB proxies
  • PowerBuilder provides two methods to generate
    proxy object
  • Within the development environment
  • A standalone command-line application
  • Relies on the Javap utility provided with the
    JDK.
  • Fully qualified name of an EJBs remote interface
    is required as parameter
  • Assumes that the home interface has the same name
    followed by Home
  • An additional PB structure is generated as well,
    that records the correspondence of the original
    Java class to the resulting proxy object name

41
Web Services and .Net
  • Creating and Consuming Web Services with
    PowerBuilder 9.0

42
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

43
Web 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

44
Standards Used In PB Web Service Client
  • Standards supported in PB 9
  • XML Schema 1.1
  • WSDL 1.1
  • SOAP 1.1 over HTTP

45
PowerBuilder 9.0 Enhancements
  • SaveAs(PDF!)
  • Debugger Enhancements
  • Version Control Enhancements

46
SaveAs(PDF!)
  • Generating PDF Files From Your DataWindows

47
Methods to Export PDF
  • SaveAs method
  • integer dwcontrol.SaveAs ( string filename,
  • saveastype saveastype,
  • boolean colheading )
  • SaveAsType

48
SaveAs(PDF!)
  • Demonstration

49
Debugger Enhancements
  • Improving the Debugging Experience

50
Debugger Enhancements
  • TipWatch for Context Variable or Expression in
    Debugger Source View
  • QuickWatch for Context Variable or Expression in
    Debugger Source View
  • Predefined shortcut keys for some debugger menu
    items.

51
TipWatch
  • TipWatch for Context Variable or Expression
  • During debugging and script execution when
    stopping at a breakpoint
  • Place mouse pointer over a variable string or
    selected text as watch variable or expression in
    debugger source view
  • A tip window will automatically popup to show
    the current value of variable or expression
  • Watch string comes from the context variable or
    expression in source view
  • Value of watch is shown in a popup window

52
Examples for TipWatch
  • TipWatch for simple type expression(Format exp
    value)

53
QuickWatch
  • Select Debug\QuickWatch menu item or QuickWatch
    popup menu
  • QuickWatch Dialog with QuickWatch View pops up
    and shows the detail current information of the
    watch variable or expression
  • Change the variable or expression

54
Examples for QuickWatch
  • QuickWatch activiation

I
55
Examples for QuickWatch
  • QuickWatch for datawindow object properties

Type any dw dot notation string in exp editbox
and reevaluate it to get the dw data or obj
properties
56
Examples for QuickWatch
  • QuickWatch for datawindow object properties

57
Examples for QuickWatch
  • Modify variable value

Double click the variable item or select the item
and click Change Value Button to modify the
item value
58
Predefined shortcut keys for some debugger menu
items
  • Predefined shortcut keys are added for menu items
  • Use mouse to watch the variable value and use
    predefined shortcut keys to control script
    execution

59
Predefined shortcut keys for some debugger menu
items
60
Version Control Enhancements
  • Source Code Control and PowerBuilder 9.0

61
Goals for SCC features in PB 9
  • Automated target refresh
  • Improve performance of status queries
  • Improve detection of out of sync objects
  • Closer integration with SCC providers
  • User enhancement requests

62
Automated target refresh
  • ORCA / SCC integration (new)
  • Batch build procedure with no operation
    intervention
  • Rebuild PBLs from scratch
  • Refresh PBLs
  • Do not overwrite checked out objects
  • Refresh from a previous version label or view
  • OrcaScript utility (new)
  • Scripting language for ORCA API

63
OrcaScript example - Create PBDs and Executable
Start session Set liblist .\qadbtest\qadbtest.pbl
.\shared_obj\shared_obj.pbl.\chgreqs\chgreq
s.pbl.\datatypes\datatype.pbl Set application
.\qadbtest\qadbtest.pbl qadbtest build
library .\shared_obj\shared_obj.pbl ""
pbd build library .\datatypes\datatype.pbl ""
pbd build library .\chgreqs\chgreqs.pbl ""
pbd build executable .\qadbtest\qadbtest.exe
".\emp.ico" ".\qadbtest.pbr" "nyyy" End session
64
The Refresh Status Cache
  • PowerBuilder caches the status information of
    objects under source control along with a
    timestamp
  • For a period of time, customizable by the user,
    PB assumes this information is accurate
  • Once the status refresh rate expires for a
    particular object, PB will query the SCC provider
    for new status information and refresh its cache
    the next time this information is requested by
    the IDE

65
Explicit Refresh Status Requests
  • Users can override the default behavior of the
    Refresh Status Cache at any time and for any
    reason
  • Users can force a new SccQueryInfo and compare
    differences request by clicking on the Refresh
    Status menu item
  • Refresh Status is available from the System
    Tree in PB 9.0.
  • Refresh Status in PB 9 takes place on a
    background thread
  • Users should issue target-wide Refresh Status
    request BEFORE requesting a target-wide
    GetLatestVersion

66
Improve detection of out of sync objects
  • Use four different diff strategies
  • SccQueryInfo OUTOFDATE flag
  • Compare PBL source with local project path (new)
  • Diff by version number (new)
  • SccDiff
  • Diff strategy varies for each SCC provider

67
User Enhancement Requests
  • Support Reload Feature in SccHistory and
    SccProperties
  • Resizable checkview dialog
  • All SCC operations accessible from system view
    context menus
  • Prompt user not to clobber checked out objects on
    target-wide GetLatestVersion request
  • Require additional confirmation before removing
    objects from source control
  • Suppress prompt to overwrite read-only files in
    local project path

68
PowerDesigner and PowerBuilder
  • Reverse Engineer and Generate PowerBuilder
    Objects with PowerDesigner

69
PowerBuilder Support in PowerDesigner 9.5.2
  • PowerDesigner 9.5.2 will support PowerBuilder 6,
    7, 8 and 9
  • PowerDesigner will reverse engineer and generate
    all PowerBuilder objects
  • The following objects are reverse engineered and
    generated as classes
  • Application, User Object, Structure, Function,
    Window, Proxy

70
PowerBuilder Support in PowerDesigner 9.5.2
  • The other objects are reverse engineered and
    generated as is
  • Support libraries (.pbl) and source files (.sr?)
  • PowerBuilder tool palette for creating new
    objects
  • Model verification
  • Generate reverse PowerBuilder extended
    attributes in Physical Data Model

71
Reverse Engineering PowerBuilder Application
  • Select LanguagegtReverse Engineer PowerBuilder
  • Select the Library or source mode
  • Select the Target or application
  • You can select or deselect the objects

72
Example of a Class Diagram
  • The class diagram shows packages, inheritances,
    associations, dependencies, attributes,
    operations
  • Each library will create a package
  • A stereotype and a mini icon shows the type of
    object
  • The dependencies show which menu or data window
    is used by which window
  • Window, user object, application, structure,
    function and proxy are represented as classes and
    the code is regenerated from the class definition
  • Controls are represented by inner classes

73
Working on the Class Diagram
  • Create, modify or delete objects or links
  • Use a tool bar to create objects
  • Preview the to be generated PowerBuilder code
  • Modify the PowerBuilder code in the code preview
    window
  • Write specification in RTF format. You can use
    Word to edit the description or annotation
  • Generate reports in HTML or RTF formats

74
Working with Controls
  • Controls are represented as inner classes
  • To see the list of controls
  • Open the properties of a window
  • Select the Inner Classes tab
  • Open the properties of an inner class

75
Generating the Application
  • Select LanguagegtGenerate PowerBuilder Code
  • In the Select tab, you can select or unselect
    objects
  • In the Options tab, you can select the library or
    source mode, a target or application

76
The Business / Technical Benefits
  • PowerDesigner offers UML Modeling to PowerBuilder

77
The Business / Technical Benefits
  • UML modeling offers the PowerBuilder Community
    the power to
  • Understand legacy systems through visual modeling
  • Ease integration and maintenance
  • Migrate existing client-server applications to
    N-tier/service oriented architectures
  • Easily lift business logic out of existing
    applications
  • Insert Business Logic visually into objects
    generated to PowerBuilder

78
The Business / Technical Benefits
  • Documentation of complex multi-tier applications
  • For ongoing development and maintenance
  • Makes projects and systems more agile in
    responding to changes in
  • Business Requirements
  • Business Models

79
Future Direction
  • PowerBuilder will be able to embed PowerDesigner
    views inside PowerBuilder
  • PowerBuilder will be able to generate complete
    code from PowerDesigner models using OLE
    automation

80
Pocket PowerBuilder
  • Developing Applications for Pocket PC Devices

81
Objective
  • Extend PowerBuilder Enterprise to WinCE devices
  • 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
  • No Pocket PowerBuilder runtime licenses
  • Develop using the same PowerBuilder IDE format
  • Deploy to desktop, device or emulator

82
Windows 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

83
Database Synchronization
  • 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

84
Debugging
  • Desktop application
  • Deploy to the desktop and use the PB Debug
    interface. This could be done using PowerBuilder
    or Pocket PowerBuilder
  • This should cover most of the application
    problems, except perhaps for the database access
  • PPC Emulator for quick preview
  • Use the emulator for instant device testing
  • Always test on the real device (devices) before
    shipping the application

85
First Release of Pocket PowerBuilder
  • Compatibility with PowerBuilder
  • PowerBuilder Objects can be imported into Pocket
    PowerBuilder
  • Pocket PowerBuilder objects can be imported into
    PowerBuilder
  • A subset of PowerBuilder objects and methods
  • No RichText Control
  • No OLE
  • Etc.

86
Post Pocket PowerBuilder 1.0 Possible
Enhancements
  • XML Support for DataWindows and PowerScript
  • More Database Support
  • IR Support
  • Wireless
  • .Net

87
Beta Registration
  • www.sybase.com/pocketpb

88
Pocket PowerBuilder
  • Seeing the Technology in Action

89
Sybase Developer Network presents CodeXchange
  • www.codexchange.sybase.com

90
Share PB 9.0 code tools
  • New SDN feature enables community collaboration
  • Download samples created by Sybase
  • Leverage contributions of others to exploit PBNI
  • (i.e. PBNI CommonDialog, PBNI OLEObject
    utilities)
  • Contribute your own code or start your own
    collaborative project with input from other
    PowerBuilder experts
  • Any SDN member can participate
  • Log in using your MySybase account via SDN
  • Join the collaboration already underway
  • http//powerbuilder.codexchange.sybase.com or
  • via SDN at www.sybase.com/developer

91
www.pb9books.com
92
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com