powerbuilder 12 - · pdf file11 –sybase ase15 august 27, 2010 powerbuilder goals and...

Post on 25-Mar-2018

237 Views

Category:

Documents

9 Downloads

Preview:

Click to see full reader

TRANSCRIPT

PowerBuilder 12

向質彬 Ben Sybase Taiwan 2010 / 08

PowerBuilder is .NET

3 – Sybase ASE15 – August 27, 2010

Deborah Kurata‘s Blog的部份例子

private void myGrid_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { if (e.RowIndex == 2) { int rowHeaderWidth = myGrid.RowHeadersVisible myGrid.RowHeadersWidth : 0; Rectangle rowBounds = new Rectangle( myGrid.RowHeadersWidth, e.RowBounds.Top, myGrid.Columns.GetColumnsWidth( DataGridViewElementStates.Visible) - myGrid.HorizontalScrollingOffset + 1, e.RowBounds.Height);

ControlPaint.DrawBorder(e.Graphics, rowBounds, Color.Red, ButtonBorderStyle.Solid); myGrid.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.BlanchedAlmond; } }

In C#:

4 – Sybase ASE15 – August 27, 2010

讀者對Deborah Kurata‘s Blog文章的感謝

No Good ….

5 – Sybase ASE15 – August 27, 2010

PowerBuilder Productivity: 你只需要一行

This.SelectRow(row, true)

…argument row is determined by PowerBuilder. No extra code!

In PowerScript:

6 – Sybase ASE15 – August 27, 2010

PowerBuilder Productivity: Example

7 – Sybase ASE15 – August 27, 2010

PowerBuilder Productivity: Example

8 – Sybase ASE15 – August 27, 2010

PowerBuilder Productivity: 奇偶行不同色

If(Mod(GetRow(),2) = 1, 16777215, 25231232)

In DataWindow Expression:

9 – Sybase ASE15 – August 27, 2010

PowerBuilder Productivity: Example

In WPF DataWindow Expression:

10 – Sybase ASE15 – August 27, 2010

PowerBuilder Productivity: Example

In WPF DataWindow Expression:

11 – Sybase ASE15 – August 27, 2010

PowerBuilder Goals and Strategy

• 目標

–開發資料庫應用程式最容易的開發工具

–讓 PowerBuilder 成為開發.NET應用最容易的開發工具

• 策略 –結合微軟平台和底層

–PowerBuilder 開發人員可使用PB技術來因應不同的需求,例如C/S、Web、N-Tier、Mobility…

–提供讓既有 Win 32 的程式,昇級或是搬移到.NET環境 –Sybase is the only vendor providing such a migration path

12 – Sybase ASE15 – August 27, 2010

簡報大綱

PowerBuilder Roadmap

PowerBuilder WPF 及WCF功能

介紹

PowerScript enhancements

PowerBuilder 12新功能總結

13 – Sybase ASE15 – August 27, 2010

簡報大綱

PowerBuilder Roadmap

PowerScript New Feature

PowerBuilder WPF 及WCF功能

介紹

PowerBuilder 12新功能總結

14 – Sybase ASE15 – August 27, 2010

.NET Platform Support

Technology Differentiators

1H 10 2011 2012

Open Development

Easiest Application Development for .NET

• .NET language support – CTS

• WPF IDE

• WCF support

• RDBMS Support Updates, for Sybase, IBM, MS, Oracle, etc

• Web Services

•WPF DataWindow

• PB skills Managed code apps

• VS IDE inside PowerBuilder

• Develop Win32, Deploy WPF

WPF, Winform, Webform, Smart Client

• DataWindow and Entity Framework

• HTML 5

• Silverlight

•.NET Framework update

• .Enhanced WCF

•.NET 4

• VS 2010

• .PowerBuilder in the Cloud

• REST based web services

• Usability enhancements

•Refactoring support

•CVUO as assemblies

•Sharepoint support - DataWindow

• Win32 DataWindow Enhancements

• Mobile targets

PowerBuilder Roadmap

WPF Support

WCF Client Support

Managed Code Apps

Visual Studio IDE inside

15 – Sybase ASE15 – August 27, 2010

What’s Next? Market trends to follow...

•MSOFT’s Silverlight Application Modernization

Private and public cloud

Virtualization

16 – Sybase ASE15 – August 27, 2010

PowerBuilder 12 Features

17 – Sybase ASE15 – August 27, 2010

PowerBuilder .NET

18 – Sybase ASE15 – August 27, 2010

Based on the Visual Studio Isolated Shell

19 – Sybase ASE15 – August 27, 2010

Create WPF Windows Applications

20 – Sybase ASE15 – August 27, 2010

Deploy PowerBuilder NVOs as .NET Assemblies

21 – Sybase ASE15 – August 27, 2010

