Curl Enterprise Framework: refactoring and sub-applets

At LogiqueWerks I have replaced the first Curl 6.0 revision of Paul Sheehans ‘Curl Enterprise Framework’ by a slightly re-factored version which uses only the documented sub-applet API’s of Curl 6.0

The original code accompanying the book ‘Enterprise Curl‘ relied on a package ‘IPC’ for inter-process communication which relied on largely undocumented Curl internals. One problem not solved in the port of the framework to Curl 6.0 was that of communication with such transient items as the ’splash screen’ when launched from HTML so as to avoid

Error: InvalidAppletException: Unsupported content-type 'application/octet-stream'

arising from the internal Curl call to Applet.load-next-aux

In the most recent refactoring, launching ‘enterprise-parent.curl‘ results in parent-child calls between that applet and the AppletData of enterprise.curl. However, launching ‘enterprise.curl’ from HTML proved more of a challenge. To allow a simple callback, the package ‘logon’ has now moved within the ‘VMS-MOTORS’ package as has the one ’splashscreen.scurl’ formerly located in a SERVICES package.

In the case of ‘enterprise-parent.curl‘, a parent-callback is used to launch the logon dialog once the splashscreen has run its course. In the case of embedding in ‘enterprise-curl.html‘, the child applet is controlled from a JavaScript function with a call to ‘applet_invoke‘.

The one drawback is that now the Help menu cannot call upon the same SplashScreenManager class to provide the ‘about’ dialog.

The framework is now reduced from 13 to 11 packages. The logon.scurl arguably belonged with the SplashScreenManager in the application code found in VMS-MOTORS where both now reside so as to avoid circular imports from the WINDOWS package.

While the splash screen for ‘VMS MOTORS’ may not be the best illustration of the sub-applet model in Curl, the upside is that there is now a working example which does not use imports from CURL.REMOTE or make explicit reference to ‘remote-connection’ and undocumented Curl such as
{import * from CURL.REMOTE}
{define-remote-class public abstract open ParentInterface
{define-remote-proxy-class ParentProxy}
{define-remote-yxorp-class ParentYxorp}
{remote-method public abstract open {mention-string str:String}:String}
}

But what is available by running ‘enterprise-parent.curl’ with a breakpoint at
set ad.applet-invoke-ready-callback
in the Logon method
{method public {startup-with ad:AppletData}:void
is a view of the underlying sub-applet API features of Curl 6.0 such as
the connection – a TunnelRemoteConnection
the proxy – a TunnelRemoteProxy
none of which are exposed in using only the published API found in the IDE documentation and illustrated in the IDE extended examples.

The LogiqueWerks page also has a link to the example ’shape.curl’ and the various JavaScript tips to be found in ’shape-parent.html’ for the use of AppletData.

The new EnterpriseFramework code now contains an example of a subclass of AppletHistory which might also be of interest.

Several cosmetic features of the example UI for ‘VMS MOTORS’ will see a re-work in the days and weeks to come as my work commitments permit.

Leave a Reply

You must be logged in to post a comment.