Category Archives: Delphi

019 – MIX07 – Danny Thorpe – on Borland, Google, Windows Live and .NET


Welcome to podcast #019. In this podcast I’m talking to the legend that is Danny Thorpe. Danny is a time-served guru, having spent time at Borland and Google. He’s now employed at Microsoft as a Windows Live Quantum Mechanic – a job title I’m sure most of us would love to have! Over the course of 30 or so minutes we wax lyrical about Danny’s time at Borland, Google, a variety of product battles, Windows Live security, RAD development environments, working remotely, Silverlight vs soapbox, etc. We also chat about the Borland folks that we both know and discuss where they are now…

Podcast feed – subscribe here!

This podcast:

Resources & Related Posts
http://blogs.msdn.com/dthorpe/
Scott Lovegrove interviews Danny Thorpe and Angus Logan
NxtGenUG chaps on Mix07, including mentions of Scott Guthrie, Robby Ingebretan, Simon Peyton Jones
027 – MIX07 – Jim McNiven and Chris Hardy – Viral Marketing
026 – MIX07 – Men Of Iron – Michael Foord, Dave Verwer – IronPython, IronRuby, the DLR
018 – MIX07 – Scott Lovegrove on Windows Live Services
017 – MIX07 – Hugh MacLeod – the inspiration behind the Blue Monster

Technorati Tags: , , , , , , , , , , , , ,

Borland forming CodeGear to focus exclusively on developer productivity

CodeGear – Formerly Borland’s Developer Tools Group – Expected to Become a Separate Wholly Owned Subsidiary by Early 2007

