Category Archives: delphi

Jewels from the loft: launch of Delphi, Netscape’s Constellation, HTML to die, Longhorn for developers

It’s the Easter holiday in the UK and I’ve suffered a bout of spring-clean fever. It is time, I decided, to clear out a mountain of old books and magazines.

A job like this always prompts reflections, the first of which is the sad decline of print journalism in the field of software development. It hurt to send piles of Byte, Exe, Dr Dobbs’s Journal, Application Development Advisor and others off for recycling.

image

A few things caught my eye. Exe June 1995, and there is a young Anders Hejlsberg talking to Will Watts about his new creation: Borland Delphi:

Before Delphi, you always had to make a choice. Do I go for the performance of a native code compiler, or the ease of use of a visual development environment? Do I go for a powerful object-oriented language, or a proprietary 4GL client/server tool? What programmers really want is all of the above, in one package. That’s what we set out to do.

What is striking about Delphi is that this was not hype. It delivered on that promise. It was better than its obvious rival, Microsoft’s Visual Basic, in almost every way (I will give VB a point for sheer ubiquity, especially in VBA guise). Delphi is still with us today, not bad after fifteen years. However, it never came close to VB’s market share, which shows that quality has never been the sole or even the most important determinant of sales success.

Next up is Byte, March 1998. “Reinventing the Web”, the cover proclaims. “XML and DHTML will bring order to the chaos”.

image

Inside there is a breathless description of how XML will change everything, and a quote from Jon Bosak:

HTML, this so-called ‘hypertext markup language,’ implements just a tiny amount of the functionality that has historically been associated with the concept of hypertext systems. Only the simplest form of linking is supported – unidirectional links to hard-coded locations. This is a far cry from the systems that were built and proven during the 1970s and 1980s.

Indeed. “We need to start replacing simple HTML with more powerful alternatives”, the article concludes. “The migration to XML must begin. The future of the Web depends on it.”

Here’s one thing that mostly did not work out as planned. The W3C tried to retire HTML, failed, and is now belatedly engaged in specifying HTML 5.

Byte March 1997 is also intriguing. Netscape’s Marc Andreessen smiles out of the cover.

image

Jon Udell, in the days before he disappeared into some Microsoft corridor, writes about Netscape’s “Constellation: the network-centric desktop”:

Netscape’s Constellation takes a less Windows-centric approach and puts more emphasis on location-independent computing, regardless of the platform. No matter what kind of system you’re using or where you are, Constellation presents a universal desktop called the Homeport. Although the Homeport can appear in a browser window, Netscape usually demonstrates it as a full-screen layer that buries the native OS – certainly one reason Microsoft is not embracing Constellation.

Netscape got a lot of things right, a true pioneer of what we now call cloud computing. What went wrong? Well, Microsoft went all-out to conquer Netscape by removing its browser dominance. Microsoft’s weapon was the free Internet Explorer.

It is all a pre-echo of what is happening now with Google and Microsoft, the difference being that Google has huge financial power thanks to its marriage of internet search and internet advertising. Unlike Netscape, Google is winning.

This blog is long enough; but I’ll give a brief mention to another jewel from the archives: a book given out at PDC 2003 entitled Introducing Longhorn for Developers.

image

It describes Microsoft’s vision for Longhorn: a radical new application model for Windows, building on XAML, WinFS and “Indigo”, the communication framework. It bears little resemblance to what eventually appeared as Vista, which is a shame as it was compelling in many ways.

Embarcadero All-access: a better way to deploy developer tools?

I have a call lined up with Embarcadero today, and wanted to catch up with their latest tools. It reminded me of something I’d intended to post about for some time, the Embarcadero All-Access system which allows no-touch install of many of its tools. Here is how it works. First, you run the All-Access client:

image

I’m not showing all the available tools here: I count 17 currently. You’ll notice many of them are marked InstantOn. Let’s say I want to take a look at DBArtisan. I click the link and get a dialog:

image

This invites me to start a download. Click Yes and I get a download thermometer:

image

