Wednesday, January 29, 2014

Insufficient Storage Available errors on Android

Mostly just a note to self.  Apparently since the 4.2 update, you can get "Insufficient Storage Available" errors when updating apps on Android when there is plenty of free space available.  The solution is to enter "*#9900#" on the phone keypad and then select "Delete dumpstate/logcat".  For further info, see this thread:

http://stackoverflow.com/questions/16818049/insufficient-storage-available-even-there-is-lot-of-free-space-in-device-memor

Tuesday, January 21, 2014

FAQ: How can I send SMTP from PowerBuilder

PowerBuilder's only native method of sending email is through Simple MAPI, which is very limited.  In particular, the approach was hampered quite a bit when Microsoft introduced security enhancements which resulted in security warnings being generated anytime Simple MAPI was used.

The most popular approach for addressing this has been to use SMTP to send email instead.  There are quite a number of third party tools that can be used to accomplish this:

  • Topwiz Software's EmailSMTP is a PowerBuilder non-visual user object that uses Windows API calls to send SMTP.


  • This blog post explains how to create a .Net assembly that can then be wrapped via a COM Callable Wrapper and called from Classic PowerBuilder.  The blog article uses Visual Studio and C# to create the assembly, but the assembly could also be created using PowerBuilder.Net.  The STMPClient.zip file in these PowerBuilder Samples on Google Drive is an example of doing just that.


  • Many databases have build in features for sending email such as SQL Anywhere's xp_startsmtp / xp_sendmail, Oracle's UTL_SMTP or UTL_MAIL, Microsoft SQL Server's Database Mail, etc.  Therefore, it is quite feasible to create a stored procedure in the database that handles email transmission and simply have the PowerBuilder client invoke that.

So, where do we go from here (e.g. WebForms)?

As you're probably already well aware, the .Net WebForms target was removed from PowerBuilder beginning with the 12.5.2 maintenance release.  The reason it was removed was because of a third party control that was implemented in the later versions of it (11.5.x, 12.x, and 12.5.x) which SAP is no longer authorized to distribute.  As a result, they had to pull it from the product as well as remove any EBFs or maintenance releases that contained it.


FAQ: What are my source control options for PowerBuilder

Source code control is used for one or more reasons:

     1.  To provide for a single common location with a master set of the source code being developed.
     2.  To provide checkin/checkout capability to ensure that two developers do not attempt to make incompatible code changes at the same time
     3.  To provide a history of source code changes.  This helps for instance by allowing changes that were done in error to be more easily reverted.

Prior to PowerBuilder 6, the source control options available from within PowerBuilder were limited.  This was primarily because a custom driver had to be created that enabled PowerBuilder to talk to the target source control system. Everything changed with PowerBuilder 6, when PowerBuilder implemented a standard API based upon the Microsoft Source Code Control Interface (MSSCCI).  In PowerBuilder 8, a PBNative option was added to provide an out-of-the-box source control option.  However, PBNative provides "minimal" source code versioning capability.