CUPERTINO, Calif.,— November 14, 2006 — Borland Software Corporation (NASDAQ: BORL, www.borland.com), today announced its decision to separate the Developer Tools Group into a wholly-owned subsidiary focused on maximizing developer productivity. The newly formed operation, CodeGear, will be responsible for advancing the four primary product lines formerly associated with Borland’s Integrated Development Environment (IDE) business. These include Developer Studio (Delphi®, C++Builder® and C#Builder®), JBuilder® (including the upcoming Eclipse-based “Peloton” offering), Turbo® and Interbase.

The full announcement can be found here:
http://bdn.borland.com:80/article/33819

On Gnostice, PDF creation, Delphi, Borland’s Turbo products

On the 22nd September 2006, Gnostice released version 2.41 of the PDFToolkit and eDocEngine for the [Delphi] VCL. As regular readers of this blog will know, I’m a great fan of Gnostice products – their PDF creation tools and components are a real boon to developers. Of course, this continued support for the Delphi VCL for Win32 and .net despite the divestment of the Borland IDEs, is confirmation that Gnostice passionately believe in the Delphi product name and the VCL.

Indeed, one need only look at the PDFToolkit VCL “road-map” here to realise that Gnostice are intent on producing an astonishingly feature complete PDF component set…writing for the VCL using the VCL – V3.0 looks to be awesome. Not surprisingly, there’s a similar roadmap for eDocEngine VCL – plans all the way up to V3.0 are well documented over here.

In an earlier post, I touched on the fact that Borland IDE divestment and the direction in which many component vendors seemed to be taking their products (towards .net and C#). Whilst this seems to still be the case, it’s worth noting that Gnostice are firmly focusing on three market spaces: the traditional Delphi VCL, .NET and Java. Their PDFOne .NET product provides support for PDF creation inside Borland Developer Studio 2005 and 2006 – with demonstrations being provided using the C# language, whereas their eDocEngine and PDFToolkit are fairly and squarely targeted at the VCL.

Of course now that the Turbo range of products are available, we see a renewed interest in the Delphi language and its direction. Knowing that Microsoft’s Express Editions are free, I can’t see the Turbo products being direct competition, therefore their existence presumably serves to further the Delphi language and provide heritage continuance (outside of the more expensive Borland Developer Studio-style all-encompassing product set). Given the career path of Delphi’s original architect, Anders Heilsberg (from Borland to Microsoft), this renewed interest might be what it takes to let Delphi and the Turbo products catch up with Microsoft. After all, here we are seeing much talk of .NET 3.0, yet Borland Developer Studio 2006 still only targets .NET 1.1. That said, Bob Swart makes mention of the next version of Delphi that will support .net 2.0, codenamed Highlander, over here.

I would like to see the Turbo products enjoy a shorter release cycle, providing them with an opportunity to target .net 2.0 and 3.0. With the next version of Visual Studio (Orcas) just around the corner, there’s not much time left to achieve this, but it should be a goal nonetheless.

Despite my earlier concerns about the future of Delphi and its language, it seems that there is a rekindled enthusiasm for the Delphi product set, fuelled more so by the reappearance of the Turbo mark that made Borland who they are today. Indeed it was the original Turbo range that provided the inspiration for the VCL and their [Borland] re-introduction of this famous branding will take the VCL to new heights – a point not missed by Gnostice who have plans in place for native VCL product releases/upgrades right into 2007.

eDocEngine VCL – comprehensive, generic, 100% VCL electronic document creation component suite for Borland® Delphi™ and Borland® C++Builder™.

PDFtoolkit VCL – powerful component set for Borland® Delphi™ and Borland® C++Builder™ to manage, manipulate, view, print, enhance PDF documents and process PDF eForms.

PDFOne .NET – 100% .NET component library to implement PDF based software solutions.

PDFOne Java – 100% Java library to implement PDF based software solutions.

Links
http://www.gnostice.com
Gnostice Plans for 2006
PDF Toolkit VCL – Road-map
eDocEngine VCL – Road-map
Turbo Downloads
TurboExplorer

Technorati Tags: , , , ,

XML as code

Via Alistair’s cakeBlog, I found this to be a good read.

Now, I am a huge fan of XML, and have gone through [my] three phases of XML usage:

1. 1999-2000: XML everywhere. Used it for everything, list boxes, drop-down menus, you name it – all populated from SQL Server tables. It was way cool. But, half way through the project’s duration (not feature set), realisation set in, hey, it take a lot of time to work with XML if it’s everywhere. Why don’t we just use it where it’ll provide some benefits?

2. 2000-2002: Refactoring from XML everywhere to XML here and there. Anywhere data had to cross boundaries, XML has its place – combined with web services, XML was starting to take shape.

3. 2002-today: Use it wisely…for syndication/content aggregation and connected systems. Extending the crossing of boundaries to between disparate systems.

I’m still in the third phase, although I have an idea about how XML will play a part in the next [fourth] phase, I can’t reveal it here just yet. It’s just not firmed up enough to write much about it.

Naturally, whenever I hear folks ranting on about XML and how bloated it is, I’m right in there kicking off a debate! However, Allen’s Just Say No to XML article is one that I will happily agree with. XML provides us with a super means of connecting systems together. However, by virtue of the XML DOM, it provides us with a parser and a syntax checker. Couple and XML document with an XML Schema, and suddenly we can control the order of the XML elements in the XML document and control data types…we’ve kind of got ourselves a language parser. And it seems that folks have latched on to this concept and are using XML documents to convey more than data and meaning, but to carry out specific programming instructions, i.e. XML, as a mark-up language, is being used as a programming language. Except it won’t be any programming language that you or I are familiar with. It’s likely to be a hybrid of the original author’s favourite “instructions”. There will be no language constructs, such as partial classes, heck there won’t even be classes as we know them. And, in the absence of XSLT, it’s likely to be procedural in nature.

If you’re thinking of using an XML document to add some form of programmatic instructions to your application, please, don’t. Learn how to use some of the many [free] language parsers that are out there, integrate them into your application and you’ll have a much more maintainable and robust application. And it’ll probably save you a lot of time – you won’t be writing what amounts to an interpreter were you to use XML elements as instructions.

Technorati Tags: , , , , , , , , ,

Alas poor Delphi, do I see a sharp future ahead?

[Warning: thought gathering rambling follows, coherence might be sacrificed.]

Following Tod Nielsen’s letter announcing that Borland would be divesting their IDE product lines, driving an even tighter focus on the Application Lifecycle Management (ALM) market, what future lies ahead for those of us who have been using Delphi for most of the last eleven years?

I know that I am not alone in having an opinion about this divestment, and it’s one that may result in a further blog posting. Even some Microsoft employees have a very heavy interest in Borland’s divestment plans, some who were/are very close to the Delphi scene.

However, the purpose of this posting to two-fold:

  1. to plug Gnostice’s PDFOne – their .net 1.1/2.0 PDF creation components. It’s a great product, I reviewed their earlier Win32 VCL offering, eDocEngine and found it to be totally awesome (as this review confirms!). However, and this is not a criticism by any means, but the PDFOne demonstrations are written using C#. I believe that this is decision to use C#, and Gnostice are not alone, is a key driver that will dictate the direction of the “Delphi Language”.
  2. to try and understand, whether in this posting or a follow up, what might happen to Delphi as a “language”, if all vendors in the .net space move their demonstrations and support over to C#

Gnostice have produced a product for use in the .net environment. Without splitting hairs, that means products like: Borland Developer Studio 2005/6 (Delphi 2005/6), Visual Studio 2003/5, Visual C#/VB Express Editions. Given that Delphi 200x targets .net 1.1, Gnostice were wise to produce assemblies for both .net 1.1 and .net 2.0. The demonstration application that is supplied with PDFOne is written using C#…which means that it will work with Delphi 200x (via its “C#Builder” or C# personality) and it will work in the Microsoft IDEs too.

Of the other vendors who are moving their components (demonstrations and documentation too) from the VCL to .net, what if a number of them started ignoring true Delphi and provided C# examples? I guess most of us would just muck in and convert the code on an as-needed basis, after all, it’s not very difficult converting C# examples into true Delphi code (and vice versa). Certainly it would make me think about whether I should be writing any new applications using true Delphi code.

The importance of the “Delphi Language” is gradually being eaten away by the almost omnipresent C#. There are folks out there who believe C# is the best thing since sliced bread. However, us folks in the Delphi world have enjoyed virtually everything that C# has to offer today. Granted language progression slowed down somewhat when Anders Heilsberg joined Microsoft (see his TechTalk here). C#, and parts of the .NET framework (especially 1.1) are not as well abstracted as people might think, especially those of us with a Delphi background, a point that I made during my recent lament about Borland and .NET:

…is .NET 2.0 up-to-date with regard to the needs of today’s developer? I’m not so sure: Delphi was the first product to simplify Windows-based development with its glorious abstractions around WndProc and the Windows messaging sub-system. No longer did we have to write code to create treeviews, add nodes, or draw them in special ways, etc. Win32 development with Delphi was almost reduced mouse clicks. Visual Studio for .NET 1.1 brought a similar IDE metaphor to the .NET world, however it lacked a number of Win32-style events that we in the Delphi world take for granted, such as the simple ability to have owner draw controls (have you never wanted to make root nodes in a treeview bold?) In .NET 1.1, it’s back to basics, you have to implement everything yourself (as described in these hoops and by the example here.)

So Delphi 200x IDEs may be relegated to being competition for Microsoft’s IDEs. Is that such a bad thing? Can the market withstand such competition? Well, Borland obviously have a view on the competitive aspects of their IDE – they’re selling it off. By selling it off, they are telling me two things:

  1. They’ve got something else to focus on, in this case ALM. Presumably this is the next big cash-cow and we all should be buying shares in any company that promises big things in the ALM space.
  2. They’re hoping that the potential buyer will work with developers and the market space, and will progress the IDE within the competitive environment. I certainly hope this is the case.

Delphi itself, as a product, has always enjoyed a lot of kudos because of its legacy support, i.e. applications written using previous versions would re-compile with newer versions. The only problem in this legacy support scenario is third party components. [Borland, please note, this is not a criticism] For years Borland have charged circa £1000 for an upgrade to the next major version or nearly £2000 for a new purchase. Now, I am a Delphi fanatic and have been for 10 years. That’s a lot of upgrade cash. I’ve lost track of the number of Delphi developers who recite the same story to me, especially at user group meetings and developer events.

It’s one thing migrating a vanilla Delphi application from one version to the next major version, it’s another thing to migrate an application that is “third party component heavy”. It’s another thing because we have to shell out for the third party components that match the version of Delphi we’re upgrading to. If you’re doing well, the third party component vendor(s) have kept up and their products are available when you need them…not months after the release of Delphi itself.

On the other hand, and keeping things equal, I like the Microsoft IDEs too. Whilst both Borland and Microsoft IDEs require huge amounts of desktop real estate (screen resolution), each of the respective IDEs have a number of features that make them a delight to work with. Granted, in terms of developer productivity, they are behind the likes of IntelliJ, although it’s authors are making great efforts to correct that as Rob Lally confirms in his write up here (expect a Resharper review to appear here and over at Scottish Developers real soon now!)

I wonder if the recent emphasis on C# signifies the demise of what we know as the “Delphi Language”? Two things will provide the answer: time and the new DevCo who take over the Borland IDE market space. Will there be developer consultation? Will there be a customer satisfaction survey that lets us suggest what language features to important to us? I certainly hope so.

Further Reading
Borland rides Segue on trip out of IDE biz
Borland gambles without developers
Marco Cantu’s Support Delphi blog posting.
DavidI’s posting is here.
http://www.regdeveloper.co.uk/2006/03/07/borland_ditches_delphi/
Hopefully this posting is merely an April Fool’s joke?
Product Roadmap
Borland wants to be a Red Hat for developers

Creating SWF movies in Delphi

I reviewed Delphi+Flash for The Delphi Magazine: it’s a great product and is especially useful if you need to add animation to your application.

Merry Xmas

Here are a couple of sample animations:

Example SWF 1
Example SWF 2

And some sample code:


var Movie: TFlashMovie;
label1, label2, label3, label4: TSWFOffsetMarker;
EA: TSWFExportAssets;
begin
Movie := TFlashMovie.Create(0, 0, 400 * twips, 200 * twips, 20);
Movie.Version := 6;
Movie.SystemCoord := scPix;

Movie.AddRectangle(0, 0, 400, 300).SetLinearGradient(SWFRGBA($663300), SWFRGBA($CCFF99), 270);
Movie.PlaceObject(Movie.Shapes[0], 1);
Movie.BackgroundColor.RGB := SWFRGB(0,0,0);

{ Text }
Movie.AddFont(Font, false);
With Movie.Fonts[0] do
begin
Size := 2 * twips;
Name := 'Times New Roman';
Bold := true;
end;
Movie.AddText('The Delphi Magazine', cswfWhite, Movie.Fonts[0], Point(0, 100), taRight);
Movie.AddSprite;
With Movie.Sprites[0] do
begin
PlaceObject(Movie.Texts[0], 10);
with PlaceObject(Movie.Texts[0], 9) do
begin
SetTranslate(2, 2);
InitColorTransform(true, -$FF, -$FF, -$FF, -150, false, 0, 0, 0, 0, true);
end;
end;
Movie.PlaceObject(Movie.Sprites[0], 10000).SetTranslate(395, 0);

{ one snow }
Movie.AddStar(0, 0, 3, -3, 4).SetSolidColor(SWFRGBA($EE, $EE, $FF, $DD));

Movie.AddSprite;
With Movie.Sprites[1] do
begin
PlaceObject(Movie.Shapes[1], 1);
With FrameActions do
begin
ConstantPool(['this', '_x', '_y', 'ZielX', 'ZielY']);
Push([400, 0], [vtInteger, vtConstant8]);
GetVariable;
Push([1], [vtConstant8]);
GetMember;
Less2;
_Not;
label1 := _If.BranchOffsetMarker;
PushConstant(0);
GetVariable;
Push([1, 10], [vtConstant8, vtInteger]);
SetMember;
SetMarker(label1);
PushConstant(0);
GetVariable;
Push([1], [vtConstant8]);
GetMember;
Push(0);
Less2;
_Not;
label2 := _If.BranchOffsetMarker;
PushConstant(0);
GetVariable;
Push([1, 250], [vtConstant8, vtInteger]);
SetMember;
SetMarker(label2);
PushConstant(0);
GetVariable;
PushConstant(2);
GetMember;
Push(0);
Less2;
_Not;
label3 := _If.BranchOffsetMarker;
PushConstant(0);
GetVariable;
Push([2, 250], [vtConstant8, vtInteger]);
SetMember;
SetMarker(label3);
Push([300, 0], [vtInteger, vtConstant8]);
GetVariable;
PushConstant(2);
GetMember;
Less2;
_Not;
label4 := _If.BranchOffsetMarker;
PushConstant(0);
GetVariable;
Push([2, 10], [vtConstant8, vtInteger]);
SetMember;
SetMarker(label4);
Push([3, 4], [vtConstant8, vtInteger]);
RandomNumber;
SetVariable;
Push([4, 4], [vtConstant8, vtInteger]);
RandomNumber;
SetVariable;
PushConstant(0);
GetVariable;
PushConstant([1, 3]);
GetVariable;
PushConstant(0);
GetVariable;
PushConstant(1);
GetMember;
Add2;
SetMember;
PushConstant(0);
GetVariable;
PushConstant([2, 4]);
GetVariable;
PushConstant(0);
GetVariable;
PushConstant(2);
GetMember;
Add2;
SetMember;
end;
ShowFrame;
RemoveObject(1);
FrameActions.GotoFrame(0);
FrameActions.Play;
ShowFrame;
end;

EA := TSWFExportAssets.Create;
EA.Assets.Objects[EA.Assets.Add('bot')] := Pointer(LongInt(Movie.Sprites[1].CharacterId));
Movie.ObjectList.Add(EA);

With Movie.FrameActions do
begin
ConstantPool(['max', 'i', 'zufall', 'bot', 'attachMovie', '_root', '_x', '_y', '_xscale', '_yscale', '_alpha']);
Push([0, 100], [vtConstant8, vtInteger]);
SetVariable;
Push([1, 0], [vtConstant8, vtInteger]);
SetVariable;
label2 := SetMarker;
PushConstant(1);
GetVariable;
PushConstant(0);
GetVariable;
Less2;
_Not;
label1 := _If.BranchOffsetMarker;
Push([2, 150], [vtConstant8, vtInteger]);
RandomNumber;
SetVariable;
Push([1], [vtConstant8]);
GetVariable;
PushConstant([3, 1]);
GetVariable;
Add2;
Push([3, 3, 4], [vtConstant8, vtInteger, vtConstant8]);
CallFunction;
Pop;
PushConstant(5);
GetVariable;
PushConstant([3, 1]);
GetVariable;
Add2;
GetMember;
Push([6, 800], [vtConstant8, vtInteger]);
RandomNumber;
SetMember;
PushConstant(5);
GetVariable;
Push([3, 1], [vtConstant8, vtConstant8]);
GetVariable;
Add2;
GetMember;
Push([7, 360], [vtConstant8, vtInteger]);
RandomNumber;
SetMember;
PushConstant(5);
GetVariable;
PushConstant([3, 1]);
GetVariable;
Add2;
GetMember;
PushConstant([8, 2]);
GetVariable;
SetMember;
PushConstant(5);
GetVariable;
PushConstant([3, 1]);
GetVariable;
Add2;
GetMember;
PushConstant([9, 2]);
GetVariable;
SetMember;
PushConstant(5);
GetVariable;
PushConstant([3, 1]);
GetVariable;
Add2;
GetMember;
PushConstant([10, 2]);
GetVariable;
SetMember;
PushConstant([1, 1]);
GetVariable;
Increment;
SetVariable;
Jump.BranchOffsetMarker := label2;
label2.JumpToBack := true;
SetMarker(label1);
end;

Movie.ShowFrame;
Movie.MakeStream;
Movie.SaveToFile('demo.swf');
Movie.Free;

ShellExecute(handle, 'open', 'demo.swf', nil, nil, SW_Normal);

The Best of Delphi 2005

the best of Delphi 2005
On the 29th of November 2004 I will be speaking at The Best of Delphi 2005: an event organised by The Developers’ Group.

The event takes place here: 1 Whitehall Place, London, SW1A 2EJ and starts at 0900 – be there!

The full agenda can be found here.

I’ll be speaking about two subjects: refactoring and XML Web Services.

Refactoring
I don’t know about you, but I’m a lazy coder: I like my IDE to help me as much as possible. I used to be happy with simple stuff like indenting or “outdenting” blocks of code. Then along came code completion, heaven! Naturally I crave for more, more productivity gains, more guarantees that the code I write is syntactically correct and it is consistent.

The refactoring support in Delphi 2005 provides such guarantees: no longer do you have to rely on cut’n’paste to move chunks of code around (many a customer-facing error has been made with “cut’n’paste”!).

Use Refactoring To Move From Win32 Delphi to Delphi 2005
Moving your application from one version of Delphi to another is never quite as easy as it looks. Even more so if it’s from Win32 Delphi to Delphi for .NET!

Consider a legacy Delphi 5 application that was written around the time Delphi 5 was released. Like all code that was written “a while ago” (a couple of weeks ago in my case!), you probably look at some old code and think: “did I really write that?” and/or “I haven’t a clue how that piece of code actually works”. If those quotations ring true for you, Delphi 2005’s refactoring (and unit testing) is something you should be very interested in: refactor what you don’t understand.

Delphi 2005’s refactorings will let you re-write (alter the design of) your old code whilst preserving the functionality. Similarly, if you don’t understand how a piece of code works, Delphi 2005’s unit testing will let you write tests to “surface” an understanding.

If your application doesn’t use any third party components, then moving from say Delphi 5 to 6 or 5 to 7 is probably the simple matter of a recompile, perhaps with one or two minor code changes.

However, if your application uses third party components, your move to a new version of Delphi typically will involve an upgrading those very same components! And this is where it can get a little hairy. My experience has shown that moving a moderate-sized application from Delphi 5 to Delphi 7, whilst taking into account a raft of third party component upgrades, sparks off the need to re-test and often re-write large parts of the application.

Similarly, moving from Win32 Delphi to Delphi 8 or Delphi 2005 also necessitates that your application is retested after the move.

It is for reasons like these that Borland have incorporated two features into Delphi 2005: refactoring support and unit testing via NUnit. Refactoring brings with it the productivity gains we are all looking for and NUnit provides us with a means of ensuring that the refactoring hasn’t broken anything. Refactoring and unit testing are made for each other: I will cover refactoring during my session and Dr.Bob will cover unit testing in his.

Attend this session if you want to learn how to be more productive within the Delphi IDE (Win32 or .NET), how to be more responsive to your customer’s [changing] needs and how to bring your application to market faster thus encouraging an early return on investment and realising profit sooner rather than later.

XML and Web Services
Between Delphi 6 and Delphi 2005, the bottom line functionality of Delphi’s support for protocols like the Simple Object Access Protocol (SOAP) and web services hasn’t really changed very much. Granted, there have been bug fixes and upgrades to support newer versions of World Wide Web Consortium (W3C) standards, but if you look at the applications that can be created using Delphi, not much has changed.

So why spend 45 minutes talking about it?

Well, there are plenty of good reasons, least of all:

1. Delphi 2005 could be the version you have been waiting for: a lot of folks follow “odd numbers”, Delphi 3, 5, 7…Delphi 2005 is the next logical version. If you plan to adopt Delphi 2005, and you are coming from Delphi 5, then it is possible that your Delphi 2005 application architecture will need to involve web services.

2. Delphi 2005 could be the version that you plan to “migrate to .NET” with. You’ll need an understanding of what’s in .NET that can help you: this session will provide you with an understanding of how to integrate your application(s) using .NET’s XML support and will show you how to interact with other applications running elsewhere on the Internet.

Building applications that rely on web services to serve up their functionality might sound odd. However, think about how your existing applications are architected: you probably use “layers” or abstractions to shield GUI functionality from database access functionality, for example.

Building an application using web services instantly gives you a layer of abstraction: you can implement functionality once, and then use it from a GUI client application, and web client application or even a mobile device – anything platform that is capable of consuming a web service could potentially become a user of your application.

This suggests that your application could be used in more remote locations….increasing the return on investment and bringing your application into profit much sooner.