Lazarus

Programming => Networking and Web Programming => Topic started by: cappe on September 28, 2021, 06:30:59 pm

Title: ExtPascal and database
Post by: cappe on September 28, 2021, 06:30:59 pm
Anyone have an example of how to create a database application with extpascal? Making a menu?
Title: Re: ExtPascal and database
Post by: MarkMLl on September 28, 2021, 06:48:06 pm
Anyone have an example of how to create a database application with extpascal? Making a menu?

What's extpascal?

MarkMLl
Title: Re: ExtPascal and database
Post by: Thaddy on September 28, 2021, 07:06:43 pm
It is an ExtJs wrapper. The FPC JVM target works nicely with it and databases, so I guess he will need a FPC JVM build. That supports most Db functionalty, including SqlDb and engines at the standard FPC RTL level. Most, if not all - non-gui examples drom FPC fcl-db simply work on the java target. ExtJs can be used for a GUI.
Pas2Js has exanples for it.
Title: Re: ExtPascal and database
Post by: MarkMLl on September 28, 2021, 08:12:32 pm
OK, sorry and thanks for the clarification: I wasn't sure whether it was directly relevant to FPC.

MarkMLl
Title: Re: ExtPascal and database
Post by: Thaddy on September 28, 2021, 09:32:49 pm
OK, sorry and thanks for the clarification: I wasn't sure whether it was directly relevant to FPC.

MarkMLl
It should be possible to use native cpu code through JNI but I never tried that.
The tools for it are available with Pas2Js.
Title: Re: ExtPascal and database
Post by: Thaddy on September 28, 2021, 09:42:32 pm
These features are a bit under advertised...Jonas and Mattias have created something special.
Title: Re: ExtPascal and database
Post by: MarkMLl on September 28, 2021, 09:54:05 pm
These features are a bit under advertised...Jonas and Mattias have created something special.

As is their wont :-)

MarkMLl
Title: Re: ExtPascal and database
Post by: PascalDragon on September 29, 2021, 08:59:11 am
It is an ExtJs wrapper. The FPC JVM target works nicely with it and databases, so I guess he will need a FPC JVM build. That supports most Db functionalty, including SqlDb and engines at the standard FPC RTL level. Most, if not all - non-gui examples drom FPC fcl-db simply work on the java target. ExtJs can be used for a GUI.
Pas2Js has exanples for it.

Ehm... FPC JVM <> pas2js. The former is the port for the Java Virtual Machine the later transpiles to JavaScript which are two different languages. And the former definitely does not support SqlDb.
Title: Re: ExtPascal and database
Post by: devEric69 on September 29, 2021, 10:39:13 am
For info., there's a specially dedicated discussion thread here, concerning ExtPascal: https://forum.lazarus.freepascal.org/index.php/topic,8106.msg419488.html#msg419488 (https://forum.lazarus.freepascal.org/index.php/topic,8106.msg419488.html#msg419488).
AMHO, using the fpWeb + SqlDb [backend side] + pas2js  [frontend side] frameworks seems the more academic \ canonical solution, from the point of view of the official maintainers \ developers of fpc + Lazarus.
Title: Re: ExtPascal and database
Post by: PierceNg on September 29, 2021, 11:13:59 am
According to https://github.com/farshadmohajeri/extpascal (https://github.com/farshadmohajeri/extpascal), last code commit > 10 years ago, license is  GPL.

ExtPascal may not work with the ExtJS of today. You'll have to hunt down an old compatible version.  Or try to make it work with current ExtJS, which is commercial with 30-day free trial.

I suggest better look into pas2js.
Title: Re: ExtPascal and database
Post by: devEric69 on September 29, 2021, 11:30:52 am
ExtPascal may not work with the ExtJS of today.

Indeed, this is very possible: AFAIK, the ExtJS editor only keeps track (to be downloaded) of its few latest javascript engines on the internet. So, ExtPascal (the Pascal backend driving code for ExtJS fontend javascipt engine) should work, but with a 10 years old and specific ExtJS javascript versioned engine (some people create \ historize their own backups of their own ExtJS version, on Github for example). Nevertheless, this is not the policy pursued by the ExtJS editor itself...

I suggest better look into pas2js.

I give the same advice (take a look at pas2js (https://wiki.freepascal.org/pas2js)), in the interests of the stability (for the future of your projects).
TinyPortal © 2005-2018