Recent

Author Topic: FreeSpider 1.1.0 released  (Read 62254 times)

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider 1.1.0 released
« Reply #45 on: May 24, 2010, 02:24:24 am »
Hello Indiana, actually I've tested FreeSpider only with stable versions of Lazarus.
make sure that you are using NoGUI in LCL Widget type in compiler options

Quote
Do you plan to add more advanced template handling as in fpWeb?
hello Leledumbo, what is the template handling in fbWeb, do you have any page about it?
thanks

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: FreeSpider 1.1.0 released
« Reply #46 on: May 24, 2010, 03:40:58 am »
Nice work, motaz. :)

More alternatives is better. Now, for web dev framework we got 4 options: Powtils, fpWeb, ExtPascal, and now FreeSpider.

However, if I may share some suggestions with you, could you elaborate your work with ExtPascal? Especially to enable support to the FCGI protocol and CGI gateway mechanism for FreeSpider. ExtPascal got quite heavy refactoring lately, so we could use the FCGI part without being bother by the ExtJS classes generation part.

Why I think the support for FCGI and CGI gateway would be good for FreeSpider? Here's my answers:

1. FCGI is LOT faster than plain CGI since the app stay at memory. But since the app residents in the memory, be careful with any memory leak.

2. FCGI could support debugging easily since it always run at the background, not activated by browser request.

3. With FCGI, we could provide some pooling mechanism i.e. database connection, template cache, etc. to give it more performance boost.

4. CGI gateway mechanism could provide FCGI protocol without support from the web server. It's a good option for common web hosting that doesn't support FCGI.

5. With CGI gateway mechanism, we could have better development experience since we don't need to deploy the binary to the CGI folder each time we recompile the app. We could just run the FCGI server right from the IDE, the CGI gateway would connect to it directly. You could see this feature in action here: http://www.youtube.com/watch?v=ZVUMW0V9nGs

6. ExtPascal has support for embedded web server using Indy. This is good feature for self-contained web app and could be used for debugging.

What do you think, motaz?
-Bee-

A long time pascal lover.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: FreeSpider 1.1.0 released
« Reply #47 on: May 24, 2010, 04:15:50 am »
Quote
hello Leledumbo, what is the template handling in fbWeb, do you have any page about it?
Err..no. But you have it in fpWeb examples (it's in your lazarus components directory). Find the most complex one.

@bee:
That's one thing missing from fpWeb and FreeSpider: debugging! From this point of view, I still choose ExtPascal. Single stepping is the way to find bugs easily, and it can't be done from a plain CGI program.

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: FreeSpider 1.1.0 released
« Reply #48 on: May 24, 2010, 04:42:35 am »
That's one thing missing from fpWeb and FreeSpider: debugging! From this point of view, I still choose ExtPascal. Single stepping is the way to find bugs easily, and it can't be done from a plain CGI program.

Once you spoiled with the ease of ExtPascal, especially the debugging experience, I bet you don't want to back to old-style debugging using logging mechanism. It's so '80s programming style. Hello... we're at 21st century now! :D

Actually, Powtils has a fork project named OO-Powtils. It supports live debugging. But, instead of using FCGI mechanism, it chose to use IPC mechanism. Personally, I don't like it because that kind of Powtils become too complicated.
-Bee-

A long time pascal lover.

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider 1.1.0 released
« Reply #49 on: May 24, 2010, 06:23:36 am »
I was thinking to add Fast CGI and ISAPI, but I didn't find the direct documentation that would guide me to such protocols in the net that could help me on this. CGI was very simple and straightforward.
anyway I'll check this in the next weekend (reserved time for Open Source)

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: FreeSpider 1.1.0 released
« Reply #50 on: May 24, 2010, 07:01:01 am »
@motaz: I think FCGI and CGI gateway support is enough to fulfill any needs on any platforms. It's a standardized protocol, supported by virtually all web servers, and available on any platforms. Plus, it's easier to accomplish. During runtime, it's also easier to control. You can terminate it, restart it, etc, without touching the web server. To know how FCGI works, you could take a look at ExtPascal source code, especially the FCGIApp.pas unit.

I personally don't like any locked-in vendor technologies. For example, I don't like Apache mod, because well... it would simply run only on Apache. I don't like ISAPI, because it would only be supported by IIS. This would make my apps tied to a specific web server. While if I use FCGI, I could change the web server to anything i.e. lighttpd, nginx, etc, at anytime, at any OSes. ;)
-Bee-

A long time pascal lover.

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: FreeSpider 1.1.0 released
« Reply #51 on: May 24, 2010, 07:22:41 am »
@Leledumbo and @motaz
Here is the receipt:
One SpiderCGI to the Datamodule form and here is the source code.

procedure TDataModule1.SpiderCGI1Request(Sender: TObject;
  Request: TSpiderRequest; var Response: TSpiderResponse);
begin
     Response.Add('<html><title>Free Spider Web Application Sample</title><body>');
     Response.Add('<h2>Free Spider</h2>');
     Response.Add('<br>');
     Response.Add('<h2>Hello world</h2>');
     Response.Add('</body></html>');
end;     

This code is tested with the Lazarus SVN Revision 25589 and compiled with both FPC 2.4.0 and 2.5.1 SVN version 15320, also compiled example tested with the Mac OS X 10.5 for the misconfiguration of apache2 server but the result is the same (500 Internal Server Error). Maybe I forget a little detail.
Thanks

@motaz
LCL Widget type changed to noGUI

@bee
Seems to me a great project but ExtPascal Getting Started web page is a little bit  complicated to me, here is my first CGI experience.
Thanks.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: FreeSpider 1.1.0 released
« Reply #52 on: May 24, 2010, 07:52:38 am »
Did you follow the tutorial thoroughly?

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: FreeSpider 1.1.0 released
« Reply #53 on: May 24, 2010, 08:14:27 am »
@indiana:

Yes, ExtPascal looks a bit complicated at the first time, especially for new comers on web programming. But, once you really understand what web programming is all about, you'll see how good ExtPascal is. Once you used to it, plain CGI programming seems like a very old school technology.

Of course, ExtPascal is not that good and all. It has its own quirks, in fact, it has many quirks. That's why I asked motaz to elaborate his work with ExtPascal code. I even hope he would also take a look at Powtils code. There are many good things from Powtils and ExtPascal that can be borrowed by FreeSpider. For example: from ExtPascal he could borrow the FCGI and CGI gateway code, from Powtils he could borrow the template engine, etc. He even could take a look at fpWeb code to learn how to make UI binding with external JS UI framework.

That way, I hope he would be able to combine all the advantages and eliminate all the disadvantages. It will make FreeSpider simply the best out all of them. ;)
-Bee-

