On 08.02.2013, at 07:03, Ian Boston <[email protected]> wrote:

> I partly asked the question because I have at times been asked "Why
> doesn't Sling support regexes like X does"

Carsten already gave most of the answer - it's one of Sling's core principles 
to be based on an explicit resource tree and not be based on regular 
expressions.

The right answer to that question is: Sling does not use regexes for URL 
handling simply because they are a bad idea: they don't allow for user managed 
structures or ACLs, they become unmaintainable & totally intransparent.

Regular expressions in "legacy" frameworks exist because:
a) these frameworks assume that develpers define the URL space
b) and/or they are based on a RDMBS hence they need to do all this: request -> 
wiring (regexs) -> internal objects -> DAOs -> ORM -> RDBMS

Sling just has request -> resource tree / JCR, thereby simplifying things a 
lot, while easily supporting a user managed URL space, which is very useful for 
CMS and many web applications.

Cheers,
Alex

Reply via email to