Thursday, September 13, 2012

On Cross platform development

I have been looking at suitable platforms for cross-platform application development. While there are many such available, including Java, I was more interested in a write-once-compile-anywhere kind of platform. Since I have kept in touch with most of these stuff over the last 8years, I narrowed the list to two specific platforms
1. wxWidgets/C++
2. Lazarus/Object Pascal.

I could have used wxPython but I needed a compiled app rather than a scripted/virtual machine based app. The reason is that the application was likely to be closed source/proprietary till it made sense to open source it. This ruled out Java and Mono/.net since decompilation was fairly trivial.

In terms of elegance, of all the programming languages I have learnt I consider the worst to be BASIC and the second worst to be COBOL. But the language I really like for its elegance has been Pascal. I still remember writing a simple console-based banking/financial application in my second year of engineering in less than a day. The application even had those command line menu kind of interface (using Turbo Pascal) and the entire code (as far as I remember) was less than 2000 lines of code. For those guys who do not believe it could be possible, well you should visit Mike Wiering wrote a Mario clone for the PC which became quite famous. The entire compiled code with 256color VGA at 320x200 was less than 256kBytes.

During my final year, at one time I even contemplated using Delphi as my primary RAD platform. But then I shifted over to working with embedded systems. got into an MS and then PhD program during which time I started working on speech/signal processing. I wanted to program a cross-platform speech/voice source analysis application to go along with my electroglottograph (

I have been following Lazarus since the 0.9.1 version (2004), and the 1.0 version was released last month. It seems to have become quite stable and a number of applications have been developed using it. However I had not coded in Pascal since 2002 and so I decided programming simultaneously in both, till I found one faster to code than the other. Strangely it took me just a glance at couple of Pascal programs for me to recollect the syntax. One of the features of Freepascal which Lazarus uses is that I can use C libraries as units in my pascal code. Since I am more comfortable coding in C/C++ especially for signal processing related applications this is a very useful feature.

So at this stage I am stuck between deciding on the two. Hopefully I may not have to. Both can co-exist for different sets of applications. Anyway I think the following criteria will finally help me decide
1. Stability
2. Ease of use
3. Speed of development
4. Available libraries

No comments: