Thursday, March 01, 2007

Review: Delphi 2007 for Win32 (Beta) - part one

Nick Hodges of CodeGear contacted me and gave me permission to talk about the upcoming Delphi 2007 for Win32 product - codenamed Spacely. Note that this review is based on a pre-release Beta build 2063 from mid February. Anything you see here is subject to change in the release version.


The installer


Here are a few screenshots of how the new installer looks like - click them to see them in full size. The installer has been created with InstallAware (which is also bundled with Delphi 2007) and it should allow CodeGear to release patches and potentially new versions in an easier and more integrated way.


 


 


Delphi 2007 is a non-breaking version 


What does it mean that Delphi 2007 is a non-breaking version? Well, according to CodeGear roadmaps there will be a new BDS (or CDS?) version later this year code named Highlander. To reduce the pain (for developers, 3rd party component providers etc) of having two new full Delphi versions in less than a year, CodeGear decided to release Delphi 2007 as a non-breaking version. The result is that you should be able to use code and components designed for and compiled in BDS 2006 or Turbo Delphi 2006 without even recompiling any .dcu (delphi compiled unit) files. So even .dcu only shareware components should continue to just work.


Delphi 2007 is special in that it is (mostly) a non-breaking version in relation to BDS 2006 and Turbo Delphi 2006. This means that it is binary compatible at the .dcu level and no breaking changes has been made to the interface of any units. This means that there are no changes to existing classes or routines, for instance. Note that the Delphi unit interface checks are granular enough to allow new classes and identifiers to be added, as long as no existing identifiers are modified in any way.


A side-effect is that while it is relatively easy to fix RTL and VCL bugs (that only need changes in the implementation section), and to introduce new classes and components, it is very hard to introduce new functionality, methods and properties on existing classes. Hard, but not impossible, of course. CodeGear has not been shy to apply the odd hack or two to add native support for extended Vista Glass functionality in the TForm class, for instance. Allen Bauer has already spilled the beans on this and how it was achieved. We will take a closer look at the RTL and VCL changes in Delphi 2007 (relative to BDS 2006) further down in the review.


What's new in the compiler?


It also means that the compiler has not been updated with new features that would break binary compatibility, so there are no generics support yet, for instance. However, a little investigation shows that there have been improvements to the compiler. For instance, there are a slew of new compiler hints, warnings and errors. It also looks like the compiler has spiffed up its XML documentation generation capabilities. Some of the new error messages are probably due to bug fixes. Code that would earlier generate internal errors now generate clean compile-time errors with explanations of what is wrong with the code. Here is an example list of the new hints, warnings and errors that I've identified:


New Hints:



  • H2445 Inline function '%s' has not been expanded because its unit '%s' is specified in USES statement of IMPLEMENTATION section and current function is inline function or being inline function
  • H2451 Narrowing given WideChar constant (#$%04X) to AnsiChar lost information
  • H2456 Inline function '%s' has not been expanded because contained unit '%s' uses compiling unit '%s'

New Warnings:



  • W1055 PUBLISHED caused RTTI ($M+) to be added to type '%s'
  • W1201 XML comment on '%s' has badly formed XML -- 'Whitespace is not allowed at this location.'
  • W1202 XML comment on '%s' has badly formed XML -- 'Reference to undefined entity '%s'.'
  • W1203 XML comment on '%s' has badly formed XML -- 'A name was started with an invalid character.'
  • W1204 XML comment on '%s' has badly formed XML -- 'A name contained an invalid character.'
  • W1205 XML comment on '%s' has badly formed XML -- 'The character '%c' was expected.'
  • W1206 XML comment on '%s' has cref attribute '%s' that could not be resolved
  • W1207 XML comment on '%s' has a param tag for '%s', but there is no parameter by that name
  • W1208 Parameter '%s' has no matching param tag in the XML comment for '%s' (but other parameters do)

New Errors:



  • E2447 Duplicate symbol '%s' defined in namespace '%s' by '%s' and '%s'
  • E2448 An attribute argument must be a constant expression, typeof expression or array constructor
  • E2449 Inlined nested routine '%s' cannot access outer scope variable '%s'
  • E2450 There is no overloaded version of array property '%s' that can be used with these arguments

Linker errors:



  • F2446 Unit '%s' is compiled with unit '%s' in '%s' but different version '%s' found

What's new in the IDE


In general the IDE feels very fast and nice to work with - it has noticeably less flickering when switching between debug and design layouts, for instance.


Here are a couple of screen shots showing some of the news in the IDE.



I've marked the changes with numbers:



  1. I've added a new toolbar button to toggle a debugger setting called Notify on Language Exceptions
  2. The new TForm property GlassFrame to control the Vista Glass effect on the form's area. This is achieved cunningly with class helpers, property injectors and some extra hacks.
  3. The Tool Palette has improved partial search matching. Any component that contains the string you're typing will be included in the list. So starting to type "but" will show all button components. This is great!

Here is a another screen shot.




  1. The new File Browser view is very handy. It works like a mini Explorer, reducing the need to use an external Explorer or File | Open all the time. And of course, this view can be docked anywhere - or you can keep it floating, or unpin it so that it scrolls away when you're not using it.
  2. The project's options for Compiler, Compiler Warnings, Linker and Directories/Conditionals can now be set separately for a Release and Debug configurations. In addition you can create more named configurations. Finally!
  3. Here you can again see the new compiler warnings that can be toggled on or off
  4. I added a Windows Vista specific component called TFileOpenDialog - the compiler issues a platform warning for this. Nice.

This review will be updated with more information and details in the coming few days. Stay tuned ;)

