Top Banner
The Power of PowerDesigner Frank Irnich Sybase GmbH [email protected]
49
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

The Power of PowerDesigner

Frank IrnichSybase GmbH

[email protected]

Page 2: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Agenda

PowerDesigner Overview PowerDesigner for PowerBuilder Features Summary Applying PowerDesigner extensibility features to extend its

traditional usage Version 10: PowerDesigner and PowerBuilder together PowerDesigner 10

Page 3: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner Overview

Why Modeling? PowerDesigner History PowerDesigner Features Summary

Page 4: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Why Modeling? – An analogy

The Architect validatesthe concept with the clientFrom these drawings, a technical diagram will be derived

The Contractors will take this blueprint and optimise it based on technical considerations – linked to the Architectural View

Would you build a house without a blueprint ?

Page 5: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

The Application Development Process

Starts with Understanding Business Needs

IT Manager then: Matches business

needs with Technological Requirements

Manages the IT development team – a multi-discipline team

Most IT shops separate DB development from Application development

Specific tools needed for each population/role

A Business Process Model describing the Software Development Lifecycle

Page 6: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

TraditionalE/R DataModeling

(James Martin)

Object-orientedModeling

(UML techniques)

Business ProcessModeling

(emerging standards)

Designers/Analysts,DBAs, Database Developers

Design Tools Market Landscape

Designers/Analysts,Developers, Programmers

Business AnalystsLOBsCIOs

Three markets converging

Page 7: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Target Audience

Business-centric IT-centric

RDBMS- Designers- Developers-…

CxOsLOBsBusiness Analysts

Application

- Designers- Developers-…

IT Directors and ManagersSenior Analysts & Designers

Page 8: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner’s Rich History

1989

v1

1990

v2French Only

1991

v3MultipleModels

1992

v4Enterprise

Edition

1994

v5DFD Process

Modeling

1996

v6WarehouseModeling

Old Generation – Completed commitment to Traditional E/R

New generation - Reinvented and Refined - UML, Business Modeling

1999

v7First UML

2000

v7.5EnterpriseRepository

2001

v8.0Enhanced

UML

v9.0J2EE in UML

New Warehouse& Business Process

Modeling

Q4/2002

v9.5All UML diagrams

.NET in UMLIntegration

Q1/2002

Page 9: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Source Sybase

Rep

osito

ryBusiness

centric

ITcentric

PowerDesigner 9.5

Development

Analysis&

Design

BusinessAnalysis

Business-centric Control Flow diagram

Entity/Relationship modeling (and DW extensions)

UML modeling (all diagrams)

RDBMS structuresObject Relational mappingJava, .Net, XML, PB... supportIDEs & App Server support

Tem

plates, G

eneric G

enerato

rs,U

ML

pro

files, mo

del-to

-mo

del g

eneratio

n…

Integrated Enterprise Modeling Tool

Page 10: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Link and Synchronize All Models

PowerBuilder,Java, J2EEXML, WSDL

Forward Engineering

Reverse Engineering

Round-trip Engineering

Import/Export

ODBC

C++, C#, VB.Net,

Web Services, etc...

Business ProcessModel(BPM)

ebXML, MessageBroker,

Ohio

Database SQL Script(DDL)

O/R

Map

pin

g

Conceptual DataModel(CDM)

Physical DataModel(PDM)

Object-Oriented Model(OOM)

FreeModel(FEM)

Page 11: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner 9.5.2 Features Summary

PowerDesigner is a good enterprise modeling tool Leading Data Modeling tool Complete UML support (9 UML diagrams) Business Process Modeling features Good Repository

Integration with Integration Orchestrator, Message Broker, ebXML

Design and generate code for PowerBuilder, Web Services, J2EE (EJB, O/R mapping), .NET, etc.

Support all major databases (more than 30) Support major application servers (EAServer, WebLogic,

WebSphere) Integration with IDEs (Eclipse, JBuilder 8, Ant) Supports Model Driven Architecture (MDA) Extensibility (Profile, Code generator, VBScript, OLE

automation)