A long time pascal lover.

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider 1.1.0 released
« Reply #54 on: May 25, 2010, 03:13:12 am »
@Bee
I was wondering which technology that I should support, but now it becomes more clear to me that I should support Fast CGI protocol.
I'll check it next week
I'll search for ExtPascal first

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider 1.1.0 released
« Reply #55 on: May 25, 2010, 03:21:16 am »
To Indiana

did you called SpiderCGI1.Execute; at DataModules OnCreate event?
what did you get when you call your CGI application from console ?

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: FreeSpider 1.1.0 released
« Reply #56 on: June 04, 2010, 02:49:28 am »

Sorry for being late for the response, after a little bit of investigation of sources and help of motaz, the case is okey now.
Thanks.

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider 1.1.0 released
« Reply #57 on: June 07, 2010, 05:41:17 am »
Is that mean you get it work for Ubuntu 10.4 with the latest version of Lazarus or you downgrade to 0.9.28 ?

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: FreeSpider 1.1.0 released
« Reply #58 on: June 07, 2010, 05:59:39 am »

Absolutely, Ubuntu 10.04 and the latest Lazarus, it works fine, without any problem. :)
Thanks.

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
Re: FreeSpider 1.1.0 released - Path issues with Free Spider on nginx
« Reply #59 on: October 07, 2010, 08:07:21 am »
I am trying out the FreeSpider demo, and the path to the cgi-bin doesn't need /cgi-bin/ so what would be http://localhost/cgi-bin/demo.cgi becomes http://localhost/demo.cgi.

I am able to get the first page alright, but all the other links don't work.

Does FreeSpider's path handling depend on a /cgi-bin/ at the start?

The main (Only) feature that has been added is the Integration with Lazarus IDE.

- You can create FreeSpider web applications by clicking File/New.. FreeSpider CGI web application

- This saves a lot of configuration for starting new FreeSpider web application. An automatic data Module, uses , NoGUI, etc. has been added.

- Current FreeSpider applications that has been written with the old version 1.0.7 will not be affected, you can re-install the new version and no change for these application could happen.

- Has been tested with Ubuntu and Windows Vista

http://motaz.freevar.com/freespider.htm
Lazarus 3.0/FPC 3.2.2

 

TinyPortal © 2005-2018