Recent

Author Topic: Status of toolkit for ExtPascal  (Read 84796 times)

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #15 on: January 05, 2010, 04:05:51 pm »
By first adding the unit path and then not mindlessly changing FCGIAPP to CGIAPP I seem to get somewhat further,

I now get

"Can't find unit Ext used by ExtPascal."

I see this in ExtPascal.pas:

uses
  SysUtils, StrUtils, Math, Ext, ExtUtil, ExtGrid;   

But I can't see either file of  of Ext.*, ExtUtil.* and ExtGrid.* anywhere



-Michael

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Status of toolkit for ExtPascal
« Reply #16 on: January 05, 2010, 04:07:14 pm »
You did follow the instructions on the ExtPascal site and generate the Ext.pas, etc. source files, didn't you?

Thanks.

-Phil


By first adding the unit path and then not mindlessly changing FCGIAPP to CGIAPP I seem to get somewhat further,

I now get

"Can't find unit Ext used by ExtPascal."

I see this in ExtPascal.pas:

uses
  SysUtils, StrUtils, Math, Ext, ExtUtil, ExtGrid;   

But I can't see either file of  of Ext.*, ExtUtil.* and ExtGrid.* anywhere



-Michael

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #17 on: January 05, 2010, 04:10:23 pm »
If you installed this package:

/home/mschnell/ExtPascal/extp_tk_20091206/extp_ctrls/extp_ctrls.lpk

Then $PKGDIR(ExtP_Ctrls)/../../ will point to /home/mschnell/ExtPascal where the ExtPascal .pas files, including FCGIApp.pas, are located.

Check to see if all of that is correct.
Sorry, but I have no idea how I should check what $PKGDIR(ExtP_Ctrls) is extracted to,

I suppose here we are hit by some upper-case problem or similar. I'll try uninstall the two extPascal packages (which is rather difficult ans Lazarus mostly refuses to show the right-click menu for them), move the sources to some other folder and reinstall....

-Michael
« Last Edit: January 05, 2010, 04:27:16 pm by mschnell »

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Status of toolkit for ExtPascal
« Reply #18 on: January 05, 2010, 04:14:01 pm »
I think you're starting to drift away from a solution into the weeds.

Did you or did you not compile and run ExtToPascal.dpr? If not, then do it.

Thanks.

-Phil

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #19 on: January 05, 2010, 04:26:11 pm »
Check to see if all of that is correct.
I had just unzipping both Zip files into the same directory placed the extpascal.pas files et al into a subdirectory ExrtPascal-0.9.7.1. So they can't be found. Moving them up one level did help.

(now I directly get to the "unit ext not found" level :) )

Thanks
-Michael
« Last Edit: January 05, 2010, 04:29:08 pm by mschnell »

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #20 on: January 05, 2010, 04:34:40 pm »
Did you or did you not compile and run ExtToPascal.dpr? If not, then do it
Of course I did. (with my tests I found that I get an appropriate error message just when creating an ExtPascal Application when the executable is not found)

(Back to the "ext not found" problem, ...
As I now can compile the hello project provided, I suppose I just missed some point in my own new Application.)
-Michael
« Last Edit: January 05, 2010, 04:38:43 pm by mschnell »

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Status of toolkit for ExtPascal
« Reply #21 on: January 05, 2010, 04:58:34 pm »
Did you or did you not compile and run ExtToPascal.dpr? If not, then do it
Of course I did. (with my tests I found that I get an appropriate error message just when creating an ExtPascal Application when the executable is not found)

(Back to the "ext not found" problem, ...
As I now can compile the hello project provided, I suppose I just missed some point in my own new Application.)
-Michael

Sounds good. The new app wizard doesn't know where the ExtPascal source files is, so it makes an assumption (two levels up from extp_ctrls folder) and sets the units path accordingly. This is also the SVN structure.

If this is not the case, just change the path.

Thanks.

-Phil

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #22 on: January 05, 2010, 05:23:10 pm »
Hmm.

I just rechecked and loaded the "Hello" example project.

Now it as well fails with not finding the ext unit :( .

-Michael

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #23 on: January 05, 2010, 06:39:34 pm »
Hi Phil,

As the building has been closed for the night, I needed to leave the office and can't do any test any more today. But I can post some comments that occurred to me while riding my bicycle home through the snow.

1) It would be really nice to have a description of the suggested folder structure in the docs, so that the unzipping process can be done appropriately.

