Desktop Programming 1
Following Dr. Johnson, it is tempting to say that it is useless to define a desktop program because everyone knows what it is. But for our purposes let’s say the term refers to any program that does not need a browser to run on your computer. This is a useful definition since when contemplating the creation of a new program the decision of whether the program should run in a browser or not is a key first decision.
The great advantage of a web application is that it needs to be installed only once, on a server that is connected to the internet and can be accessed by a browser. A related advantage is that updates need be done in only one place – the server. The minute a new update is installed on the server it is available to everyone who uses it 2.
So if the new application should be a web application if the following apply:
- Needs to be used by many people at different and/or changing locations and computers.
- An internet connection is ordinarily at hand for the user
- Security of data is not an overriding issue.
If on, the other hand, the application needs to be run on only a few computers, or on a local area network, where it can be installed on the network server and accessed by everyone on the network, a desktop program can be considered. So the question is why develop your application as a desktop program?
- One obvious answer is that you may not have access to the internet
- Another is that security is a major issue. Any web application is to some extent open to the world and susceptible to being hacked. In a desktop application it is easier to protect your data and program.
- Connectivity is an issue with a web application. Poor internet connectivity or unreliable connectivity can be a big problem with a web application
- Performance. A desktop application, especially one that can be compiled to native machine language, can be made to run faster than any web application
- Functionality: A desktop application does not have to contend with limitations imposed by a browser and can be slicker in its design and performance 3.
Most desktop programs use and store data kept in a database. Some development tools, such as Microsoft Access or Visual Foxpro come with their own specialized database but even these, along with those developed using other tools, can be made to use local or remote databases such as Microsoft Sql Server, MySql. DB2, Oracle and many others.
This latter point is important since it is easy for a novice to make the mistake of assuming that you need a web application to make use of remote data. This is not true if the computer has an internet connection a desktop application can access the same data as a web application. In fact it is sometimes useful to develop an application in which most users use the web to access the data but others, such as administrators, use a desktop application.
Enough of this! This is not the place for a comprehensive reference to computer programming. Our purpose here is to tell you what we can do and describe the pros and cons of the different development choices offered by Cambria.
This is a wonderful tool for getting a database program up and running fast and has support even for a non-skilled user to quickly create a variety of reports in the least time. It comes with its own database but when the database needs outrun the capabilities of this database4 MS Access has a wizard that fairly easily allows a user to switch to Microsoft SQL Server. This tool is limited to Microsoft operating systems and requires Microsoft Office to be installed.
Delphi programs can be compiled to an “exe” file that will execute as fast or faster than a program built with any other tool. Moreover it does not require an installation program. The compiled file can simply be copied to the computer and used immediately. It is a descendant of the venerable Turbo Pascal product brought out in the 1980s and its continued popularity speaks highly of its capabilities. As a practical matter Delphi programs are limited to Microsoft platforms.
This tool introduced the concept of an interpreter within which the program runs. The interpreter (the “Java Virtual Machine”) is one that is made for specific operating systems with the result that a Java program can run on many platforms – Windows, Macintosh, Linux etc..if the proper interpreter is available. This is an obvious candidate for writing a program that needs to run on many types of computer 5. It was a sensation when introduced in 1995 and the approach taken has since been copied by, for example, Microsoft .NET. The fact that the program uses an interpreter as a middleman, so to speak, has disadvantages as well as advantages and this is not necessarily a good choice if the program is to run on one type of operating system where speed of execution is important.
Most of us think of .Net for Web Applications but it is also a tool for developing desktop programs. As Microsoft says the .NET Framework is their platform for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes. By providing a comprehensive and consistent programming model and a common set of APIs, the .NET Framework helps developers build applications that work the way clients want, in the programming language you prefer, across software, services, and devices.
This language was developed in the 1980s as a competitor to the older and at the time very popular dBase2 and came with its own database. By virtue of superior performance and ultimately the support of Microsoft who purchased it, this application essentially replaced dBase2 and became very popular as a choice for developing complicated database applications. At one time it was the single biggest programming tool in use by Cambria. For a number of reasons rooted in its 1980s origin this tool has gradually lost favor and today Cambria’s FoxPro efforts are mainly in the maintenance of old programs. It should always be kept in mind that if a program is working for you, and many fine FoxPro programs have been written, there is never a reason to rewrite it in a language that is currently trendy.
1 This is not the place to define terms whose meaning is readily available to anyone who can use google so please forgive the cursory treatment given below.
2 Like many things in the computer world there are grey areas. A desktop program when run on a computer connected to the internet can be made to access a central server where it can automatically upload the latest version of the program. This to some degree mitigates the advantage that a web application has in maintain the software.
3 Such tools as Ajax have been developed for use in web applications to mitigate this desktop advantage but the advantage still exists.
4 Performance degrades when the access database is too large or when more than 20 or so users are using it at the same time. Also security is an issue.
5 In practice things are not quite so rosy and to run, and look, properly on both a Mac and a PC, for example, the programmer often needs to spend time tweaking the code in order to optimize it.