Once downloaded, I have to pass a license screen and enter a serial number. Presuming you have a current subscription, you can get a serial number by logging on to you Embarcadero account and requesting it there, where it is supplied instantly. This part of the process is similar to that used by Microsoft for MSDN subscriptions. It is a shame it is not built into the All Access desktop client, but a minor inconvenience.

Then the application runs.

image

No further setup, no install options, or any of the other complications that often accompany installing developer tools.

To be fair, I can think of other development tools that are pretty much download and run. Eclipse is usually good in this respect, at least until you try to get updates. Further, even with All Access there can be additional steps. Instant-on 3rd Rail, for example, does not install a Ruby runtime, so it is not really click and run: the Eclipse-based IDE runs, but you cannot start a project without getting a Ruby interpreter from somewhere.

Nevertheless, this is the closest I’ve seen to on-demand developer tools, short of the interesting browser-hosted tools that are emerging. Embarcadero now also calls it the ToolCloud. It is not just an easy install; this is application virtualisation:

Aimed at simplifying deployment, enabling side-by-side versioning of products, and breaking down the barriers to use, InstantOn is also great in locked-down desktop environments, since the product does not affect any system files or system registry settings.

says the faq.

Alongside the technical aspects, All-Access simplifies license management for a development team. You can install the server piece on your own network for full control.

This comes at a price of course. There are four subscription levels, from Bronze to Platinum, though even the Bronze gives you use of a wide range of tools including Delphi, C++ Builder, JBuilder, Rapid SQL, some parts of ER/Studio, 3rdRail and Delphi for PHP. Example price from Grey Matter in the UK starts at £3188.57 for a 1-year Bronze concurrent license.

The interesting question: when can this be made into a generic tool that developers can use for deploying their own applications?

Delphi and C++ Builder 2010 are out

I’ve installed the new Delphi from Embarcadero. I want to enthuse about this product, as a long-time Delphi enthusiast, but a few things have dampened my zeal:

1. The install on Windows 7 64-bit was not totally smooth. First Avira Antivir claimed that a file installed during setup, called convert.exe, contained a virus (not the fashionable new one, something else called DR/Delphi.Gen dropper). I thought this was most likely a false positive. I tested the file with with Kaspersky which declared it clean, and I’ve emailed Avira about the problem.

I’m not sure why I bother at all with running anti-virus software. It is very little use. After all, what is the point of having it, if when it claims to find something you ignore it? On the other hand, what is the chance that this is a real virus on Embarcadero’s new CD, that Kaspersky does not detect?

None of this is Embarcadero’s fault, of course, unless it has shipped a virus, which I doubt.

2. Next, on running and quitting Delphi 2010 for the first time, the Windows Program Compatibility Assistant was triggered. See this earlier post for what this guy looks like and what it does. This one made the same change, ELEVATECREATEPROCESS.

A minor niggle perhaps, but it looks bad. At this stage, the Delphi team should have come to terms with UAC and made RAD Studio properly UAC-aware. I’m guessing most of the team run with UAC disabled.

3. Another UAC issue. When the IDE starts up, you get a message:

Error executing ‘C:\ProgramData\{BBD31133-40F8-4B57-9BA6-DB76C03D153B}\Setup.exe’: The parameter is incorrect

This does not occur if you run as administrator.

4. I ran up the IDE and noticed there is a new documentation wiki with user contributions. I think this is a great idea. It seems to be built with mediawiki. Unfortunately it failed with “A database query syntax error has occurred”. Update: it’s working now.

5. I’d understood that Delphi 2010 is somewhat Windows 7 ready. It has great support for multi-touch and gestures. That’s fine, but I was interested to see how to support the Windows 7 Jump Lists. A Jump List is the menu that pops up when you right-click a taskbar icon.

Well, if support for this is there I can’t find it. There is support for the Windows 7 Direct 2D Canvas, and as I mentioned for multi-touch, but that’s about all I can find.