2) up to now I failed to find any instructions regarding the "ext" unit, that seems to be required additionally as well by my own project as by the "hello" example.

As I can't test anything before I even get anything compiled, I needs to ask these  questions:

3) I hoped that the visual ExtPascal components come in a "dual use" way. (a) similar to the appropriate LCL  comonent and (b) as html based remote controls, while (a) is used when designing and when debugging the user code locally (b) is used when publishing the executable as a cgi by a web server.

I understand that the .cfg file with the appropriate "-d" define does something like this, but I did not find how to do the switch whether a local debugging executable or a cgi is to be compiled.

4) Am I correct assuming that the LCL's "CGIApplication" uses "CGI" while ExtPascal uses "FastCGI" ? What exactly is FastCGI ? Does any WebServer (e.g. the very small "boa") and any browser support FastCGI ?

5) Obviously ExtPascal implements a message-event system, that does not depend on any GUI. Does same only support the "visual" ExtPascal components or can we use other "events" as well, such as TTimer and Thread Synchronization messages.

6) Would it not be good to include ExtPascal in the Lazarus distribution to be installed by default ? There I did find CGI-Application, but same seems to be a very small brother to ExtPascal.

7) Do you have any idea how ExtPascal compares to MSEifi ?

Thanks a lot for providing this package !
-Michael
« Last Edit: January 05, 2010, 06:48:02 pm by mschnell »

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #24 on: January 05, 2010, 06:49:29 pm »
If this is not the case, just change the path.
IMHO: better change the folder structure !
-Michael

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Status of toolkit for ExtPascal
« Reply #25 on: January 05, 2010, 07:50:47 pm »
Hi Phil,

As the building has been closed for the night, I needed to leave the office and can't do any test any more today. But I can post some comments that occurred to me while riding my bicycle home through the snow.

1) It would be really nice to have a description of the suggested folder structure in the docs, so that the unzipping process can be done appropriately.

Browse the SVN structure.

Quote
2) up to now I failed to find any instructions regarding the "ext" unit, that seems to be required additionally as well by my own project as by the "hello" example.

Ext.pas is created by ExtToPascal.dpr from Ext JS HTML docs. This is a one-time thing that you do.

Quote
As I can't test anything before I even get anything compiled, I needs to ask these  questions:

3) I hoped that the visual ExtPascal components come in a "dual use" way. (a) similar to the appropriate LCL  comonent and (b) as html based remote controls, while (a) is used when designing and when debugging the user code locally (b) is used when publishing the executable as a cgi by a web server.

I understand that the .cfg file with the appropriate "-d" define does something like this, but I did not find how to do the switch whether a local debugging executable or a cgi is to be compiled.

ExtP Toolkit supplies design controls that allow you to place and design controls visually in the Lazarus IDE. At compile time, as long as you have UseRuntime defined (done for you automatically in extpascal.cfg file), the compiler will compile against the ExtPascal units (Ext.pas, etc.) - that way there's no dependency on LCL, etc.

Did you read this (also included with Toolkit)?

http://web.fastermac.net/~MacPgmr/ExtPascal/ExtPToolkitStatus.html

I tried to give an overview of the whole process.

Quote
4) Am I correct assuming that the LCL's "CGIApplication" uses "CGI" while ExtPascal uses "FastCGI" ? What exactly is FastCGI ? Does any WebServer (e.g. the very small "boa") and any browser support FastCGI ?

I'm not familiar with CGIApplication. I believe there's a discussion of CGI/FCGI on the ExtPascal site. You don't need FCGI if you use the CGIGateway - see docs.

Quote
5) Obviously ExtPascal implements a message-event system, that does not depend on any GUI. Does same only support the "visual" ExtPascal components or can we use other "events" as well, such as TTimer and Thread Synchronization messages.

Maybe ask on ExtPascal form.

Quote
6) Would it not be good to include ExtPascal in the Lazarus distribution to be installed by default ? There I did find CGI-Application, but same seems to be a very small brother to ExtPascal.

ExtPascal is a separate project, as is ExtP Toolkit. There are dozens of separate projects like this - probably not feasible to include much more with Lazarus. Anyway, that's not our doing - ask the Lazarus developers if you need a more definitive answer.

