Like Pascal? CodeGear has released the latest version of Delphi for Win32. Blake Watson checks it out.
CodeGear's Delphi 2007 for Win32
(D2007) is the latest version of Delphi RAD studio based on the
Delphi/Object Pascal language and for Windows development only.
In other words, this Delphi, unlike previous “cross-platform”
versions of Delphi, develops native Win32 applications only (no .NET)
and only in the Delphi language (no C#, C++, etc.) If you're familiar
with Borland Developer Studio 2006, this is analagous to the feature
called “Delphi for Microsoft Win 32”.
That's important because the IDE is
still .NET-based, even though it doesn't target .NET. You still have
to make sure that you're up-to-date with .NET. The installation
process goes through all the checks and downloads, of course.
Despite targeting native apps only,
Delphi still has the rich set of options available since back in the
Delphi 7 days: Console, control panel, Win32 GUI, COM objects, a
variety of Internet targetting options and so on. But before we get
into specifics, let's look at the big picture.
In the main, this is a relatively minor
upgrade to BDS 2006, especially with regard to new features. Even so,
it should be welcome to those who are on an older version of Delphi
(7 or earlier) and even to those who have been using BDS 2006.
In my review of BDS 2006, I wrote of
how it finally managed to pull me away from the stalwart Delphi 7,
which it did. But I still occasionally found myself firing up D7 from
time to time—particularly if BDS was being difficult in some
fashion. For example, I might encounter project file corruption, a
refusal of the BDS to shutdown sometimes, or shutting down with an
access violation at other times. They were little annoyances, to be
sure, but in a crunch one doesn't always have time or patience to
deal with such things.
So, while D2007 looks pretty much the
same as the Win32 facet of BDS 2006, the niggling little IDE bugs and
unexplained behavior seem to have entirely vanished. Granted, these
bugs were superficial in themselves, but they detracted from an
experience longtime Delphi users expected to be pleasurable. With
D2007, I haven't had the faintest urge to fire up D7. It starts about
as fast (depending on installed components, of course), stops when I
want it to—and only when I want it to—and I haven't yet
encountered a single IDE exception.
And that's reflective of the whole feel
of this new version. There aren't a lot new features; those that
exist are relatively narrow in scope, but it feels all of a sudden
like someone (or lots of someones) is taking Delphi seriously again.
It's a curious thing to review: I like it a whole lot more than 2006,
but the why's are primarily the sum of many small improvements.
What's Old Is New Again
I know I wasn't the only hold-out
hanging on to Delphi 7, and I'm not the last to leave it behind. I'm
sure that's a big part of the impetus for CodeGear's Nick Hodges'
article on what's
changed since Delphi 7. It's a lot, but it covers a good five
years of development. By all means, if you haven't kept up with
Delphi's evolution, check it out. Some of the advancements haven't
made much of an impression on me, while others have proved very
useful.
For example, I love the IDE guidelines
introduced in 2006, the refactoring and the sync edit. I'm lukewarm
on the block competion and code templates, since I often end up
wrestling with them. And while I've become addicted to class
completion and error-underlining, they don't always work as they
should. (Code completion chokes on “array of array of [type]”
under certain circumstances, and has since first introduced, for
example.)
But these improvements are from 2006
and earlier. The 2007 additions to the IDE aren't exactly thrilling:
the IDE now uses the MS Build and has been beefed up in some other
ways;and a new file browser has been added. (But you still can't make
the component list work like it did in D7.) The most substantial
change (in my view) was to the help files, which I'll cover later.
There are little things, though, that
tend to get overlooked (even in the What's New documentation), like
the component bar's search feature improvement. In BDS 2006, you
could type “tbu” (or just “bu”) and get any
component that started with “tbu”, like “TButton”.
In D2007, if you type “bu”, you get any component that
has a “bu” in it anywhere, like “TSpeedButton”.
Minor, but it makes the search infinitely more useful.
There are a few negatives on the minor
side, too. For instance, Alt+Tabbing between Delphi and some other
app seems to always cause the Desktop SpeedSetting to be selected.
But these are relatively few.
Like the IDE improvements, the 2007 VCL
improvements are pretty light in 2007. Themes are on by default.
There are a few new Vista dialogs. It's Vista-compatible, which is
one of those things that's critical if you need it, but makes you
feel better knowing that your tool is keeping up with the times.
There's a tray icon component. Oh, and TeeChart's back on the
component palette, which I like. Two other nice additions are AJAX
support and dbExpress improvements, discussed below.
The VCL has probably changed the least
since D7, adding a few cool, if not critical items, which you can see
in Nick's article above. This is not a bad thing, though. There's no
shortage of components, and big changes in structure tend, of course,
to break code.
Also in the “no changes is good
changes” category is language. D2007 doesn't add any new
language features, as far as I can tell. Although I have in the past,
preferred Delphi to be more cutting edge, I see a lot of other
languages bloating up and not respecting the complexity
they're introducing with new features. (Sometimes I think most
individual languages are headed toward C++ while language development
itself seems to trend toward Smalltalk and Lisp.)
Since D7, we've gotten operator
overloading, some refinement of the object model (with class
variables and strict designators), method extensions to records
(handy when you don't have garbage collection), and the very cool
class helpers (which allow you to extend classes without changing
their code). I know the CodeGear guys are excited about all kinds of
language improvements (aspects being among the most interesting to
me), but I'm happy to see them polish what's already there.
Odds and Ends
Because this release doesn't come with
a huge laundry list of earth-shaking features, it could be easy to
dismiss. Yet from the moment I started using it, the whole experience
made me feel better about Delphi than I had in years.
As I've mentioned, there's the
(predictable) support for Vista and AJAX: Indispensible if you need
them, comforting if you don't. I'm not doing Vista and usually use
other tools for AJAX, but the dbExpress rewrite hit home for me.
I do a lot of work writing custom
database applications for people, generally trying to avoid
inflicting the overhead of one of the full-blown DBMSes when not
necessary. DbExpress is designed to facilitate that sort of
development, and the whole framework is written in Delphi, making it
possible to easily write your drivers.
In addition, some pretty clear and
relatively thorough set of help pages gives an overview of how and
why to develop with dbExpress, how to deploy dbExpress applications,
and so on. Like Vista and Ajax, the dbExpress stuff isn't
revolutionary, but it is just what I
was looking for.
Which brings me to the help. I was
thrilled when I brought up the first few help topics in D2007: The
text was meaty and well linked. It was clear that considerable effort
had been expended on improving one of the most deteriorated aspects
of Delphi. (Some of the weird help-system behaviors of previous
versions have gone away, too.)
A bit of the bloom has gone from the
rose subsequently, unfortunately: Big chunks of things are still
undocumented (showing only their Doc-O-Matic stubs) or don't show up
in context help, and even though you're working in Delphi and Win32,
you still get bunches of irrelevant links for .NET and C++. The help
filters don't stick or even
work, as far as I can tell.
If the worst thing
that one could say about any help system is that you wouldn't want
more of it, the worst thing I can say about D2007's help is that I
want a whole lot more like the new stuff.
CodeGear
The most important advancement in D2007
is, frankly, CodeGear, the newly spun-off company from Borland. For
me, recognizing a lot of the names on the CodeGear masthead gave me a
sense of optimism that was largely justified in the wake of this
release.
The company website, being devoted
solely to developer's tools, is easier to navigate and gives the
impression of fully embracing the concept of transparency. Another
post from Hodges reveals a list of persistent bugs that are fixed in
the new version. It's natural to have a sense of pride about one's
product, but this can turn into a sort of jingoism and denial, to a
company's detriment. CodeGear seems to hit just the right combination
of pride-of-workmanship with the sort of honesty that keeps one
grounded.
The other important impression I get
from CodeGear is that they know the importance of their audience. As
Borland turned their focus from the developer in the trenches, they
alienated some long time fans, and a lot of energy seems to be
devoted into winning those people back.
So, even though Borland hasn't sold
CodeGear off yet, speculation that there would be no serious change
in the development process does not seem to be borne out by the
evidence. Besides the overall transparency and the splitting of the
Win32 product, CodeGear has released a PHP tool and has a Ruby tool
in the works. (If memory serves, the last time Borland branched out
to a new language was the '90s.) CodeGear looks to be heading off
rumors of irrelevancy at the pass.
The Bottom Line
In summary, and hopes for the future
aside, if you're using BDS 2006 and cash is tight, you could
reasonably skip this iteration or put it off for a while, unless you
really need the Vista, AJAX or dbExpress goodies. I wouldn't, though,
just because of the number of rough edges that have been smoothed
out.
But if you're still clinging to Delphi
7, it's time to let go. Seriously.
For .NET, of course, you'll still need
to have BDS 2006 around, and it's curious that there's no mention of
a pending upgrade. But if it means more smoothing and polishing, I
can wait. And if D2007 is any indication, the wait will be worth it.