Description
Here is a description of the Universal Converter demo.
The Universal Converter is a collection of APL+Win conversion utilities which help convert "anything to anything" (Celsius to Farenheit, Miles to Kilometers, etc.) At least it will evolve to that since only a limited number of conversions are available in this version.
The Universal Converter may be useful just as an application and you may call it whenever you need to do some conversions, but it is also a demo of a new technology.
The Universal Converter is a .Net C#/APL+Win Client/Server Web application.
The User Interface is a C# application.
The Login system and all the business logic (the conversions) are perfomed on an Internet Server by APL+Win.
The application is deployed with the Microsoft .Net ClickOnce technology, i.e. you click on a link on a Web page and the rich client Universal Converter application opens up on your computer without any files installed on your machine.
There are a couple of prerequisites to be able to use this application though.
How it works
- you click on a link on a Web page
- the Universal Converter application opens up on your system within a few seconds
- it is a rich client (Windows Forms) application, not a poor client ASP or ASP.Net application!
- no files are installed on your computer when you load the Universal Converter
- when you work with the Universal Converter, clicking on buttons, typing data in TextBoxes, etc. C# remote objects are used on the remote Server and they run APL+Win functions on the Server, use APL+Win component files, read APL+Win variables, etc. and return the results to the C# client application
- the client application displays the results and really work as if it were a pure local Windows application on your computer
How fast it is
This demo shows how fast this C#/APL+Win Client/Server technology can be: for example, as you type characters in one of the Universal Converter conversion Text Boxes in the second tab, for each character you type:
- the content of the TextBox is read by C#
- it is converted to numeric
- it is sent to the remote C# objects
- it is transfered to the right APL+Win conversion routine by the remote C# objects
- this APL+Win conversion routine is run and converts the data
- the result is returned to the C# remote objects
- the C# remote objects return the result to the client application
- C# formats the result in the client application
- the result is then displayed in the other conversion Text Box
If you try out the Universal Converter, you'll see that this works incredibly fast, almost as fast as you can type in the TextBox (at least it does for me here).
Similarly, when you select a Conversion Type in the combo box, C# runs an APL+Win routine on the Server which returns the code of the APL+Win conversion routine to be used and it displays them in the client application. This also is almost instantaneous.
When you Login to the Universal Converter, an APL+Win component file is used on the Server. Etc.
Conclusion
The conclusion of this is that:
- it now is possible to efficiently port an APL+Win application to the Web
- this does require rewriting the User Interface in C#, but this task is quite modest as far as only the User Interface is concerned: C#/Visual Studio is really well adapted to do that easily
- the APL+Win application business layers (calculations, algorithms, etc.) and data layers (APL+Win component files, native files, colossal files) remain in APL and work on the Server
- making C# call APL+Win functions, passing any nested array to them and returning any nested array, is really simple once the basic layers are in place
Of course, it is also possible to not involve a Server at all in this process and to simply write a C# User Interface application which call APL+Win on the local machine, whenever needed.
Advantages
The advantages of porting an APL+Win application to the Web, in the way described above, are numerous:
- no need to create an installation program
- no deployment needed on the Client computers
- possibility to share files with all users
- users can use the application immediately, anywhere in the world as long as they have an Internet connection
- when updating the application, no need to send installation CDs or ask customers to download and install an upgrade: you just need to update an APL+Win workspace on a Server after testing on your local development machine and/or to publish (i.e. upload) the new version of the User Interface to your Server