Delphi


Delphi still fighting the war lost years ago

Embarcadero announced the release of the Delphi XE Starter edition for building native windows applications. I spent many years as a Delphi developer before I made the switch to Java while the Delphi programming language and tools were top notch at the time. However, with the years of abuse at the hands of Borland and then Codegear, it fell way behind. Java IDEs in general are far superior with a lot of attention paid to the actual code aspects of the IDEs while Delphi was very GUI centric and provided superior visual editors. Of course, Delphi is very rigid in how you build applications while Java provides a lot more flexibility to the point of having too much flexibility (the story of Java’s life).
Read More ยป

Is Microsoft digging in the wrong place?

Java developers might feel a sense of unease relating to the number of posts predicting its demise at the hands of .net. However, developers have evolved; at least I know I have. Looking back on my Delphi days, we used to couple visual components to datasets that were then coupled to the database by a SQL statement. Insert, updates and deletes were made using cached updates with SQL statements that were generated from the select SQL. For the most part, unless you were really aware of the issue, transactions were ignored and despite it being an object-oriented language, it made rather shallow usage of the methodology.

Handling validation, corrections and formatting of fields was always a tricky affair and involved data validation code scattered throughout the application. In most cases the code was stuffed into event handlers and reproduced each time it was needed.

Over time, maintenance became a nightmare. If a field name, type or size changed it would break the dataset that was bound to that table or field. It meant having to go and manually refresh the fields on each dataset, and some changes meant having to manually modify each SQL statement that involved a particular table. For the last few years, most of my Delphi gigs have involved maintenance of Delphi applications and each time I was presented with spaghetti code where logic was strewn throughout the application in the unlikeliest of places.

One problem with Delphi is the ease with which applications can be created using a point and click interface, which is always a good thing, except for the fact that it leads to casual and lazy programming. (Un)Fortunately Delphi was never so popular that the masses picked it up, otherwise we could be swimming in a sea of bad code instead of a small lake. I like to think that those who did adopt Delphi as their language of choice took pride in it enough to do a decent job although obviously not everyone did.

Having seen and worked with Java, it is like coming out from under a rock and programming like an adult. We have frameworks that use good OO principles as often as they use ?if? statements. We can use rich ORM models to decouple the application from the database, and we use other layers and Dependency Injection to abstract everything from casual data access to complex processing so we can easily refactor at will and switch out one concrete class for another. Our domain models decouple our view and our logic from our database. The web frameworks became more plentiful and feature rich, and while it gave the developer a dizzying choice, it showed that Java folks were being creative and innovative.

Despite the choice of Java on one hand, and Delphi on the other, Microsoft chose the Delphi style of development. They chose tight coupling between data, logical and view tiers with developer tools that encourage point and click coding and discourage re-use. They chose the route that promotes lazy development and takes the user down the route of spaghetti code. I think Microsoft could have fully embraced true OO values and built it into Visual Studio.

Microsoft has taken steps to amend this with the introduction of the ObjectDataSource in .net 2.0 which allowed developers to couple their controls to lists of objects. They have also released their own action based MVC framework, which puts them only about 10 years behind java, which in software development terms is a lifetime.

There are also efforts to port the best java libraries over to .net such as spring.net and nhibernate that may encourage people to adopt better practices. I have used Nhibernate with asp.net and found it works very well, but I worry that the lack of a ?Made By Microsoft? stamp will keep it on the sidelines in most corporate shops. There are also many developers who will move to .net from VB and Delphi and continue their bad practices without thought and forge new shackles for themselves in a new language.

ASP.net pages are already being shown the door for Microsoft MVC, Winforms has come and gone in favor of WPF. If developers had separated their layers, they can put a new view layer over the business/data layer rather than have to redo many pieces with a new front end. I don?t doubt for one minute that this will be the last major upheaval to .net in the next decade. It seems like few pieces of Microsoft technology has a practical lifespan of more than a few years. Most articles promoting good practices in .net involve shallow OO principles and like Delphi, are relegated to the strange and esoteric. Why write code when I can point and click?

