Tuesday, May 13, 2008

PowerBuilder 11.5 and strong-named .NET Assemblies

Another new feature in PowerBuilder 11.5 is the ability to generate strong-named assemblies for any of the four .NET targets (Web Forms, Windows Forms, .NET Web Services or .NET Assemblies). What does this mean?

Well the Help file says this:

A strong name consists of an assembly's identity—its simple text name, version number, and culture information (when provided)—plus a public key and digital signature. It is generated from an assembly file using the corresponding private key. The assembly file contains the assembly manifest that includes the names and hashes of all the files that make up the assembly.

So, what are the benefits of creating strong name assemblies?

First you can be assured that a name is globally unique. According to the MSDN website, strong names satisfy the following requirements:

  • Strong names guarantee name uniqueness by relying on unique key pairs. No one can generate the same assembly name that you can, because an assembly generated with one private key has a different name than an assembly generated with another private key.

  • Strong names protect the version lineage of an assembly. A strong name can ensure that no one can produce a subsequent version of your assembly. Users can be sure that a version of the assembly they are loading comes from the same publisher that created the version the application was built with.

  • Strong names provide a strong integrity check. Passing the .NET Framework security checks guarantees that the contents of the assembly have not been changed since it was built.
Note that creating strong-named assemblies does not imply the same level of trust that is provided by a digital signature and supporting certificate.

Saturday, May 10, 2008

More on Graphs in PowerBuilder 11.5

Last week I posted a screen shot of the new 3D Rendering capabilities being added to some of the 3D graphs in PowerBuilder 11.5. It was met with mixed reviews on the PowerBuilder Futures newsgroup (forums.sybase.com) so I went back to the drawing board to see what I could come up with. Apparently there are quite a few configuration settings one can set programmatically to render better looking graphs. For example, the primary color scheme default can be changed by making a couple of function calls for each data point or series. Here is a screen shot of an example application I am putting together to be released when 11.5 ships:


This feature is still in development so the legend doesn't take advantage of the translucency property yet.
Now lets look at a 3D chart that contains a series. First here is a screen shot of the original 3D graph style available in PowerBuilder 11.2 and earlier (and still available in 11.5 if you like the retro look):


Now lets see that same chart with the new 3D (DirectX) rendering turned on and translucency set on some of the series:


Looks a lot better. The new 3D rendering capability will be available for the following 3D graph styles: Area, Column, Pie, Bar, and Line. This should meet the majority of users' 3D graph needs. If you need something more powerful or want a wider selection of charting options, take a look at the FusionCharts demo available on CodeXchange at:

Tuesday, May 6, 2008

DataWindow Tooltips in 11.5

Today's sneak preview is on the DataWindow Tooltip enhancement in 11.5. This screenshot shows a tooltip on the first_name column:




This shows a tooltip with the title property populated as well as an icon property selected. It also shows the bubble format. Below you can see the list of properties that will be available for tooltips:



It is important to point out that you can place a tooltip on any control on the DataWindow. Drawing objects, buttons, nested reports, computed fields, labels, they all support the tooltip property!

Monday, May 5, 2008

New Graph Styles in 11.5

G'Day from Down Under. I've been in Australia since April 27th and while it is great to be "home" (I lived in Sydney from 1995-2000) I've been too busy to keep my blog up to date. I've got a few spare minutes today so I want to share with you another new feature being added to PowerBuilder 11.5.

There will be some new 3D graph styles based on DirectX technology. These new graphs will be available for Win32 and .NET Windows Forms applications.



Here's a screen shot of the new 3D Pie Chart. It isn't feature complete yet but it should give you an idea of what to expect.





You'll notice that there are some new properties in the DataWindow painter and some new functions are being added to allow you to get and set data and series labeling on various 3D graphs.

Thursday, April 24, 2008

PowerBuilder 11.5

PowerBuilder 11.5 will have a number of DataWindow enhancements. Over the next several days I will be posting some screen shots along with descriptions of many of these new features.

I should point out that these enhancements are for Win32 (PowerBuilder native) and .NET Windows Forms applications only. They won't be available in .NET Web Forms applications (sorry!). Eventually these enhancements will be rolled into DataWindow .NET 3.0.

The first enhancement I want to demonstrate is the background image for DataWindows. This new property lets you select a .bmp, .jpg, .gif, .png, .rle, or .wmf file as a background for your DataWindow. I'm using a .jpg file of the Sybase headquarters building in Dublin, California in this example. There are several tile mode options available from "original size" to "fit to width" to "flip xy". There are also several clip properties and a transparency property. Of course all of the properties can be set in the DataWindow painter or programmatically in your code.

