[Lazarus] Changes to fpWeb...

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list

Hello,

I have committed a serious change to the way fpweb handles requests.

Especially routing of requests was changed.

The old Delphi style routing worked with Datamodules only. The pattern was
strictly /modulename/actionname or through query variables: ?module=xyz&Action=nmo

This old routing is still available by setting the LegacyRouting property of
webhandler or webapplication (custweb) to true. (the new routing described
below is then disabled)

The new routing is more flexible in 3 ways.

- It is no longer required to use datamodules, but this is still supported.
   There are now 4 methods that can be used to register a route:

   - Using a callback procedure
     TRouteCallback = Procedure(ARequest: TRequest; AResponse);

   - Using a callback event:
     TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object;

   - Using an interface
     IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}']
       Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);
     end;
     Note that this is a CORBA interface, so no reference counting.
     (although a reference counting version could be added, if desired)

   - Using a router object:
     TRouteObject = Class(TObject,IRouteInterface)
     Public
       Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract;
     end;
     TRouteObjectClass = Class of TRouteObject;

     The object class needs to be registered. The router will instantiate the
    object and release it once the request was handled.

   - Using a datamodule, as it used to be.

   More methods can be added, if need be.
   All routes are registered using the HTTPRouter.RegisterRoute method.
   it is overloaded to accept any of the above parameters.

