#1 2013-08-29 19:21:31

moctes
Member
From: Mexico
Registered: 2013-05-11
Posts: 129

Lazarus support

Hi Arnaud,

How is Lazarus support going?   I'm not thinking on cross-platform compiling but Windows only,  seems like is perfectly possible to have mORMot on the server side and Web based clients (with some Javascript framework, AngularJS, Ember, etc)  I'm asking because I recently updated my Delphi pro license to XE3, we now have XE4 and I see XE5 is just around the corner; I can't just afford upgrading at the pace of embarcadero and also I don't think the upgrades are worth, so I am now serious about leaving Delphi but staying a little bit longer with Object Pascal and for that matter I would opt for FPC/Lazarus, Can you please share with us what is the current status/plans about this subject?

With regards,
Mocte

Offline

#2 2013-08-30 06:16:57

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,657
Website

Re: Lazarus support

FPC support is on the project roadmap.

We tried to make it as FPC-friendly as possible, following e.g. the PtrInt/PtrUInt pattern and other FPCisms in our code.

Code compiles just fine, but we still have some issues with low-level RTTI support.

That is, regression tests do not pass yet when compiled with FPC.

If you can help debugging, you are welcome.

Offline

#3 2013-08-30 16:15:22

moctes
Member
From: Mexico
Registered: 2013-05-11
Posts: 129

Re: Lazarus support

Thanks Arnaud, I'm currently reading your SAD Document and I'm far from finishing I'll see what can I do to help once I get used to mORMot philosophy.

Offline

#4 2013-09-22 12:23:23

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: Lazarus support

Out of interest I've just had a go with compiling mormot with Lazarus on a Mac which wasn't completely successful. Here's a bit of feedback:
1. Could {$I Synopse.inc} be put before the comment block of source files. Otherwise if delphi mode isn't already set the compiler gets confused by comment nesting.
2. It makes use of the libC unit which hasn't been ported to osx. see http://wiki.freepascal.org/libc_unit
3. The uses clause at line 540 of SynCommons:  SynLz should be SynLZ
4. TWindowsVersion type is not defined (at line 8057 of SynCommons).

It would be great if mac compatibility was there - at least enough to build an http client like in Sample 4.

Offline

#5 2013-09-23 05:51:08

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: Lazarus support

It's impossible for now to implement Sample 4 on any other OS except Windows. TSQLHttpServer depend on HTTP.sys, plain socket HTTP server - from IOCP (this technology implemented only on Windows platform).

Offline

#6 2013-09-23 05:59:21

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: Lazarus support

I was only thinking of implementing the client side of Sample 4

Offline

#7 2013-09-23 08:41:53

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: Lazarus support

Maybe FPC support can be implemented in two phases? First the client side, then the server?


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#8 2013-09-23 08:50:47

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,657
Website

Re: Lazarus support

SynCommons won't work under OSX, neither mORMot.pas I'm afraid, since both rely on some low-level code dedicated to the underlying platform (for exceptions or interface calls).

I would like to implement just the client side, without all SynCommons+SynCrtSock overhead.
That is, just a simple RESTful client.
No problem about speed on the client side.
We could even use Indy.
Or Synapse (lighter than Indy).

What I'm thinking about is an unit code generator, which may be shared with several compilers, e.g. Delphi NexGen (iOS and Android), FPC (all platforms), SmartMobileStudio and C#/Java.

What do you think?

Offline

#9 2013-09-23 10:09:19

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: Lazarus support

What do you mean by a 'unit code generator'?

Offline

#10 2013-09-23 12:52:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,657
Website

Re: Lazarus support

Some kind of wizard (or even better IMHO a RESTful dedicated method) able to generate some .pas .cs .js .java files directly from the server.

Offline

#11 2013-09-23 14:44:19

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: Lazarus support

A wizard would definitely aide in adopting lots of mORMots smile.


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#12 2013-09-23 14:52:07

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: Lazarus support

That sounds great for javascript but I can't see the advantage if one is writing a client in pascal which needs to be compiled manually.

I would vote for synapse rather than indy. How much work would implementing OSX compatibility be just for client side? Seeing as it's based on FreeBSD doing it should also go a long way to making it compatible with other *NIXs.  I'm happy to help if I can.

Offline

Board footer

Powered by FluxBB