(+N) Consulting Inc.

Consulting | Software Solutions | Training

Runtime token substitution

I'm toying with a class that will allow for efficient token replacement at runtime. Why re-invent the wheel? Its fun A bare class that does just this is rare Absent a class like this, people just use all kinds of string manipulation techniques that can be slow and sluggish. What am I out to solve? Let's say your website supports some notion of a CMS. So you let some users publish pages / content by filling in a form and storing the content in the db. Next usually comes the request that special variables can be planted in the content. This includes ads, formatting, dynamic links, personalization data etc. The first reflex is to just use string replacement. But if the content is not the whole page, the tendency ... [More]