Saturday, June 12, 2010

The first post about Bold

So this blog is about Bold for Delphi. There is a lot of developers that knows Delphi and using it for development. But I am still amazed that so few programmers are not aware of modeldriven development. I started to work with Delphi and Bold Sep 2005. Soon I realize the potential with this language and framework. Here you have the power of object orientation with Delphi and RAD development. That in combination with object orientation also to the persistence or the database.

Traditionally programmers has used SQL to communicate with a database to load and store data. Sure it works, but when the complexity grows it is easy to get a nightmare when fixing bugs or adding new features. By using Bold for Delphi as framework the productivity is increased a lot (I have heard 10 times as effective). You handle data an the database and the model as objects and this way you can take much more complex situations compared to the traditional way.

Bold use an UML model and OCL to read data from database. Maintenance is easy, just change the model, apply the generated database script to the database and start coding the changes. You don't need SQL, but you can of course still use it if you really wants.


  1. The problem with Bold for Delphi 2007/2005 is its inherent instable nature. It is so easy to lost the "glue" when you switch back-and-forth between the model and the code. And because it uses code generator and not "compiler-magic", you will total lost if the generator "forgot" something. The only rescue then is to switch back to a local backup version, which is very annoying. Or you had created some model in other application already and now want to import it in your new application, but when you did not do it right away from start, you will fail. Things like that take more time as writing the actual code, especially if you are a newcomer so your moral standing will decrease rapidly. Unfortunely the handbook and help files also do not say anything about that, so in the end you will create your first models very fast but will unavoidable stumble in any real life project. Actually, the list of (my) problems are endless but maybe your Bold gurus can write about some best practice so newcomer will not unnecessary bleed the nose for slipping on banana skin like that.

  2. Hi Sinuhe!
    Unfortunately I share your experience. The original Bolds modeleditor was started from Delphi IDE. It was not so clever because the editor is not stable as you said. When I begin to work with Bold for Delphi and Attracs the model editor was compiled as an separate application but still not stable. I remember sometimes I have to try many times before a roundtrip was successful. Some years ago one talent member of our team was tired of this and made command-line tools of this instead. So now a roundtrip is done in 10-15 minutes from a bat-file. This was a great relief, no more exceptions!

    We use Rational Rose for modeling so when model changes is ready the first line in bat-file convert the model to a bld-file as it is faster to work with.

    The rest of the command-line tools read the bld-file and produce code for businessclasses.pas the interface file and the dfm-file containing the model. There is also a command-line tool to generate the db-script.

    Of course this is only possible as we have the source for Bold... I really wish that Bold was free or at least available to buy so developers had a chance to compare what a powerful framework this is. For us Bold is great but we have also continued development of the framework to suit our needs.