Category Archives: codegear

Delphi moving towards cross-platform, 64-bit

Embarcadero’s Delphi Live conference is running this week, and there are some interesting reports coming out. Robert Love has the best summary I’ve found so far. As I understand it, the next Delphi is codenamed “Weaver” and adds Windows 7 support, including the Touch APIs. More interesting is that this will be followed at some point by “Project X”, a cross-platform native code compiler for Windows, Mac and Linux. There is also mention of “Project Commodore”, which brings full 64-bit support.

Project X is the one that particularly grabs my attention. Cross-platform Delphi has been tried before, with Kylix, Delphi for Linux. Although promising, Kylix suffered on the technical side from Wine dependencies and on the marketing side from lack of demand for Delphi desktop applications. I do not have any technical information about Project X yet, but on the marketing side Mac OS X (and perhaps iPhone) is a great deal more promising than Linux.

After suffering from under-investment for many years, it is great to see Delphi now getting a new lease of life in its new home, and I’m looking forward to finding out more.

Code for Mac Cocoa in Visual Studio – surprised to see this?

I grabbed this screenshot from a preview just installed:

Cocoa app in Visual Studio

It comes from Delphi Prism, a new product from Embarcadero/Codegear which lets you code for .NET using the Delphi language, an object-oriented version of Pascal. The product is not as new as it first appears. It is based on an existing product from RemObjects, called Oxygene, which it now replaces.

Here’s the story in a nutshell. 2003: Borland, the company which created Delphi, decides (rightly) that .NET is here to stay, and releases Delphi 8, a pure .NET version. Nobody wants it, because it has no advantages to speak of over Win32 Delphi (which is faster), or C#, which is the Microsoft .NET language.

At that time some voices muttered that what Borland should do is to integrate Delphi into Visual Studio, rather than doing its own .NET IDE.  One was Marc Hoffman at RemObjects, only he did more than mutter: his company developed its own implementation of Delphi Pascal for Visual Studio, called Chrome.

Borland soldiers on with Delphi 2005, which does both .NET and Win32 in a single IDE. Developers are happy to have a new Win32 Delphi, but most still don’t see the point of the .NET stuff. Further, Delphi 2005 is buggy; many stick with Delphi 7. Next comes Delphi 2006: more of the same, but less buggy.

There’s a couple of problems with Delphi’s .NET support. First, it is always out-of-date compared to Microsoft’s .NET tools. Second, it has component library schizophrenia. There’s VCL for .NET, based on Delphi’s component and GUI library, but that’s not compatible with .NET components built for Windows Forms. There’s Windows Forms, but that’s not compatible with existing Delphi code. Borland decides to deprecate use of Delphi .NET with Windows Forms. This is really for VCL developers, it says.

Next comes Delphi 2007. Nice product, but where’s .NET? Gone. Nobody seems to mind [and it turns up later in RAD Studio 2007*]. Delphi 2009, gone again. But now there’s Prism, and it is a complete U-turn. Forget VCL.NET. It uses standard .NET libraries, runs in Visual Studio, supports Windows Forms, ASP.NET, WPF, and soon Silverlight. Oh, and it’s based on what that other guy did back in 2004, with some Borland Codegear Embarcadero technology thrown in: dbExpress database framework, client support for DataSnap multi-tier applications, and the Blackfish pure .NET database engine.

Very good; but there’s still that awkward question: why not use C#? The answer, I guess, being either that you love coding in the Delphi language, or you want to use one of the Delphi-compatible libraries.

Or that you want to use Mono, which of course is what enables those tasty Mac options in the New Project dialog above. You can also use C# with Mono – possibly you should, since it is Mono’s core language – but in Prism it comes nicely integrated into Visual Studio. Well, somewhat nicely. In practice there are a few extra steps you need to take to get it working. The recommendation is to run Visual Studio in a VM on a Mac, since Windows cannot run Cocoa applications. And you’re going to be using Apple’s Interface Builder; there’s no GUI designer in Visual Studio itself.

Hardly enterprise-ready then; but still an intriguing development.

*Added correction thanks to John Moshakis’ comment below.

Prism: official Delphi language comes to Visual Studio

Embarcadero is to release Delphi for .NET as a Visual Studio add-on, called Prism. Marco Cantu has a summary. Note that according to this post, which is based on an announcement statement by product manager Nick Hodges at the SDN conference near Amsterdam, there will be:

full support for the .NET framework 3.5 (WinForms, WFP, Silverlight, ASP.NET, WCF, LINQ) … CodeGear will provide Datasnap 2009 integration and dbExpress for ADO.NET support

It looks as if this will be a full alternative language for .NET developers. Note that many of the language changes, such as generics, in the Win32 version of Delphi 2009 seemed to have .NET compatibility in mind. It makes sense for Embarcadero to use Visual Studio to host .NET development tools, just as it uses Eclipse for Java.

There remains an awkward question. What advantage is there in using Delphi (a version of Pascal) rather than C# for .NET development? If this is aimed only at existing Delphi developers migrating code, it will only ever be a niche.

