Perspectives On Application Development Using Sybase Tools Donald D. Clayton President, Intertech Consulting, Inc. [email protected] (713) 586-6481 April 27, 2004
Download ReportTranscript Perspectives On Application Development Using Sybase Tools Donald D. Clayton President, Intertech Consulting, Inc. [email protected] (713) 586-6481 April 27, 2004
Slide 1
Perspectives On Application Development Using Sybase Tools
Donald D. Clayton
President, Intertech Consulting, Inc.
[email protected] (713) 586-6481
April 27, 2004
Slide 2
Objectives
Review some decision frameworks regarding the use of
Sybase tools
Understand the Sybase tools strategy for application
development
PowerBuilder
PowerBuilder in a .Net World
Next Generation Web DataWindow
PowerDesigner
PowerDesigner For PowerBuilder Developers and PowerDesigner Futures
Slide 3
Audience Review
Which version of PowerBuilder are you on?
How many applications are you supporting?
How many of those are PFC?
What do your enhancement requests look like?
Bug fixes only
New functionality
Need to move functionality to Web
What are your company’s current development standards?
Slide 4
Decision Framework #1
Maintenance vs. New Requirements
Web vs. Non Web
Looking for a Silver Bullet?
It is important to have an effective baseline and know where
you want to go
Step 1: Know your PowerBuilder Code
Slide 5
Maintenance Mode Only
If it isn’t broken, don’t try to fix it.
There is lots of maintenance mode PB out there, mostly PB
6.5.1, with post Y2K fixes, etc.
But what if there are new requirements?
Stick with PB 6.5, which seems to work… Or
…move to newer version of PowerBuilder
Slide 6
Deployment Concerns
A major reason for moving to web-based computing is the
elimination of deployment concerns
How many of you would like to eliminate the tedious
installation of new and upgraded software onto the many PCs
in your far-flung company?
Many companies use CITRIX or Terminal Services
There are other options available
Softricity's SoftGrid
Exent Technologies
Stream Theory
Appstream
Egenera
Slide 7
Do You Need to Get To The Web?
There are numerous ways to get to the web with Sybase
products
PowerBuilder/EAServer Combo
HTML DataWindow
Web Services Tools in EAServer
3rd Party Code Generators or Migrators
Appeon
Metex
Slide 8
Decision Framework #2
What development tools do your strategic and tactical
application development platforms call for?
Sybase sees the App Dev World splitting into two large
camps with several smaller camps around them
Large Camps
Microsoft Visual Studio and .Net
Java
Small Camps
Borland Delphi
PowerBuilder
Centura
Oracle Forms
Slide 9
The .NET World of Microsoft
.The Future According to Microsoft
Microsoft’s vision of Windows application development is an
all encompassing environment with many benefits
Common runtime system
Type safe programming
Easy communication between different languages
Massive class library, from soup to nuts.
Slide 10
Microsoft’s App Dev Roadmap
Slide 11
The .Net Cool-aid
Microsoft intends to do all their applications development
and more under .NET.
C# will be the language of choice for everything that is not of
the kernel, which will remain in C/C++.
The scope of the runtime system and the class libraries is
almost breath taking.
Microsoft believes in this architecture strongly enough to
have upset their very large base of Visual Basic developers
with a radically (for them) new version Visual Basic.
Slide 12
Powerbuilder’s Place in .NET
Powerbuilder offers alternatives to Microsoft’s vision.
Sybase announced and has committed to a 4 phased .Net
strategy
Release 9.0
Release 10.0
Supports Web Services and XML
More support for Web Services
DataWindow .NET
Release 11.0
PB 11.0 will introduce compiler support for .NET, compiling Powerscript
directly to MSIL
Powerbuilder access to .NET class libraries
Allow .NET applications to access Powerbuilder objects.
Slide 13
Powerbuilder’s Place in .NET
Coming in the next release
The DataWindow .NET
For the Visual Basic programmer
Will be a citizen of the .NET world
The DataWindow technology will be extended to all languages supported in
the Common Language Runtime
Visual Basic.NET, C#, C++
A worthy competitor to the DataGrid control
The DataWindow offers features that will be enticing to VB programmers
For the Powerbuilder programmer
Where development in .NET is mandated, the investment in DataWindows is
protected.
The DataWindow will be familiar
Slide 14
The DataWindow .NET initiative
What is the DataWindow.NET?
A .NET data aware control
The .NET data aware object
Drop it on a Window Form
It supports the familiar set of DataWindow properties, events and methods
Instantiated using “new”.
Like the DataWindowControl, it will expose DataStore methods events and
properties.
The Powerbuilder database drivers
The DataWindow Builder
For DataWindow creation without Powerbuilder
Slide 15
The DataWindow .NET Initiative
Implementation
The DataWindowControl
Is a custom authored Windows Form.
Can be dropped on a Windows Form
Backed up by a C# class library that maps DataWindow functionality to
applications running within the Common Language Runtime
This class library includes the DataStore.
The DataWindow engine (server)
Powerbuilder DataWindow engine
Loads DataWindow definitions from pbls and pbrs
Communicates with the database drivers
Processes UI events in the screen real estate of the DataWindowControl
Does the screen painting.
Slide 16
The DataWindow .NET Implementation
How do you use it
From the Visual Studio .NET toolbox
.
Select and drop the DataWindowControl onto a Windows Form.
Two important properties are exposed:
Enter the name of the DataWindow Object to use in the DataWindowControl
Enter a library name from where to load the DataWindow Object
Slide 17
DataWindow .NET Implementation
How do you use it?
DataWindow Events..
The DataWindowControl will support the same set of events as the
DataWindow
Slide 18
Powerbuilder’s place in .NET
Powerbuilder futures
A future release of Powerbuilder will:
Allow Powerscript access to .NET class libraries
Compile Powerscript code to MSIL
Allow Powerscript to run under the Common Language Runtime
Allow Powerscript to consume both Microsoft and other .NET objects
Allow .NET objects to access Powerbuilder objects
NVO etc.
Slide 19
PowerScript.NET
How to create a PB target for .NET?
Create a .NET target
When creating a PB target, you will be able to create a .NET target. In this
target you can import and extend .NET classes written in other languages.
Create a normal target and compile it into MSIL
When creating a PB target, if you choose to create a normal target, you can
create a project to compile the target into a .NET application. However, in this
target, you cannot import or extend.NET classes written in other languages.
Slide 20
PowerScript.NET
What can you do with it?
Compile a PowerBuilder target into a .NET application.
Import and use .NET classes written in other languages.
Extend .NET classes written in other languages.
Slide 21
PowerBuilder 10: The “XML Web DataWindow”
Solution
Utilize latest web technologies:
XHTML
Client-side XML
Client-side XSLT
Standalone CSS stylesheet (with cascaded absolute positioning)
Slide 22
XML Web DataWindow
Browsers targeted:
B ro w s e r
X M L p a rs e r
X S L T p ro c e s s o r
X S L T v e rs io n
In te rn e t E xp lo re r 5 , 5 .5
M S X M L 2 .0
X S L -W D
In te rn e t E xp lo re r 6 .0
M S X M L 3 .0
X S L T 1 .0
N e tsca p e 6 +
T ra n sfo rM iiX
X S L T 1 .0
M o zilla 1 .0
T ra n sfo rM iiX
X S L T 1 .0
Slide 23
Why Use XHTML?
Benefits:
Separation of presentation markup from content
Use of XML-specific technologies in architecture
Most fundamental principle in web development
DOM-based generation and parsing
Use of XML-specific tools for customizing
TreeView-based editing
Slide 24
Separating Presentation from Content
Within DataWindow:
Content = data values of column, compute, and text controls
Presentation = visual and functional properties of DW controls
Benefits of Separating:
Accessibility
Targeted presentation using stylesheets
Improved processing by browser
Slide 25
XHTML Benefits
Accessibility
XHTML’s separation of visual elements from actual content make
page much more accessible to people with disabilities
XHTML more easily understood by people with visual impairments
using screen readers and voice browsers
Presentation can now be stored in separate stylesheet documents
(CSS and XSL) for XHTML page
Different stylesheets more easily generated for different browsers
United States, Section 508 of the Usability Act
Slide 26
Client-Side XML
XML Content
XSLT
Determines structural
layout
XHTML
Determines style of
elements as displayed
in browser
CSS
Slide 27
XSLT
Extensible Stylesheet Language Transformations
Provides a way of transforming XML documents into other
document formats
For XHTML (which is fundamentally XML), XSLT can be used to
transform an XML document into a styled XHTML web page for
display in a browser
XSLT goes beyond CSS by allowing rules that change or infuse
the content with layout and structure
Slide 28
Why Use Client-Side XSLT?
Benefits:
Saves bandwidth
Clients only need to download and cache XSLT code once for
DataWindow session
Server processing is reduced with more work being done on client
Slide 29
XML Web DataWindow Design
Server-Side
Client-Side
XML
DataStore
User request page
XSLT XHTML
XML Web DW
component
Step 2
DataWindow generated
in separate XML, XSLT
CSS, JS, with transform
script sent to client
CSS
Client-side
JavaScript
JS control
JS rows
JSP Page
Step 1
HTTP get
XHTML Page
Client-Side
Step 4
Client-side JavaScript
uses XSLT to transform
XML into XHTML and
displays this in the
Perspectives On Application Development Using Sybase Tools
Donald D. Clayton
President, Intertech Consulting, Inc.
[email protected] (713) 586-6481
April 27, 2004
Slide 2
Objectives
Review some decision frameworks regarding the use of
Sybase tools
Understand the Sybase tools strategy for application
development
PowerBuilder
PowerBuilder in a .Net World
Next Generation Web DataWindow
PowerDesigner
PowerDesigner For PowerBuilder Developers and PowerDesigner Futures
Slide 3
Audience Review
Which version of PowerBuilder are you on?
How many applications are you supporting?
How many of those are PFC?
What do your enhancement requests look like?
Bug fixes only
New functionality
Need to move functionality to Web
What are your company’s current development standards?
Slide 4
Decision Framework #1
Maintenance vs. New Requirements
Web vs. Non Web
Looking for a Silver Bullet?
It is important to have an effective baseline and know where
you want to go
Step 1: Know your PowerBuilder Code
Slide 5
Maintenance Mode Only
If it isn’t broken, don’t try to fix it.
There is lots of maintenance mode PB out there, mostly PB
6.5.1, with post Y2K fixes, etc.
But what if there are new requirements?
Stick with PB 6.5, which seems to work… Or
…move to newer version of PowerBuilder
Slide 6
Deployment Concerns
A major reason for moving to web-based computing is the
elimination of deployment concerns
How many of you would like to eliminate the tedious
installation of new and upgraded software onto the many PCs
in your far-flung company?
Many companies use CITRIX or Terminal Services
There are other options available
Softricity's SoftGrid
Exent Technologies
Stream Theory
Appstream
Egenera
Slide 7
Do You Need to Get To The Web?
There are numerous ways to get to the web with Sybase
products
PowerBuilder/EAServer Combo
HTML DataWindow
Web Services Tools in EAServer
3rd Party Code Generators or Migrators
Appeon
Metex
Slide 8
Decision Framework #2
What development tools do your strategic and tactical
application development platforms call for?
Sybase sees the App Dev World splitting into two large
camps with several smaller camps around them
Large Camps
Microsoft Visual Studio and .Net
Java
Small Camps
Borland Delphi
PowerBuilder
Centura
Oracle Forms
Slide 9
The .NET World of Microsoft
.The Future According to Microsoft
Microsoft’s vision of Windows application development is an
all encompassing environment with many benefits
Common runtime system
Type safe programming
Easy communication between different languages
Massive class library, from soup to nuts.
Slide 10
Microsoft’s App Dev Roadmap
Slide 11
The .Net Cool-aid
Microsoft intends to do all their applications development
and more under .NET.
C# will be the language of choice for everything that is not of
the kernel, which will remain in C/C++.
The scope of the runtime system and the class libraries is
almost breath taking.
Microsoft believes in this architecture strongly enough to
have upset their very large base of Visual Basic developers
with a radically (for them) new version Visual Basic.
Slide 12
Powerbuilder’s Place in .NET
Powerbuilder offers alternatives to Microsoft’s vision.
Sybase announced and has committed to a 4 phased .Net
strategy
Release 9.0
Release 10.0
Supports Web Services and XML
More support for Web Services
DataWindow .NET
Release 11.0
PB 11.0 will introduce compiler support for .NET, compiling Powerscript
directly to MSIL
Powerbuilder access to .NET class libraries
Allow .NET applications to access Powerbuilder objects.
Slide 13
Powerbuilder’s Place in .NET
Coming in the next release
The DataWindow .NET
For the Visual Basic programmer
Will be a citizen of the .NET world
The DataWindow technology will be extended to all languages supported in
the Common Language Runtime
Visual Basic.NET, C#, C++
A worthy competitor to the DataGrid control
The DataWindow offers features that will be enticing to VB programmers
For the Powerbuilder programmer
Where development in .NET is mandated, the investment in DataWindows is
protected.
The DataWindow will be familiar
Slide 14
The DataWindow .NET initiative
What is the DataWindow.NET?
A .NET data aware control
The .NET data aware object
Drop it on a Window Form
It supports the familiar set of DataWindow properties, events and methods
Instantiated using “new”.
Like the DataWindowControl, it will expose DataStore methods events and
properties.
The Powerbuilder database drivers
The DataWindow Builder
For DataWindow creation without Powerbuilder
Slide 15
The DataWindow .NET Initiative
Implementation
The DataWindowControl
Is a custom authored Windows Form.
Can be dropped on a Windows Form
Backed up by a C# class library that maps DataWindow functionality to
applications running within the Common Language Runtime
This class library includes the DataStore.
The DataWindow engine (server)
Powerbuilder DataWindow engine
Loads DataWindow definitions from pbls and pbrs
Communicates with the database drivers
Processes UI events in the screen real estate of the DataWindowControl
Does the screen painting.
Slide 16
The DataWindow .NET Implementation
How do you use it
From the Visual Studio .NET toolbox
.
Select and drop the DataWindowControl onto a Windows Form.
Two important properties are exposed:
Enter the name of the DataWindow Object to use in the DataWindowControl
Enter a library name from where to load the DataWindow Object
Slide 17
DataWindow .NET Implementation
How do you use it?
DataWindow Events..
The DataWindowControl will support the same set of events as the
DataWindow
Slide 18
Powerbuilder’s place in .NET
Powerbuilder futures
A future release of Powerbuilder will:
Allow Powerscript access to .NET class libraries
Compile Powerscript code to MSIL
Allow Powerscript to run under the Common Language Runtime
Allow Powerscript to consume both Microsoft and other .NET objects
Allow .NET objects to access Powerbuilder objects
NVO etc.
Slide 19
PowerScript.NET
How to create a PB target for .NET?
Create a .NET target
When creating a PB target, you will be able to create a .NET target. In this
target you can import and extend .NET classes written in other languages.
Create a normal target and compile it into MSIL
When creating a PB target, if you choose to create a normal target, you can
create a project to compile the target into a .NET application. However, in this
target, you cannot import or extend.NET classes written in other languages.
Slide 20
PowerScript.NET
What can you do with it?
Compile a PowerBuilder target into a .NET application.
Import and use .NET classes written in other languages.
Extend .NET classes written in other languages.
Slide 21
PowerBuilder 10: The “XML Web DataWindow”
Solution
Utilize latest web technologies:
XHTML
Client-side XML
Client-side XSLT
Standalone CSS stylesheet (with cascaded absolute positioning)
Slide 22
XML Web DataWindow
Browsers targeted:
B ro w s e r
X M L p a rs e r
X S L T p ro c e s s o r
X S L T v e rs io n
In te rn e t E xp lo re r 5 , 5 .5
M S X M L 2 .0
X S L -W D
In te rn e t E xp lo re r 6 .0
M S X M L 3 .0
X S L T 1 .0
N e tsca p e 6 +
T ra n sfo rM iiX
X S L T 1 .0
M o zilla 1 .0
T ra n sfo rM iiX
X S L T 1 .0
Slide 23
Why Use XHTML?
Benefits:
Separation of presentation markup from content
Use of XML-specific technologies in architecture
Most fundamental principle in web development
DOM-based generation and parsing
Use of XML-specific tools for customizing
TreeView-based editing
Slide 24
Separating Presentation from Content
Within DataWindow:
Content = data values of column, compute, and text controls
Presentation = visual and functional properties of DW controls
Benefits of Separating:
Accessibility
Targeted presentation using stylesheets
Improved processing by browser
Slide 25
XHTML Benefits
Accessibility
XHTML’s separation of visual elements from actual content make
page much more accessible to people with disabilities
XHTML more easily understood by people with visual impairments
using screen readers and voice browsers
Presentation can now be stored in separate stylesheet documents
(CSS and XSL) for XHTML page
Different stylesheets more easily generated for different browsers
United States, Section 508 of the Usability Act
Slide 26
Client-Side XML
XML Content
XSLT
Determines structural
layout
XHTML
Determines style of
elements as displayed
in browser
CSS
Slide 27
XSLT
Extensible Stylesheet Language Transformations
Provides a way of transforming XML documents into other
document formats
For XHTML (which is fundamentally XML), XSLT can be used to
transform an XML document into a styled XHTML web page for
display in a browser
XSLT goes beyond CSS by allowing rules that change or infuse
the content with layout and structure
Slide 28
Why Use Client-Side XSLT?
Benefits:
Saves bandwidth
Clients only need to download and cache XSLT code once for
DataWindow session
Server processing is reduced with more work being done on client
Slide 29
XML Web DataWindow Design
Server-Side
Client-Side
XML
DataStore
User request page
XSLT XHTML
XML Web DW
component
Step 2
DataWindow generated
in separate XML, XSLT
CSS, JS, with transform
script sent to client
CSS
Client-side
JavaScript
JS control
JS rows
JSP Page
Step 1
HTTP get
XHTML Page
Client-Side
Step 4
Client-side JavaScript
uses XSLT to transform
XML into XHTML and
displays this in the
in the browser
Step 3
HTTP response
Step 5
User interacts with
DataWindow, but
next request only
requires download
of XML and JS rows
Slide 30
XML Web DataWindow Generator
Server-Side
1.) Invoked in the DataWindow engine from server-side code
2.) Generates an XHTML rendering of the DW in a DOM tree
3.) Concurrently generates a CSS stylesheet using a DOM tree with
all styling information of the DW’s elements, including absolute
positions in cascade
4.) Also generates separate client-side JavaScript files for
instantiating the control object and array of row elements
Static client-side set of JavaScript files deployed as usual
5.) Reverse-transforms the XHTML DOM tree to XML and XSLT
DOM trees for web publishing
XML = DataWindow data content for the page
XSLT = DataWindow structural layout
6.) Ultimately generates small amount of script to perform explicit
transformation on client-side
Slide 31
PowerBuilder 11: New Language Features
Package
A language feature that allows programmers to organize their
program into sets of modules.
Help avoid name conflicts.
Support team programming efforts.
Packages can be nested.
Slide 32
New Language Features
Declare a package
Usage 1
Package mypackage
Usage 2
Package FirstLevelPackage.SecondLevelPackage
Slide 33
New Language Features
Import a package
Usage 1
import system
Usage 2
// import a package (actually a .NET namespace)
import system.text.regularexpressions as st
Regex r = create st.Regex(“abc”)
Match m = r.match("123abc456")
String str
If m.success then
str = “The position of abc is at ” + string(m.index)
end if
Slide 34
PowerScript.NET
Import and use a .NET class
// use a .NET namespace
imports System.Text.RegularExpressions
// create an instance of a .NET class
Regex r = create Regex("abc")
Match m = r.Match("123abc456")
String str
If m.success then
str = “The position of abc is at ” + string(m.index)
end if
Slide 35
PowerScript.NET
Extend a .NET class
// use a 3rd party namespace
imports ThirdPartyNameSpace
// Declare a class inheriting from a 3rd party class
type MyClass extends ThirdPartyClass
int ii_var
end
// overriding a function
forward prototypes
public function int doSomething(string s)
end
public function int doSomething(string s)
return doSomethingElse(s)
end
Slide 36
New Language Features
Parameterized constructors
A language feature that allows programmers to define
constructors with parameters.
Constructor(string name, int id)
With parameterized constructors, you can create an instance
in several different ways.
Employee e = create employee(“xxx”, 123)
Slide 37
New Language Features
Interfaces
An interface declaration introduces a new reference type
whose members are abstract methods.
Interfaces can help reduce the couplings between classes
and packages, and improve testibility.
A class can implement more than one interfaces.
Slide 38
New Language Features
Declare an interface
Public interface IEmployee
function string getName()
subroutine adjustSalary(real adjustment)
event companyClosed()
End
Interface IDeveloper extends IEmployee
subroutine assignProject(string projectName)
end
Slide 39
New Language Features
Use an interface
A class can implement one or more interfaces.
Interfaces can be used as parameters or return values.
Class Page implements IPrintable
public subroutine print()
public subroutine addItem(IItem item)
Public function IItem getItem(int x, int y)
End
Slide 40
New Language Features
Other features
User-defined enumerations
Class methods
Bit-wise operations
New data types
Hashtable
List
Regular expression
…
Slide 41
PB 11 Complier Framework
Why have a new compiler framework
To lay a solid foundation for writing the PB p-code compiler,
.NET compiler, and Java compiler.
To be able to write utilities, e.g. cross-referencing tool, based
on the compiler framework.
.N E T IL
g en erato r
Instrum ented
P S code
P S code
P re-p ro cesso r
P arser
A ST
P -co d e
g en erato r
Jav a b y te-cod e
g en erato r
O th er to o ls
Slide 42
Complier Framework
Architecture
.NET Importer
IImporter
Compiler
Framework
IEmitter
.NET Emitter
IPSVisitor
.NET Compiler
IPreprocessor
Preprocessor
Preprocessor
Slide 43
Complier Framework
What does the compiler framework do
Syntactic analysis
Parse the given source code and generate an Abstract Syntax Tree (AST).
Contextual analysis
Identification – Resolve the identifiers, load other classes if necessary.
Type checking – to ensure there is no type error.
Slide 44
Complier Framework
Make use of the compiler framework
The compiler framework provides an interface IPSVisitor for
traversing the AST tree.
With the visitor interface and the AST tree, many things can
be done:
Emit PB p-code
Emit .NET MSIL
Emit Java byte code
Create a cross-reference database
PBDoc like javadoc
Refactoring
Reverse engineering
…
Slide 45
Complier Framework
Pre-processor
A pre-processor can introduce some keywords to the
PowerScript language.
A pre-processor is responsible for translating the keywords
into “real” PowerScript code.
Examples:
Design by Contract
Aspect-Oriented Programming
…
Slide 46
Next-Generation PowerScript Langauge
Going forward…
Continue to be a productive language
A general-purpose language
More object-oriented
A high-level language but can do low-level things
Support both .NET and Java
Extensible
Lots of utilities
Slide 47
Agenda
PowerDesigner Overview
PowerDesigner 9.5.2 for PowerBuilder
PowerDesigner Roadmap
PowerDesigner 10 and PowerBuilder 10 Together
Slide 48
Design Tools Market Landscape
Three markets converging
Business Process
Modeling
(emerging standards)
Traditional
E/R Data
Modeling
(James Martin)
Designers/Analysts,
DBAs,
Database Developers
Business Analysts
LOBs
CIOs
Object-oriented
Modeling
(UML techniques)
Designers/Analysts,
Developers,
Programmers
Slide 49
PowerDesigner 9.5.2
Integrated Enterprise Modeling Tool
Development
Source Sybase
Business-centric
Control Flow diagram
Entity/
Relationship
modeling
(and DW
extensions)
UML
modeling
(all diagrams)
RDBMS structures
Object Relational mapping
Java, .Net, XML, PB... support
IDEs & App Server support
Business
centric
Repository
Analysis
&
Design
Templates, Generic Generators,
UML profiles, model-to-model generation…
Business
Analysis
IT
centric
Slide 50
Link and Synchronize All Models
PowerBuilder,
Java, J2EE
XML, WSDL
Object-Oriented
Model
(OOM)
ebXML,
Message
Broker,
Ohio
O/R Mapping
Business Process
Model
(BPM)
Conceptual Data
Model
(CDM)
C++,
C#, VB.Net,
Web Services, etc...
Physical Data
Model
(PDM)
Forward Engineering
ODBC
Reverse Engineering
Round-trip Engineering
Import/Export
Database SQL
Script
(DDL)
Slide 51
PowerDesigner for PowerBuilder Features Summary
PowerDesigner 9.5.2 introduces complete support for all
PowerBuilder objects reverse engineering and generation
Support libraries (.pbl) and source files (.sr*)
Support PowerBuilder 6, 7, 8 and 9
PowerBuilder tool palette for creating new objects
Model verification
Generate & reverse PowerBuilder extended attributes in PDM
Slide 52
PowerDesigner Value Proposition
Help users to understand how the application was developed.
Help users to visually see the relationship between objects.
Help users to improve existing code, refactor the code.
Regenerate PowerBuilder application.
Generate documentation (report) in HTML and RTF format.
Slide 53
Example of a Class Diagram
<>
w_pbtutor_basesheet
<
Step 3
HTTP response
Step 5
User interacts with
DataWindow, but
next request only
requires download
of XML and JS rows
Slide 30
XML Web DataWindow Generator
Server-Side
1.) Invoked in the DataWindow engine from server-side code
2.) Generates an XHTML rendering of the DW in a DOM tree
3.) Concurrently generates a CSS stylesheet using a DOM tree with
all styling information of the DW’s elements, including absolute
positions in cascade
4.) Also generates separate client-side JavaScript files for
instantiating the control object and array of row elements
Static client-side set of JavaScript files deployed as usual
5.) Reverse-transforms the XHTML DOM tree to XML and XSLT
DOM trees for web publishing
XML = DataWindow data content for the page
XSLT = DataWindow structural layout
6.) Ultimately generates small amount of script to perform explicit
transformation on client-side
Slide 31
PowerBuilder 11: New Language Features
Package
A language feature that allows programmers to organize their
program into sets of modules.
Help avoid name conflicts.
Support team programming efforts.
Packages can be nested.
Slide 32
New Language Features
Declare a package
Usage 1
Package mypackage
Usage 2
Package FirstLevelPackage.SecondLevelPackage
Slide 33
New Language Features
Import a package
Usage 1
import system
Usage 2
// import a package (actually a .NET namespace)
import system.text.regularexpressions as st
Regex r = create st.Regex(“abc”)
Match m = r.match("123abc456")
String str
If m.success then
str = “The position of abc is at ” + string(m.index)
end if
Slide 34
PowerScript.NET
Import and use a .NET class
// use a .NET namespace
imports System.Text.RegularExpressions
// create an instance of a .NET class
Regex r = create Regex("abc")
Match m = r.Match("123abc456")
String str
If m.success then
str = “The position of abc is at ” + string(m.index)
end if
Slide 35
PowerScript.NET
Extend a .NET class
// use a 3rd party namespace
imports ThirdPartyNameSpace
// Declare a class inheriting from a 3rd party class
type MyClass extends ThirdPartyClass
int ii_var
end
// overriding a function
forward prototypes
public function int doSomething(string s)
end
public function int doSomething(string s)
return doSomethingElse(s)
end
Slide 36
New Language Features
Parameterized constructors
A language feature that allows programmers to define
constructors with parameters.
Constructor(string name, int id)
With parameterized constructors, you can create an instance
in several different ways.
Employee e = create employee(“xxx”, 123)
Slide 37
New Language Features
Interfaces
An interface declaration introduces a new reference type
whose members are abstract methods.
Interfaces can help reduce the couplings between classes
and packages, and improve testibility.
A class can implement more than one interfaces.
Slide 38
New Language Features
Declare an interface
Public interface IEmployee
function string getName()
subroutine adjustSalary(real adjustment)
event companyClosed()
End
Interface IDeveloper extends IEmployee
subroutine assignProject(string projectName)
end
Slide 39
New Language Features
Use an interface
A class can implement one or more interfaces.
Interfaces can be used as parameters or return values.
Class Page implements IPrintable
public subroutine print()
public subroutine addItem(IItem item)
Public function IItem getItem(int x, int y)
End
Slide 40
New Language Features
Other features
User-defined enumerations
Class methods
Bit-wise operations
New data types
Hashtable
List
Regular expression
…
Slide 41
PB 11 Complier Framework
Why have a new compiler framework
To lay a solid foundation for writing the PB p-code compiler,
.NET compiler, and Java compiler.
To be able to write utilities, e.g. cross-referencing tool, based
on the compiler framework.
.N E T IL
g en erato r
Instrum ented
P S code
P S code
P re-p ro cesso r
P arser
A ST
P -co d e
g en erato r
Jav a b y te-cod e
g en erato r
O th er to o ls
Slide 42
Complier Framework
Architecture
.NET Importer
IImporter
Compiler
Framework
IEmitter
.NET Emitter
IPSVisitor
.NET Compiler
IPreprocessor
Preprocessor
Preprocessor
Slide 43
Complier Framework
What does the compiler framework do
Syntactic analysis
Parse the given source code and generate an Abstract Syntax Tree (AST).
Contextual analysis
Identification – Resolve the identifiers, load other classes if necessary.
Type checking – to ensure there is no type error.
Slide 44
Complier Framework
Make use of the compiler framework
The compiler framework provides an interface IPSVisitor for
traversing the AST tree.
With the visitor interface and the AST tree, many things can
be done:
Emit PB p-code
Emit .NET MSIL
Emit Java byte code
Create a cross-reference database
PBDoc like javadoc
Refactoring
Reverse engineering
…
Slide 45
Complier Framework
Pre-processor
A pre-processor can introduce some keywords to the
PowerScript language.
A pre-processor is responsible for translating the keywords
into “real” PowerScript code.
Examples:
Design by Contract
Aspect-Oriented Programming
…
Slide 46
Next-Generation PowerScript Langauge
Going forward…
Continue to be a productive language
A general-purpose language
More object-oriented
A high-level language but can do low-level things
Support both .NET and Java
Extensible
Lots of utilities
Slide 47
Agenda
PowerDesigner Overview
PowerDesigner 9.5.2 for PowerBuilder
PowerDesigner Roadmap
PowerDesigner 10 and PowerBuilder 10 Together
Slide 48
Design Tools Market Landscape
Three markets converging
Business Process
Modeling
(emerging standards)
Traditional
E/R Data
Modeling
(James Martin)
Designers/Analysts,
DBAs,
Database Developers
Business Analysts
LOBs
CIOs
Object-oriented
Modeling
(UML techniques)
Designers/Analysts,
Developers,
Programmers
Slide 49
PowerDesigner 9.5.2
Integrated Enterprise Modeling Tool
Development
Source Sybase
Business-centric
Control Flow diagram
Entity/
Relationship
modeling
(and DW
extensions)
UML
modeling
(all diagrams)
RDBMS structures
Object Relational mapping
Java, .Net, XML, PB... support
IDEs & App Server support
Business
centric
Repository
Analysis
&
Design
Templates, Generic Generators,
UML profiles, model-to-model generation…
Business
Analysis
IT
centric
Slide 50
Link and Synchronize All Models
PowerBuilder,
Java, J2EE
XML, WSDL
Object-Oriented
Model
(OOM)
ebXML,
Message
Broker,
Ohio
O/R Mapping
Business Process
Model
(BPM)
Conceptual Data
Model
(CDM)
C++,
C#, VB.Net,
Web Services, etc...
Physical Data
Model
(PDM)
Forward Engineering
ODBC
Reverse Engineering
Round-trip Engineering
Import/Export
Database SQL
Script
(DDL)
Slide 51
PowerDesigner for PowerBuilder Features Summary
PowerDesigner 9.5.2 introduces complete support for all
PowerBuilder objects reverse engineering and generation
Support libraries (.pbl) and source files (.sr*)
Support PowerBuilder 6, 7, 8 and 9
PowerBuilder tool palette for creating new objects
Model verification
Generate & reverse PowerBuilder extended attributes in PDM
Slide 52
PowerDesigner Value Proposition
Help users to understand how the application was developed.
Help users to visually see the relationship between objects.
Help users to improve existing code, refactor the code.
Regenerate PowerBuilder application.
Generate documentation (report) in HTML and RTF format.
Slide 53
Example of a Class Diagram
<
w_pbtutor_basesheet
<