Powerscript Language Enhancements

22 – Sybase ASE15 – August 27, 2010

WCF Support for Consuming Web Services

23 – Sybase ASE15 – August 27, 2010

PowerBuilder Classic

24 – Sybase ASE15 – August 27, 2010

Win32 Applications

25 – Sybase ASE15 – August 27, 2010

.NET Web Form Applications

26 – Sybase ASE15 – August 27, 2010

.NET Windows Forms Applications

27 – Sybase ASE15 – August 27, 2010

PowerBuilder NVOs as ASP .NET Web Services

28 – Sybase ASE15 – August 27, 2010

簡報大綱

PowerBuilder Roadmap

PowerBuilder WPF 及WCF功能

介紹

PowerScript enhancements

PowerBuilder 12新功能總結

29 – Sybase ASE15 – August 27, 2010

Windows Communication Service(WCF)

• WCF是微軟下一世代開發分散式應用程式的技術

• WCF可以利用Web Service與其它支援SOAP的不同平台進行溝通,例如:Java 2 / J2EE等。

• WCF提供低階非同步來處理早期非型別的訊息。而在最上層是更高階的服務,包含型別訊息,安全性訊息交換,穩定性訊息交換,交易訊息及佇列訊息

30 – Sybase ASE15 – August 27, 2010 27-Aug-10 30

• WCF Client is an engine to be used (in PB12 WPF target) to consume several kinds of services: – ASMX Web Services – ASMX + WSE 3.0 Services – WCF Services

ASMX Web Services

ASMX Web Services + WSE

WCF Services (basicHttp, wsHttp, netTcp, REST)

WCF Engine 2

Web Service Engine (EasySoap, .NET Engine)

WCF Client Support

31 – Sybase ASE15 – August 27, 2010

Windows Presentation Foundation

• WPF全名為Windows Presentation Foundation,是微軟力挺的下一代圖型操作介面技術

32 – Sybase ASE15 – August 27, 2010

WPF Feature and Advantage

1. 支援硬體加速

2. 解析度獨立

3. 介面描述語言 (XAML)

4. 以物件為基礎的繪圖

5. 解除控制元件外觀限定

6. 統合2D/3D/影片

7. 時間軸為基礎影格動畫

8. 資料繫結

33 – Sybase ASE15 – August 27, 2010

XAML and WPF is good, but …

• 了解 XAML 以及使用XAML不容易 – 在.NET Framework 3.0中扮演非常重要的角色 – 經常被使用於WPF 應用程式、Silverlight以及

WF(Windows Workflow Foundation)

• 使用WPF開發資料導向程式不容易 – 需透過XAML定義各種使用者介面的元件,諸如按鈕、表單或排版等等

– 需透過XAML繫結資料,如文字檔、多媒體影音 – WPF提供義事件驅動,如滑鼠點擊、滑鼠拖曳等等,但因為採用以XML為基礎的排版方式,設計變得更加開放但難度高

34 – Sybase ASE15 – August 27, 2010

PowerBuilder .NET for WPF Development…and more…

Benefits for…

• WPF Application Targets

• .NET Assembly Targets

• .NET Web Service Targets

35 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• An effective illustration that PowerBuilder, and the PowerBuilder Developer, are full .NET citizens...

...They are utilizing the same tools and the same “off the street” ...

– XAML

– Control Templates

– Skins

– 3rd party controls

...as non-PowerBuilder .NET developers

36 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• XAML – XAML 是標籤語言XML的一種,用來建立複雜的WPF 使用者介面

37 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Control Templates

– Are described by a portion of XAML

– Act as “resource dictionaries”

– Specify to what kind of control they may be applied

– Alter the default appearance of the designated WPF control

38 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Control Templates – May certainly be used with controls in PowerBuilder

.NET in that they are derived from base WPF classes <pbwpf:CommandButton.Template> <ControlTemplate TargetType="{x:Type

pbwpf:CommandButton}"> <Grid Margin="5"> <Ellipse Stroke="DarkBlue" StrokeThickness="2"> ... </Ellipse> ... </Grid> </ControlTemplate> </pbwpf:CommandButton.Template>

39 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Control Templates (cont’d)

40 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Skins

– Are also declaratively developed in XAML – Can be statically or dynamically invoked – Have a wider scope than control templates – Alter appearance (as well as behavior!) of not just

controls or groups of controls, but for an entire application if you wish

41 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Skins (cont’d)

– May be used with WPF PowerBuilder applications after you... Develop them yourself Find those that are freely available Purchase those that are professionally developed

• “Off the street” skins will need to be slightly modified to utilize PowerBuilder WPF subclasses

42 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Skins (cont’d)

43 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Skins (cont’d)

44 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• Skins (cont’d)

45 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• 3rd Party WPF Controls