It’s a shame because only a few people will be using multi-touch in the near future, and Direct 2D is not a feature visible to users, but the new Windows 7 taskbar and its features – there’s also the ability to add controls to taskbar preview windows – is the thing that every Windows 7 user will notice.

Of course you can easily call the Windows API from Delphi, and the community will figure out how to support these features before long; there’s already an alpha “Windows 7 controls for Delphi” that Daniel Wischnewski has come up with. But I’d like to have seen it in the box, and it would have been a nice selling point.

Don’t let me put you off. There are other new features – including Firebird support, integrated code formatter, better thread debugging -  and no doubt the core of Delphi is as good as ever (no 64-bit yet, but it will come eventually).

Still, my impression is that Embarcadero still has to work a bit on that last degree of polish. One final gripe: why is the discussion forum so darn slow? It has also been in beta forever.

More information here.

Delphi developer virus exposes weakness in anti-virus defences

I found a real live instance of the Delphi-attacking virus W32/Induc-A yesterday. It was in the executable for FinalBurner Free from ProtectedSoft (ironic name in the circumstances), a decent freeware CD burning application. The file is burner.exe and I suspect the company has been shipping it for some time. I do not know if it affects the paid-for versions.

This malware was highlighted by Sophos though one thing Sophos does not make clear (as it is in the scaremongering business) is that the virus has only a mild affect. It only affects machines with ancient versions of Delphi installed – versions 5, 6 and 7 according to Marco Cantu – and its activity appears to be limited to replication. In other words, a successfully infected machine modifies Delphi’s runtime library so that it compiles infected executables, but does nothing else that I know of.

The implication is that the anti-virus companies, far from doing a great job at protecting us, have only just spotted a problem that has been around for months or possibly years. The burner.exe I found was dated 16 June 2009. If anyone has an older example, I would be interested to know; I’ve seen one report of an August 2008 infection.

Thus, when Delphi Product Manager Mike Rozlog comments to the Register’s report:

The best ways to combat these types of issues are to establish a deployment protocol that checks for viruses and trojans before shipping any applications

you have to ask: how? Clearly scanning with an anti-virus product would not have helped ProtectedSoft. Note that Sophos admits in its database that protection has been available only since 18 August 2009.

Despite the mild impact of W32/Induc-A (as far as we know so far) it is not something to take lightly. The attack looks like a proof-of-concept, to be followed by similar code with more serious impact, or possibly just an experiment that escaped into the wild. Maybe there are other more serious variants that the vigilant anti-virus folk will find in a month or two’s time.

How then can developers protect their machines? Another Reg reader says:

Instead, people should try to ensure the integrity of their development systems. Don’t connect them to the ‘net and don’t play games on them (duh!). Don’t have any foreign executables on them besides the OS and the compiler, transfer the sources there and compile them there. Run some kind of integrity checker to make sure that your compiler distribution hasn’t been tampered with. That sort of stuff.

Good advice, though not trivial to implement. A suggestion for Embarcardero: how about giving some thought to the problem and coming up with an easy means for developers to check the integrity of their runtime library files?

The disturbing aspect of this story is how malware can end up in shipping software from reputable companies; it could even be signed code. How long before something like this ends up in an executable shipped with an operating system itself, maybe with a timed payload so it lies dormant until well distributed?

Survey ranks developer tools, and reveals what developers care about most

Evans Data has published its 2009 Software Development Platforms survey, to which around 1200 developers contributed, scoring their chosen development tools in eighteen different categories.

The tools covered are Eclipse, Embarcadero’s Delphi, IBM’s Rational Suite, IntelliJ, Microsoft’s Visual Studio, NetBeans, Oracle JDeveloper and Sun Studio.

I was sorry not to see more products covered. Flex Builder Flash Builder, Zend Studio, Aptana and JBuilder would all have been interesting, for example. Each developer only scored the product they actually use (a good thing), so the sample is not as big as it first appears.

I’m also mistrustful of the survey results, particularly when you look at it in detail. For example, one of the categories is “Support for frameworks”.  Visual Studio came top, while Eclipse was last. But hang on: in Visual Studio (for example) are we talking MFC, or .NET Framework? The development experience for each is totally different. And were developers primarily judging on the framework tools, or the framework itself? It is hard to attach much meaning to the scores in this category.

