[Mapbender_dev] Handling REST API requests.

Armin Retterath armin.retterath at lvermgeo.rlp.de
Mon Jul 12 01:33:38 EDT 2010


hello together,

i would prefer 1)
cause i think that nice urls are the key for our problems.

regards,
armin

Am Sonntag 11 Juli 2010, um 16:32:04 schrieb Karim Malhas:
> > > You can have a single script for each resource type in the 
approach I
> > > mentioned. Think of it like this
> > > 
> > > api/users.php/json
> > > api/user.php/<id>/json
> > > api/wms.php/<id>/json>
> > > 
> > > etc.
> > 
> > Even if it is api/users.php/json
> > when the client will send a request GET api/users/json , the server 
will
> > look for api/users/json/index.php or api/users/json/index.html
> 
> I don't understand the "GET api/users/json" request, what is that
> supposed to get?
> 
> 
> Let me try to give a summary of the discussion so far :
> 
> 1) Map all paths to /index.php and do all the path-parsing there
> 
>   example: "/user/25" is rewritten to /index.php which can then
>   parse "/user/25"
> 
>   advantage: nice URLs
>   disadvantage: additional configuration in the webserver needed
> 
> 
> 2)
> 
>   Give the path as an argument to index.php
> 
>   example: "/index.php/user/25" will call /index.php which can then
>   parse "/user/25"
> 
>   advantage:  simple, can be used together with a rewrite
> 
> 
> 3)
> 
>   like 2), but for each Resource
> 
>   there's a ".php"  in each url, which could be gotten rid of
>   with URL rewiriting but it's more work than in 2)
> 
> 
> 
> Me my personal preference would be 2)
> 
> I would also prefer specify Content-Type as ".json" not "/json", so you
> don't have to treat it as a special case in path parsing
> 
> 
> Regards,
> Karim
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev


-- 
Im Auftrag
--
Armin Retterath

Kompetenz- und Geschäftsstelle Geodateninfrastruktur Rheinland-Pfalz
beim
Landesamt für Vermessung und Geobasisinformation Rheinland-Pfalz

Ferdinand-Sauerbruch-Straße 15
56073 Koblenz
Telefon 0261/492-466
Telefax 0261/492-492
armin.retterath at lvermgeo.rlp.de
http://www.geoportal.rlp.de


More information about the Mapbender_dev mailing list