[web-devel] [Yesod] ANN: Wai routes 0.7
Greg Weber
greg at gregweber.info
Sat Jun 13 18:53:59 UTC 2015
Thanks for the explanation.
I have a small function for applying different middleware to different
routes that I put up on a pull request now.
https://github.com/yesodweb/wai/pull/384
On Fri, Jun 12, 2015 at 11:09 AM, Anupam Jain <ajnsit at gmail.com> wrote:
> Ah great question! One that I keep revisiting in my mind every time I
> think of adding something to wai-routes. Short answer - No. Long
> answer follows.
>
> Wai-routes' stated goal is to "provide a similar level of typesafe URL
> functionality to Wai applications as is available to Yesod
> applications". The feature list may make it seem like a larger
> framework, but it's really all just features provided by the routing
> code from yesod! Writing plain wai apps is tough though, so wai-routes
> provides a thin veneer over some of the rough edges, just enough to
> make it pleasant.
>
> Sometimes the simplicity of wai-routes makes it easier to use than
> Yesod. For example, it is really easy to have multiple independent
> route sets that match one after the other, so you can better logically
> group your app, instead of putting all routes in one big file. You can
> also apply different middleware to the different route sets. I'm
> currently not aware of any way to do that in Yesod.
>
> The de-coupling from wai also insulates the user from changes to the
> wai api. So the same wai-routes code continued to work when Wai-3.0
> changed to a CPS style. ...Though that leaves the user vulnerable to
> changes in the wai-routes api... which happens quite more often... So,
> forget I said that! :)
>
> -- Anupam
>
>
> On Fri, Jun 12, 2015 at 9:58 PM, Greg Weber <greg at gregweber.info> wrote:
> > To me, wai-routes seems like a full web framework and a
> re-implementation of
> > Yesod (I am not suggesting that it is a bad thing). Is that its goal?
> >
> > On Tue, Jun 9, 2015 at 3:54 PM, Anupam Jain <ajnsit at gmail.com> wrote:
> >>
> >> Hi all,
> >>
> >> I have just released v0.7 of wai-routes, the typesafe urls framework
> >> for wai. After letting the code rot for several months, I finally
> >> managed to carve out some time to do a bit of housekeeping. The code
> >> now compiles with ghc 7.8 and 7.10, and is compatible with wai-3.0.
> >> The dependency on yesod-routes has also been removed, as that package
> >> was deprecated, and its code has been folded into wai-routes.
> >>
> >> I also took the opportunity to add a few long pending features -
> >> 1. Subsites! Simpler than the corresponding concept in Yesod, though
> >> probably less powerful as well. This is still an evolving experimental
> >> feature.
> >> 2. Ability to get information about the currently executing route,
> >> including the Route Attributes (which is exactly the same thing as in
> >> Yesod).
> >>
> >> Get it at -
> >> [http://hackage.haskell.org/package/wai-routes]
> >> [https://github.com/ajnsit/wai-routes].
> >>
> >> Feedback would be greatly appreciated, especially from people using
> >> wai-routes in their projects!
> >>
> >> -- Anupam
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Yesod Web Framework" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to yesodweb+unsubscribe at googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Yesod Web Framework" group.
> >
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to yesodweb+unsubscribe at googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "haskell-wai" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-wai+unsubscribe at googlegroups.com.
> To post to this group, send email to haskell-wai at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/haskell-wai/CAKit5aAcYFP4v24-9ZqV-XdZkgk5VOZR4cbgyzjPBT5jmKBdrg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/web-devel/attachments/20150613/643ccb12/attachment.html>
More information about the web-devel
mailing list