


                        A  Product  Review


      DELPHI -  A Programming Language from Borland International

                 A Review  (c) 1995 by Peter Neuendorffer




  Borland International has recently released a rapid application
  development language - a brand new programming language for Windows. It
  is Delphi, and it promises to bring the power of object oriented
  programming and the structure of Pascal to the Visual programming world.
  Much has been already said about Visual Basic; the point and click
  language that allows rapid prototyping of Windows programs using
  reusable graphical objects like list boxes and text boxes. Certainly
  were there no Visual Basic, there would be no Delphi.

  Borland is obviously very proud of this new software, and it has been
  eagerly anticipated in the past year. They boast over 700 third party
  software and services already. The Borland Developer's conference will
  be in San Diego from Aug. 6-9. Delphi topics there will include Rapid
  Application Development, objects, Windows 95 and Delphi, and Database
  design. (Call 1-800-350-4244 for reservations.)

  This review will talk a bit about rapid application development, and
  some of the features of Delphi that I find noteworthy. This past week, I
  was able to port a DOS Pascal (Turbo Pascal 7.0) database application
  into Windows using Delphi. It was a relatively painless process, and
  large portions of my code stayed the same. Translating a DOS application
  to Windows in less than two weeks would have been unheard of a couple
  years ago. I remember hearing John Dvorak speak about how companies
  usually farmed out their Windows version releases to a third party, as
  people didn't know what to do with Windows.


  The Language

  The File Input/Output language syntax in Delphi is almost identical to
  Turbo Pascal. Old style error trapping -what to do when an error occurs,
  say when a file is opened that does not exist- is supported. Delphi also
  has a new system of exception handling that can trap any type of error,
  including data range errors.

  One of the advantages of Delphi is that it is Pascal based. Long
  regarded as the ugly sister language, Pascal is strongly typed. That
  means that data has very definite characteristics. It is pretty hard to
  go awry when writing in it. Most developers have preferred C for it's
  seat of the pants "devil may care" aspects. But when dealing with
  Windows, in my opinion, having a highly structured language prevents a
  lot of bugs and makes for a sturdier application.

  There is an increasing demand in the industry for easy to use
  inter-faces, or windows (small case here) to large database engines. The
  office worker can have the ease of  use of  Windows, combined with the
  power of SQL databases on a network. This vertical development is made
  much easier with Visual Basic. Delphi's Client/Server edition takes this
  process even further.

  According to Borland, local database applications created with Delphi
  can be ported to the Client/Server edition by simply recompiling the
  application with the Client/Server version of Delphi.

  Delphi has full Object Oriented language structure. This means that the
  programmer can modify graphical or logical objects in an orderly way
  with object oriented programming. Because the action code procedure is
  encapsulated into the object, programs are much sturdier. Sending
  messages and modifying the behavior of these objects - say a modified
  memo box -becomes a matter of adapting or "deriving" a child object from
  a more generic one, much as the composer does a variation on a theme.

  Rapid Application Development

  Someday, hopefully, the average bright office worker will be able to put
  together an application in real time, much as we can now draw a picture
  in Paintbrush, thus I suppose throwing a lot of us out of work.

  Applications that self modify could be used to adapt to changing needs.
  In the meantime, it is a blessing to have the new Visual programming
  languages. They present graphical objects without having to write a line
  of code. You just click the list box onto your Window and then click it
  on to write the code for what to do when the user clicks on it.

  The problem with previous Visual languages, was that you could not
  customize the behavior of these objects. With Delphi, you can design
  your own components- something that had to be done in C previously. You
  can write your own DLLs (dynamic link libraries). You can use other
  libraries. A number of third party ones are advertised in the Delphi
  literature, including Graphics Server from Pinnacle, and Fax Plus and
  Comm Library 3 communications routines from Microhelp.

  Applications created with Delphi are claimed to be fully compatible with
  Windows 95, and NT, by the way. To convert Delphi applications to 32bit
  mode, the developer simply does a single mouse click in the forthcoming
  Windows 95 version of Delphi, without having to change a line of code.


  Object Inspector


  Much like Visual Basic, Delphi provides an Object inspector where you
  can make settings for your graphical objects at design time. These menus
  are visually exciting, and offer many properties not available with
  Visual Basic. You can set a Window to always be on top, and you can set
  a text box to read only. Text boxes are called memos in Delphi. Much
  like trying to learn Spanish after French, the close relation of Delphi
  to Visual Basic can be disconcerting - the same thing having two
  different names. The memo was well thought out by Borland. You can
  control and access particular lines of text as they are in a special
  string array type. This allowed me to put pop-up colored tags next to my
  text box to point out certain lines of text. These string arrays can be
  easily copied to other controls. Thus a list box list can be transferred
  to a memo with one line of code.

  An internal graphics editor - a small drawing program - is a welcome
  addition, allowing you to quickly create bitmaps for inclusion in your
  programs. Many more controls are standard with Delphi than with Visual
  Basic. The menu designer is intuitive and "what you see is what you
  get". A great deal of effort went into making these sub areas easy to
  use.

  Writing The Application

  At first I was miffed that so little documentation was provided with
  Delphi. This is my only complaint about Delphi. However, an exploration
  of the online Help usually, but not always, provides answers to
  questions. Developers familiar with Borland's usual strong documentation
  providing cookbook examples are going to be disappointed. On the
  Internets World Wide Web, Borland has a site htpp://www.borland.com.
  There I was able to download for free the Object Pascal Language
  Reference Guide (objlang.zip 929k) which is available in hard copy from
  Borland for a fee. Technical support via telephone is available at $2.00
  per minute or on account.

  The code editor uses all the familiar Brief style editing commands. I
  didn't care for the Find utility, but other features are great,
  including the ability to color highlight your code by types of words.
  The nice thing about Delphi code writing is that you have a clear sense
  that you are dealing with separate and complete files. You can page
  through them as text files, and are not boxed into little windows as in
  Visual Basic. Certain things are required of you to make units available
  to one another, something that was automatically available in Visual
  Basic, but in a limited fashion.

  When you compile your program, a single .EXE is created. You no longer
  have to distribute a myriad of .DLL or .VBX files for installation of
  your application. The VBRUN300.DLL runtime library of Visual Basic has
  no counterpart in Delphi. This is because Delphi is a full native code
  compiler. Your program is in machine language. Visual Basic has an
  ingenious interpreter system, but, as a result, Visual Basic programs
  run more slowly than Delphi ones.

  When you compile your program, only those files that have changed are
  re-compiled. Also, with smart linking, only code that is used is
  compiled as "dead code" is ignored. This problem has plagued C
  programmers, but users of Turbo Pascal have long had the advantage of
  this "smart linking." You can manage dynamic memory with a variety of
  simple schemes, also familiar to Turbo Pascal users. File input output
  is identical to Borland Pascal and Turbo Pascal, thus allowing those of
  us who have worked in Pascal to easily port applications.

  Delphi is fun to use, and has a lot of nice touches - not the least of
  which is an easy way to move seamlessly between the graphics and the
  code. Whether Delphi will replace the other Visual programming languages
  or not, I can't say.. It looks like Borland has a winner, and barring
  serious problems  in the field, should keep developers happily busy for
  a long time.

  Delphi, a Visual Pascal-based development language for Windows. Price:
  The regular Delphi is priced at $495, with a $199.00 promotional price
  for 90 days.

  The Delphi Client/Server edition has a suggested retail of $1000.

  Platform: Intel 386-based PC or higher
          Microsoft Windows 3.1 or later, 100% compatible version.
          6MB of extended memory or higher, 8Mb for Client/Server.
          30Mb hard disk space, 50Mb for Delphi Client/Server
          CD-ROM drive (3.5" disks available separately for $19.95)

 Strongest point: Combines the power of object oriented programming with
 the structure of the Pascal Language with an interface vastly improved
 over Microsoft's Visual Basic.

  Weakest point: Curiously poor documentation. The manual is an overview,
  and the online help requires search skills that assume you already have
  a strong knowledge of the language.


  Peter Neuendorffer is a Windows and DOS programmer.  He is the author of
  MBTA Directions on the Boston Transit (mbta127a.zip) for DOS; My New
  Project (mynewp13.zip) Project Management for Windows and  Scrubble Text
  file scrambler (scrubb10.zip)

                                     ww


