YOUR FEEDBACK
Evripidis wrote: I downloaded and tried to run the SampleSolution through Visual Studio. Every ti...
Cloud Computing Conference
November 19-21 San Jose, CA
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


PowerBuilder: Standards, Standards, Standards
Building state-of-the-art applications

Welcome to a new column in PBDJ. In this column, we'll discuss all things "new" in PowerBuilder - from keys to success in starting new projects to tips and techniques you need to know to features in the latest, and upcoming, releases of the product.

Our mission is to guide you on your path to developing state-of-the-art, robust, maintainable applications using PowerBuilder and other technologies. Your mission is to ensure we are fulfilling our mission. Your feedback and input on past and future topics will be critical in making sure this column provides educational, accurate and, most importantly, useful information. Disclaimer: both Larry and I have many years of development experience to share with you, but there will inadvertently, and inevitably, be times where we present (slightly) inaccurate information. Please remember that those errors and omissions are ALWAYS Larry's fault.

Let's Get Started
Whether you're new to PowerBuilder or starting a new project, there are some keys to remember to help ensure a safe and successful endeavor. These aren't new concepts in software development, but somehow they get pushed aside and aren't given enough consideration. I'm referring to Standards and Frameworks.

Standards
Standards typically encompass naming and coding, but can include data modeling and architectural design as well. Whether you're staring a new project or joining an existing one, standards make it much easier to ensure that everyone is speaking the same language everywhere. Whether you're doing analysis in the database or modifying code in the application, it's ALWAYS easier when standards are used, communicated and enforced.

Too much time is wasted when similarly purposed columns in the database are named differently and selects won't compile because an account column is named acct in one table and accountCode in another table. Do you find it hard to jump into someone else's code when their naming and style conventions clash with your own? Does filtering take place in a where clause or in a DataWindow object or is it set dynamically in code? How are transactions handled? Does the application use embedded SQL or stored procedures? Is all database access only through DataWindow objects? How is security enforced in the application? Is code placed directly in window functions, behind command buttons, or in non-visuals objects (nvo's)? The list can go on and on but the bottom line is that inconsistencies cost time, stability, and maintainability.

Many of these issues will be determined by the project architects, DBAs, technical leads, and project managers. Hopefully, documentation exists that can be shared by the team members. Hopefully, someone does code reviews and enforces the standards that were developed. And, if any of these are missing, you may be able to add input to help make sure that they are addressed, or at least understand why they are not.

PowerBuilder tries to do its part with regard to naming standards. In the DataWindow painter, select Design| Options|Prefixes to see suggested DataWindow object naming prefixes. Other modifiable naming conventions are available from the Design|Options| Prefixes1 and Prefixes2 dialogs when you're in the script painter. In the User Guide, there are sections regarding naming conventions for objects, variables, user objects, and controls. Consult the index and look for naming conventions. If you don't have the User Guide, you can reference it online at www.sybase.com/support/manuals and select PowerBuilder from the product dropdown in the middle of the page. It's a good idea to use the PowerBuilder default prefixes since these are generally accepted standards in most PowerBuilder shops and projects.

One last note about naming conventions: Don't use naming conventions that are applicable to one tier or technology of your application in another tier or technology without good reason. Each technology or tier already has a fairly well established naming convention. It's very confusing and frustrating to find non-standard naming conventions. For example, while it's standard to find a variable named li_ReturnCode in PowerBuilder, using this same name in a stored procedure or Java code is nothing short of ridiculous.

While naming conventions propose a method of identifying object types and functions by their name, coding standards and style affect how the code looks. Are language keywords in all caps (e.g., IF ... THEN ... ENDIF)? Do variable names use underscores or capitalize the initial letter of each word in the variable name (e.g., ls_last_name or ls_LastName or ls_lastName)? Do objects have the associated application as part of the name (e.g., w_genapp_sheet or w_sheet)? How are parentheses to be demarcated (e.g. if (a < b) then or if( a < b ) then or if(a<b) then)?

Since coding standards and style are often the cause of wars, I certainly won't be so bold (read: stupid) to propose a particular standard or style. Whether you want to code in typical PowerBuilder fashion or in a Java-like style, or something else, the key is to develop a standard to maintain consistency.

You'll inevitability have to maintain or enhance someone else's code at some point in the project. It's so much easier when naming conventions are the same and coding styles are, at least, similar.

Frameworks
Frameworks are tricky. Well, hopefully, not the frameworks themselves, although, some certainly are. Whether to use a framework is the tricky question.

Frameworks, in theory, are wonderful things. They provide functionality that all applications need and let the developer concentrate on coding the business logic and user interface. Sometimes frameworks try to do too much and become behemoth-like and difficult to understand and use. Sometimes, frameworks do too little and don't provide any real value. Sometimes, a framework forces a rigorous methodology on developers that becomes more trouble than it's worth.

About Steve Katz
Steve Katz is a senior developer at HSBC Bank USA and has extensive experience developing applications utilizing PowerBuilder, Java, and other technologies. He has used PowerBuilder since v2.0a, taught at Techwave, and even wrote some articles about PowerBuilder a very long time ago.

YOUR FEEDBACK
PBDJ News Desk wrote: PowerBuilder: Standards, Standards, Standards Welcome to a new column in PBDJ. In this column, we'll discuss all things 'new' in PowerBuilder - from keys to success in starting new projects to tips and techniques you need to know to features in the latest, and upcoming, releases of the product.
PBDJ LATEST STORIES . . .
Sybase, Inc. (NYSE:SY), a leading provider of enterprise infrastructure, mobile software, and mobile services, today announced that Terry Stepien, President of Sybase iAnywhere, will present on behalf of the company at the UBS Global Technology and Services Conference. The presentation...
Sybase 365 manages inter-carrier messaging services for more than 3 billion of the estimated 3.7 billion mobile subscribers worldwide, and for more than 700 mobile operators worldwide. Sybase 365's systems process more than 100 billion messages annually. With responsibility for over 80...
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...
As in prior years, the first thing I'll cover is what has changed (assuming that you attended in the past few years). We're back at the Mandalay Bay in Las Vegas. Near as I can tell, if you have to be in Las Vegas, this is the place to be. About the only complaint I had last year was t...
Recognizing that information technology is pervasive in today’s business organizations and is changing the way businesses function across virtually every industry sector, Boston University's School of Management created a unique dual degree program – the MS·MBA. This program fuses...
Up until recently, Web applications were "connected-only" applications. Users could only use the application by connecting to the central server and all data access was done in a single place. For many years, people accepted that was the limitation of Web applications. But it isn't a l...
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

Sybase 365, a subsidiary of Sybase, Inc. (NYSE: SY), the global leader in mobile me...