Note that no matter what source control option you use, you should - at least within PowerBuilder Classic - use the source control menu options provided within the PowerBuilder IDE.  That is because the PowerBuilder Classic IDE does not store individual source code files at the operating system level, but instead stores them in PowerBuilder libraries (PBLs).  Attempting to add the PBLs to a source control system has significant limitations, including restricting checkin/checkout capability to a PBL (preventing other developers from working with any objects in the library that you aren't working with) and dramatically limiting the ability to do version comparisons between edits.  The PowerBuilder.Net IDE does store individual source code files at the operating system level, and as a result your source code control options are much more open and beyond the scope of this article.

Source code options for PowerBuilder Classic fall in three general categories:

1.  Using PBNative:  This is the out of the box solution.  Note however that while it does provide for checkin/checkout capability to prevent more than one developer from editing the same source code at the same time, the approach provides little support for code versioning,

2.  Using a source control system that supports MSSCCI.  Once the client for such a system is installed on the workstation that PowerBuilder is installed on, the vendor should appear in the drop down within the PowerBuilder IDE for available source control systems.  There are a number of such systems available.  Two of interest because they are specifically designed for use with PowerBuilder are WizSource and PowerVSC.  Historically (even prior to PowerBuilder 7) vendors such as PVCS and ClearCase were very popular.  Other systems that support MSSCCI include Team Foundation ServerPlastic SCMSurround SCM, and SourceAnywhere,

3.  Use a non MSSCCI source control system for which there is a MSSCCI bridge product available.  A number of newer source control systems that do not support MSSCCI have become very popular lately.  Historically, CVS was a popular option, and more recently SVNGit and Mercurial have become very popular.  Such products can be used for source control from PowerBuilder provided there is an add-on utility that will convert the MSSCCI calls that the PowerBuilder IDE makes into the calls that the target source control system does understand.  Some available 'bridge' products include:



Git:    PushOK Git

Mercurial:  Currently the only know MSSCCI products for Mercurial are Visual Studio plugins that will not work with PowerBuilder.

FAQ: How do I learn more about using PowerBuilder?

  • The PowerBuilder Development Center,   Thediscussions blogs, and documents like this one are one way to learn more about using PowerBuilder.  There are a number of other options as well:
     
  • ELearnIT offers online video series with workshops.  More personalized training is also available through GoToMeeting or onsite training. 
  • PowerBuilder.TV offers a number of PowerBuilder related webinars monthly and has an archive of previous webinars. 
  • SAP has a Database and Tools Academy on Youtube with a number of videos on using PowerBuilder. 
  • For 20 years, the PowerBuilder Developer's Journal printed a monthly magazine with articles about PowerBuilder and related technologies.  The magazine ceased publication in early 2013, but archives of many of it's articles are available online. 
  • ISUG-TECH is the international SAP user group that focuses on technical users.  They offer a monthly magazine that includes PowerBuilder, a special interest group forum for PowerBuilder, a discount on ELearnIT training reference above as well as local user group meetings and conferences.

Friday, December 20, 2013

PowerBuilder User Group Germany

These are my notes from the PowerBuilder User Group meeting in Walldorf Germany on December 3, 2013, originally posted on my personal blog site.

Robyn Chan - Senior Vice President - Head of Mobile Platform
Michael Redford - PMP Business Information Technology, Products and Innovation

PowerBuilder 15
  • 32 and 64 bit support
  • OData
  • SQL 2012
  • Oracle 12
  • Windows 8
  • .Net 4.5
  • Dockable Windows

Beta builds are ready now, but access to it is still being figured out.

  • PB 15+
    • Open APIs eg objects like ORCA, IDE infrastructure/painter, build process
    • Hana XSE support for PowerScript ( XSE is their JavaScript like app server language)
    • HANA Cloud (HEC, Neo AWS) and on premise options
  • Evaluating
    • RDL (River Definition Language) support for PowerScript (intermediate layer, platform agnostic)
    • WebApp Toolkit for multi-channel development (internal name - not announced yet, web based IDE, AppDesigner, AppBuilder, the latter was developed by the PowerBuilder team to create mobile apps, SAP UI5 -- HTML5)
    • Client SDKs for NVOs - Typical PB app is 30% business logic in the client.  The audience thought it was a lot higher.

PowerBuilder.Net versus PowerBuilder Client
  • Looking at trying to get into one IDE

Plan to support JavaScript in IDE
  • Yes, that was what support for XSE was intended to convey

EAServer - what happened to NetWeaver integration
  • Couldn't put on slide - Looking at migrating PASP to Netweaver - probably wouldn't focus on other app servers

What about support contracts
  • That's one of the big questions they're working on.   The other is that existing SAP customers have an S-user account.  They're trying to figure out how to automatically give people S-user accounts so they can access the beta without going through the S-user creation process.

More on the state of HTML5 development

Specifically with regard to mobile applications.  It's beginning to look like HTML5 may work well for desktop web, but native is more appropriate for mobile devices.
"The promise of HTML5 is you write once, run everywhere and this is not happening because of the divergence of browser features." HTML5 does not offer the performance and access to native features that a native app can.
"We're going to see HTML5 relegated to just a small portion of apps," including forms, content consumption and customer acquisition apps, said King. Native will be for everything else,