Delphi 2005 Architect Packs A Wallop - ' A Superb Environment ' (
Page 2 of 2 )
A Superb Environment
Of course, the key element to whether it's productive or not to use Delphi for other
languages rests entirely on the quality of the IDE. Probably the most important selling point for Delphi over the years has been its IDE, and this version does not disappoint. There are many little touches and additions, from new wizards and editor features, and rather than try to touch on them all, I'll point out the ones that I found particularly useful.
One huge improvement over Delphi 7 is the Data Explorer. I've always been impressed by how
well-integrated the VS.NET data explorer is with the environment. (Delphi's used to be completely separate, and has always been weak.) Delphi 2005 raises the bar considerably, allowing a high level of interaction with available database connections.
But oftentimes, it's the dumbest little things that make you smile and make your job a little easier. Here's one. Delphi 2005 has a "sync edit" mode which works like this: You select an arbitrary block of code and retype any variable in that code. As you do this, all
instances of that variable are retyped, like an interactive search-and-replace. (I did run into some glitches with this, but nothing serious or undoable.) This isn't really anything you
couldn't do with search-and-replace, but it's somehow less harrowing, because you're making one change in (say) 40 different places, rather than 40 separate changes.
ADVERTISEMENT
Delphi 2005 also provides an nigh-instant syntax check, noting where the errors are as you make them (and who doesn't love that?) and providing the explanations of same in the "Structure" pane in the upper left-hand-corner. Initially, I disliked this feature for Delphi and C#, because every statement is an error until you put a semi-colon at the end of it; but it shows up only if you pause, and it's fairly unintrusive. And, let's face it, it beats compiling to find out where you've messed up your punctuation.
Here's a feature you might wonder why we haven't seen before in a Delphi release. The
new environment saves old versions of your code, so that you can go back and look at the history. This is slowly breaking me of a practice I've had since I started using Borland IDEs back in 1986; I never saved my code until I was sure that I wanted to overwrite the old version. Of course, Delphi has been autosaving backups for years, but the new environment gives you however-many backups you want and a built-in DIFF feature, so you can see where the changes were made.
Delphi has always been a tool that rewards you for sitting down with each new edition and going over the hot-keys, code-completion and wizardly tools, and retraining yourself to use
the new features. What's nice is how many features in this new version are just there, and how a little retraining can go a long way.
I haven't even touched on the refactoring features. The one that most stands out in my mind is Delphi's ability to analyze selected code and turn it into its own subroutine (without,
obviously, changing the semantics). This is one area where old habits have been hard for me to break; I've done by hand what the IDE will now do automatically, if only I'd remember to use it.
Observation: Software upgrades are sometimes faster than wetware upgrades.
The High Road
The Delphi language—or as I like to call it, "The Language Formerly Known As Object
Pascal"—finally has its own enumerator construct (for <object> in <collection> do), something it has mysteriously lacked. Delphi 2005 also introduces syntactic support for nested classes. But Delphi-the-language has not undergone any
really cutting edge changes. Instead, Delphi 2005 offers a number of high-level tools (available in the pricier editions).
The most promising of these is ECO II, a set of enterprise class objects (get it?) that continue Borland's push toward merging high-level design concepts with a development environment (seen previously in Delphi 7 Architect's integration with ModelMaker and Bold). There's no way I could do justice to ECO in this review, but I will say it feels better integrated with the environment. Also, the learning curve seems to be gentler and you'll see a return for the effort more quickly.
With ECO you can also "extend" existing objects, providing handlers that give you a kind of entree into Aspect-Oriented Programming—a phrase you're going to hear a lot of in the future, if you haven't already. Delphi 2005 Architect also comes with Borland's Janeava, a product that allows your Java objects and your .NET objects to talk. I've always thought this was about the coolest idea since P-Code, and if you need it, it's probably indispensible. (So far, though, I've personally had no requests.)
Delphi Architect includes a bunch of other stuff, like the Wise Owl Demeanor (a code obfuscator), ComponentOne components (the shopping-cart component is probably responsible for the need to agree to a PayPal EULA), NUnit integration (for testing), to say nothing of old standbys like Crystal and Rave Reports. But this is an article, not a book.
Trouble In Paradise?
Life with Delphi 2005 isn't perfect. I had some unwarranted and occasionally fatal exceptions. The Tool Palette, which was normally very smart about what to display, occasionally would carry a category over from the previous context. I couldn't get some of the
demos to compile, and there were some unpleasant surprises. Some of these can be ascribed to .NET's immaturity, some others to the immaturity Delphi-as-a-.NET-environment. And most were little more than a hiccup.
Perhaps paradoxically, the product's richness could work against it. If you're not using a feature, it can become clutter. Obviously, Delphi's implementors worked hard to make this
manageable, and for the most part they succeed, though there is still plenty I have not adequately explored.
In the past, Delphi occupied a sort of sweet spot. Its executables were almost as fast
as C++ and its syntax was almost as easy-to-use as Basic. However, C# is very, very close to Delphi syntactically (no surprise, given that they had the same architect), and executable speed is an increasingly less significant concern for a great many people.
Delphi, then, has to rely on combining ease-of-use with powerful features to win people over from the standard. And this version definitely will pay back your effort-investment with
dividends.