Friday, 21 August 2009

Time for new project type?

I’m not a web developer. While I did do some classic ASP earlier in my career, it’s mostly been about classic (Delphi) Win32 applications for me. So recently I thought I’d have a look at ASP.NET. At the same time, I thought I’d also have a look at ASP.NET MVC since that seems to be the in thing at the moment. Now I have no bias either way. I’m fairly new to both, but I just loved the simplicity of ASP.NET MVC. I’m not sure if simplicity is the word I need here, because actually, classic ASP.NET is perhaps the easier option for an inexperienced developer, as it uses abstractions to make Web development a drag and drop affair. Still, ASP.NET MVC just felt more natural to me. I’m sure had I looked at it 10-12 years ago (and had ASP.NET and ASP.NET MVC been around), I would have loved ASP.NET, and wondered why they even bothered with MVC.

This got me thinking about my day job. Since Delphi 1 we’ve opened up the IDE and clicked on New VCL Forms Application, got our empty form and started dropping components on the surface. We drop a few more components, create a few bindings, write a few event handlers, and hey presto we have an application. I bet every Delphi developer started out that way, and it works, but as you get more experienced, you begin to realise that for any real-world, half decent application, this sort of coding style just doesn’t scale well, and more importantly doesn’t maintain well. So you add a datamodule, and move all your database components to it, and feel happy for all of about 3 minutes. Something still bothers you though, so you get rid of the datamodules, and get rid of the data aware components, and perhaps write a framework, or even get a third party one. You read the book on design patterns, and see how many of them you can fit into your application.

Now that’s all well and good, and your framework may be great, but it’s different than my framework. Actually, I keep changing my framework of choice depending on what article or book I read last. My point is, that there is no consistency. So while the data-aware component model works well for beginners, and I would not advocate getting rid of it, I think Delphi is more than mature enough to have a new model. Sure we can look at third-party vendors for this model, or we can write it ourselves, but if we want real consistency, it needs to be in the IDE right next to Create New VCL Forms Application, and everybody needs to have it in their IDE. That way, when that new developer outgrows the 100 components per form model, and he or she is ready for the next level, there’s a clear path.

So how about it Embarcadero? Perhaps it’s time for Delphi to grow up a bit. I dunno, some kind of MVC pattern perhaps. Perhaps Passive View. Why not more than one? Wouldn’t you like to see this in the menu under File|New

New Passive View Project

Or maybe it’s just me!

4 comments:

william said...

I would rather prefer a MVP framework on the new menu item :)

Anonymous said...

I'm in total agreement with you. Come on Embarcadero bring it on!!

dave said...

Totally agree. The RAD style of development is one of many. Also Cross platform would be easier with MVC or similar.

JPenn said...

Greate post! I second your suggestion. Let's move Delphi (and the VCL) to the next level!