WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #12935, comment 63


Ignore:
Timestamp:
02/23/2011 01:49:58 PM (11 years ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12935, comment 63

    initial v1  
    11Replying to [comment:62 mikeschinkel]:
    22> Replying to [comment:60 scribu]:
    3 > > But the perceived lack of flexibility of WP_Rewrite isn't due to regexes, but due to the way these patterns are generated and stored.
    4 >
    5 > You misquote me.  It's not a lack of flexibility of regular expressions; it's the requirement to match each URL in it's entirety that makes it very difficult for most people to set URL routes for anything beyond trivial.
     3> > But the perceived lack of flexibility of WP_Rewrite isn't due to regexes, but due to the way these patterns are generated and stored.
     4>
     5> You misquote me.  It's not a lack of flexibility of regular expressions; it's the requirement to match each URL in it's entirety that makes it very difficult for most people to set URL routes for anything beyond trivial.
    66
    77I didn't quote you to begin with.
    88
    9 > Also, can you help me understand why you'd advocate maintaining a system that generates and map upwards of 1000 regular expresssions for a complex CMS when with a tree structure the matching would be 1 to 2 orders of magnitude less per page load?
     9> Also, can you help me understand why you'd advocate maintaining a system that generates and map upwards of 1000 regular expresssions for a complex CMS when with a tree structure the matching would be 1 to 2 orders of magnitude less per page load?
    1010
    1111I advocate maitaining this system for normal use. Complex CMSs can do tree structure matching, as needed.
    1212
    13 > And please address why retaining the complexity of the regular expressions as used in the rewrite system makes sense vs. much more straightforward simple match rules that mere mortals are much more likely to understand (with fallback to RegEx, of course?)
     13> And please address why retaining the complexity of the regular expressions as used in the rewrite system makes sense vs. much more straightforward simple match rules that mere mortals are much more likely to understand (with fallback to RegEx, of course?)
    1414
    15 The system you propose is not actually that simple at all. You just replace the regex engine with PHP code, removing one common skillset with a very specific one (knowing the tree structure API and algorhitm).
     15The system you propose is not actually that simple at all. You just replace the regex engine with PHP code, removing one common skillset with a very specific one (knowing the tree structure API and algorithm).