Search My Blog

Thursday, April 19, 2018

STD Framework - PowerBuilder to Java Example!

** New Feature **

STD Integrated Framework

PowerBuilder to Java Interop!

 

    Software Tool & Die Inc. (STD) are pleased to announce the release of the updated PowerBuilder to Java interoperability example application (PB2Java)! The updated PB2J example (2018R1) application is also built from the latest STD Integrated Framework (version 2018.2.0.97 released on 2018-03-11) and the newest Appeon PB2017R2 release (build 1769). Now the ability of a PowerBuilder Classic based application to "consume" a Java class and call its methods is even easier than before and totally encapsulated into the STD Integrated Framework for PB developer productivity!

    The PowerBuilder IDE since early 2000 has had the ability to call EJB (Enterprise Java Beans) due to the introduction of the Java based Application Server by Sybase named EAServer. With EAS came the ability to call a remote EJB in any J2EE based application server by using RMI (remote method invocation) that was exposed as the "Home" interface. The EJB Home Interface though can be either local or remote in nature. Thus when dealing with a native MS-Windows PB application that has Java classes deployed along side of it, we can use the local Home interface to interact with it from a PB application. This is, as long was we expose the Java application as an EJB (that is .. follow the EJB construction rules).
   When the Java developer creates a Java class, they can also create a Home interface or what PowerBuilder would refer to as an EJB "proxy". A Proxy is a Class/Method signature that allows PB to treat the Java application as a "bean". According to the generally accepted definition of a Java proxy is as follows: "A proxy class is a class that implements a list of interfaces". Since CORBA (Common Request Object Broker Architecture) support was added to PowerBuilder a long time ago - PB understands "proxies" very well. So if we can get your PB application a list of proxy classes it needs to deal with an EJB, it can then communicate with it. First of all, we can build a Java Class and then build a HOME interface for that using your standard development environment - even "notepad" for us poorer folk. Once completed, you can just compile the EJB class and its Home class using the JAVAC compiler, as follows:
  Now that we have an EJB and a Home class to serve as a "proxy" road-map for PowerBuilder, we can use the Classic IDE to build the necessary interfaces for us in a PowerBuilder Library (PBL) to use in our application. To perform this step, we need to call on the IDE's Project Painter to help us with this task. When creating a new project, we can then select EJB Client Proxy option. This will build a a PB Project object that can build all the necessary proxy interfaces for you. All we need to do is specify the Java Bean  class and its HOME (interface) class to the proxy painter. for example:

  Once the EJB Client Proxy project is properly configured, the next step will be to run the project, as follows:

    Now that we have the "proxies" required for the Java interface (Home) class, we can now instantiate the EJB by using its proxy in your PB Application. The only challenge beforehand, is loading the Java Virtual Machine (JVM) and activating its JNI (Java Native Interface) JDK to inter-operate with your Java EJB. Luckily, this is where the STD Integrated Framework steps in to help you. All you need to do is call a new "of_create_instance" method in the Application Controller supplied by the framework and it will perform all of the JVM the house keeping for you including: loading, reusing, unloading, garbage collection, etc of the PB to JVM infrastructure! So now the PB Developer can just concentrate on using the EJB's methods & processes, for example:
 
  To make this easier to follow, STD have created a working example of this PB to Java mechanism for you to examine, learn and move forward with your organizations Java interoperability within your PowerBuilder project. You can download the PB2Java example built from the STD Integrated Framework by clicking here!
   
Enjoy!

Regards ... Chris

Tuesday, April 17, 2018

PowerBuilder Presentations

** Hot News Item **

PowerBuilder Presentations Online!


    Over the years, I have amassed and presented on a various plethora of PowerBuilder related topics to various PowerBuilder User Groups and Conference attendees. I still receive many requests for copies of these presentations. Thus, I have decided to create an area on the Software Tool & Die (STD) Framework project area of the Source Forge website that will represent a collection of these presentations on various topics for the PB Community to peruse and download for free.

    The new presentation area on the STD Framework Source Forge website can be accessed here!

