YOUR FEEDBACK
andy.mulholland wrote: intriguing !!! We have full scale 'Mashup Factories' in Chicago USA and Utrec...
AJAXWorld RIA Conference
Early Bird Savings Expire Friday Register Today and SAVE !..


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
POWERBUILDER LINKS YOU MUST CLICK ON


.NET Features Analyzer
Easing the .NET development effort

Enter the .NET Features Analyzer, a PowerBuilder utility that presents the unsupported features list in two TreeView formats - one arranged by PowerObject class, the other by the objects in your PBLs. Features can be filtered as well, so items of minimal impact to your application can be removed from view as you do your analysis. Like the Output window in the PowerBuilder integrated development environment (IDE), the .NET Features Analyzer provides hyperlinks that navigate directly into the script painter to the line of PowerScript that references the unsupported feature. In this article, we'll take a quick tour of the utility and peek under the covers at some techniques you may find useful in your own applications or utilities.

To start, you can download the utility (including the source code) from Sybase's CodeXchange site at http://powerbuilder.codexchange.sybase.com/ under the IDE Utilities section. A simple setup program searches for your PowerBuilder 11 installation and puts the utility's executable file (nfa.exe) and a help file in a newly created Add-ons directory below your PowerBuilder 11.0 directory. To provide access directly from the PowerBuilder IDE, the .NET Features Analyzer appears as an option in the File>New dialog, as shown in Figure 2. Did you know you can add your own items to the File>New dialog as well? Check out "How'd he do that" at the end of this article to learn more.

When you launch the .NET Features Analyzer, you'll see a simple blank tabbed interface. First you'll need to select the source of the unsupported features list: either an open PowerBuilder IDE session (using the File>Import from Output Window menu item) or a file (using the File>Open... menu item) containing the unsupported features list saved from a previous .NET deployment.

Electing to import the unsupported features list from the Output window presumes you have an open PowerBuilder IDE session from which you've just deployed a .NET target. If you happen to have several PowerBuilder sessions open, you'll be prompted to pick one. Once the targeted PowerBuilder session is known, the .NET Features Analyzer populates its own internal structures with the data appearing in the Unsupported Features tab. If you choose to pull the data from a file you saved previously, the data will be read in from that file, of course. Check out "How'd he do that" at the end of the article for insight in to accessing a PowerBuilder IDE session from an external program.

Each unsupported feature reference is reported as a fairly well-structured message that includes the name of the object referencing the feature, the unsupported feature itself, and the context in which that feature is used, including a source code line number. As each message is read from the IDE or file, it's parsed via a finite state machine (see the processFeature method of the n_featureList custom class user object). The feature information is then added to a main DataStore object used to provide the data for three different views in the .NET Features Analyzer:

  • The Class View (Figure 3) shows the unsupported features arranged by PowerObject class,
  • The PBL View (Figure 4) shows the features organized by the objects in the PowerBuilder library file, and
  • The Input tab (Figure 5) echoes the unsupported feature output as originally presented in the PowerBuilder development environment.
A fourth tab, Exceptions (Figure 6), can be hidden if desired; it contains entries from the Unsupported Features tab that weren't recognized as specific feature instances - such as the comment lines that show at the beginning and end of the unsupported features list.

Both the Class View and PBL View organize the feature list into five TreeView levels, with the lowest level referencing each specific instance of an unsupported feature in the source code or object definition. A context menu on each TreeView enables you to quickly collapse or expand to one of these five discrete levels. If the list was obtained from an open PowerBuilder IDE session, the items at the detail level of the TreeView (as well as all the lines on the Input tab) act as hyperlinks to open object painters to the relevant line of code within that PowerBuilder session. How do the hyperlinks work? See "How'd he do that" at the end of the article.