– May be used with WPF PowerBuilder applications after you... Use base WPF controls You or your teammates develop them in VS Find those that are freely available Purchase those that are professionally developed

46 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• 3rd Party WPF Controls

47 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• 3rd Party WPF Controls

48 – Sybase ASE15 – August 27, 2010

PowerBuilder: A Full .NET Citizen

• 3rd Party WPF Controls

49 – Sybase ASE15 – August 27, 2010

簡報大綱

PowerBuilder Roadmap

PowerBuilder WPF 及WCF功能

介紹

PowerScript enhancements

PowerBuilder 12新功能總結

50 – Sybase ASE15 – August 27, 2010

Powerscript language enhancements

PrimitiveType Mapping

System.Object

Arrays

Parameterized Constructors

User-defined Enumerations

Properties & Indexers

Interfaces

Generics

Delegates

Namespace

Bitwise Operators

51 – Sybase ASE15 – August 27, 2010

Primitive Type Mapping

52 – Sybase ASE15 – August 27, 2010

System.Object

.NET root type PowerObject inherits from System.Object Any PowerBuilder type can assign to each other with

system.object System.Object o Int i = 1 o = i

.NET functions of System.Object can be invoked in PowerBuilder

PowerObject po po = create powerobject po.tostring()

53 – Sybase ASE15 – August 27, 2010

Parameterized Constructors

Define parameterized constructor event for NVO E.g. global type nvo from nonvisualobject

event type long constructor(string s1, string s2)

end type

Create object with parameterized constructor event nvo nvo1 nvo1 = create(“s1”, “s2”)

54 – Sybase ASE15 – August 27, 2010

Parameterized Constructors (Continued…)

Constructor events rules: Invoking ancestor’s constructor event must be the first statement of

descendant’s constructor event Super::EVENT constructor(“s1”, “s2)

Default constructor is defined, optional to invoke any ancestor’s constructor event

Default constructor is not but parameterized constructor events are, mandatory to invoke ancestor’s constructor event

55 – Sybase ASE15 – August 27, 2010

User-defined Enumerations

Original PowerBuilder system-defined enumerations Encoding{EncodingANSI,EncodingUTF16E,EncodingUTF8,EncodingUTF16BE}

Global user-defined enumerations E.g. global type myenum enumerated

Item1, Item2 End type

Local user-defined enumerations in scriptable objects [NamespaceName.][enumerationName.]enumeratione

ntryName! E.g. myenum.item1!, encoding.encodingANSI!

56 – Sybase ASE15 – August 27, 2010

Interfaces

Define interface E.g. global type myinterface from myinterfacebase

function string f(int i) int p[get,set] event type int e() string this[int i, int j][get,set] end type

Implement interface: Custom Class, Standard Class, Custom Visual, Standard Visual, Window, Menu

E.g. global type nvo from nvovisualobject, myinterface event type int myinterface.e() public int myinterface.p[get, set] public string myinterface.this[int i, int j][get,set] end type forward prototypes public function integer interface1.f1 (int i) public function int interface1.p_get () public subroutine interface1.p_set (int value) public function string interface1.this_get (int i, int j) public subroutine interface1.this_set (string value, int i, int j) end prototypes

57 – Sybase ASE15 – August 27, 2010

Namespace

These objects can specify namespaces: Custom Class, Standard Class, Custom Visual, Standard Visual, Window, Menu, Structure, Function, Interface, and Enum

namspace namespace a.b using system.text end namespace

Two ways to identify a unique name Full qualified name, System.Collections.Generic.Dictionary<long, int> Use using directive

Namespace searching sequence Current namespace Identifiers without namespace Namespace specified in using directive

The searching sequence for a variable Argument or local variable Shared variable Global variable (follow searching sequence of namespace) Instance variable

58 – Sybase ASE15 – August 27, 2010

簡報大綱

PowerBuilder Roadmap

PowerScript enhancements

PowerBuilder WPF 及WCF功能

介紹

PowerBuilder 12新功能總結

59 – Sybase ASE15 – August 27, 2010

Summary... PowerBuilder: A Full .NET Citizen

• PowerBuilder is .NET

• PowerBuilder 提供 WPF Windows,是通往微軟下一代主流技術的捷徑,並且整合在VS Studio Shell下

• PowerScripts 增加了更多的物件導向語法,整合.NET 語言開發模型

• 同一個開發工具,可開發多個不同應用 – .NET – J2EE – Mobile – Pure Win32 Client/Server

60 – Sybase Confidential – August 27, 2010

謝謝您的參與! 更多資訊請參考: http://www.sybase.com/products/modelingdevelopment/powerbuilder

61 – Sybase Confidential – August 27, 2010

Tea Break

62 – Sybase Confidential – August 27, 2010

top related