Enjoy!   

Regards ... Chris

Sunday, April 15, 2018

STD Framework - Multi-Thread Example!

** Hot News Item **

PowerBuilder - Multi-threading Example!


    Software Tool & Die Inc. (STD) are please to announce the release of an updated example PowerBuilder application that utilizes the STD Integrated Framework to implement multi-threading! The multi-threading feature is PB has been around since version 5.0 of PowerBuilder when the Distributed PB feature was first introduced. However, it is not a well documented and known feature of the development tool. The STD example even goes further in that it allows the application to utilize the vast resources exposed by the STD Integrated framework to even take multi-threading to a much higher functional level.
    The updated Multi-thread example application now utilizes the STD Integrated Framework (version 2018.2.0.97 released on 2018-03-11) and the newest Appeon PB2017R2 release (build 1769.

Note: The STD Framework is the only PB framework in existence that is thread aware and multi-thread safe!


    The Integrated framework allows each thread to be monitored by the frameworks performance dialogue, write to the O/S Console, log a message in the main tread's application log, share DBMS access, send messages back & forth between threads or between the main thread and its sub-threads, introspect the O/S, etc - just to name a few interesting aspects. Messages may also now be written to the MS-Windows Event Log and Debug logs as well from each sub-thread!


  The STD multi-threaded PowerBuilder example application can now be downloaded from the SourceForge website. Please click here to download & enjoy!
  

Regards ... Chris

Thursday, April 12, 2018

STD Framework - Updated BASE64 Example!

** Hot News **

STD Foundation Classes

Updated BASE64 Example Application released!

 

     Software Tool & Die Inc. today are very pleased to announce an updated Base64 Encoding / Decoding example application for Appeon PowerBuilder that was built from the latest STD Integrated Framework (version 2018.2.0.97 released on 2018-03-11) and the newest Appeon PB2017R2 release (build 1769) ...
 

     Base64 encoding and decoding is a critical  feature when processing XML and JSON files that contain binary datum. As well as using PowerBuilder's PBDOM feature, an XML DataWindow or interacting with Web Services that pass binary data back and forth (ie: JSON in a RESTFul web service). The received binary data will be in base64 encoded format - which is unusable to your PB application unless decoded (converted back) to its original binary state. Conversely, binary data that your PB application needs to send to other XML or JSON based applications must be converted (encoded) into the base64 standard.

    The Base64 Example application utilizes standard Microsoft Base64 API's supplied by the MS-Windows O/S. These API's are now embedded in the framework's "nc_crypto_master" object class and easily called from your PowerScript code, as follows:
  • lo_crypto.of_base64_stringtobinary ( lblb_image , ls_base64 )

    The Base64 Example - along with the STD Integrated Framework - is also written to support the PowerServer Web product. Thus, the Base64 Example application can also be deployed to your favourite Web Browser and executed as a web application as well.

    You can download the Base64 Example application from the STD Framework's website by clicking here! You can also download either of the free open source STD frameworks for PowerBuilder, PowerServer and Web Services by clicking here!

Enjoy!

Regards ... Chris

Tuesday, April 10, 2018

STD Integrated Framework - TCP/IP Example!

** Hot News **

TCP/IP Programming

New Socket Application released!


        Software Tool & Die Inc. today are very pleased to announce a brand new MS-Windows Socket (2018R1) example application built with the latest STD Integrated Framework (2018R2). This latest release of the Socket application is also built using the Appeon PowerBuilder 2017 IDE  ...

Client Application - Ready to send DW object & buffers


         The STD Socket example application demonstrates a significant enhancement to the the PB developer's toolbox! The Socket example showcases the TCP/IP features in the STD Integrated Framework and more importantly returns the power of Distributed PowerBuilder back to the application developer. The TCP/IP socket support in the STD Frameworks is based on the work by Tom Cervenka's Sockets objects (written in pure PB, dating back to the PowerSoft days) that utilizes MS-Windows socket API's for FTP'ing files between servers and/or peer-to-peer communications.

Server Application - Receiving DWO and buffers from sender

    You can download the new STD Socket example application from the STD Framework's website by clicking here to get more productive in peer-to-peer communications with PowerBuilder!

 
Enjoy!


Regards ... Chris

Friday, April 6, 2018

PowerBuilder 2017R2 - MS-Windows Explorer

** Hot News **

Windows O/S Explorer


    Software Tool & Die Inc. is please to announce the release of its new MS-Windows O/S System Explorer utility all written in PowerBuilder 2017R2 - build 1769! This utility demonstrates the power of using the STD Integrated Framework plus MS-Windows SDK calls to locate every running application, process, service, etc running in the entire operating system. The latest release contains the following upgrades ...
  • Migrated the code base to Appeon PowerBuilder 2017R2 Build 1769
  • Updated the STD Integrated framework to the latest release (2018R2 Build 97)
Win 32/64 WinExplorer running on W10

     This release is also already ready for deployment as a Web Browser or IWA (Installable Web Application) based application utilizing the PowerServer software. With the combination of the STD Integrated  Framework plus Appeon PowerServer - the MS-Windows Explorer application will now function in either the Internet Explorer, Opera, FireFox, Chrome or Edge web browsers.

WinExplorer running as a Web App on MS-Edge!

     Unlock the "Power" in PowerBuilder and download this free PB Classic utility application. Check out the prowess of the Integrated framework assisting the Windows Explorer application - click here to download!

Enjoy ... Chris

Tuesday, April 3, 2018

Appeon PowerBuilder 2017R2 - Script Commenter

** Hot News **

STD Foundation Classes

New Script Commenter Application released!

        Software Tool & Die Inc. today are very pleased to announce a new Script Commenter (2018R1) application for the new Appeon PowerBuilder 2017 IDE. This latest release of the Script Commenter application is also using the latest STD Integrated Framework (2018R2)  ...


PB 2017 IDE using the Script Commenter!

         The STD Script Commenter is a significant enhancement to the way a PB developer works productivity wise by easily allowing code comments to be added to any object class in the current object painter's PowerScipt or declaration areas! The Script Commenter is based on the original commenter application by R.C. Sizer but has been totally refactored. The latest release includes the following new features ...

  • Migrated the App code from PB 2017 build 1666 to PB 2018R2 build 1769
  • Updated the STD framework to release 2018.2.0.97 (2018R2) ... March 29, 2017.

Mapping the Script Commenter in the PB 2017 IDE

    The new Script Commenter is designed to work with any Unicode version of PowerBuilder (v10.0 through 2017). It can be activated in any PB IDE by creating a toolbar short-cut icon and assigning to the EXE as follows:

app path\ScriptCommenterXXX.exe  header
  - or -
app path\ScriptCommenterXXX.exe  block
  - or -
app path\ScriptCommenterXXX.exe  inline
  • where XXX = Compiled type 32M, 32P or 64P 

     The values added as a header, in-line or block comment are located in the "Comment_Block.ini" file. This file can built based on the values found in the "Comment_Template.ini" file and is customizable by the PB developer!
    You can download the new STD Script Commenter application from the STD Framework's website by clicking here and get more productive!

 
Enjoy!

Note: The previous PB12.1/PB2017 Script Commenter versions are in the Archive sub-folder.

Regards ... Chris

Sunday, April 1, 2018

Elevate 2018 Conference

** Hot News **

Appeon Elevate 2018 Conference

  

      Appeon will be holding their annual conference this year in November, 2018. The conference will be located in Philadelphia, Pennsylvania, USA on November 5th through to 7th, 2018 inclusive. Appeon is now extending a call for presentations and presenters. For more information on the 2018 Conference, how to present, etc - please visit the Elevate 2018 website.



Regards ... Chris