Not good news for RemObjects Oxygene, which is also an Object Pascal add-on for Visual Studio; but Oxygene has some other tricks like Mono support, for running on Linux, which may sustain it.*

I am trying to clarify a couple of points. To what extent, if at all, will Prism support the .NET version of Delphi’s VCL (Visual Component Library), which would not fit smoothly with the Visual Studio design tools? Even if VCL.NET applications work, you would probably be better off using Delphi’s own IDE for them. Code ported from Win32 Delphi will likely use the VCL, so this is tough to get right. And what is the future of Delphi for .NET in RAD Studio? I will update this post when I know more.

*Comments below suggest that this is in fact Oxygene rebadged; I won’t say more until I’ve got official confirmation.

It is time we stopped talking about Rich Internet Applications

I have a couple of posts on a new blog aimed at IT Professionals:

Delphi: a secret weapon for Windows developers

Is Adobe Flex and Air in your future?

The latter post is already out of date, following Google’s Chrome announcement. In it, I summarize the different approach to Rich Internet Applications, and argue that rather than discussing RIAs we should simply talk about the next generation of the client. I noted that “Google and Mozilla are also stretching browser technology”; now that we have Chrome this looks like a full-on battle.

Technorati tags: , , , , , ,

Delphi and C++ Builder 2009 are available to order

I’m choosing my words carefully, because although the CodeGear/Embarcadero site is now showing Delphi 2009 as the current version, if you click through to the order page it only offers a pre-order. Still, it must be done or thereabouts. US prices are as follows:

Delphi 2009: Pro $874.00;  Enterprise $1974.00; Architect $3474.00

C++ Builder 2009 costs the same; or you can get a bundle with both for a relatively small extra cost, eg. $1074.00 for Delphi and C++Builder Professional.

Curiously, an upgrade to Delphi 2009 Pro only costs $374.00 (57% discount), but an upgrade to Enterprise is $1274.00 (35% discount). I can’t make sense of this except on the basis that any product labelled “Enterprise” is presumed not price sensitive.

So what’s not in the Pro version? The Enterprise edition adds drivers for server databases in the dbExpress database framework, the DataSnap multi-tier application framework, and a full range of modeling diagrams. Architect bundles ER/Studio Developer Edition, Embarcadero’s database modeling tool, with support for a wide range of database servers.

In other words, the majority of Delphi’s features are in the Pro edition, which is really much the best value, though if you need DataSnap or client-server dbExpress then I guess you have no choice.

The big features here strike me as Unicode in the Visual Component Library; and the new language features, generics and anonymous methods. I’ve not yet looked at the product though, so watch this space.

What’s new in Delphi 2009

Today I viewed David Intersimone’s Live Webinar on what’s new in Delphi 2009, code-named Tiburon.

This is a Win32-only release. I think you will want it (if you use Delphi), if only for the new language-level features: generics, anonymous methods, and unicode strings. I grabbed a few screens from the presentation. Generics:

Unicode – here’s the TEncoding class:

and Unicode in action:

There are also some new components, such as a neat collapsible panel called TCategoryPanelGroup, TBalloonHints, and Office-2007 style ribbon controls.

The ribbon controls interested me because I am wary of Microsoft’s Office ribbon patent. CodeGear/Embarcadero seems to be wrapping Microsoft’s controls*, as used by the CMFCRibbon* classes, which as I understand it are not the actual controls used in Office 2007 but share their look and feel. You therefore have to agree to Microsoft’s license for the Fluent UI in order to use the controls.

There are also major changes to the DataSnap middleware but DavidI didn’t go into this much in the presentation.

During the Q&A at the end there were the inevitable questions: what about 64-bit (coming in a later version); what about Mac/Linux (nothing to announce); what about the dreadful online help (errrmmm we’re working on it); what about .NET (coming in a later version). Some of the language changes seem to be making ready for .NET 2.0 compatibility.

No announced release date; but the roadmap shows this as a 2008 release; and if it’s being webinared now that suggests it won’t be too long a wait.

Delphi is still absolutely my favourite Win32 development tool and this should be a strong release. At the same time, it is all rather old-school: win32, native code, fat client. You can do web applications in Delphi, and there is an updated “VCL for the Web” in this release, but why would you?

Nevertheless, if there are any Delphi developers still hanging on to Delphi 7 (the last version with the old IDE), perhaps these important language changes along with what is now a mature new-generation IDE will be sufficient to persuade them to migrate.

*Update: Although DavidI said that Delphi’s ribbon controls wrap Microsoft controls, Nick Hodges says here that this is not the case. He is probably right as I’m not sure what controls Delphi could wrap. If the MFC team could not use the actual Office controls, but had to create its own implementation, then I should think a third party would be in the same position. I wondered if the VCL was actually using the MFC code but I doubt that would be straightforward either. This may be a confusion caused by the licensing requirement.

Codegear sold to Embarcadero