- The router can now match more complex, parametrized routes.

   A route is determined by the path part of an URL; query parameters are not examined.

   /path1/path2/path3/path4

   In these paths, parameters and wildcards are recognized:

   :param means that it will match any request with a single part in this location
   *param means that it will match any request with zero or more path parts in this location

   examples:

   /path1
   /REST/:Resource/:ID
   /REST/:Resource
   /*/something
   /*path/somethiingelse
   /*path

   The parameters will be added to TRequest, they are available in the (new) RouteParams array property of TRequest.

   Paths are matched case sensitively by default, and the first matching pattern is used.

   The HTTP Modules are registered in the router using classname/* or defaultmodulename/*

- A set of methods can be added to the route registration (default is to  accept all methods).
   The router will  match the request method. If the method does not match, it will raise an
   exception which will result in a 405 HTTP error.

I have added a demo application. It behaves well, just as the testcases, but I would appreciate
feedback if you have cases where your datamodules no longer behave as they
used to (both with LegacyRouting=true or false)

Some more improvements to fpweb are planned, but they will not be as invasive as this.

Michael.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
On Fri, Jan 13, 2017 at 8:36 PM, Michael Van Canneyt via Lazarus
<[hidden email]> wrote:
>
> Hello,
>
> I have committed a serious change to the way fpweb handles requests.
>
> Especially routing of requests was changed.
>
> [...]

For me, this is great news.
I'm feeling we've started to go ahead writing complex Web systems
using Object Pascal.
Thanks Michael and all those who have been contributing for these new features.

Best regards,
Marcos Douglas
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list


On Sat, 14 Jan 2017, Marcos Douglas B. Santos via Lazarus wrote:

> On Fri, Jan 13, 2017 at 8:36 PM, Michael Van Canneyt via Lazarus
> <[hidden email]> wrote:
>>
>> Hello,
>>
>> I have committed a serious change to the way fpweb handles requests.
>>
>> Especially routing of requests was changed.
>>
>> [...]
>
> For me, this is great news.
> I'm feeling we've started to go ahead writing complex Web systems
> using Object Pascal.
> Thanks Michael and all those who have been contributing for these new features.

Well, after working some years in web environments, I felt I had enough
experience to diverge from what Delphi originally did :)

Now things become really simple:

uses fpcgi, httpdefs, httproute;

procedure DoHello(ARequest:TRequest; AResponse : TResponse);

begin
   AResponse.Content:='<html><body><h1>Hello,World!</h1></body></html>'
end;

begin
   HTTPRouter.RegisterRoute('*',@DoHello);
   Application.Initialize;
   Application.Run;
end.

The only way to get it even more concise would be with anonymous functions.

And by changing fpcgi to fpfastcgi or fphttpapp, you can switch between all
kinds of web enabled application. Can't get more simple than that, I think.

Michael.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Bls: [fpc-pascal] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Will this new fpWeb be included in the next FPC release? v.3.2? v.3.0.2?

Thank you.
 

–Mr Bee



Pada Sabtu, 14 Januari 2017 5:36, Michael Van Canneyt <[hidden email]> menulis:



Hello,

I have committed a serious change to the way fpweb handles requests.

Especially routing of requests was changed.

The old Delphi style routing worked with Datamodules only. The pattern was
strictly /modulename/actionname or through query variables: ?module=xyz&Action=nmo

This old routing is still available by setting the LegacyRouting property of
webhandler or webapplication (custweb) to true. (the new routing described
below is then disabled)

The new routing is more flexible in 3 ways.

- It is no longer required to use datamodules, but this is still supported.
  There are now 4 methods that can be used to register a route:

  - Using a callback procedure
    TRouteCallback = Procedure(ARequest: TRequest; AResponse);

  - Using a callback event:
    TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object;

  - Using an interface
    IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}']
      Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);
    end;
    Note that this is a CORBA interface, so no reference counting.
    (although a reference counting version could be added, if desired)

  - Using a router object:
    TRouteObject = Class(TObject,IRouteInterface)
    Public
      Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract;
    end;
    TRouteObjectClass = Class of TRouteObject;

    The object class needs to be registered. The router will instantiate the
    object and release it once the request was handled.

  - Using a datamodule, as it used to be.

  More methods can be added, if need be.
  All routes are registered using the HTTPRouter.RegisterRoute method.
  it is overloaded to accept any of the above parameters.

- The router can now match more complex, parametrized routes.

  A route is determined by the path part of an URL; query parameters are not examined.

  /path1/path2/path3/path4

  In these paths, parameters and wildcards are recognized:

  :param means that it will match any request with a single part in this location
  *param means that it will match any request with zero or more path parts in this location

  examples:

  /path1
  /REST/:Resource/:ID
  /REST/:Resource
  /*/something
  /*path/somethiingelse
  /*path

  The parameters will be added to TRequest, they are available in the (new) RouteParams array property of TRequest.

  Paths are matched case sensitively by default, and the first matching pattern is used.

  The HTTP Modules are registered in the router using classname/* or defaultmodulename/*

- A set of methods can be added to the route registration (default is to  accept all methods).
  The router will  match the request method. If the method does not match, it will raise an
  exception which will result in a 405 HTTP error.

I have added a demo application. It behaves well, just as the testcases, but I would appreciate
feedback if you have cases where your datamodules no longer behave as they
used to (both with LegacyRouting=true or false)

Some more improvements to fpweb are planned, but they will not be as invasive as this.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 14.01.2017 15:34, Marcos Douglas B. Santos via Lazarus wrote:
> I'm feeling we've started to go ahead writing complex Web systems
Does fpweb / weblaz already support status messages from the server to
the client (or will it some day) to allow for "Rich Web Applications") ?
> Thanks Michael and all those who have been contributing for these new features.
+1 !!!
-Michael
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
On Mon, Jan 16, 2017 at 8:12 AM, Michael Schnell via Lazarus
<[hidden email]> wrote:
> Does fpweb / weblaz already support status messages from the server to the
> client (or will it some day) to allow for "Rich Web Applications") ?

I don't work very often with web, but I'm curious...

Can you give examples of these messages? And who (nginx, apache..?)
and how they are implemented?

Thanks.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
On Mon, January 16, 2017 12:19 pm, Daniel Gaspary via Lazarus wrote:

> On Mon, Jan 16, 2017 at 8:12 AM, Michael Schnell via Lazarus
> <[hidden email]> wrote:
>
>> Does fpweb / weblaz already support status messages from the server to
>> the client (or will it some day) to allow for "Rich Web Applications") ?
>>
>
> I don't work very often with web, but I'm curious...
>
>
> Can you give examples of these messages? And who (nginx, apache..?)
> and how they are implemented?
>
> Thanks.


Indeed, does he mean javascript pop up messages, but initiated by the
server? when is the message displayed and why would it be displayed?  an
ajax on the current web page loaded, but initiated by the server?

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list

El 16/01/17 a las 17:12, Lars via Lazarus escribió:

> On Mon, January 16, 2017 12:19 pm, Daniel Gaspary via Lazarus wrote:
>> On Mon, Jan 16, 2017 at 8:12 AM, Michael Schnell via Lazarus
>> <[hidden email]> wrote:
>>
>>> Does fpweb / weblaz already support status messages from the server to
>>> the client (or will it some day) to allow for "Rich Web Applications") ?
>>>
>> I don't work very often with web, but I'm curious...
>>
>>
>> Can you give examples of these messages? And who (nginx, apache..?)
>> and how they are implemented?
>>
>> Thanks.
>
> Indeed, does he mean javascript pop up messages, but initiated by the
> server? when is the message displayed and why would it be displayed?  an
> ajax on the current web page loaded, but initiated by the server?
I think he is talking about WebSockets. The only framework I'm aware of
implementing it is m0rm0t.

Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
On Mon, January 16, 2017 1:59 pm, Leonardo M. Ramé via Lazarus wrote:
>> Indeed, does he mean javascript pop up messages, but initiated by the
>> server? when is the message displayed and why would it be displayed?  an
>>  ajax on the current web page loaded, but initiated by the server?
>
> I think he is talking about WebSockets. The only framework I'm aware of
> implementing it is m0rm0t.

What is the exact name of it... couldn't find it:

https://www.google.com/search?q=m0rm0t+web+sockets

maybe a spelling mistake or slightly different name?
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 16.01.2017 20:19, Daniel Gaspary wrote:

> Can you give examples of these messages? And who (nginx, apache..?)
> and how they are implemented?
>

In fact I can't, either, that is why I ask.

I do know that there are several frameworks that support this by running
rather complex Java script on the Client. (For Pascal there once was
EXTPascal, but AFAIK, the project has died. )

AFAIK there are several "standard" ways to use a HTTP connection via a
HTTP server in reverse direction, including polling by Java script,
holding a connection open for an extended amount of time and using an
additional TCP/IP socket. (I seem to remember names like "Comet" or
"WebSocket". "WebAssembler" might be a future extension to this, in
future potentially allowing to run projects created from Pascal code
directly in the browser.)

It would be nice to have a package Lazarus that supports such things.

-Michael
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list


On Tue, 17 Jan 2017, Michael Schnell via Lazarus wrote:

> On 16.01.2017 20:19, Daniel Gaspary wrote:
>
>> Can you give examples of these messages? And who (nginx, apache..?)
>> and how they are implemented?
>>
>
> In fact I can't, either, that is why I ask.
>
> I do know that there are several frameworks that support this by running
> rather complex Java script on the Client. (For Pascal there once was
> EXTPascal, but AFAIK, the project has died. )
>
> AFAIK there are several "standard" ways to use a HTTP connection via a
> HTTP server in reverse direction, including polling by Java script,
> holding a connection open for an extended amount of time and using an
> additional TCP/IP socket. (I seem to remember names like "Comet" or
> "WebSocket". "WebAssembler" might be a future extension to this, in
> future potentially allowing to run projects created from Pascal code
> directly in the browser.)
>
> It would be nice to have a package Lazarus that supports such things.

There is. Look for bauglirwebsocket. It implements the websocket protocol.

Michael.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 16.01.2017 21:59, Leonardo M. Ramé via Lazarus wrote:
> The only framework I'm aware of implementing it is m0rm0t.
What do you mean by "The only" ?  The only at all (I suppose that there
are several of those) or the only that explicitly supports pascal / fpc
/ Lazarus. (I don't know any at all).

-Michael
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 16.01.2017 22:21, Lars via Lazarus wrote:

> What is the exact name of it... couldn't find it:

http://blog.synopse.info/category/Open-Source-Projects/mORMot-Framework

-Michael
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 17.01.2017 10:27, Michael Van Canneyt wrote:
>
> There is. Look for bauglirwebsocket. It implements the websocket
> protocol.
That is good to know !
Thanks,
-Michael

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Bls: [fpc-pascal] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
This is really a great news. Thank you, Michael and all other contributors for the great work. 

It would only need more complete documentation with adequate demo and code samples.

Regards,
 

–Mr Bee



Pada Sabtu, 14 Januari 2017 5:36, Michael Van Canneyt <[hidden email]> menulis:



Hello,

I have committed a serious change to the way fpweb handles requests.

Especially routing of requests was changed.

The old Delphi style routing worked with Datamodules only. The pattern was
strictly /modulename/actionname or through query variables: ?module=xyz&Action=nmo

This old routing is still available by setting the LegacyRouting property of
webhandler or webapplication (custweb) to true. (the new routing described
below is then disabled)

The new routing is more flexible in 3 ways.

- It is no longer required to use datamodules, but this is still supported.
  There are now 4 methods that can be used to register a route:

  - Using a callback procedure
    TRouteCallback = Procedure(ARequest: TRequest; AResponse);

  - Using a callback event:
    TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object;

  - Using an interface
    IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}']
      Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);
    end;
    Note that this is a CORBA interface, so no reference counting.
    (although a reference counting version could be added, if desired)

  - Using a router object:
    TRouteObject = Class(TObject,IRouteInterface)
    Public
      Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract;
    end;
    TRouteObjectClass = Class of TRouteObject;

    The object class needs to be registered. The router will instantiate the
    object and release it once the request was handled.

  - Using a datamodule, as it used to be.

  More methods can be added, if need be.
  All routes are registered using the HTTPRouter.RegisterRoute method.
  it is overloaded to accept any of the above parameters.

- The router can now match more complex, parametrized routes.

  A route is determined by the path part of an URL; query parameters are not examined.

  /path1/path2/path3/path4

  In these paths, parameters and wildcards are recognized:

  :param means that it will match any request with a single part in this location
  *param means that it will match any request with zero or more path parts in this location

  examples:

  /path1
  /REST/:Resource/:ID
  /REST/:Resource
  /*/something
  /*path/somethiingelse
  /*path

  The parameters will be added to TRequest, they are available in the (new) RouteParams array property of TRequest.

  Paths are matched case sensitively by default, and the first matching pattern is used.

  The HTTP Modules are registered in the router using classname/* or defaultmodulename/*

- A set of methods can be added to the route registration (default is to  accept all methods).
  The router will  match the request method. If the method does not match, it will raise an
  exception which will result in a 405 HTTP error.

I have added a demo application. It behaves well, just as the testcases, but I would appreciate
feedback if you have cases where your datamodules no longer behave as they
used to (both with LegacyRouting=true or false)

Some more improvements to fpweb are planned, but they will not be as invasive as this.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
El 17/01/17 a las 06:29, Michael Schnell via Lazarus escribió:
> On 16.01.2017 21:59, Leonardo M. Ramé via Lazarus wrote:
>> The only framework I'm aware of implementing it is m0rm0t.
> What do you mean by "The only" ?  The only at all (I suppose that
> there are several of those) or the only that explicitly supports
> pascal / fpc / Lazarus. (I don't know any at all).
>
> -Michael

I mean the only for Lazarus/FPC.


--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list

El 17/01/17 a las 06:48, Michael Schnell via Lazarus escribió:
> On 17.01.2017 10:27, Michael Van Canneyt wrote:
>>
>> There is. Look for bauglirwebsocket. It implements the websocket
>> protocol.
> That is good to know !
> Thanks,
> -Michael
>

Nice!, thanks.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, Jan 13, 2017 at 7:36 PM, Michael Van Canneyt via Lazarus <[hidden email]> wrote:

Hello,

I have committed a serious change to the way fpweb handles requests.

Especially routing of requests was changed.

The old Delphi style routing worked with Datamodules only. The pattern was
strictly /modulename/actionname or through query variables: ?module=xyz&Action=nmo

This old routing is still available by setting the LegacyRouting property of
webhandler or webapplication (custweb) to true. (the new routing described
below is then disabled)

The new routing is more flexible in 3 ways.

- It is no longer required to use datamodules, but this is still supported.
  There are now 4 methods that can be used to register a route:

  - Using a callback procedure
    TRouteCallback = Procedure(ARequest: TRequest; AResponse);

  - Using a callback event:
    TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object;

  - Using an interface
    IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}']
      Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);
    end;
    Note that this is a CORBA interface, so no reference counting.
    (although a reference counting version could be added, if desired)

  - Using a router object:
    TRouteObject = Class(TObject,IRouteInterface)
    Public
      Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract;
    end;
    TRouteObjectClass = Class of TRouteObject;

    The object class needs to be registered. The router will instantiate the
   object and release it once the request was handled.

  - Using a datamodule, as it used to be.

  More methods can be added, if need be.
  All routes are registered using the HTTPRouter.RegisterRoute method.
  it is overloaded to accept any of the above parameters.

- The router can now match more complex, parametrized routes.

  A route is determined by the path part of an URL; query parameters are not examined.

  /path1/path2/path3/path4

  In these paths, parameters and wildcards are recognized:

  :param means that it will match any request with a single part in this location
  *param means that it will match any request with zero or more path parts in this location

  examples:

  /path1
  /REST/:Resource/:ID
  /REST/:Resource
  /*/something
  /*path/somethiingelse
  /*path

  The parameters will be added to TRequest, they are available in the (new) RouteParams array property of TRequest.

  Paths are matched case sensitively by default, and the first matching pattern is used.

  The HTTP Modules are registered in the router using classname/* or defaultmodulename/*

- A set of methods can be added to the route registration (default is to  accept all methods).
  The router will  match the request method. If the method does not match, it will raise an
  exception which will result in a 405 HTTP error.

I have added a demo application. It behaves well, just as the testcases, but I would appreciate
feedback if you have cases where your datamodules no longer behave as they
used to (both with LegacyRouting=true or false)

Some more improvements to fpweb are planned, but they will not be as invasive as this.

Hello Michael,

Is there a documentation link to explain all new features?
I'm gonna start a new web project and I would like to use them.

What about the design packages for Lazarus?
The wizards continue creating Web Module based applications.

This is my environment:
Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Best regards,
Marcos Douglas

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
On Tue, May 1, 2018 at 9:59 PM, Marcos Douglas B. Santos <[hidden email]> wrote:

> Hello Michael,
>
> Is there a documentation link to explain all new features?
> I'm gonna start a new web project and I would like to use them.
>
> What about the design packages for Lazarus?
> The wizards continue creating Web Module based applications.
>
> This is my environment:
> Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Actually, I've found the "routing example" and it worked very well in
standalone mode in my environment.
I can get how it works (the new way) just studying this demo. Thank you.
But I still think that we need to have a good documentation for it.

Regards,
Marcos Douglas
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Changes to fpWeb...

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list


On Tue, 1 May 2018, Marcos Douglas B. Santos via Lazarus wrote:

>> but I would appreciate
>> feedback if you have cases where your datamodules no longer behave as they
>> used to (both with LegacyRouting=true or false)
>>
>> Some more improvements to fpweb are planned, but they will not be as
>> invasive as this.
>
>
> Hello Michael,
>
> Is there a documentation link to explain all new features?
> I'm gonna start a new web project and I would like to use them.

I will see if I can put something in the wiki.

>
> What about the design packages for Lazarus?
> The wizards continue creating Web Module based applications.

A good point.
I had not thought of this. I will put it on my todo list.

Michael.
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
12