PowerDesigner 9.5 - Sybase
PowerDesigner 9.5 - Sybase
PowerDesigner 9.5 - Sybase
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
QUARTERLY NEWSLETTER<br />
<strong>PowerDesigner</strong> ®<br />
Blueprint<br />
SEPTEMBER<br />
Newsletter<br />
2002 / ISSUE 7<br />
EDITORIAL<br />
Dear Blueprint reader,<br />
<strong>PowerDesigner</strong> <strong>9.5</strong> officially launched on<br />
September 19, 2002 at the Gartner Application<br />
Development Summit at the Grand Cypress<br />
Hotel in Orlando, Florida and created quite a<br />
buzz with analysts and IT professionals. We’re<br />
very excited about the new functionality <strong>9.5</strong><br />
offers — supporting all nine UML diagrams,<br />
enhanced data modeling capabilities and much<br />
more! I encourage you to return the enclosed<br />
business reply card or download the free evaluation<br />
copy and see for yourself!<br />
In our feature article, Creating Web Services with<br />
<strong>PowerDesigner</strong> <strong>9.5</strong>, Xiao Wang, <strong>PowerDesigner</strong>’s<br />
Chief Architect, simplifies the complexities of<br />
Web Services using <strong>PowerDesigner</strong> <strong>9.5</strong>. If you<br />
know how to create a class and a method, you<br />
know how to create Web Services! You can use<br />
<strong>PowerDesigner</strong> to design, create, reverse engineer<br />
and document Web Services. You will learn<br />
how you can create libraries of Web Service<br />
components for reuse. You will also learn how to<br />
manage versions of Web Services using the<br />
Repository. Check out this very valuable article!<br />
Also in this issue, David Dichmann,<br />
<strong>PowerDesigner</strong> Product Manager, has provided a<br />
concise listing of the features and benefits of<br />
<strong>PowerDesigner</strong> <strong>9.5</strong>, based on each role in the<br />
development lifecycle.<br />
In the article, <strong>PowerDesigner</strong> Profile, Gabriel<br />
Kevorkian, Software Engineer for <strong>PowerDesigner</strong>,<br />
documents the enhancements made in<br />
<strong>PowerDesigner</strong> <strong>9.5</strong>, improving on it’s long history<br />
of customizable options, making it the most<br />
flexible tool on the market! Read about how the<br />
new “Free Model” will allow you to represent any<br />
domain-specific system by defining your own<br />
semantics for model-to-system mapping.<br />
I’d also like to encourage you to check out the<br />
<strong>PowerDesigner</strong> product page, where you will find<br />
several 5-20 minute video demonstrations of the<br />
features of <strong>PowerDesigner</strong>. Visit<br />
www.sybase.com/powerdesigner and click on<br />
Demonstration Videos, these demos have been<br />
created based on job function and will prove to<br />
be very valuable tools to help you become more<br />
familiar with the benefits of <strong>PowerDesigner</strong>.<br />
If this is your first issue of Blueprint, please check<br />
out www.sybase.com/powerdesigner for the<br />
online versions of previous issues.<br />
Regards,<br />
Laurie Barker<br />
lbarker@sybase.com<br />
<strong>PowerDesigner</strong> Marketing Program Manager<br />
<strong>Sybase</strong> e-Business Division<br />
Creating Web Services with<br />
<strong>PowerDesigner</strong> <strong>9.5</strong><br />
By Xiao Wang, <strong>PowerDesigner</strong> Chief Architect, <strong>Sybase</strong> Inc<br />
WEB SERVICES ALLOW YOU TO EXPOSE EXISTING OR<br />
NEW FUNCTIONALITIES IN A STANDARD FORMAT.<br />
USERS MAY ALSO ACCESS APPLICATIONS FROM ANY<br />
LOCATION.<br />
POWERDESIGNER <strong>9.5</strong> INTRODUCES COMPLETE<br />
WEB<br />
SERVICES DESIGN AND GENERATION FOR BOTH<br />
MICROSOFT .NET ® AND JAVA TM . WITH<br />
POWERDESIGNER ® <strong>9.5</strong>, YOU CAN CONCENTRATE ON<br />
THE DESIGN OF YOUR WEB SERVICES AND LET<br />
POWERDESIGNER GENERATE ALL THE NECESSARY<br />
IMPLEMENTATION ARTIFACTS.<br />
WEB SERVICES OVERVIEW<br />
A Web Service is an interface that describes a collection<br />
of operations that are accessible on the network<br />
through SOAP messages.<br />
A Web Service’s interface and deployment location<br />
(optional) are described by WSDL. WSDL is a XML<br />
document that declares the data types, messages,<br />
port types and ports (optional). WSDL allows a user<br />
to understand which format of the SOAP message<br />
should be sent to invoke the service and what is the<br />
expected return message format.<br />
To allow users to find desired Web Services, a service<br />
provider can publish a WSDL in a UDDI registry,<br />
and then users can search a Web Service using the<br />
UDDI registry.<br />
To invoke a Web Service, users can send a SOAP message<br />
to the access point URL where the Web Service<br />
is deployed or use a proxy class that simplifies the<br />
invocation. A SOAP message is a XML document.<br />
POWERDESIGNER’S WEB SERVICES<br />
FEATURES<br />
<strong>PowerDesigner</strong> <strong>9.5</strong> allows you to: create new Web<br />
Service components, reverse engineer WSDL to create<br />
Web Service components, browse UDDI to<br />
search WSDL, generate WSDL from Web Service<br />
component definition, generate server side code for<br />
.NET (C# and VB .NET), generate client proxy for<br />
.NET, generate server side code for Java (JAX-RPC<br />
and JAXM) and generate client proxy for Java.<br />
To design Web Service components, <strong>PowerDesigner</strong><br />
uses UML Class Diagrams, Component Diagrams<br />
and Deployment Diagrams. A Web Service is represented<br />
by a Component in a Component Diagram.<br />
A deployed Web Service is represented by a<br />
Component Instance in a Deployment Diagram<br />
CREATING WEB SERVICE COMPONENTS<br />
There are five steps to creating a Web Service component.<br />
The first step is creating an Object-Oriented<br />
Model (OOM). You can choose one of the following<br />
languages: C#, Visual Basic .NET or Java. An<br />
Extended Model Definition (XEM) for WSDL is<br />
automatically attached to the model. It defines<br />
WSDL generation templates and Extended Attributes.<br />
The second step is creating a class. It is recommended<br />
to create a Package first then create the class under<br />
the package.<br />
The third step is converting the class to a Web<br />
Service component using the Web Service wizard.<br />
You can right click on the class then select the Create<br />
Web Service Component command or select the<br />
class then choose the Tools> Create Web Service<br />
Component command. FIGURE 1 is an example of<br />
the Web Service wizard. The Web Service type could<br />
be interface or implementation. Interface means<br />
that you only want to define the Web Service interface<br />
and generate the WSDL. For .NET, the component<br />
type is Standard and the Web Service will be<br />
implemented by an .asmx file. For Java, the component<br />
type could be Standard, Servlet or Stateless<br />
Session Bean. The Java Standard Web Service will be<br />
implemented using JAX-RPC. The Servlet Web<br />
Service will be implemented using JAXM. The<br />
Stateless Session Bean Web Service will be implemented<br />
using the Web Services for J2EE (JSR109)<br />
specification. At the end of the wizard, a Component<br />
and a Class are created. FIGURE 2 is an example of<br />
Component symbol in Component Diagram.<br />
FIGURE 1 Web Service wizard.
Stock Quote<br />
Implementation<br />
FIGURE 2 Component symbol.<br />
The fourth step is adding a web method. You need to<br />
create a new Operation, open the property sheet of<br />
the operation, click on the Web method check box,<br />
define parameters and return type and write code to<br />
implement the operation. FIGURE 3 is an example of<br />
implementation for the GetStockQuote web method.<br />
FIGURE 3 Example of implementation for the<br />
GetStockQuote web method.<br />
The last step is customizing the WSDL generation.<br />
You can customize the parameters and the return<br />
value’s WSDL data types, the operation extended<br />
attributes and the component properties and extended<br />
attributes. To verify the generated WSDL, you can<br />
open the WSDL tab of the Component property<br />
sheet. You can let <strong>PowerDesigner</strong> generate the WSDL<br />
or define your own (user-defined). If a Web Service<br />
component is reverse engineered from a WSDL, the<br />
original WSDL will be preserved. FIGURE 4 is an<br />
example of generated WSDL.<br />
FIGURE 4 Example of generated WSDL.<br />
You can preview the generated implementation code<br />
in the Preview tab of the Class property sheet.<br />
You can model a deployed Web Service component<br />
using Deployment Diagram, Node and Component<br />
Instance. You can define the server URL in Node and<br />
the service URL in Component Instance.<br />
REVERSE ENGINEERING WSDL<br />
A WSDL could define the Web Service interface only<br />
or define the interface and the access point URL. The<br />
Web Service interface can be used by multiple service<br />
providers to offer the same service but with different<br />
implementation and access points. If you have a<br />
WSDL document file path or URL, you can reverse<br />
engineer it to create a Web Service component then<br />
defines your own implementation or keep the Web<br />
Service component in a library for future use. If you<br />
don’t know where to find an interesting WSDL, you<br />
can use the UDDI browser to search WSDL in a<br />
UDDI registry.<br />
To reverse engineer a WSDL, you need to create an<br />
OOM with one of the following the languages: C#,<br />
VB .NET or Java. Then select the Language>Import<br />
WSDL command, enter the WSDL file path or URL.<br />
After reverse engineering, a Component will be created<br />
in Component Diagram and a Class will be created<br />
in Class Diagram. The created class will only contain<br />
the signature of the operations of the Web Service. If<br />
you want to implement the Web Service, you need to<br />
define the implement code of these operations.<br />
SEARCHING WSDL IN UDDI REGISTRY<br />
If you want to search WSDL registered in UDDI registry,<br />
open the Import WSDL window, click on the<br />
Browse UDDI button. The Browse UDDI window,<br />
shown in FIGURE 5, allows you to select UDDI operator,<br />
the search criteria and the search type. You can<br />
search by business entity name, service name or<br />
WSDL name. The WSDL can be previewed.<br />
FIGURE 5 Browse UDDI window.<br />
GENERATING WEB SERVICES FOR .NET<br />
For .NET server side code, <strong>PowerDesigner</strong> generates<br />
an .asmx file. The Web Service implementation class<br />
could be generated inside the .asmx file or outside.<br />
The implementation class could be in C# or VB .NET.<br />
You can preview the .asmx file and the implementation<br />
class code in the Preview tab of the Class property<br />
sheet. FIGURE 6 is an example of .asmx file for C#.<br />
FIGURE 6 Example of .asmx file for C#.<br />
<strong>PowerDesigner</strong> can also generate a client proxy class<br />
to simplify the invocation of the Web Service. To generate<br />
the client proxy class, <strong>PowerDesigner</strong> uses the<br />
wsdl.exe program that comes with Visual Studio .NET.<br />
To generate the WSDL, the server side code and/or<br />
the client proxy, select the Language>Generate C#<br />
Code or Language>Generate VB .NET Code command.<br />
If you want to generate client proxy, you can<br />
select the Generate Web Service client proxy option<br />
in the Tasks tab. FIGURE 7 shows the available Tasks<br />
for the generation. You can compile the C# or VB<br />
.NET code if the classes are not generated inside the<br />
.asmx files. To compile C# or VB .NET files, you have<br />
to define a variable CSC or VBC to indicate where is<br />
the csc.exe or vbc.exe command.<br />
To deploy the Web Service, copy the .asmx file and<br />
the class files under the IIS directory<br />
C:\Inetpub\wwwroot\, where is the name of the<br />
package. To test the Web Service, enter the<br />
URL in the browser:<br />
http:////.asmx<br />
FIGURE 7 Web Service generation tasks.<br />
GENERATING WEB SERVICES FOR JAVA<br />
If the Web Service implementation type is Standard,<br />
<strong>PowerDesigner</strong> uses JAX-RPC for the implementation.<br />
If the implementation type is Servlet,<br />
<strong>PowerDesigner</strong> uses JAXM for the implementation.<br />
If the implementation type is Stateless Session Bean,<br />
<strong>PowerDesigner</strong> uses Web Services for J2EE (JSR109)<br />
specification for the implementation. JSR109 is not<br />
finalized yet.<br />
JAX-RPC defines RPC type invocation for Web<br />
Services. It is easy to develop and use. But it is limited<br />
to simple message formats to avoid complex<br />
Objects/XML mapping. JAXM based Web Service<br />
components give you the flexibility to handle complex<br />
message structures.<br />
To use JAX-RPC or JAXM, you need to install the<br />
Java Web Services Developer Pack (JWSDP). You can<br />
download it from Sun Microsystem’s web site. To<br />
deploy JAX-RPC or JAXM Web Service components,<br />
you will need a server that supports JAX-RPC or<br />
JAXM. JWSDP ships with Apache Tomcat that supports<br />
JAX-RPC and JAXM.<br />
For JAX-RPC based Web Service component, you<br />
only need to implement the web method code. To<br />
Continued on page 3<br />
2
<strong>PowerDesigner</strong><br />
FEATURES & BENEFITS<br />
By David Dichmann,<br />
<strong>PowerDesigner</strong> Product Manager<br />
<strong>PowerDesigner</strong> offers the following features and benefits<br />
for each role in the development lifecycle:<br />
For Business-centric Managers<br />
<strong>PowerDesigner</strong> enables you to model business-driven<br />
application using simple, non-IT, and intuitive techniques.<br />
<strong>PowerDesigner</strong> is the easy to use and learn way to model<br />
and design business processes and maximize collaboration<br />
with your IT department.<br />
With <strong>PowerDesigner</strong> Version <strong>9.5</strong>, you will:<br />
! Document and model your business and business<br />
processes using business-oriented diagrams.<br />
By using this non-IT, non-technical, intuitive, business-centric<br />
model, you focus on the business<br />
processes themselves, before handing this off to the<br />
IT professionals who will incorporate the technical<br />
details.<br />
! Work in a state-of-the-art, graphical, highly intuitive<br />
user interface, with new advanced graphic capabilities<br />
that dramatically improve the expressiveness<br />
of the resulting diagrams. This GUI makes<br />
<strong>PowerDesigner</strong> easy to learn, easy to use, and a very<br />
powerful medium for communicating ideas across<br />
multiple disciplines.<br />
! Centralize all your work in a secure, enterprise-class<br />
repository. The repository provides a global view of all<br />
models, shared across all team members, increasing<br />
collaboration throughout the enterprise. Store,<br />
manage, version and share all your business<br />
models throughout the enterprise.<br />
! Take advantage of the business process model’s<br />
advanced features, like the ability to track Data flows,<br />
CRUD Matrix and data model integration, UML model<br />
generation and ebXML support, both generation and<br />
reverse engineering. By leveraging the business models<br />
everywhere, IT will be more efficient in developing<br />
projects or applications that meet business goals.<br />
For IT-centric Managers:<br />
<strong>PowerDesigner</strong> streamlines collaboration, accelerates<br />
the learning curve and reduces time and cost of software<br />
development. <strong>PowerDesigner</strong> is a single, easy-to-use,<br />
standards-based environment that will capture business<br />
needs and requirements and effectively model the software<br />
that meets them.<br />
With <strong>PowerDesigner</strong> Version <strong>9.5</strong>, you will:<br />
! Use multiple standard modeling techniques for both<br />
IT-centric and Business-centric information in one<br />
modular, integrated package. Combining UML with<br />
non-UML business and data modeling streamlines<br />
communication between the business and IT.<br />
! Use comprehensive and highly iterative bi-directional<br />
model synchronization and linking capabilities to<br />
streamline response to change, anywhere in the<br />
development lifecycle, flattening the change cost<br />
curve.<br />
! Work in a state-of-the-art, graphical, highly intuitive<br />
user interface. With <strong>PowerDesigner</strong>’s short learning<br />
curve, users will be productive right away.<br />
! Centralize all your work in a secure, enterprise-class<br />
repository. The repository provides a global view of all<br />
models, shared across all team members, increasing<br />
collaboration through-out the enterprise.<br />
For IT-centric Technical Staff – Developer:<br />
<strong>PowerDesigner</strong> provides for increased development productivity<br />
through practical, results-driven UML.<br />
<strong>PowerDesigner</strong>’s code generation and synchronization<br />
facilities, including support for Java and .Net, ensure the<br />
model and development efforts are always the same.<br />
With <strong>PowerDesigner</strong> Version <strong>9.5</strong>, you will:<br />
! Work in an easy to use, simplified, practical environment<br />
for UML, with all 9 diagrams and powerful<br />
extension mechanisms supported. A practical and<br />
applied approach to UML modeling allows the developer<br />
to focus on results, not concepts. This will<br />
reduce the tendency to over analyze before getting to<br />
the desired stage – writing and deploying code<br />
and applications.<br />
! Reverse-engineer existing systems with support for<br />
Java, XML, PowerBuilder and all manner of Web<br />
Services. Being able to document and understand<br />
existing systems quickly makes integration or<br />
enhancement projects easier to manage, scope and<br />
execute.<br />
! Use complete, round-trip code generation for multiple<br />
environments including the Java (J2EE with support<br />
for EJB, JSP and servlett) and the .Net (WSDL and<br />
UDDI support) platforms. With this, you have support<br />
for both leading e-Business platforms, and you have<br />
significantly improved Java developer productivity.<br />
You may also model heterogeneous environments<br />
across multiple technologies.<br />
! Use your favorite development environments through<br />
integration with popular IDEs and Application Servers.<br />
Continued on page 4<br />
Creating Web Services with <strong>PowerDesigner</strong> <strong>9.5</strong>, continued...<br />
generate the WSDL, the server side code and/or the<br />
client proxy, select Language>Generate Java Code,<br />
select the Generate WSDL using XRPCC tool (server<br />
side) and/or the generate Web Service proxy code using<br />
XRPCC tool command (SEE FIGURE 8). The XRPCC<br />
command is a tool of JWSDP. It can generate server<br />
side code or client proxy for JAX-RPC. To deploy the<br />
generated Web Service, you need to create a .WAR file<br />
that contains all the generated files and deploy the<br />
.WAR file in a server that supports JAX-RPC<br />
(ex: Apache Tomcat).<br />
FIGURE 8 JAX-RPC generation tasks.<br />
For JAXM based Web Service component, you need to<br />
implement the onMessage operation. The onMessage<br />
operation will take the input SOAP message, process it,<br />
construct a return message as described in WSDL and<br />
return the message. To generate the WSDL and the<br />
JAXM Web Services, select the Language>Generate<br />
Java Code command, select the Build Web<br />
Components, Create Web Application WAR command<br />
(SEE FIGURE 9). This command compiles the JAXM<br />
servlet code and creates a WAR file. To deploy the<br />
JAXM servlet, you can deploy the WAR file in a server<br />
that supports JAXM, (ex: Apache Tomcat).<br />
FIGURE 9 JAXM generation task.<br />
Since the JSR109 specification is not finalized, it is not<br />
possible to use the Stateless Session Bean based Web<br />
Service component.<br />
FUTURE ENHANCEMENTS<br />
The Web Services for J2EE (JSR109) specification will<br />
be available soon. It will allow you to use a Stateless<br />
Session Bean as a Web Service implementation artifact.<br />
<strong>PowerDesigner</strong> <strong>9.5</strong> comes with a non-certified version<br />
of JSR109 support based on an early version of the<br />
specification. When the specification is finalized, a<br />
maintenance release will be issued.<br />
Future versions of <strong>PowerDesigner</strong> will also support<br />
Web Services orchestration standards.<br />
CONCLUSION<br />
<strong>PowerDesigner</strong> <strong>9.5</strong> simplifies Web Services design and<br />
implementation. If you know how to create a class and<br />
a method, you know how to create Web Services! You<br />
can use <strong>PowerDesigner</strong> to design, create, reverse engineer<br />
and document Web Services. You can create<br />
libraries of Web Service components for reuse. You can<br />
also manage versions of Web Services using the<br />
Repository.<br />
3
FEATURES & BENEFITS Continued from page 2<br />
By having support for leading IDEs and Application<br />
Servers you have a choice in environments and are<br />
not locked into a single vendor solution.<br />
! Use data modeling integrated with UML, including<br />
design-time support for Object/Relational mapping.<br />
This allows management and the team to<br />
leverages data models in business logic design as<br />
well as facilitates object/relational mapping, or<br />
persistence management, for the business logic.<br />
For IT-centric Technical Staff –Database<br />
Developer and Administrator<br />
<strong>PowerDesigner</strong> increases database manageability,<br />
facilitates database maintenance and increases ability<br />
to change. <strong>PowerDesigner</strong> boosts productivity through<br />
effective database design with complete DDL or change<br />
script generation.<br />
With <strong>PowerDesigner</strong> Version <strong>9.5</strong>, you will:<br />
! Create database designs using iterative multi-level<br />
design. By having a separate models for the fully<br />
normalized formal data-analysis, the database<br />
independent logical models and a separate model<br />
for the optimized physical schema, you will be able<br />
to create more robust database systems.<br />
! Have support for over 40 different types and versions<br />
of leading relational databases. Multiple<br />
database support not only ensures openness, but<br />
also allows for heterogeneous database environments<br />
to be modeled in a single tool, leading to<br />
greater understanding and control over the enterprise<br />
database architecture. Models may be linked<br />
to reflect cross-database and cross platform<br />
dependencies. Custom support for each database<br />
gives faster, easier database system deployment.<br />
! Reverse-engineer existing database systems for all<br />
supported RDBMS or with generic support for practically<br />
any RDBMS in production. Use this for complete<br />
database systems understanding when documentation<br />
does not exist, or for incorporating<br />
changes made outside the model back into an<br />
existing design to ensure 100% accuracy between<br />
the models and the production environment.<br />
<strong>PowerDesigner</strong> Profile<br />
By Gabriel Kevorkian, Software Engineer<br />
! Work in an easy to use, simplified, practical environment<br />
for physical database design, complete<br />
with advanced productivity wizards for common<br />
tasks like denormalizing tables and columns,<br />
defining views, creating indexes, triggers, and<br />
more. A practical and applied approach to data<br />
modeling allows you to focus on results, not<br />
concepts.<br />
! Use complete, round-trip database object generation,<br />
which provides greater flexibility when<br />
deploying iterative design changes to a running<br />
production server without any loss of existing data,<br />
while respecting the changes made to the database<br />
server outside the model.<br />
! Use data modeling integrated with UML, including<br />
design-time support for Object/Relational mapping.<br />
This allows management and the team to<br />
leverages data models in business logic design as<br />
well as facilitates object/relational mapping, or<br />
persistence management, for the business logic.<br />
POWERDESIGNER V<strong>9.5</strong> BUILDS UPON THE EXISTING<br />
METAMODEL EXTENSION CAPABILITIES OFFERED BY<br />
PREVIOUS VERSIONS AND NOW PROVIDES A FULL-<br />
FLEDGED METAMODEL PROFILING FUNCTIONALITY THAT<br />
GOES BEYOND THE STANDARD UML PROFILE AND IS<br />
MADE AVAILABLE TO ALL MODULES (CDM, PDM,<br />
OOM...). THIS FEATURE TAKES ON A PARTICULAR<br />
SIGNIFICANCE WITH THE NEWLY RELEASED FREE<br />
MODEL AS IT ALLOWS YOU TO REPRESENT ANY<br />
DOMAIN-SPECIFIC SYSTEM BY DEFINING YOUR OWN<br />
SEMANTICS FOR MODEL-TO-SYSTEM MAPPING.<br />
UML PROFILE<br />
The idea of profile as expressed in the UML specification,<br />
is to allow the UML metamodel to be customized<br />
to address domain-specific needs. A UML<br />
Profile is basically a grouping of additional properties<br />
(a.k.a. tagged values) and constraints<br />
(expressed in OCL (object constraint language)<br />
that can be applied to instances of the UML metaclasses.<br />
UML defines the concept of stereotype as a<br />
metaclass subtyping mechanism that allows metaclass<br />
extensions to be applied to model elements on<br />
a per-instance basis.<br />
POWERDESIGNER PROFILE<br />
<strong>PowerDesigner</strong> 9 offered a metamodel extension<br />
mechanism through the XEM/XOL/XDB target<br />
definitions. Extended attributes (UML tagged values)<br />
provided a way of extending concrete metaclasses<br />
(ie instantiable metaclasses). Once a target<br />
was associated with a given model, these extended<br />
attributes would become available to all instances of<br />
the corresponding metaclasses. In other words,<br />
XEM/XOL/XDB definitions provided an implicit<br />
stereotyping mechanism for adding extended<br />
attributes to model elements. The ability to associate<br />
more than one XEM with a given model somewhat<br />
addressed the need for applying more than<br />
one stereotype to a given element although this<br />
could not be done at the instance level.<br />
In <strong>PowerDesigner</strong> <strong>9.5</strong>, the structure of the target<br />
definitions has been vastly improved in order to<br />
enable metamodel extensions to be defined with<br />
respect to any metaclass, whether its abstract or<br />
concrete. Extensions defined with respect to an<br />
abstract metaclass are made available to the<br />
instances of the metaclass' concrete descendants.<br />
Extensions that do not bear any relevance for a<br />
given metaclass are simply ignored (eg. custom<br />
symbols defined for non-visible objects).<br />
<strong>PowerDesigner</strong>'s unified meta-extension framework<br />
facilitates the definition of profiles through an<br />
intuitive interface that groups all the extensions by<br />
metaclass or meta-extension container. You only<br />
need to add the metaclass of your choice under the<br />
profile node using the Add metaclass...selection<br />
dialog and then right-click on the metaclass to<br />
define the desired extension(s).<br />
FIGURE 1 Defining meta-extensions.<br />
Meta-extensions fall into two categories: standard<br />
extensions that actually extend the metamodel by<br />
adding structure or behavior to model elements<br />
and meta-extension container extensions that<br />
define groupings of standard extensions to be<br />
applied on a per-instance basis. Extended attributes,<br />
Custom symbols, Custom Checks, Templates<br />
and Generated Files fall in the former category<br />
whereas Stereotypes and Criteria belong to the latter.<br />
STANDARD META-EXTENSIONS<br />
Extended attributes are properties that correspond<br />
to UML tagged values. They may be associated with<br />
a user-defined data type.<br />
FIGURE 2 Extended attribute.<br />
Meta-extensions fall into two categories: standard<br />
extensions that actually extend the metamodel by<br />
adding structure or behavior to model elements<br />
Continued on page 5<br />
4
<strong>PowerDesigner</strong> Profile, continued...<br />
and meta-extension container extensions that<br />
define groupings of standard extensions to be<br />
applied on a per-instance basis. Extended attributes,<br />
Custom symbols, Custom Checks, Templates<br />
and Generated Files fall in the former category<br />
whereas Stereotypes and Criteria belong to the latter.<br />
Custom symbols are formats that are to be<br />
applied to the symbols of the objects they are<br />
defined for. They are especially useful when<br />
defined under a stereotype or a criterion for visually<br />
differentiating objects in a diagram.<br />
FIGURE 3 Custom symbol.<br />
Custom checks are VBScript extensions to the<br />
standard "Check model" functionality. They allow<br />
for the enforcement of domain-specific constraints<br />
upon a model.<br />
FIGURE 6 Generated File.<br />
META-EXTENSION CONTAINERS<br />
In <strong>PowerDesigner</strong>, stereotypes are tightly coupled<br />
with metaclasses through a 1-1 association (UML<br />
defines a weaker relationship between stereotypes<br />
and metaclasses based on a delegation mechanism<br />
that allows a given stereotype to be applied to<br />
instances of unrelated metaclasses). A stereotype<br />
may be derived from another stereotype that<br />
extends the same metaclass or one of its ancestors.<br />
Applying a stereotype to a given element provides<br />
it with all the extensions defined for the given<br />
stereotype and its ancestors. Hence, common<br />
extensions may be factored out at an abstract level<br />
and reused through stereotype inheritance.<br />
Custom tools may be defined as part of a stereotype<br />
specification in order to let users create<br />
stereotyped objects using the tool palette.<br />
FIGURE 8 Criterion.<br />
an ancestor metaclass is redefined, the new definition<br />
shadows the original. The same principle<br />
holds true for extension defined on stereotypes.<br />
Stereotypes are considered to be stronger than criteria.<br />
In other words, in case of a conflict between<br />
two extensions, the one defined under a stereotype<br />
overrides the one defined under a criterion.<br />
1. determine the set of extensions<br />
defined by the corresponding<br />
metaclass (metaclass<br />
inheritance)<br />
2. determine the set of extensions<br />
provided by the satisfied<br />
criteria.<br />
3. determine the set of extensions<br />
defined by the corresponding<br />
stereotype, if any<br />
(stereotype inheritance)<br />
4. merge the sets derived in<br />
step 1 through 3 with each set<br />
overriding the previous one.<br />
TABLE 1 Steps for determining the set of<br />
extensions that apply to a given model element.<br />
FIGURE 4 Custom check.<br />
Templates can be thought of as calculated attributes<br />
used mainly for generation purposes but also<br />
for defining criteria and name-code conversion<br />
scripts. Templates are defined in GTL<br />
(<strong>PowerDesigner</strong>’s Generation Template<br />
Language).<br />
FIGURE 5 GTL Template.<br />
Generated Files define files to be generated as part<br />
of the code generation process. Their template<br />
content is specified in GTL.<br />
FIGURE 7 Stereotype.<br />
Criteria are a dynamic extension mechanism, in<br />
contrast with the stereotyping mechanism that<br />
may be considered as static, as the stereotype of a<br />
model element is unlikely to change over time.<br />
They are defined as arbitrarily complex conditions<br />
based on attribute values and object relationships.<br />
These conditions are expressed in GTL and may be<br />
defined in terms of existing templates. One of the<br />
most spectacular uses of criteria is coupled with<br />
custom symbols as the symbol format is automatically<br />
synchronized with the corresponding object,<br />
depending on which criterion is satisfied. They are<br />
also heavily used for generation purposes as in the<br />
Java object language definition.<br />
EXTENSION MECHANISM<br />
The metamodel extension mechanism supports<br />
inheritance both at the metaclass level and though<br />
stereotype inheritance. If an extension defined in<br />
CONCLUSION<br />
The profiling capability introduced in<br />
<strong>PowerDesigner</strong> v<strong>9.5</strong> greatly enhances its customizability<br />
and makes it the most flexible tool on the<br />
market today in terms of pure modeling.<br />
Although <strong>PowerDesigner</strong> doesn't support OCL at<br />
this point, it does allows constraints to be defined<br />
in terms of VBScript-based custom checks and<br />
actually augments the set of extensions provided<br />
by the UML profile with GTL templates and generated<br />
files for defining model-to-code mappings.<br />
As far as the actual extension mechanism is concerned,<br />
<strong>PowerDesigner</strong> not only provides a UMLlike<br />
stereotyping mechanism but introduces the<br />
ability to define criteria that circumvent stereotype<br />
limitations and offer an extremely powerful way of<br />
inducing dynamic structure and behavior on<br />
model elements.<br />
5
Check IT<br />
OUT<br />
Because your TIME is more<br />
LIMITED than ever, we have created<br />
a series of technical VIDEO DEMOS<br />
based on specific job functions.<br />
Each video is a self-running<br />
executable that runs from 5-20 minutes<br />
and demonstrates some of the<br />
key features of <strong>PowerDesigner</strong> based<br />
on each job role.<br />
VISIT<br />
www.sybase.com/pdvideos<br />
TODAY!<br />
6