|
|
Section 3: What kind of programming can you do with Delphi?
The simple answer is "more or less anything". Because the code is compiled, it runs quickly, and is therefore suitable for writing
more or less any program that you would consider a candidate for the Windows operating system.
You probably won't be using it to write embedded systems for washing machines, toasters or fuel injection systems, but for more or less
anything else, it can be used (and the chances are that probably someone somewhere has!)
Some projects to which Delphi is suited:
Simple, single user database applications
Intermediate multi-user database applications
Large scale multi-tier, multi-user database applications
Internet applications
Graphics Applications
Multimedia Applications
Image processing/Image recognition
Data analysis
System tools
Communications tools using the Internet, Telephone or LAN
Web based applications
This is not intended to be an exhaustive list, more an indication of the depth and breadth of Delphi's applicability. Because it is
possible to access any and all of the Windows API, and because if all else fails, Delphi will allow you to drop a few lines of assembler
code directly into your ordinary Pascal instructions, it is possible to do more or less anything. Delphi can also be used to write
Dynamically Linked Libraries (DLLs) and can call out to DLLs written in other programming languages without difficulty.
Because Delphi is based on the concept of self contained Components (elements of code that can be dropped directly on to a form in
your application, and exist in object form, performing their function until they are no longer required), it is possible to build
applications very rapidly. Because Delphi has been available for quite some time, the number of pre-written components has been
increasing to the point that now there is a component to do more or less anything you can imagine. The job of the programmer has become
one of gluing together appropriate components with code that operates them as required.
Figure 2 The huge array of components provided with Delphi
Delphi is supplied with an army of components, which are available to the programmer when the product first installs. However, if
your needs are not served by any of the standard components, it is possible to use Delphi to create new ones, and if you don't have the
know how to do this (and you should have at least some of the know how when you complete Lecture 10) then you can go looking for your
component elsewhere.
Languages like Delphi have in effect created a quiet revolution in programming. Component design is now the biggest growth area in
programming, and there are several companies that have been set up purely to market pre-written components. Component Source is probably
the best known of these companies (
http://www.componentsource.com ), but programmers being programmers, there
are a several good resources of components that are free on the web
http://www.delphi32.com
http://www.technosoft-inc.com/ascomp.html
http://www.slicktools.com/
In fact, if you go to the
altavista search page and type as your search pattern Delphi + Components then
you will get in excess of 400,000 references.
The variety of pre-written components out there is mind-boggling. Need a component to send Faxes to finish off that desktop
communications package you've been writing? You'll find one out there. Need to get your Email client application to dial up to the
internet on demand? Look hard enough and you'll find a number of free implementations out there. Need to get your application to minimise
to the system tray? Once again, root around on the internet, and you'll soon find what you need. It's in the nature of software
development anyway, but for Delphi it is certainly true - you need an Internet connection to get the best out of it.

For many larger projects, you will hear "seasoned real programmers" declare that C or C++ is the only choice. In many cases, of
course, one of these two languages is
a good choice. However, in my experience, programmers find the change to Delphi and Pascal a far shallower learning curve than that
involved in learning C and certainly than C++. It is certainly much harder to write unreadable code in Delphi, much less likely that you
will introduce hard to trace pointer errors into your code, and hence much more likely that your project will be completed on time. There
is no "Annual Obfuscated Delphi competition", but you will find this event being held regularly for C programmers.
(http://www.ioccc.org/)

No doubt some of the readers of this will already have used Visual Basic in one its various forms. Visual basic and Delphi share the
ideology that programming should be easy, fast, and visual. After all, if its easy to program, then you will make fewer mistakes, and
arrive at a stable release point that much earlier. However, the structure of the Pascal language is widely recognised as the model for a
good programming language; next to no-one would argue this case for Basic. In addition, Delphi code is compiled to native machine code,
where Visual Basic code is at least partially interpreted, and hence runs noticeably slower in nearly all circumstances
|
|
|
|
|