Quote
7) Do you have any idea how ExtPascal compares to MSEifi ?

No idea.


mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #26 on: January 05, 2010, 10:00:43 pm »
Ext.pas is created by ExtToPascal.dpr from Ext JS HTML docs. This is a one-time thing that you do.
Ooops. Silly me confused this with the converter fmtoextp.dpr. So I really missed a major step that is described in ExtPToolkitStatus.html (which I in fact was trying to follow  %) ).

I'll do this tomorrow.....

At compile time, as long as you have UseRuntime defined...

Does this mean that when I comment out the UseRuntime lin in extpascal.cfg, I'll get a running LCL application, that I can debug with standard means ? (I'll try this ASAP.)

Many thanks for your patience !

-Michael
« Last Edit: January 05, 2010, 10:09:03 pm by mschnell »

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Status of toolkit for ExtPascal
« Reply #27 on: January 05, 2010, 10:24:19 pm »
Ext.pas is created by ExtToPascal.dpr from Ext JS HTML docs. This is a one-time thing that you do.
Ooops. Silly me confused this with the converter fmtoextp.dpr. So I really missed a major step that is described in ExtPToolkitStatus.html (which I in fact was trying to follow  %) ).

I'll do this tomorrow.....

At compile time, as long as you have UseRuntime defined...

Does this mean that when I comment out the UseRuntime lin in extpascal.cfg, I'll get a running LCL application, that I can debug with standard means ? (I'll try this ASAP.)

Many thanks for your patience !

-Michael

No, don't mess with extpascal.cfg - you'll end up with nothing. You can debug the running app in Lazarus - see the tutorial.

Think client-server - the FPC app is running on the server and serving up things to the browser, where the JavaScript executes. LCL in this context makes no sense.

Thanks.

-Phil

mschnell

  • Full Member
  • ***
  • Posts: 131
    • http://www.lumino.de
Re: Status of toolkit for ExtPascal
« Reply #28 on: January 06, 2010, 09:19:19 am »
Think client-server - the FPC app is running on the server and serving up things to the browser, where the JavaScript executes.,
Hmmmm, "Normal" CGI applications are started by the webserver and the webserver only sends back an HTML page to the client's browser when the application stops. So debugging seems quite difficult.

I do hope that with Extpascal the application keeps running (Wikipedia revield that this seems to be FCGI) which would fit my needs (here my questiond about TTimer etc. comes up) and would allow for standard debugging. This is why I asked if any web server can handle FCGI.
LCL in this context makes no sense.
Of course the CGI-application would avoid any binding to visual LCL components. But having a simple switch that - using supposedly very similar {$ifdefs as are distinguishing between design and compile state right now  - allows for either creating a CGI executable or a LCL enabled stand alone application would be really nice to have and seems to be doable (I'll take a look once I got the package running completely).

Thanks agian,
-Michael
« Last Edit: January 06, 2010, 09:36:58 am by mschnell »

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: Status of toolkit for ExtPascal
« Reply #29 on: January 06, 2010, 09:55:08 am »
Hmmmm, "Normal" CGI applications are started by the webserver and the webserver only sends back an HTML page to the client's browser when the application stops. So debugging seems quite difficult.

Yes. You have to use log mechanism for debugging CGI. CGI application is executed by web server, it serves the request, then dies. The process is repeated for each request, over and over.

I do hope that with Extpascal the application keeps running (Wikipedia revield that this seems to be FCGI) which would fit my needs (here my questiond about TTimer etc. comes up) and would allow for standard debugging. This is why I asked if any web server can handle FCGI.

Yes. Unlike CGI, FCGI application isn't started by the web server. Instead, web server will "communicate" with the FCGI application through an FCGI protocol. So, the FCGI application must be running separated/independenly from the web server. Most web servers support FCGI.

In addition to that, ExtPascal provide CGI gateway mechanism. This gateway is a lightweight CGI application that acts as the loader/router of the FCGI application. This way, FCGI application doesn't need to run all the time (to save resources, etc). ExtPascal FCGI application is able to shutdown itself after some period time of idle.

You don't need to question more about TTimer or interactive debugging using ExtPascal's FCGI. It already does that using multithreading approach.

For more detail information, please read ExtPascal's wiki. :)
-Bee-

A long time pascal lover.

 

TinyPortal © 2005-2018