By expanding the Class View tab to the third level (Unsupported Feature Level in the context menu), you can gain quick insight into where the unsupported features are concentrated. Figure 7, for example, shows that the Web Reports sample application shipped with PowerBuilder 11 includes a total of nine references to the LiveScroll property of the various DataWindow controls used in the application. (LiveScroll controls whether the DataWindow contents scroll as you move the thumb control on the scroll bar). Although this property isn't supported per se in a Web application, the default behavior in a Web application is nearly identical from the end-user perspective. Consequently, likely this is not a feature of concern or one requiring further action on the part of the PowerBuilder developer.

To remove LiveScroll and other similarly benign features from view, the .NET Features Analyzer includes a convenient filter interface. The filter input mechanism is another TreeView DataWindow that can be exposed using the Options menu or the green arrow button at the right of the main window. The filter initially shows all of the features represented in the current unsupported features list as selected. To remove one specific feature from view, toggle the checkbox by clicking on the desired feature. To select or deselect groups of features (for instance, all Menu properties or every function, event, and property of a Tab control), use the context menu by right-clicking the desired element of the filter tree (see Figure 8). Changes to the filter take effect immediately, and the open tab views as well as the count of features displayed (shown directly above the filter TreeView) are updated accordingly.

For ease of use across multiple applications or perhaps when revisiting the features of a given application, you can also save the current filter selections via the context menu. When you save the filter, the items that are not selected are recorded in the INI file associated with the application (located by default in the user's local applications settings directory, e.g., C:\Documents and Settings\jsmith\Local Settings\Sybase\PowerBuilder 11.0). Since the filter setting is saved, you can reload the filter and apply it to any unsupported feature list that you subsequently load, thus giving you the option of universally ignoring specific features that you know will never be of interest regardless of the application you're working on.

While the hard work - namely implementing workarounds or alternative implementations for the more critical unsupported features - is still left up to you, the .NET Features Analyzer tool helps focus your efforts on the more important aspects of your applications. And since the utility is now in the open source domain on CodeXchange, customizing and extending the tools is only limited by your time and imagination!


About Jim O'Neil
Jim O'Neil is a Microsoft Developer Evangelist for the Northeast U.S. where he concentrates on the developer communities using Visual Studio .NET and the various .NET technologies. Prior to joining Microsoft, he was a Principal Systems Consultant and Principal Technical Support Engineer for Sybase, Inc., where he specialized in the PowerBuilder family of tools, EAServer, and Appeon for PowerBuilder.

PBDJ LATEST STORIES . . .
Virtualization is actively being used by Sybase IT to help solve power/cooling issues as well as transform the datacenter into an environment that brings greater benefits to their customers, especially the engineering organization. Average CPU utilization was very low on physical serve...
Must have at least 5 years of recent experience (within the last 7 years) in building, testing, and supporting complex (multiple interfaces with database(s) and other applications) and mission-critical Windows applications using PowerBuilder. Must have at least 5 years of experience wr...
Join Scott Guthrie as he discusses Microsoft’s commitment to web standards development, Rich Internet Applications and how Microsoft is contributing to help move the web forward. Join Adobe’s Kevin Lynch as he demonstrates how Flash and HTML come together to make the most engaging,...
Particularly in a means of moving PowerBuilder applications to the web. What I’m looking for doesn’t require a server license or the installation of unmanaged code to the web server, and works well across different browsers (not just Internet Explorer). The WPF DataWindow will help...
"The rise of Enterprise Architecture is proof that organizations need to manage the impact of changes in competition, technology and regulations across their enterprise," said Dan Lahl, director of Intelligent Enterprise for Sybase. "PowerDesigner 15's unique Link and Synch technology ...
With PowerBuilder 11 Sybase gave developers what we have long hoped for – the possibility of taking an application created in a client/server architecture and turning it into a Web application, almost without having to move the code; and it's better if you don't use a server applicat...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING POWERBUILDER / SYBASE NEWS
Medmatics, LLC, a leading vendor of on-demand, anticoagulation software for private practices and ho...