On Wednesday, 12 September 2012 at 19:10:50 UTC, Sönke Ludwig
wrote:

Am 12.09.2012 20:20, schrieb Eldar Insafutdinov:

How many paths are you thinking here? tens or hundreds?

I would say something in the range of one hundred is realistic
for a
moderately complex web app (I have one half finished with about
50
routes). So if say 200 are not affecting performance, the state
machine
approach is probably not needed.

Btw. router.match() is the same as router.addRoute() is now,
but 'match'
seems like a nice naming alternative.

Yeah, I already noticed that that there is addRoute, so I'll
rename it.

Ok

I don't quite understand about how exactly to use state machines
here, but I just thought - if there were support for Regexps how
would that fit in?

Also as for 100-200 routs - is that realistic to use together
with the Router class? Because to me if you have this many routs,
you might as well write your own handler that implements
IHttpServerRequestHandler interface and does some custom logic?