[fpc-pascal] 3-tier database applications with FPC

Marco van de Voort marcov at stack.nl
Wed Oct 19 11:23:00 CEST 2011

In our previous episode, Graeme Geldenhuys said:
> Just over 3 years ago I asked about FPC support for creating 3-tier
> database applications. The answer was basically: it's not possible
> (unless you roll your own Midas / Datasnap code).

- kbmMW  http://components4developers.com/
  the author was on the Lazarus day in 2010.

Afaik sb was also working on porting midware (www.overbyte.be), but while
I haven't look at it for years I assume that is very windows centric.

> TClientDataset also missed some vital features, and the state of
> WebServices was also not complete.
> Here is the original message thread:
>    http://www.mail-archive.com/lazarus@lazarus.freepascal.org/msg00861.html
> So after 3 year, what has changed? Is the missing parts already
> implement, and is a Midas / Datasnap style 3-tier application possible
> with FPC?

I take 3-tier above as a general framework for 3-tier, not necessarily a
Datasnap compatible layer.
> I also believe Borland/CodeGear/Embarcadero released the Midas source
> code in post Delphi 7 versions.

No, starting only with D2010 afaik, and only enterprise and higher SKUs

> Anybody have success in compiling that
> code with FPC?

That would be very hard since it is C++.

> Yes I know you can't release such code, and yes I know Datasnap will
> probably only work with Windows.  But from my Kylix 3 manual it mentions
> TSoapConnection and WebServices for multi-tier development, so was
> wondering if FPC had no alternative, if I could possibly compile that
> Kylix 3 code using FPC - anybody tried this before?

Since Delphi XE2 last December you can make datasnap apps for OS X and very
experimental for iOS. Linux is said to follow in the next release.

However that is based on Firemonkey's ownerdrawn framework, and thus needs a
separate codebase for the GUI.  Firemonkey IS available for windows too

Note that stuff like datasource remains the same, but how non visual db
aware components are databound to FM visual components differs totally.

There is no grid, but the stringgrid like has some databinding properties.

To be honest, it looked a bit convoluted to me during the demo, but that
might just be the inexperience.

More information about the fpc-pascal mailing list