A Comparison of Three Programming Languages used for Windows Application Programming |
![]() |
|||||||
|
|
||||||||
|
"What is the best language to use for writing Microsoft Windows applications?" New Windows programmers often ask this question. They usually mention three languages:
Visual Basic, Delphi and C++. Before I can answer this question I need to ask "What do you want to do in your Windows application?"
The language used to implement a computer program should reflect the functions the program is to perform. For example, trying to write a
complex report using C++ is difficult. It does make sense to use C++ for report programs especially with the
availability of report writing languages. Just as difficult, if not impossible, is writing a device driver in a
report writing language. This paper will describe the reasons for using the three primary languages used to write Microsoft Window applications. Please note that I do not endorse any of these languages nor the companies that sell them. I use all three languages in my work and try to fit the proper language to the job. Visual BasicVB is good for small applications that need to be written quickly and by relatively inexperienced programmers. Not to say only inexperienced programmers use VB, but it is easier to learn and get an application running using VB. The primary disadvantage of VB is that it is resource intensive and does not easily support some programming constructs that might be required for a complex application. Visual Basic does not support pointers or unsigned numeric data types. Both of these data types are used extensively in Windows API calls.DelphiDelphi is based on Object Pascal, if you know Pascal and understand object-oriented concepts, you can write a fairly complex application quickly. The documentation is weak in describing object-oriented concepts using Object Pascal. If you want to write in Delphi, get a good book (there are plenty available at your local bookstore.)Delphi is compiled to executable code, it is more efficient that VB. Because it is compiled you can create Dynamic Link Libraries (DLL) with Delphi. You cannot do this with VB. It also does a good job of hiding much of the Windows API, however some API programming may be needed to perform some complex functions. Delphi is a good intermediate Windows language. I would not recommend it as a first language for someone trying to learn programming on their own. C++C++ is still the only way to go for large complex applications. With C++ you get full control over your application, nothing is hidden. However for this control you get complexity. Use C++ if your application has stringent performance requirements or if it is doing something "low-level." It will take longer to develop a program using C++, but you can do more.C++ is an advanced programming language. It should only be used by experienced programmers. An inexperienced programmer trying to write a program in C++ can get into a lot of trouble. C++ allows you to do things other languages would flag as errors and does so without warning. If you are not an advanced level programmer and feel you need to write in C++, be very careful and do a lot of testing. Mixed Language ProgrammingAlso consider mixed language applications. Use VB or Delphi for their strengths and C++ or Delphi to write performance critical DLL's. This is the model I use for most of my programming. It allows me to get the user interface available for requirement testing quickly, but does not restrict the functionality of the program.ConclusionThe most important thing I can say about choosing a language to write an application in is to pick the language to fit the job. This is much easier if you actually know more than one language. My recommendation is to start programming with Visual Basic if you are learning your first programming language. When you find that you are spending a lot of time figuring out how to contort VB to perform a task you need to perform, learn Delphi.If you already know Pascal, or better yet Object Pascal, start with Delphi. Get a good book, there are plenty available, and learn the special techniques required for Delphi. If you know C++ then use it. However, you may want to look into Delphi in order to get your user interface together quicker. Back |
||||||||