Upload
alexandra-schultz
View
222
Download
1
Tags:
Embed Size (px)
Citation preview
PowerDesigner for PowerBuilder
高正宗 (Wubark Kao)System Consultant ManagerSybase [email protected]
PowerDesigner 9.5 for PowerBuilder
PowerDesigner for PowerBuilder Feature Summary
Reverse Engineering PowerBuilder Applications
Designing PowerBuilder Applications
Generating PowerBuilder Applications
Future Direction
PowerDesigner for PowerBuilder Features Summary
PowerDesigner 9.5 正反向生成完全支援所有PowerBuilder 物件
支援 libraries (.pbl) and source files (.sr*)
支援 PowerBuilder 6, 7, 8 and 9 等版本 提供 PowerBuilder 工具列 模組驗證 PDM 正反向生成 PowerBuilder extended attributes
Problem Statement
PowerBuilder 開發者並未進行系統設計階段 .
PowerBuilder 開發之系統沒有系統文件及良好架構 .
工程師離職後系統難以維護 .
PowerDesigner Value Proposition
幫助使用者了解應用程式是如何開發的 . 幫助使用者以視覺化界面了解物件間之關係 .
幫助使用者修改及分析現有程式碼 . 正向再生成 PowerBuilder 應用程式 .
生成 HTML 及 RTF 格式之文件及報表 .
Reverse Engineering PowerBuilder Applications
Application, User Object, Structure, Function, Window, Proxy 轉成 class structure
其他物件如 DataWindow, Query, Pipeline, …), 則將原始程式碼轉至 Class 之 Script 中 .
反向生成支援 libraries (.pbl) 及 source files (.sr*).
Reverse Engineering PowerBuilder Applications
提供反向生成選項 .
提供 PowerBuilder System Classes and PFC library的模組來顯現父物件 , 可了解系統全貌 .
Displaying PowerBuilder Objects in Class Diagram
A class diagram shows packages, inheritances, associations, dependencies, attributes, operations.
Each library is represented by 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.
Other objects are represented as classes by the source code is kept and are not regenerated from the class definition.
Controls are represented by inner classes.
Displaying PowerBuilder Objects in Class Diagram
library
Windowuser objectApplicationStructureFunctionproxy
Other
Package
<<dataWindow>>
d_product
Class
<<window>>
u_dwstandardClass
<<window>>
w_welcome
++++++++++
<<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>>
widthheighttitlebartitlecontrolmenuwindowtypebackcoloriconcontexthelpcenter
: integer: integer: boolean: string: boolean: windowtype: long: string: boolean: boolean
= 2299 = 1000 = true = "Welcome" = true = response! = 67108864 = "AppIcon!" = true = true
cb_cancelcb_oksle_passwordsle_useridst_passwordst_useridst_welcomep_sports
InnerClass
Dependencies/Generation
Example of a Class Diagram
*iw_opensheets
<<menu>>
m_pbtutor_sheet
<<userObject>>
n_pbtutor_sheetmanager
++++
is_sheetsis_displayiw_opensheetsim_items
: string[]: string[]: w_pbtutor_basesheet[]: menu[]
+++++++++++
of_unregistersheet (..)of_sheetcount ()of_opensheet (..)of_sheetisclosing (..)of_classcount (..)of_openallsheets ()of_adjustmenu (..)of_resetmenu ()of_registersheets (..)of_addtomenu (..)of_registersheet (..)
: integer: long: integer: long: long: integer: integer: integer: integer: integer: integer
<<window>>
w_cust_pct
++
<<property>><<property>>
tagwidth
: string: integer
= "Customer Location" = 2392
++
uf_percentage (..)activate ()
: decimal
cbx_zerosle_resultcb_percentddlb_statest_2st_1
<<window>>
w_pbtutor_basesheet
++++++++++++
<<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>><<property>>
XYWidthHeightTitleBarTitleMenuNameBackColorControlMenuMinBoxMaxBoxResizable
: int: int: int: int: boolean: string: string: long: boolean: boolean: boolean: boolean
= 672 = 264 = 1582 = 1064 = true = "Sheet" = "m_pbtutor_sheet" = 79416533 = true = true = true = true
++++++++
ue_postopen ()ue_undo ()ue_cut ()ue_copy ()ue_paste ()ue_clear ()open ()close ()
Designing PowerBuilder Applications
create, modify, delete objects or links.
PowerBuilder 工具列建立物件 .
定義 interfaces 及 implement interfaces, 生成時會忽略Interface.
預覽 PowerBuilder code.
直接由預覽畫面編輯 PowerBuilder code.
以 RTF format 編寫程式規格 , 且可直接以 Word 來編輯description 或 annotation.
生成 HTML 或 RTF formats 之文件報表 .
Defining Inheritances
A parent class could be a shortcut representing a class defined in another model for example for system classes.
<<userObject>>
uo_cust_visual_1
++++++
<<property>><<property>><<property>><<property>><<property>><<property>>
widthheightbackcolortexttabtextcolorpicturemaskcolor
: integer: integer: long: string: long: long
= 1787 = 384 = 67108864 = "none" = 33554432 = 536870912
pb_1
UserObject(<PowerBuilder 9>)
++++++++++++++++++++++
EnabledHScrollBarVScrollBarBorderObjectTypeControlBackColorPointerClassNameLibraryNameTextStyleUnitsPerLineLinesPerPageUnitsPerColumnColumnsPerPageBorderStyleTabTextColorTabBackColorPictureNamePictureMaskColorPowerTipText
: boolean: boolean: boolean: boolean: UserObjects: WindowObject[]: long: string: string: string: string: long: integer: integer: integer: integer: BorderStyle: long: long: string: long: string
= true
= CustomVisual!
= 1073741824
= StyleBox!
= 67108864
= 25166016
+++++++++++++++
Constructor_event ()Destructor_event ()DragDrop_event ()DragEnter_event ()DragLeave_event ()DragWithin_event ()Other_event ()RButtonDown_event ()AddItem (..)DeleteItem (..)EventParmDouble (..)EventParmString (..)InsertItem (..)PageCreated ()CreatePage ()
: int: int: int: int: int: int: int: int: integer: integer: integer: integer: integer: boolean: integer
<<window>>
w_customers
++++
<<property>><<property>><<property>><<property>>
tagwidthheightx
: string: integer: integer: int
= "Maintain Customers" = 2940 = 2940 = 670
dw_detaildw_master
<<window>>
w_master_detail_ancestor
+++
<<property>><<property>><<property>>
widthheightmenuname
: integer: integer: string
= 2267 = 1732 = "m_my_sheet"
+++++
ue_retrieve ()ue_insert ()ue_update ()ue_delete ()open ()dw_detaildw_master
<<window>>
w_products
++
<<property>><<property>>
tagwidth
: string: integer
= "Maintain Products" = 2830
dw_detaildw_master
Defining Events
Events are represented as operations.
An Event could be an operation with the «event» stereotype, with a language event or with an extended attribute EventID (pbm_*).
Overriding Properties
In the Attributes tab of the class property sheet, the Inherited button allows you to select the properties to override.
Previewing PowerBuilder Code
Window, User Object, Application, Structure, Function and Proxy, Source code 是由 Class definition 中產生 , 可有Preview 中瀏覽或修改 .
DataWindow, Menu, Query 等 , 由 Script tab 中瀏覽或修改 .
Verifying the Model
You could use the Check Model function to verify if the model is well defined.
There are PowerBuilder specific checks.
Generating PowerBuilder Applications
You can generate PowerBuilder objects into libraries or source files.
You can select the objects you want to generate.
Future Direction
PowerDesigner 10.0 will support tight integration with PowerBuilder 10
PowerBuilder 10 will be able to embed PowerDesigner views inside PowerBuilder
PowerBuilder will be able to control PowerDesigner PowerDesigner will generate complete PowerBuilder
application code (post 10.0)
PowerDesigner and PowerBuilder Together
PowerDesigner: A Plugin Component in PowerBuilder 10 Reverse Engineer From PowerBuilder Design and Generate PowerBuilder Code Using
PowerDesigner Navigation Between PowerDesigner and PowerBuilder
Summary
PowerDesigner and PowerBuilder Together
PowerBuilder Plugin Manager Manages Plugin Components A plugin component can enable or disable by Plugin Manager
PowerDesigner Feature Will Be Available Only When It Is Turned On
PowerDesigner: A Plugin Component in PowerBuilder 10
PowerDesigner and PowerBuilder TogetherPowerDesigner: A Plugin Component in PowerBuilder 10
PowerDesigner for PowerBuilder
高正宗 (Wubark Kao)System Consultant ManagerSybase [email protected]