[fpc-pascal] fpWeb REST support (asking about features)

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Tue Jun 7 16:49:31 CEST 2011



On Tue, 7 Jun 2011, Ludo Brands wrote:

>> Ok, that is simply an alternative to the current
>> TFPWebDataModule which does
>> not rely on part of the URL to determine the CRUD action, but
>> uses the URL
>> just to determine the resource, and the HTTP method to see
>> which CRUD action
>> needs to be performed.
>>
>> That's easily done. It's about 5 lines of code in
>> TFPWebDataModule: 1 for a "RESTFul" property, 4 to determine
>> the action from the method if RESTFul is set to True.
>>
>> Do you think this would be a useful addition ?
>>
>
> That would indeed be a very good starting point for a REST implementation.
> In the few REST implementations I have seen, the uri is used to pass on the
> record identifier for the RUD action while, if I understand correctly,
> TFPWebDataModule gets the record identifier together with the data from a
> datainputadaptor. This will probaly need a customised datainputadaptor since
> a record identifier can be anything.

Indeed. 
In fact, the implementation should go in the web input adaptor.


Michael.



More information about the fpc-pascal mailing list