17 comments:

unused said...

Fantastic! Great review of what appears to be a great product. I love how you pointed out all the good stuff.

Anonymous said...

Great review. Clear & informative,
roll on part 2. Cheers.

Anonymous said...

Perfect review! :)

One question about the file browser:
Does it expose the common shell functionality? I'm especially thinking of the standard context menu and shell extensions like TortoiseCVS/SVN...

Hallvards New Blog said...

Olivier:
Yes, the new File Browser view does support all the normal Explorer right-click menu items.

Anonymous said...

Halvard,
that's great to hear!
Do you have any idea whether Tortoise's overlay icons will also work? (they signify version control status of folders and files)

Anonymous said...

Great review.

I wonder, what component CodeGear has used to build that File Browser (in the left). Is this standard component (there were Shell Listivew example even in Delphi 7) or did they use some 3rd party one. Did they improve that old Shell Listview or not.

iSkomorokh said...

Very informative review. Thank you.

--
http://delphigeek.blogspot.com

Hemant Jangid said...

Does Delphi 2007 include the Delphi for .NET personality as in Delphi 2006? I understand the upcoming highlander release will include the support of .NET framework 2.0 (according to CodeGear roadmap) but perhaps Spacely include whatever was present in Delphi 2006 without any change?

Hallvards New Blog said...

Hemant:
Delphi 2007 (codenamed Spacely) only contains the Win32 personality. It does contain a lot of new features and improvements compared to the Win32 personality in BDS 2006.

Anonymous said...

Does this mean that CodeGear has abandoned the DotNet framework?

Hallvards New Blog said...

Steve: No, it just means that they have released a Win32-only personality first.

According to the roadmap and other information from CodeGear, the plan is to relase a full studio version (codenamed Highlander) including Delphi Win32, Delphi for .NET, C# and C++Builder later this year.

Anonymous said...

So, where IS the Codegear roadmap? Haven't been able to find it through either Google or Codegear.com...?

Anonymous said...

Its just too little too late, I can still use D7 for Win32 dev work (and do) albeit with no vista support and the whole world is moving to .net like it or not. And now the IDE is big and clunky like VS then I might as well use VS and have access to a whole host of additional add-ins and tools.

Anonymous said...

I can't understand the strategy hear. Why bother with a Win32 version when everyone is expecting .Net Framework 2.0 support. This version comes at what price????? whew...

Matt (India)

Anonymous said...

...because many people HAVE moved to .Net, but moved to C# (or VB.Net) in doing so. However, many developer's customers are unhappy with having to install yet another runtime just for a utility program. A lightweight native executable is easier to distribute and install. In this market segment, Delphi 7 (and older) has had little competition and thus has a large user base. That is why D2007 Win32 is being released first.

Unknown said...
This comment has been removed by a blog administrator.
allstarchimneysweeps said...
This comment has been removed by a blog administrator.


Copyright © 2004-2007 by Hallvard Vassbotn