Speaking transparency. Notice the state_name column? There is now a text transparency property for columns and labels (computed fields too). In this example I have set the value to 50%. The state_id column's text transparency property value is set to zero (completely opaque).

The background color property for both columns has been set to transparent so you can see the image come through the columns. You can also set a color and then set the transparency property anywhere from 0% to 100% (which gives you the same effect as setting the background color to transparent):



So, lets use this DataWindow in a Drop Down DataWindow column.



Pretty cool! It might be totally impractical and make it more difficult for your users to see the data in the Drop Down DataWindow but it sure looks nice!

In my next entry I will talk about the new gradient properties being added to the DataWindow. The screen shot above gives you a hint as to what you can do with these properties but it barely scratches the surface.

Wednesday, April 23, 2008

PowerBuilder 11.5 Screen shots

On the PowerBuilder newsgroups I promised to post some screen shots of some of the new DataWindow features in PowerBuilder 11.5. Well a new build will be available tomorrow (April 24th) and I want to use that build to show some of the features. Thanks for your patience.

Monday, April 21, 2008

PowerBuilder and SOA Webcast This Week!

In case you didn't get the email, I'm repeating the information here:

PowerBuilder has always been about helping you solve very real business needs in the fastest, most uncomplicated way. Now, we are bringing you an educational two-part webcast series that will show you how to employ PowerBuilder to accelerate your SOA development effort.

During the first webcast, Sybase PowerBuilder evangelist, John Strano will show you how using PowerBuilder and DataWindow technology in the implementation layer of your Service Oriented Architecture projects will preserve the SOA promise of Business Agility. During the second webcast, John will walk you through how PowerBuilder safeguards agility when presenting SOA - originating data to the user for analysis and modification.

We hope you can join us as we show you how PowerBuilder’s proven technology can continue to solve your emerging business challenges. Register for the PowerBuilder and SOA webcast series today.

Details:Webcast Part I: How to accelerate SOA Development with PowerBuilder Date: Wednesday, April 23rd, 2008Time: 9 AM PT/12 PM ET

Webcast Part II: Safeguarding SOA agility with PowerBuilder Date: Wednesday, April 30th, 2008Time: 9 AM PT/12 PM ET

Find out more and sign up here

Monday, February 18, 2008

Calling an application's window in a Web Form application

One question I'm frequently asked is, "How can I have my PowerBuilder application's windows turned into separate web pages?". If you've deployed a PowerBuilder application to the web using the .NET Web Form target, and then examined the application's directory on the web server you've noticed that there is only one ASP .NET page created (default.aspx)!

Think of that as the web equivalent of the bootstrapper .exe PowerBuilder generates in a traditional Windows application. The goal for PowerBuilder 11 was to allow you to take existing Windows applications to the web with a minimal amount of refactoring. That's all well and good, but many of you out there want to incorporate pieces of your existing PowerBuilder applications into standalone web applications or portals created using Visual Studio or some other product. Don't worry, all is not lost. It might take a little extra work (how much work depends on how you've designed your client server application in the first place) but you can leverage your existing client server application logic into new web applications without having to do a complete rewrite.

The trick is to use the commandline parameter. If you open the application object in PowerBuilder and go to the Open event, you'll notice that it recieves one argument called Commandline:




For Web Form targets, PowerBuilder lets you pass a value to the commandline by using the PBCommandParm parameter. It is as straightforward as calling the application in a URL like this:

http://myserver/myapp/default.htm?PBCommandParm=CUSTOMER

In the application Open event you can capture the value and process it any way you like. For example:

CHOOSE CASE commandline
CASE "CUSTOMER"
Open (w_mss_customer_master)
CASE "PRODUCT"
Open (w_mss_product_master)
CASE ELSE
Open ( w_mssmain_frame )
END CHOOSE

Using the Marketing Support System sample application as an example, if the application were to be run with no commandline parameter, the standard MDI frame would open and the browser would looks something like this:

http://myserver/myapp



If we call the same application but use a URL like this:

http://myserver/myapp/default.htm?PBCommandParm=CUSTOMER

The browser will open and select the Customer window:





Note: we call the default.htm file to hide the web browser's menu and toolbar. Default.htm is just a wrapper to the default.aspx but it contains some Javascript code to resize the browser and hide the menu and toolbar.

So that's all there is to it. Or is it? What if you want to pass multiple parameters? Well there is only one commandline parameter for the application's open event, but you can pass multiple parameters in using %20, the ASCII character code for an empty space in the URL.

http://myserver/myapp/default.htm?PBCommandParm=CUSTOMER%20FISH

All of the parameters will get concatenated into one commandline string so you will need to use the left, mid, or right functions, along with the pos function in Powerscript to parse them out (see the PowerBuilder Help file for details).