CodeGear, Borland’s developer tools business, is to be acquired by Embarcadero; though to be more precise, CodeGear is being acquired by the owner of Embarcedero, a private equity company called Thoma Cressey Bravo.

Embarcadero has a range of database and data modeling products, including ER/Studio, EA/Studio, RapidSQL, PowerSQL and DBArtisan.

This is the end of a long road – CodeGear was put up for sale in 2006.

Good news? Insofar as it ends a long period of uncertainty, yes. On the other hand, I sense that many of CodeGear’s customers have valued its renewed focus on software development, as opposed to application lifecycle management, modeling, change management and all those other enterprisey things. Embarcadero just might take it back in that direction. From the press release:

Customers and partners will benefit from Embarcadero’s ability to help fully integrate their application development lifecycle, automate error-prone tasks and dramatically increase their productivity.

Talk of “dramatically increased productivity” is bound to strike fear into the hearts of those who like their dev tools mean and lean.

The problem from a business perspective is that enterprise sales are where the money is, and plain old IDEs and compilers are thoroughly commodotized. Eclipse, NetBeans, Visual Studio Express…

That said, CodeGear still has some interesting products, and increased resources for things like quality control and documentation would do them no harm at all.

 

Generics, anonymous methods, Unicode coming to Delphi

Codegear has posted an updated roadmap for Delphi and C++ Builder, its native code development tools for Windows. There is also a .NET Delphi but it is not covered here.

The RAD Studio product includes both Delphi (Object Pascal) and C++ “personalities”. A release code-named Tiburon, set for later this year, will update Delphi to be “completely Unicode-based”, including the runtime library and Visual Component Library (VCL). There is also support for generics and anonymous methods.

What about 64-bit, another obvious shortcoming of the current Delphi product? It’s promised for the release after that, code-named “Commodore”, and set for mid-2009.

All of this is a bit late in the day, but probably soon enough to keep Delphi developers happy. The IDE is stable now and if you want RAD features Delphi is the best choice for native code apps on Windows.

JBuilder 2008 and Vista’s Program Compatibility Assistant

One of Vista’s annoyances is this dialog, which you may see shortly after installing an application:

As you can see, I got this after installing CodeGear’s new JBuilder. The reason it annoys me is that it doesn’t tell you what “compatibility settings” it has applied. In this case, even if you go to JBuilder.exe in Explorer and view its properties, you will find all the compatibility options unchecked. So what has it done?

Of course I clicked “What settings are applied”. Here’s what it says:

As you can see, this still does not tell you what settings are applied. By the way, Group Policy enables you to disable the Program Compatibility Assistant completely, but does not show the settings for individual applications.

I ran the registry editor, and found this entry:

It looks like the Persisted key tells Vista which applications have already had settings applied, while the Layers key tells Vista what settings to apply. ELEVATECREATEPROCESS lets the application create child processes which require admin rights, though they still raise a UAC prompt.

I also found this Microsoft article which does a good job of explaining how the Compatibility Assistant works. It appears that JBuilder 2008 tries to run something which requires administrator permissions, but does not use the  correct Vista technique for doing so. I soon found out what it is:

It’s running regedit, and exporting some keys that appear to relate to Mozilla’s Gecko Runtime project, for embedding a browser in an application. Unfortunately it does this (twice) every time it runs, which is unlikely to be necessary. You would have thought there would be a better way to use these registry entries, than exporting a temporary file.

Conclusions? None really; I just wanted to know what this annoying wizard does. A couple of observations though. First, it’s careless of CodeGear to let JBuilder 2008 out like this. It just looks bad, to have your app identified as an old one that needs compatibility help.

Second, if you read Microsoft’s article you’ll notice that among other things Vista “instruments” the CreateProcess API call in order to make this work. There must be a performance impact. I guess Microsoft will say it is a small one; but I guess it also makes its little contribution to Vista’s overall performance issues.

CodeRage sessions available for download

You can now download the content from last week’s CodeRage, the virtual developer conference laid on by CodeGear. The downloads use Camtasia and Flash and work well.

A few that I recommend are Ravi Kumar’s session on JBuilder Application Factories from Day 5, and Joe McGlynn on 3rd Rail, an IDE for Ruby on Rails, from Day 3. For Delphi futures (64-bit, generics, concurrent programming, hints about cross-compilation to other operating systems) check out Nick Hodges’ session on Day 1. I’ve not viewed everything, so there are no doubt other excellent sessions.

Nevertheless, I have mixed feelings about this CodeRage. The keynotes were weak, with too much high level waffle about how CodeGear is committed to developers etc etc. The conferencing software was no more than adequate, did not work properly for me on Vista, and did not support Mac or Linux. That may explain why attendee numbers in some sessions were embarrassingly small.

I am struggling to make sense of this. CodeGear claims to have 7.5 million registered users; yet only 2100 registered to attend the free CodeRage, and some of those no doubt never turned up. If that is representative of the level of interest in new CodeGear products, as opposed to legacy users, then that is a worrying sign.