Looking at Delphi?s past and present, I see a future for .net with an abundance of legacy apps that require someone to jump in and untangle all that spaghetti code. It may pay the bills, and in some cases pay them well, but that doesn?t always make for relief from the misery (as a Delphi developer, I would know).

This Delphi programmer has evolved, but it seems that Microsoft has not yet made the leap, and neither have a number of their developers who keep digging in the wrong place.

Ok Saul, go bust a move, but watch out for the dead monkey.

Update : An interesting discussion on this topic has developed in this post on Fredrik Norm?n’s blog.

Hello World

To paraphrase Christopher Hitchens, the truth usually falls between two opposing views and the only way to influence the determination of that point is by getting involved, having your say, refuting a few arguments and maybe changing a few opinions. Now I’ve finally found the time to create my blog, maybe I can do just that. Here’s hoping it doesn’t become just one of many derelict first post blogs with a handful of temporally divided posts.

It is somewhat poignant that today is the date of my first post given my history. I started writing software professionally 13 years ago, in the summer of 1995, at a company that wrote tax software. My boss came in, threw me a brand spanking new, hot off the presses, only just released copy of Borland Delphi version 1, and told me to learn it. It was Windows 3.1 and had its problems, but it was awesome and I soon become a Delphi guru.

That event has forged my life for the past 13 years that I have spent working as a Delphi developer. It’s been a rough road, in the late 1990’s I worked as a consultant waiting on a daily basis for the Delphi jobs to trickle through my email box. Most gigs have been unattractive maintenance jobs usually providing support until the client can write it in something else. I’ve been through the Inprise name change, I?ve been through the lawsuits and employee stealing between Microsoft and Borland, and I?ve been through the Corel fiasco, the Kylix fiasco, the CodeGear fiasco, and felt every other trip and fall that Borland, and especially Delphi had in the last 13 years. I paid good money out of my own pocket for Borland Delphi 2006, and it was a stinker. I’ve been in the same job for the last 8 years, since July 2000, working on a few Delphi projects, and it’s time for a change.

I aim to blog about a number of these changes, the artifacts and events that have precipitated it and the path I’m heading in, but for now, let’s just say that it’s time to push in new directions. This blog is really a symbol of that change, because I intend for much of this blog to focus on my new directions, and on this same day Code Gear has been sold to Embarcadero for $23 million. Now I wish them all the best, but Delphi has been the unloved stepchild of Borland for a number of years and I don?t see any small amount of investment fixing that even if they chose to make the effort to. In a day and age where IDE?s are free and platforms are competing more than ever, I don?t see a small shareholder of that market staying in the race for long.

It seems fitting and ironic that on the day I embark on new ventures, news comes out that will probably ultimately end up with Delphi being put out to pasture.

For me, Delphi is another Betamax, a far superior technology that just couldn?t get a good enough footing to reach critical mass. It spoilt me as a developer, no other platform or tool had the richness, or allowed for such development speed with strong third party and community support. It wasn’t all pretty, and some of it’ll write about, but pound for pound, Delphi was the tool, the language and the framework to which all others aspired.

I’ve been looking for new directions to take, and coming from Delphi, it is difficult for me to find tools and a language that stands up to the standards I’m used to. However, I have found a rather solid contender in the form of JBoss Seam which comes with an IDE that, rather than be a mish-mash of mis-functioning plugins, is actually geared towards developing Seam applications. Seam also provides much of the richness of developing a thick client application, and getting a project started isn’t a project in itself. For now, Seam appears to be put the RAD into web development.

There is always .net development, which coming from a Delphi background should feel like home. I’m currently working with Java at the moment, but I am sure I’ll be getting back into Microsoft territory.

So here’s to new ventures and old friends.