Page 12: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner 9.5.2 for PowerBuilder

PowerDesigner for PowerBuilder Features Summary PowerBuilder Applications Design and Development Reverse Engineering PowerBuilder Applications Designing PowerBuilder Applications Generating PowerBuilder Applications Extending PowerDesigner Features Future Direction

Page 13: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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

Page 14: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Problem Statement

Most of PowerBuilder developers don’t do design. Many PowerBuilder applications don’t have a good

architecture and there is no documentation. It is difficult to maintain and evolve when the developers are

gone.

Page 15: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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.

Page 16: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Reverse Engineering PowerBuilder Applications

Application, User Object, Structure, Function, Window, Proxy are represented by class structure

For the other objects (DataWindow, Query, Pipeline, …), the source code is preserved and can be regenerated

Both libraries (.pbl) and source files (.sr*) can be reverse engineered

Page 17: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Reverse Engineering PowerBuilder Applications

You could select reverse engineering options. You could use PowerBuilder System Classes and PFC library

models to represent parent classes that give you the complete definition of the System Classes.

Page 18: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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.

Page 19: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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 ()

Page 20: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Designing PowerBuilder Applications

You can create, modify or delete objects or links. You can use the PowerBuilder tool palette to create objects. You could define interfaces and implement interfaces but the

interfaces will not be generated. You can preview the PowerBuilder code. You can modify the PowerBuilder code in the code preview

window. You can write specification in RTF format. You could use

Word to edit the description or annotation. You can generate reports in HTML or RTF formats for

documentation.

Page 21: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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

Page 22: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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_*).

Page 23: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Overriding Properties

In the Attributes tab of the class property sheet, the Inherited button allows you to select the properties to override.

Page 24: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Previewing PowerBuilder Code

Open the properties of an object. Select the Preview tab. For Window, User Object, Application, Structure, Function and Proxy, the

code is generated from the class definition. You could change the code in the Preview window (add attributes, modify operations, …), the model will be updated to reflect the changes.

For DataWindow, Menu, Query, …, you could change the code in the Script tab

Page 25: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Verifying the Model

You could use the Check Model function to verify if the model is well defined. There are PowerBuilder specific checks.

Page 26: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Generating PowerBuilder Applications

You can generate PowerBuilder objects into libraries or source files. You can select the objects you want to generate.

Page 27: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Extending PowerDesigner Features

You could use various extensibility features of PowerDesigner to extend PowerDesigner’s PowerBuilder generation and reverse engineering capabilities:

Profile GTL (template based code generator) VBScript, OLE automation (PowerBuilder, .NET, Java, C++, …) Plugins

Page 28: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

The profile concept

PowerDesigner uses the profile concept to extend/cutomize the definition of its metamodel

Profiles are used for Creating categories of objects (stereotypes and criteria) Customizing the graphics of objects Adding additional metadata to objects (extended attributes) Defining new or modified generation capabilities (templates) Defining custom checks, menue-items, events, etc..

Profiles appear in all DBMS, object languages and extended model definitions

Page 29: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

The profile concept

Profiles appear in all DBMS, object languages and extended model definitions

PowerDesginer Public MetaModel

Object Language / DBMS

Extended Model Definition(s)

Target Model (OOM, PDM, etc...)

} Profile Concept

BPM/FRM

Page 30: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

GTL – Generation Template Language

Easy to use template language Mixes generated text with object properties enclosed in %

characters Provides macros for

Specifying conditional logic Iterating on object collections Manipulating text

VB Scripts may be embedded in GTL templates for complex logic

Supports inheritance and polymorphism

Page 31: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

GTL – Generation Template Language

Sample:

Class %code% {%attributes%

}

.foreach_item(Attributes).if (%visibility% == +)

public %DataType% %Code%;.elseif (%visibility% == -)

.//....endif

.next(\n)

