[fpc-pascal] OFF TOPIC - how I can migrate of Delphi to FPC

Graeme Geldenhuys graemeg.lists at gmail.com
Sun Aug 15 08:36:02 CEST 2010

On 14 August 2010 19:04, Marcos Douglas wrote:
> 1- What the connector you use to Postgre and SQLServer, Zeoslib?

For PostgreSQL you can use Zeoslib or SqlDB (included in FCL and part
of FPC). For MS SQLServer there is not direct database component, but
you should be able to use ODBC (I have done this to talk to MS Access
from Linux).

> 2- What the Report designer is more like with ReportBuilder?

There are a few. I use a custom written one that uses RTF files as
report templates. I can use any editor that edits RTF files as my
report designer and previewer. In our case we like to use OpenOffice
because we can distribute it to all our clients for free, and it's
read-only mode makes for a great "report preview" system (OOo hides
all toolbars and edit options in read-only mode). We even use
OpenOffice to generate PDF's via the non-GUI API.

> 3- Do exists something I can do with Delphi but not do with FPC?

Probably yes. But this is true from both FPC and Delphi. Each can do
something that the others can't - or maybe just with a bit more
effort. Have you got a specific feature in mind?

> 4- The Lazarus IDE is the most used, but MSEide is relevant too? Why?

It's quicker and easier to build, feels faster than Lazarus and seems
more stable. Note: I'm talking about the IDE itself, not the GUI
toolkits each of them uses. I don't use LCL or MSEgui, but rather
fpGUI Toolkit.

If you want to move your GUI forms etc from VCL, then probably LCL
will be the quickest to do because Lazarus IDE comes with a
Delphi-to-Lazarus conversion tool. If your move is because you want to
develop your application for multiple platforms, then you must take
other things in consideration too. LCL is maybe not the best choice
then either - depending on your needs. fpGUI and MSEgui are custom
drawn GUI toolkits, so look and behaviour is identical on all
platfroms - theming can be applied to "look more native". This also
has the benefit that all features of the GUI toolkit can be used
safely in a cross-platform way. With LCL (which wrapper other GUI
toolkits), only the most common features of each platform toolkit can
be used in a cross-platform way. As soon as you use features that are
specific to a platform, your code starts getting riddled with IFDEF
statements - not good, and a nightmare to maintain.

This is why our company invested the time to develop fpGUI. We have NO
IFDEF's in our code and all components work and behave identical on
all platforms - much easier to work with and maintain.

> 5- Do you use Object Persistence Framework (OPF)? If yes, which is?
>    5.1- What is the best OPF most used? Would be tiOPF?

Yes, we use tiOPF. I'm a core developer of tiOPF. We use
Model-GUI-Mediator (MGM implementation included in tiOPF repository)
to make all standard UI components "object aware". No need for
DB-aware or custom descendant components to let your Business Objects
interact with the UI. MGM supports fpGUI, LCL and VCL.

> 6- What FPC/Lazarus provides to DataSets in memory like TClientDataSet
> in Delphi?
>    6.1- And about multi-tier applications, what they provides?

Due to use using tiOPF, we don't need TClientDataset. I believe FPC is
near having a TClientDataset (some minor parts are missing). With
tiOPF you can still have multi-tier applications though. tiOPF
includes a "remote persistence layer" which uses HTTP as the
communication protocol and uses XML to transfer data between tiers.
The "app server" runs an embedded HTTP server and many components can
be used for this: eg Indy.

> 7- Is there any other factors we should consider before making this
> migration, which was not written above?

* Are you planning to target multiple systems, or still just Windows.
* Is your apps GUI or non-GUI. If GUI, then you need to decide what
GUI toolkit to use and what
   features are important to you. Code maintainability etc.

Our company moved over to FPC (from Delphi 7). First to Kylix 3, then
to FPC. Since we started using FPC, we never looked back. It was a
good move!

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the fpc-pascal mailing list