Another flaw: the versions of the products is not specified. That means a weakness may have been fixed in a later version, but the survey does not tell you.

A third flaw: some tools are weak in several categories, dragging down their overall score, but that does not matter to developers who do not use them for that purpose. It is hard to compare like with like.

Still, while I’m wary of the survey overall, I though it brought out some interesting points. One is that developers were asked what features matter most to them. So:

The three things developers care about most (highest priority first):

1. Basic tools (editor/compiler/debugger)

2. Documentation

3. Tool integration

The things developers care about least (lowest priority first):

1. Support for remote development

2. Support for parallel programming (sorry Intel!)

3. App Modeling tools

What about the winners and losers in the survey? I almost forgot. IBM’s Rational Suite came top, followed by Microsoft’s Visual Studio. Eclipse came last, though it still got a decent score, well below its rival NetBeans.

The low ranking for Eclipse (which is nevertheless wildly popular) deserves some comment, particularly as the top tool, IBM Rational Suite, is built on Eclipse. I spoke to Eclipse executive director Mike Milinkovich while researching this Register piece recently. One of the points we discussed was the tension (if there is one, which he disputes) between tools vendors sharing resources to build the best possible platform, and holding resources back to retain commercial differentiation. I’ll write this up in more detail shortly; but it shows why certain areas in Eclipse may not receive the attention they deserve – localization was a specific example.

Another problem with Eclipse is that it is all a bit messy, confusing and hard to manage, particularly in a team where you want every member to have an identical setup. It is still worth it though, for the riches it provides for free.

Embarcadero CEO on cross-platform native code

I had a long chat with Embarcadero CEO Wayne Williams last week. I used a few snippets on the Reg – on cross-platform Delphi and Eclipse – and hope to post more from it shortly. In the meantime, here’s what he said about using native code rather than Java or other types of managed code for cross-platform apps. It felt like 1996 all over again, but he has a point.

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.

The end of the Borland story: acquired by Micro Focus

It is not unexpected, but still sad to see loss-making Borland acquired by Micro Focus for a knock-down price of $75m. Borland’s release says little beyond the financial details. Micro Focus, which is also acquiring Compuware’s ASQ (Automated Software Quality) tools (such as QADirector, DevPartner and Optimal Trace, I presume) says:

Acquiring Borland and the Compuware Testing and ASQ Business will give Micro Focus a leading market position in the highly complementary Application Testing / ASQ market. This market is estimated to be worth c.US$2 billion a year and is logically adjacent to Micro Focus’ core application management and modernization business.  The move into the ASQ market is consistent with Micro Focus’ stated strategy of extending in logically adjacent segments to expand its addressable market.

Why sad? Well, if you were around in the eighties and nineties you will remember a bold company which came up with a series of excellent products: Turbo Pascal, Borland C/C++, Quattro Pro, Paradox, and of course the incomparable Windows development tool Delphi. The visual development model in Delphi was successfully transitioned to Java in the JBuilder product, which in its early versions used a Delphi-compiled IDE.

These developer-focused products live on, of course, mostly in the hands of Embarcadero. The Borland that has been acquired is what was left when, in my developer-centric opinion, the best parts had already left.

What went wrong at Borland? It is mostly the victim of changes in the industry, made worse today by the economic downturn. It was a tools company, and the tools market was hit by the double blow of excellent open-source competition on one side (Eclipse, GCC) and vendor-subsidised tools on the other (Visual Studio).

Still, there were some spectacular own goals along the way. The 1991 acquisition of Ashton-Tate, at the time the market leader in PC database managers, was one, mainly because dBASE IV was not very good and did nothing to help Borland transition to Windows; in any case, Borland already had a better product in the form of Paradox.

