Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
I agree. I'm not using Fold at work either ;-) and I'm also not knocking RESTXQ in any way as, yes, it's the closest to a standard and has many implementations.
I do think that experimenting with other approaches is good. Some languages use something like Fold with great success and uptake. Often as a base library on top of which other routing libraries/DSL's are created fostering even more diverse approaches.
For the time being this will stay based on RESTXQ and stay away from Java but it does feel clumsy and duplicating basic HTTP request plumbing.
ah well.... we'll see ...
--Marc
On Wed, Nov 26, 2014 at 9:49 PM, Maximilian Gärber mgaerber@arcor.de wrote:
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got
Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
I guess this request is reasonable:
https://github.com/xokomola/fold/blob/master/webapp/fold/adapter/basex-restx...
@Christian: would %rest:ANY or some sort of wildcard notion be possible?
Regards,
Maxi
2014-11-26 22:12 GMT+01:00 Marc van Grootel marc.van.grootel@gmail.com:
I agree. I'm not using Fold at work either ;-) and I'm also not knocking RESTXQ in any way as, yes, it's the closest to a standard and has many implementations.
I do think that experimenting with other approaches is good. Some languages use something like Fold with great success and uptake. Often as a base library on top of which other routing libraries/DSL's are created fostering even more diverse approaches.
For the time being this will stay based on RESTXQ and stay away from Java but it does feel clumsy and duplicating basic HTTP request plumbing.
ah well.... we'll see ...
--Marc
On Wed, Nov 26, 2014 at 9:49 PM, Maximilian Gärber mgaerber@arcor.de wrote:
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got
Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
-- --Marc
Hi Max, hi Marc,
The %rest:path annotation in BaseX 8.0 allows regular expressions [1]; I guess this is what you need?
Best, Christian
[1] http://docs.basex.org/wiki/RESTXQ#Paths
On Mon, Dec 1, 2014 at 3:51 PM, Maximilian Gärber mgaerber@arcor.de wrote:
I guess this request is reasonable:
https://github.com/xokomola/fold/blob/master/webapp/fold/adapter/basex-restx...
@Christian: would %rest:ANY or some sort of wildcard notion be possible?
Regards,
Maxi
2014-11-26 22:12 GMT+01:00 Marc van Grootel marc.van.grootel@gmail.com:
I agree. I'm not using Fold at work either ;-) and I'm also not knocking RESTXQ in any way as, yes, it's the closest to a standard and has many implementations.
I do think that experimenting with other approaches is good. Some languages use something like Fold with great success and uptake. Often as a base library on top of which other routing libraries/DSL's are created fostering even more diverse approaches.
For the time being this will stay based on RESTXQ and stay away from Java but it does feel clumsy and duplicating basic HTTP request plumbing.
ah well.... we'll see ...
--Marc
On Wed, Nov 26, 2014 at 9:49 PM, Maximilian Gärber mgaerber@arcor.de wrote:
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got
Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
-- --Marc
Hi Christian,
%rest:ANY would route all HTTP methods through that function. Basically saying I don't care which method you call me with. So it has nothing to do with the paths.
Hth
--Marc
On Mon, Dec 1, 2014 at 4:52 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Max, hi Marc,
The %rest:path annotation in BaseX 8.0 allows regular expressions [1]; I guess this is what you need?
Best, Christian
[1] http://docs.basex.org/wiki/RESTXQ#Paths
On Mon, Dec 1, 2014 at 3:51 PM, Maximilian Gärber mgaerber@arcor.de wrote:
I guess this request is reasonable:
https://github.com/xokomola/fold/blob/master/webapp/fold/adapter/basex-restx...
@Christian: would %rest:ANY or some sort of wildcard notion be possible?
Regards,
Maxi
2014-11-26 22:12 GMT+01:00 Marc van Grootel marc.van.grootel@gmail.com:
I agree. I'm not using Fold at work either ;-) and I'm also not knocking RESTXQ in any way as, yes, it's the closest to a standard and has many implementations.
I do think that experimenting with other approaches is good. Some languages use something like Fold with great success and uptake. Often as a base library on top of which other routing libraries/DSL's are created fostering even more diverse approaches.
For the time being this will stay based on RESTXQ and stay away from Java but it does feel clumsy and duplicating basic HTTP request plumbing.
ah well.... we'll see ...
--Marc
On Wed, Nov 26, 2014 at 9:49 PM, Maximilian Gärber mgaerber@arcor.de wrote:
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got
Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
-- --Marc
Maybe we could check out what's the JAX-RS way of doing this. So far, it has always been a good advice to do it the same way.
On Mon, Dec 1, 2014 at 5:24 PM, Marc van Grootel marc.van.grootel@gmail.com wrote:
Hi Christian,
%rest:ANY would route all HTTP methods through that function. Basically saying I don't care which method you call me with. So it has nothing to do with the paths.
Hth
--Marc
On Mon, Dec 1, 2014 at 4:52 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Max, hi Marc,
The %rest:path annotation in BaseX 8.0 allows regular expressions [1]; I guess this is what you need?
Best, Christian
[1] http://docs.basex.org/wiki/RESTXQ#Paths
On Mon, Dec 1, 2014 at 3:51 PM, Maximilian Gärber mgaerber@arcor.de wrote:
I guess this request is reasonable:
https://github.com/xokomola/fold/blob/master/webapp/fold/adapter/basex-restx...
@Christian: would %rest:ANY or some sort of wildcard notion be possible?
Regards,
Maxi
2014-11-26 22:12 GMT+01:00 Marc van Grootel marc.van.grootel@gmail.com:
I agree. I'm not using Fold at work either ;-) and I'm also not knocking RESTXQ in any way as, yes, it's the closest to a standard and has many implementations.
I do think that experimenting with other approaches is good. Some languages use something like Fold with great success and uptake. Often as a base library on top of which other routing libraries/DSL's are created fostering even more diverse approaches.
For the time being this will stay based on RESTXQ and stay away from Java but it does feel clumsy and duplicating basic HTTP request plumbing.
ah well.... we'll see ...
--Marc
On Wed, Nov 26, 2014 at 9:49 PM, Maximilian Gärber mgaerber@arcor.de wrote:
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got
Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
-- --Marc
-- --Marc
I'm only superficially aware of JAX-RS but I think that it didn't have this type of routing in mind when designed. AFAIKS there's only explicit verb annotations. When doing routing as I'm implementing in Fold it %rest:ANY would be a way of delegating the responsibility of finding the correct handler to the routing mechanism whereas JAX-RS seems to be designed more for the situation that you're wiring the handler directly to an explicit verb (or add multiple annotations). I could also imagine that it could be considered a somehow risky thing to do as %rest:ANY would not care which HTTP verb was used even a totally invented one. Same arguments might apply for RESTXQ.
--Marc
On Mon, Dec 1, 2014 at 5:34 PM, Christian Grün christian.gruen@gmail.com wrote:
Maybe we could check out what's the JAX-RS way of doing this. So far, it has always been a good advice to do it the same way.
On Mon, Dec 1, 2014 at 5:24 PM, Marc van Grootel marc.van.grootel@gmail.com wrote:
Hi Christian,
%rest:ANY would route all HTTP methods through that function. Basically saying I don't care which method you call me with. So it has nothing to do with the paths.
Hth
--Marc
On Mon, Dec 1, 2014 at 4:52 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Max, hi Marc,
The %rest:path annotation in BaseX 8.0 allows regular expressions [1]; I guess this is what you need?
Best, Christian
[1] http://docs.basex.org/wiki/RESTXQ#Paths
On Mon, Dec 1, 2014 at 3:51 PM, Maximilian Gärber mgaerber@arcor.de wrote:
I guess this request is reasonable:
https://github.com/xokomola/fold/blob/master/webapp/fold/adapter/basex-restx...
@Christian: would %rest:ANY or some sort of wildcard notion be possible?
Regards,
Maxi
2014-11-26 22:12 GMT+01:00 Marc van Grootel marc.van.grootel@gmail.com:
I agree. I'm not using Fold at work either ;-) and I'm also not knocking RESTXQ in any way as, yes, it's the closest to a standard and has many implementations.
I do think that experimenting with other approaches is good. Some languages use something like Fold with great success and uptake. Often as a base library on top of which other routing libraries/DSL's are created fostering even more diverse approaches.
For the time being this will stay based on RESTXQ and stay away from Java but it does feel clumsy and duplicating basic HTTP request plumbing.
ah well.... we'll see ...
--Marc
On Wed, Nov 26, 2014 at 9:49 PM, Maximilian Gärber mgaerber@arcor.de wrote:
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got
Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
> Hi, > > I would like to announce a new library (very alpha) called Fold. > > https://github.com/xokomola/fold > > It is a an HTTP routing library which provides an alternative way to > map HTTP requests to XQuery functions. In future I hope to use this > together with Origami to build REST services and small web apps. > > My main goal of announcing this is to get feedback on how to improve > this. Currently it is defined on top of RESTXQ but in future this > might be handled by a Java extension. There are parts missing still > and I strongly advise you not to use this for a serious project. > > Performance gets bad quite quickly. Performance gains may very well be > possible by XQuery refactorings. I basically wrote this as a port from > a couple of Clojure libraries. > > A bit of documentation for this library and for Origami can be found > in each project's wiki. Note that I only just started these and they > are not complete. > > I'll be working on this library over the next month to get it into a > more usable shape. > > Happy to receive comments and improvements. > > --Marc
-- --Marc
-- --Marc
basex-talk@mailman.uni-konstanz.de