Recent

Author Topic: Lazarus web application, how choose  (Read 15017 times)

ouiouioui

  • New Member
  • *
  • Posts: 13
Lazarus web application, how choose
« on: June 16, 2015, 06:01:56 pm »
Hello,

I use Lazarus for a while but I work more on Delphi, I am doing a web server that allows the user to view information from the server and client side to ring when a new message arrives.

My application checks through sensors if doors are opened, So if a door is opened I want to send a beep or sound and a message to those who are connected.

I looked fcl-web, Web Service Toolkit, Raudus, Brook framework, ... and others they there are a lot so hard to choose.

So I come to you for advice which solution will be the most suitable for my needs according to you?

I thank you in advance.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus web application, how choose
« Reply #1 on: June 17, 2015, 12:23:41 am »
All of them are OK, but I don't suggest WST. AFAIK it only supports SOAP, which is a heavyweight protocol. Use simple REST-based unstructured JSON instead, which you can do with other frameworks. Raudus is more RAD alike, so it's a bit overkill if you don't need to provide JS-based UI as a response.

ouiouioui

  • New Member
  • *
  • Posts: 13
Re: Lazarus web application, how choose
« Reply #2 on: June 18, 2015, 01:47:21 pm »
Thanks,

I have read more about Raudus and it don't give source so i don't use it.

and Kitto you now?
https://github.com/nandod/kitto/wiki/KittoGettingStarted

i try Brook framework i think

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus web application, how choose
« Reply #3 on: June 18, 2015, 01:54:57 pm »
and Kitto you now?
https://github.com/nandod/kitto/wiki/KittoGettingStarted
If it's not designed for Free Pascal, I won't know. It's Delphi only AFAICS, just like uniGUI, despite ExtPascal works on Free Pascal, too.

ouiouioui

  • New Member
  • *
  • Posts: 13
Re: Lazarus web application, how choose
« Reply #4 on: June 18, 2015, 03:31:34 pm »
you have rights, i'l try ExtPascal it seem great.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus web application, how choose
« Reply #5 on: June 18, 2015, 10:15:47 pm »
you have rights, i'l try ExtPascal it seem great.
With the last commit set to last year, it's a dead project. I wouldn't use it if I were you.

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
Re: Lazarus web application, how choose
« Reply #6 on: June 19, 2015, 05:07:01 pm »
With the last commit set to last year, it's a dead project. I wouldn't use it if I were you.
My car is 17 years old, but is still in perfect shape  :D

Even though a project seems dead, it can still be very usefull - I am still using pwu 1.6 for my projects, and it is extremely stable and reliable.

/Christian

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus web application, how choose
« Reply #7 on: June 19, 2015, 06:11:48 pm »
With the last commit set to last year, it's a dead project. I wouldn't use it if I were you.
My car is 17 years old, but is still in perfect shape  :D

Even though a project seems dead, it can still be very usefull - I am still using pwu 1.6 for my projects, and it is extremely stable and reliable.

/Christian
Wow, pwu. Long time no hear :o

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1285
Re: Lazarus web application, how choose
« Reply #8 on: June 19, 2015, 07:03:19 pm »
"There's a pascal based CGI framework used to be called PSP (Pascal Server Page) but the authors had change the name to PWU (Pascal Web Utility?). Before I know PWU is existed, I use PHP, but now, I choose PWU. If you prefer OOP approach, you can use O-PSP (object PSP) another branch of the (default) procedural PSP."
http://lists.freepascal.org/fpc-pascal/2007-March/013517.html
http://sourceforge.net/projects/pascal-webdev/files/?source=navbar
http://free-pascal-general.1045716.n5.nabble.com/how-to-compile-PWU-project-from-command-line-td2815159.html

Be careful with projects not frequently updated  on SourceForge:
http://linux.softpedia.com/blog/Wine-Will-Migrate-Away-from-SourceForge-483823.shtml
http://news.softpedia.com/news/GIMP-Devs-Accuse-Sourceforge-of-Locking-Them-Out-and-Distribuiting-Adware-482570.shtml

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: Lazarus web application, how choose
« Reply #9 on: June 20, 2015, 08:12:32 am »
Why not to have a look to FreeSpider, it is simple to deploy as CGI web application

http://code.sd/products/freespider/

ouiouioui

  • New Member
  • *
  • Posts: 13
Re: Lazarus web application, how choose
« Reply #10 on: June 24, 2015, 11:24:24 am »
Thanks all,

i'l take a look on this project.

i'm not good in web programming with lazarus, and for a simple program i don't know what is better, standalone server with indy, cgi, apache module.

Standalone is more easy to debug, i can run directly else if i must deploy manually for test it's a lost of time, ok we can automate it but i'm beginner with that and i have not time for learn all i want :( so what is the more easy to use for a beginner?

For now i don't see a framework working standalone on linux, ExtPascal can do it on Windows as i see. I don' t explain very well sorry for my English spelling. A framework for a linux indy http server.

Thanks.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus web application, how choose
« Reply #11 on: June 24, 2015, 11:32:47 am »
For now i don't see a framework working standalone on linux
Something is wrong with the way you analyze the frameworks. fpWeb and Brook runs standalone on any supported platforms, because their base, fcl-web, works so.

JD

  • Hero Member
  • *****
  • Posts: 1913
Re: Lazarus web application, how choose
« Reply #12 on: June 27, 2015, 01:10:11 pm »
For now i don't see a framework working standalone on linux, ExtPascal can do it on Windows as i see. I don' t explain very well sorry for my English spelling. A framework for a linux indy http server.

Thanks.

If it is an Indy HTTP Server on Linux you are after, why don't you look at some of the many examples created using Delphi (Google search) & port them to Lazarus? You'll learn a lot from that, I can assure you.

JD
Linux Mint - Lazarus 4.6/FPC 3.2.2,
Windows - Lazarus 4.6/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

inoussa

  • New Member
  • *
  • Posts: 14
Re: Lazarus web application, how choose
« Reply #13 on: June 27, 2015, 02:14:45 pm »
All of them are OK, but I don't suggest WST. AFAIK it only supports SOAP, which is a heavyweight protocol. Use simple REST-based unstructured JSON instead, which you can do with other frameworks.

(Disclaimer: WST's author here :) )

WST does support JSON-RPC, XML-RPC, a custom binary serializer and SOAP.

Why should one choose an "unstructured" over a "structured" mechanism ? 
REST style services have their use, so does structured web services.
Using WSDL[1] you have auto documented definitions :
  • clearly expressed data structures
  • well defined services definitions
  • tools are available to author WSDL files, you do not have to hand write them
  • tools are available to automatically translate WSDL files to (understandable) pascal sources files
 
Using WST :
  • You have a (GUI) type library editor[2] to author WSDL files and generated corresponding pascal source files
  • the same editor can be used to import an existing file
  • a command line WSDL parser to generated pascal sources
  • the type library editor is available as a Lazarus IDE expert
 

With WST you do not have to hand write or translate WSDL files, there are tools for that.

Try by yourself, then decide, knowingly.

[1]WSDL: Web Service Description Language
[2] WST's Type Library Editor : http://wiki.lazarus.freepascal.org/File:Wst_type_lib_edtr.PNG

Best regards.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus web application, how choose
« Reply #14 on: June 27, 2015, 07:33:21 pm »
(Disclaimer: WST's author here :) )

WST does support JSON-RPC, XML-RPC, a custom binary serializer and SOAP.
Oh, nice to know. What's that custom binary serializer and how would the other end understand how to (un)serialize according to the protocol?

 

TinyPortal © 2005-2018