Talking of Paradox, Paradox for Windows was another disaster. Wonderful product, but mostly incompatible with its DOS predecessor, and probably a tad too complex as well. It also had to compete with Microsoft Access, which was both cheaper and part of the impregnable Microsoft Office suite.

The company made up for it with Delphi; but even that under-performed relative to its quality. Enterprises felt safer with Microsoft’s Visual Basic. JBuilder did well at first; but its market share diminished rapidly in the face of competition from Eclipse and NetBeans. In retrospect, Borland should have made its core Java IDE free much earlier, to build a community round it, though competing with free is never easy.

Since it was so hard making money out of compilers and IDEs, Borland changed tack in order to target Enterprise ALM (Application Lifecycle Management). It could have worked, but it wasn’t actually a great fit with the independent developers who formed a large part of its customer base, and who tended to ignore large, complex and expensive supplementary tools in favour of just getting on with coding.

The nadir was 1998 when Borland changed its name to Inprise, to reflect its Enterprise focus. “Many thought Borland had gone out of business”, says Wikipedia. It was changed back to Borland in 2001.

Another mis-step was the way Borland (then Inprise) handled InterBase, its client-server database. In 2000, with a burst of community enthusiasm, the product was made open source. A couple of years later, it changed its mind and continued to develop InterBase as a proprietary product; but by then FireBird had been born, based on the open source code.

Thought for the day: Borland paid more for TogetherSoft in 2002 (around $185m, including $82.5m cash), than Micro Focus is paying now for Borland.

Embarcadero RAD Studio 2009 is done

Embarcadero / CodeGear has released RAD Studio 2009, which includes Delphi 2009, C++ Builder 2009 and Delphi Prism. Note that Prism has its own IDE, which is actually the Visual Studio shell; this is the new take on Delphi for .NET that targets Mono as well as Microsoft .NET. You can also install Prism into an existing Visual Studio installation.

Looking at the UK prices, RAD Studio starts at £979.00, whereas Delphi starts at £549.00. Upgrades are much cheaper – less than half the price in some cases. The message seems to be: get RAD Studio if you think you might need more than one of these three products.

I’ve been asked whether the upgrade to Delphi 2009 is worth it. I have no idea, of course, since it depends what you need it for – though if you need Unicode I’d have thought it was worth it for that alone. I do think it is the best so far in the post-Delphi 7 series. Personally I prefer it to Delphi 7 as well; though check Mason Wheeler’s comments to a previous post for a contrary view. Vista compatibility is another advantage, though you can hack this in any version of Delphi. I doubt that Windows 7 will be much problem here; it is close to enough to Vista that the same stuff should work fine.

SQLite and Delphi 2009

I created a simple Delphi wrapper for SQLite, the popular open source database library. I’ve just updated it to work with Delphi 2009 – I’m not happy with what I’ve done, because I’ve changed a bunch of declarations from PChar to PAnsiChar and from String to AnsiString, just to get it working quickly. SQLite is fine for Unicode, so the next step is to revise it properly to support Unicode … when I or someone else has time.

It was interesting to do some work with Delphi 2009. It has the old problem: out of date documentation. Here’s what it says about PChar, in the entry on pointer types:

The fundamental types PAnsiChar and PWideChar represent pointers to AnsiChar and WideChar values, respectively. The generic PChar represents a pointer to a Char (that is, in its current implementation, to an AnsiChar).

Further, if you have the following code:

var
strTest: PChar;
begin
strTest := StrAlloc(6);
strcopy(strTest,’Hello’);
strdispose(strTest);
end;

and hover the mouse over strTest in the editor, the pop-up tip says:

strTest – System.PAnsiChar

However, this is wrong. In Delphi 2009, a generic PChar is a PWideChar. Here’s the code in SysUtils for StrAlloc:

function StrAlloc(Size: Cardinal): PChar;
begin
{$IFDEF UNICODE}
  Result := WideStrAlloc(Size);
{$ELSE}
  Result := AnsiStrAlloc(Size);
{$ENDIF}
end;

UNICODE is defined in Delphi 2009, so StrAlloc returns a PWideChar.

Technorati tags: , ,