MacroCollection

Variable

Page 32: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

VBScript

Manipulate PowerDesigner objects in memory and perform any action on them

Browse object collections from the model down to any object using PowerDesigner`s metamodel

You can Load and save models Gain access to object definitions Perform checks Change object property values Create or delete objects with the wanted characteristics

Page 33: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

OLE automation

VBScript allows you to write a VBScript and execute it inside PowerDesigner to manipulate PowerDesigner objects

OLE automation allows you to write a program to manipulate PowerDesigner objects from outside

You can use any programming language that supports COM to access PowerDesigner objects, create user-interfaces, integrate PowerDesigner functions in your program, etc...

Page 34: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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)

Page 35: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner Roadmap

PowerDesigner Athena (V10, December 2003) Integration with PowerBuilder Integration with Eclipse (Q1 2004) Major BPM improvements XML model Fully support MDA

PowerDesigner Minerva (end of 2004) Enterprise features (requirements, impact analysis, …) XML and Web Services in database UML 2.0 Design patterns

Page 36: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Business Process Modeling Improvements

Add targets (Analysis, BPEL4WS , ebXML, Integration Orchestrator, MessageBroker, …)

Support simulation (use Simul8 engine) Support Service-Oriented modeling Model, generate & reverse BPEL4WS Better integration with Integration Orchestrator (round-trip) Better support ebXML BPSS

Page 37: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

XML Model

Design, reverse engineer and generate XML Schema and DTD Define mapping between XML Schema and database schema Define mapping between XML Schema and objects Support databases XML features

Page 38: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Other Athena Features

Support C# and VB .NET reverse engineering Improve Web Services support (support Apache Axis, …)

Page 39: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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

Page 40: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

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

Page 41: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner and PowerBuilder TogetherPowerDesigner: A Plugin Component in PowerBuilder 10

Page 42: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner and PowerBuilder Together

Select “Reverse Engineer” From PowerBuilder Target Context Menu

Select PBLs and Objects to Reverse Engineer

Reverse Engineer From PowerBuilder

Page 43: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner and PowerBuilder Together

Create a New PowerBuilder OOM (Object Oriented Model) OOM name maps to PowerBuilder target name Package name maps to PowerBuilder pbl name

Design and Generate PowerBuilder Code Using PowerDesigner

Page 44: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner and PowerBuilder Together

Add Classes and Do Design Although PowerBuilder doesn’t support interface yet, user can define interface

in PowerDesigner, then implement interface in a PowerBuilder user object.

Design and Generate PowerBuilder Code Using PowerDesigner

Page 45: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner and PowerBuilder Together

Check Model Check model is customized for PowerBuilder, for example, it will check

whether a object name is valid PowerBuilder name, a pbl can only have one application object

Check model results are printed in output window

Design and Generate PowerBuilder Code Using PowerDesigner

Page 46: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner and PowerBuilder Together

Generate PowerBuilder Code Select packages and classes from OOM to generate PowerBuilder code If it is the first time to generate PowerBuilder code, a new PowerBuilder target

will be created

Design and Generate PowerBuilder Code Using PowerDesigner

Page 47: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

PowerDesigner and PowerBuilder Together

From PowerBuilder to PowerDesigner Select “Open Class Diagram” from pbl context menu to open class diagram for

this pbl Select “Find in Class Diagram” from PB object context menu to find the

corresponding class in class diagram

From PowerDesigner to PowerBuilder Double click a class in class diagram to launch PowerBuilder painter to open

corresponding PB object Select “Find in PowerBuilder Workspace” from class context menu to find the

corresponding PowerBuilder object in PowerBuilder workspace

Navigation Between PowerDesigner and PowerBuilder

Page 48: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

Question & Answer . . .

Page 49: The Power of PowerDesigner Frank Irnich Sybase GmbH Frank.Irnich@sybase.com.

The Power of PowerDesigner

Frank IrnichSybase GmbH

[email protected]