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

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