Open Source Cloud Authors: Liz McMillan, Elizabeth White, Flint Brenton, Jason Bloomberg, Yeshim Deniz

Related Topics: PowerBuilder, Linux Containers, Open Source Cloud

PowerBuilder: Product Review

New Features in PowerBuilder 11.5

Part 1 – User Rights

I plan to make this the first of a series of articles that discuss the new features in PowerBuilder 11.5, which was released late last year. Of course, they won't be the first articles we've run on the topic, as we ran an article on the new Code Access Security features back even before 11.5 was released and a more recent article on New DataWindow Features. This series of articles is intended to discuss the major hitters of the remaining features.

FDCC Compliance
At the risk of putting my readers to sleep I'll cover the FDCC compliance first. Not because most PowerBuilder developers need or want this functionality, but because most PowerBuilder developers using PowerBuilder 11.5 are going to be affected by it nonetheless. What FDCC compliance gets at, viewed from a bigger perspective, is the issue of being able to run applications in an environment where the user has restricted user rights. It's something I deal with regularly with the applications I end up writing, because many of them are used in environments where the end user has limited rights on the workstation.

For example, in many cases the user does not have permission to write entries into most or all of the registry, and generally they will have file write capability only within their own Documents and Settings section of the local hard drive. When one of my applications is installed, it's generally done through rights elevation, either through an SMS push or by an administrator logging onto the machine to perform the install.

Some Background
There are four principal locations of the user's Documents and Settings folder structure that are of particular interest when developing applications for limited end-user rights scenarios (the name is dependent on the operating system involved):

  1. My Documents (or Documents): Somewhat obvious, the area where your app will save files that the user can access after the application finishes running (Excel Exports, Save As PDF, etc.).
  2. Application Data (or AppData): A system folder - normally hidden from the user - in which you can store small application-specific files (e.g., your application INI file). There should be a subfolder specific to your application that you store your files in. You should also be aware that there may be a limit imposed on the entire size of the Application Data section by the operating system. This is because Application Data is one of the folders that is involved in roaming profiles, so the size is often restricted to prevent the need to move large amounts of data in those profiles.
  3. Local Settings\Application Data (or AppData\Local): Another system folder, also normally hidden from the user and one in which you should have an application-specific subfolder to store your applications' files. Because this folder is not involved in roaming profiles, there is usually not a restriction on its size, and your application can store much larger files. We allow users to download the application's help file to their local machine so we can do live updates. As a result, we download it into their Local Settings/Application Data folder and then open it from there. In addition, we store a number of other application-specific files there, such as image files we can't embed into the application and our EBF PBD, so that we can add minor mods to the application without requiring a re-install of the application. The one downside is that since this folder is not part of roaming profiles, all of the files downloaded to this area are specific to that user on that machine. If you do use roaming profiles, your users would have to re-download the files on each machine they use.
  4. Local Settings\Temp ( or AppData\Temp): You cannot assume that the location pointed to by the TEMP and TMP environmental variables always point to a location that the user has write privileges to (although in most cases they will point to this folder). To be safe, you should refer directly to this folder, preferably to a subfolder (although you don't need to give it an application-specific name, since it will be purged at some point). This is the work area you would use to store temporary files only used as intermediates during application processing.

All this time I've been discussing the folders that appear under the individual users Documents and Settings folders. For example:

C:\Documents and Settings\<username>\My Documents
C:\Documents and Settings\<username>\Application Data
C:\Documents and Settings\<username>\Local Settings\Application Data
C:\Documents and Settings\<username>\Local Settings\Temp

However, there are also a couple of similar folders under the "All Users" user:

C:\Documents and Settings\All Users\Shared Documents
C:\Documents and Settings\All Users\Application Data

You would use those locations where you wanted to allow all of the users to access a single copy of a particular file, rather than each user having his or her own copy.

When you are writing your own applications and want to ensure that they will work properly in a limited end-user rights environment, the SHGetFolderPath Windows API function will quickly become your friend. Simply send in an enumerated value (called a CSIDL) and it will return the location for that particular folder. It actually handles many more special folders than we care about here; the CSIDL values that we are primarily interested in are shown in Table 1.

The exception, as noted in Table 1, is the Local Settings/Temp folder. There isn't a specific CSLID for it, although there is one for somewhat related folders (e.g., CSIDL_INTERNET_CACHE, which points to Local Settings/Temporary Internet Files). There is a GetTempPath function in the Windows API, but what that returns is the settings for the TEMP or TMP environmental variable. We've seen situations in which someone with admin rights on a workstation has set that variable to point to a location (e.g., C:\TEMP, C:\WINDOWS\TEMP) that a rights-restricted user would not be able to access logging into the same machine. As a result, it may be safer to query for a value such as CSIDL_INTERNET_CACHE and then adjust the value to get to the Temp folder.

Also of note, the MSDN documentation indicates that the SHGetFolderPath function has been deprecated. While that is the case, the new version of the function only works on a rather limited subset of Windows operating systems. For compatibility with older operating systems, you may want to consider sticking with the SHGetFolderPath until such time as Microsoft actually removes it from some future version of the operating system.

How that Affects PowerBuilder
Everything we've talked about so far has to do with applications that you write for users with limited rights. However, in some shops even software developers who use the PowerBuilder IDE are required to run with limited end-user rights. Therefore, it was important to ensure that the PowerBuilder IDE also ran properly in such environments. What this means principally is that stuff you would be able to write to that you used to find in the Program Files/Sybase folder structure has been moved to other locations. Those files generally fall into two categories: those that all users share, and those that are specific to individual users, as shown in Table 2.

While the most effect this will have on a majority of developers is to cause confusion (because they won't find files where they are most used to seeing them), it also serves as an example as to how you might modify your own applications for limited user rights. Particularly as new operating systems arrive (Vista, Windows 7) and limited user rights become more prevalent, it's something you'll probably have to deal with eventually.

More Stories By Bruce Armstrong

Bruce Armstrong is a development lead with Integrated Data Services (www.get-integrated.com). A charter member of TeamSybase, he has been using PowerBuilder since version 1.0.B. He was a contributing author to SYS-CON's PowerBuilder 4.0 Secrets of the Masters and the editor of SAMs' PowerBuilder 9: Advanced Client/Server Development.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

@ThingsExpo Stories
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its Call for Papers is now open. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Financial enterprises in New York City, London, Singapore, and other world financial capitals are embracing a new generation of smart, automated FinTech that eliminates many cumbersome, slow, and expe...
The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER give you detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Miami Blockchain Event by FinTechEXPO also offers s...
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
Internet-of-Things discussions can end up either going down the consumer gadget rabbit hole or focused on the sort of data logging that industrial manufacturers have been doing forever. However, in fact, companies today are already using IoT data both to optimize their operational technology and to improve the experience of customer interactions in novel ways. In his session at @ThingsExpo, Gordon Haff, Red Hat Technology Evangelist, shared examples from a wide range of industries – including en...
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Rodrigo Coutinho is part of OutSystems' founders' team and currently the Head of Product Design. He provides a cross-functional role where he supports Product Management in defining the positioning and direction of the Agile Platform, while at the same time promoting model-based development and new techniques to deliver applications in the cloud.
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.