Recent

Author Topic: [SOLVED] What is the different between them?  (Read 743 times)

guest65109

  • Guest
[SOLVED] What is the different between them?
« on: January 06, 2020, 04:16:34 pm »
What is the different between fpweb/fcl-web/fcl-net/lnet/internettools/turboipro/webservicetoolkit/synapse/synopse/mormot/brookframework? What is the use case for each of them? I'm confused.

lainz

  • Hero Member
  • *****
  • Posts: 3425
    • Lainz
Re: What is the different between them?
« Reply #1 on: January 06, 2020, 05:36:10 pm »
I used webservicetoolkit and I used it for WebService SOAP API, I used it with a public XML API.

I used brookframework to create endpoints, but only the old version of it. In my case was JSON endpoints for a local Web application.

fcl web and fp web seems that they're the same!

"fpWeb can be used to build cgi applications." from the wiki, so you need to know what is a CGI application.

Code: Pascal  [Select]
  1. fpCGI -> CGI
  2. fpFCGI -> FastCGI
  3. fpApache (requires httpd as well) -> Apache module
  4. fpHttpApp -> embedded server

Also apache modules and embedded server (like brook).

I've not used mormot, but seems that is a complex tool that can do anything of the above.

MarkMLl

  • Hero Member
  • *****
  • Posts: 610
Re: What is the different between them?
« Reply #2 on: January 06, 2020, 05:41:40 pm »
Picking up a little bit after Iain: lnet is in support of installation and is not particularly well-maintained. There's things like a minimal Telnet client in there.

fcl-net contains things like DNS lookup and should be well-supported.

Obviously there's quite a lot of overlap between the various packages cited, and I think it would be appropriate to distinguish between at least three cases:

a) Those which are part of FPC/FCL, i.e. have no graphical components.

b) Those which are included with Lazarus/LCL, i.e. by and large have graphical components even if they are intended as an aid to design rather than being visible at runtime.

c) Out-of-tree projects from other authors.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

PascalDragon

  • Hero Member
  • *****
  • Posts: 908
  • Compiler Developer
Re: What is the different between them?
« Reply #3 on: January 07, 2020, 09:21:09 am »
What is the different between fpweb/fcl-web/fcl-net/lnet/internettools/turboipro/webservicetoolkit/synapse/synopse/mormot/brookframework? What is the use case for each of them? I'm confused.
To clear up at least some:
  • fpweb and fcl-web are interchangeable and are FPC's web application framework.
  • fcl-net is a FPC package to handle network communication.
  • lnet is in a similar category and provides TCP and UDP classes.
  • webservicetoolkit is used to generate Pascal units for existing services that use a standardized service description language to describe their interface; AFAIK in can also be used to create such services?
  • mORMot and brookframework are also web application frameworks (though the former is also an ORM - Object Relational Mapper)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8142
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What is the different between them?
« Reply #4 on: January 10, 2020, 10:16:55 am »
  • fpweb and fcl-web are interchangeable and are FPC's web application framework.
I'd say fpweb is the framework while fcl-web are the libraries. brookframework (the pure pascal branch) uses fcl-web, but not fpweb. It leaves out the routing but reuses the request parsing, for instance.[/list]

guest65109

  • Guest
Re: What is the different between them?
« Reply #5 on: January 10, 2020, 06:00:04 pm »
Sorry. But despite how hard I tried, I can't utilize fpweb to do anything other than HelloWorld. Because I don't understand the architecture. I don't understand anything. Other more advanced frameworks even more difficult for me  :'(


I think a compiled and native language like Pascal just not suitable for developing such a kind of applications (even though you could if you are so passionate and you know what you do). I think a managed language or a scripting ones will be more appropriate. Anyway, it's only my own biased opinion. Don't be too serious on me!  :-*

PaulRowntree

  • Full Member
  • ***
  • Posts: 109
    • Paul Rowntree
Re: What is the different between them?
« Reply #6 on: January 10, 2020, 07:56:58 pm »
I have written a simple httpapp executable that sit and watch a port, and deliver a page in response to a browser request.  The example was from the tutorial, and it works fine.  This program doesn't need an installed server.
I have also written CGI executables that work just as well, but require an installed server such as Apache or NGINX.  I have not done fastCGI, but it doesn't look hard.

Either way, the pascal code can either generate the html, or it can read the information from a file, and send it back out.

I prefer the compiled over the scripted approach as the code is more locked down, and therefore perhaps less vulnerable.  Plus, I vastly prefer the clean lines of Pascal.
Paul Rowntree
- coding for instrument control, data acquisition & analysis, CNC systems

dpremus

  • New Member
  • *
  • Posts: 14
Re: What is the different between them?
« Reply #7 on: January 10, 2020, 10:15:34 pm »
I think a compiled and native language like Pascal just not suitable for developing such a kind of applications (even though you could if you are so passionate and you know what you do). I think a managed language or a scripting ones will be more appropriate. Anyway, it's only my own biased opinion. Don't be too serious on me!  :-*

Go (https://golang.org/) also generates native code, so compiled languages are not a problem,  but I must admit that writing a web application with Go is more elegant than FPC.
I am using both Lazarus and Go in my projects and I would like to have some features of Go in FPC.

guest65109

  • Guest
Re: What is the different between them?
« Reply #8 on: January 11, 2020, 12:10:51 pm »
I think a compiled and native language like Pascal just not suitable for developing such a kind of applications (even though you could if you are so passionate and you know what you do). I think a managed language or a scripting ones will be more appropriate. Anyway, it's only my own biased opinion. Don't be too serious on me!  :-*

Go (https://golang.org/) also generates native code, so compiled languages are not a problem,  but I must admit that writing a web application with Go is more elegant than FPC.
I am using both Lazarus and Go in my projects and I would like to have some features of Go in FPC.

Because the company created Go is an internet giant, so they know how to create elegant and easy to use APIs. Pascal doesn't have any of these luxuries.

guest65109

  • Guest
Re: What is the different between them?
« Reply #9 on: January 11, 2020, 12:12:29 pm »
Thanks everyone for explaining to me the different between these things. I marked the thread as SOLVED.

BeniBela

  • Hero Member
  • *****
  • Posts: 702
    • homepage
Re: [SOLVED] What is the different between them?
« Reply #10 on: January 14, 2020, 05:39:08 pm »
internettools to download data and then actually use the downloaded data.

Like when you download HTML, you need an HTML parser to use it; if you download JSON, you need a JSON parser to use it. Then the internettools pass the data to the corresponding parser.

And there is an XQuery interpreter for  scripting. For example, you can write a script that downloads data from three websites. Then to add a fourth webpage, you only need to change the script, and not the Pascal code, so you do not need to compile anything. Does not matter if the server outputs HTML, JSON, XML or CSV, everything can be handled by the script