I don’t often do application development, it’s something more of a hobby. I program in PHP after learning (and developing in) numerous languages previously. However, I do like to build useful tools from time to time and, when possible, like to use the best tool for the job even if it is Automator.
Recently, I have hit upon an idea for an application that I’d like to build. I wont give away the idea here, as I think it could be quite successful, but we’ll see. It needs to connect to a database, display and interact quickly with the user perhaps showing a lot of information at any time, and work on a number of platforms. Which is why I wrote this post.
There are many ways to write programs that run on a number of platforms. These range from simple but impossible to customise through to, essentially, writing a version for each system. I’ve used a number of them, although admittedly not all thoroughly, and felt that my findings might be useful to a few of you.
Interpreted Languages
These include Java and the .Net languages. Essentially, they provide a consistent API across all the platforms that they support, but often it is difficult to get access to the more unique aspects of a system, which is probably why you chose to program for it. One last thing – the code is compiled to a middle state, run by an interpreter – the interpreter being the part that is written and compiled for each platform.
Cross-Compilers
There are some programs written that allow you to write in a single language, a single set of code, which then is compiled by the application to run on each platform for you. Often they allow compiler directions to include and exclude bits of code you want to run on specific platforms. Essentially, you can write some common core code, most of the interface, and then customise what’s left for each platform. The most fully featured example of this I can think of is RealBasic.
Web Applications
In a sense, web applications can be included in the list. Browsers have been heavily developed to work to a common set of standards, including JavaScript for the dynamic elements. Depending on the intended audience, a web application (perhaps with a custom browser/wrapper) could be exactly what’s needed, and truely programmed as a single source.
My Experiences
Let me start off by declaring my disdain for Java, as it’s obviously going to bias this article. I downloaded a number of well-respected applications in Java recently, and found that they could only run if my computer if changed from up-to-date to pretty much bleeding edge implementations of Java. But that’s not the problem for me. The problem I have is that it is overly strict, apparently to bring stability but many other languages are simpler to use without falling apart at the edges. It also forces you to provide your application with the nastiest GUI by default unless you work very hard to change it. Finally, and this may only be me, but my experience is over several years and many platforms, that it is SLOW. On the positive side, you really only have to write the code once and it is free, and truely consistent to work with.
Next up is RealBasic. I have used this a number of times, and am very impressed with it. For general applications it is perfect. It compiles to a single binary for Windows, Mac OS X and various Linux alternatives. It provides some nice customisation for each platform and most features work across platforms seamlessly. However, if you want to customise your application for a particular purpose or platform, it can be quite tricky. Also, it costs quite a lot of money for the normal consumer.
I love the idea of writing specifically for a platform, taking advantage of the features offered to the user and really making your application nice to use. With something like C++ and the appropriate libraries you can programme for almost all known platforms, and then just customise the parts that differ. Unfortunately, this can be quite a lot. Furthermore, the time taken to customise a for a number of platforms can be great… and take a lot of learning.
What if you could write a great deal of the application once, and then just customise the front end? It would be perfect, and it is possible. Microsoft came up with what seemed like a competitor to Java, but only for one platform. It’s completely contradictory, especially when they had good Windows specific languages and libraries. But, in addition to this, the code takes from Java some of the best parts – consistency, manageability, true Object Oriented structure. That’s helpful for Windows, but not for the rest of the operating systems.
So, looking for something like this I discovered Mono. Written as an open-source framework, supporting all the major platforms, it provides an alternative implementation of .Net. This, I thought, would lead to worse inefficiences than Java. Java was written with cross-platform in mind. .Net was written for Windows, and so I naturally assumed this was going to be a bit twisted to fit. Not at all. Mono is a lightweight and optimised framework, no matter which platform you use it on. This is due to the principles that Microsoft developed .Net with, it’s just a pity that they didn’t take it to its logical conclusion. The development environments for Mono are even written in Mono, meaning they largely work across platforms too.
In summary, what Mono does is provide a way to efficiently program for multiple platforms with maximum reuse and still fine grained control. Sounds a bit like Java so far, but don’t be fooled. Mono can be built to use any libraries you care to use, and simply. So, what I have found is that the large majority of my program can be written as a common source, and I can provide every platform with an individual experience. If you programme for Windows or across platforms, take a look at Mono.
Importantly, I actually am a Mac user, and still find this to be excellent, despite it’s clear priorities being Linux and then Windows. Second, the development IDEs for it are quick, simple and elegant.
Comments (1)
Software development:
Jan 25, 2012 at 06:00 AM
Software development involves creating a computer program, or set of programs to perform tasks, from keeping track of inventory and billing customers to maintaining accounts.
Software development