4D 2004

4D’s latest database offering, 4D 2004, is designed to make life much simpler for 4D developers and users. There’s a large number of improvements, both to the interface and the functionality that the client/server cross-platform database system provides.

MEthod zone
The method editor has 'folding' functionality, making editing large methods easier.

At the top of the list for most everyday users will be the integration of a built-in backup system that not only handles backup (under the program’s control), but (and for some reason this is always the bit that most applications omit), 4D can now automatically recover databases at restart. The server application can also auto-update your client software whenever users login. Sounds dull, but if your server goes belly-up, knowing that the database is recoverable without spending hours on the phone to tech support is a big plus.

End users benefit from access to new developer-specified modifiable forms – so if the PR department gives your corporate image an overhaul, you don’t need the developer to change your form letters. And hey, they also get a spellchecker.

Developing a good feel
But let’s be honest, developers are the real beneficiaries with 2004. The IDE (Integrated development environment) is been tweaked back to life with what is really a very subtle but complete overhaul – on a Mac we finally have an OS X-like look-&-feel. The explorer, which acts like an internal Finder for 4D, lets you manipulate the various objects that go to make a complete database solution: tables for describing storing data, forms for displaying and editing it, methods (scripts) for working with forms, and so on. You can now organize objects into folders, so that you can keep together the forms, methods and tables associated with each part of your solution – making code re-use (one of 4D’s main features) easier. The explorer now even has a trash (for drag-&-drop deleting) from which you can retrieve certain object types if you change your mind.

The method editor has had a face-lift. Editing code in 4D 2004 is a joy, mainly due to its ‘folding’ capabilities. Structural statements such as ‘if… else… end if’ have reveal triangles by their side, letting you choose exactly how much you want to see of the method – great when figuring out what’s going on in a three-screen-long piece of code. There’s also a history clipboard, and ten individual clipboards, great for editing similar sections of code. And if you write a lot of similar code, there are user-definable macros. (Although, this is ‘user-definable’ in the loosest sense, as it’s a question of dropping hand-coded xml files into a folder.)

On top form
The form editor, too, has been in for a refurb. When adding or moving objects around on a form, you now see visual guides to help align things. Indeed, so improved is the look-&-feel (of both the IDE and the resulting 4D database) that you might be forgiven for thinking you were in Apple’s Interface Builder. But IB doesn’t have Views – which act like Photoshop layers so you can group, hide, and show interface elements – or Shields. By choosing a Shield type from the pop-up menu, objects on the form are marked with a shield showing, for example, their tabbing order, whether they have standard actions attached, or which View they’re on. (The Dictates of Flattery will have this showing up in other development environments soon, no doubt.)

One feature that will have 4D developers jumping up and down with glee is the new List Box form object. You can now produce spreadsheet-like tables in a form with draggable columns, multiple selects, and in-cell data entry. Subform objects can now be got at programmatically, too. (It will make life easier, but I suspect that jaded end-users may just take the resulting interface for granted.)

Wait. Buzzword check: 4D 2004 has SAX appeal… at least, it can now do XML SAX parsing, can read and write XML documents, and can handle XSLT transformations. Translation: 4D can now do PDF, HTML and so on at will, always provided you have a tame XSLT author to hand.

Regarding speed, 4D also claim a modest improvement in data access of around 200 times, due to what the developer describes as a “warm cache”. In real use, your mileage will almost certainly vary.

Database politics
But 4D the company has a problem: it’s preaching to the converted with a product aimed primarily at existing developers. For rookies, the learning curve is still steep, and the documentation remains lacklustre (Question: as a new user, how do you actually use the 4D IDE interface? Clue: don’t try looking in the help menu.) 4D is no longer an end-user product, and as a company 4D is dependent on consultants creating bespoke applications for end users – granted, with often-excellent results.

But as an end user, given the choice and the money, would you want a system developed using a proprietary environment (albeit with a lovely interface) that ties you into an upgrade cycle and a small pool of suppliers, or one that used open standards such as MySQL with a Web interface, that didn’t? Yes, both involve development costs, but maintenance costs are a different matter, and the argument over support for open source isn’t the issue it once was.


If you’re already a 4D user, then you will find the 4D 2004 development environment a great improvement. However, in terms of price, if you haven’t yet upgraded from a 6.x product to 4D 2003 and you aren’t in a rush to upgrade your OS X machines, then you may want to around for the next version, codenamed GoldFinger.

Find the best price