codeguy / php-the-right-way

An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web
https://www.phptherightway.com
Other
9.05k stars 3.24k forks source link

Update Templating - Further Reading with better examples #751

Closed daggerhart closed 5 years ago

daggerhart commented 7 years ago

Some of the current examples in the Template - Further Reading section are bad.

Specifically:

The remaining articles are all framework/library dependent:

Ideally, this section provides three things:

  1. Good introductions to templating in general
  2. Advanced templating engine design
  3. Examples that are explicitly for popular templating engines

3rd item (Examples): This is basically covered in the Libraries section, but the first 2 are either missing or unusable.

1st item (Introduction): I've written a few blog posts on the "introduction to templating" topic, but I'm not sure I'm the person to be teaching this stuff. Here are my blog posts, which I think are good examples of what should be provided in this section as introductions:

Again, I don't know that my posts are the best possibly articles for this topic, just showing as examples of what I think should be provided in the Template - Further Reading section.

2nd item (Advanced engine design): This is the reason I'm here submitting this issue. I am very interested in learning more about "How to design a PHP Templating Engine", but have had a lot of trouble finding resources with practical examples. I've re-discovered the Roll Your Own Templating System in PHP article many times over the past few years, only to be continuously disappointed and frustrated. I've even tried copying the page source code to fix it into something legible, but that exercise only highlighted to me how poorly the article is written.

Though not 100% positive, I believe the topics covered by an advanced article would include these items:

But maybe I'm wrong... I have no way to know without some clear examples.

Welcome to thoughts and feedback about this idea. Also, if anyone knows of better resources for introduction to templating or building a templating engine, I love to see them.

crossmaya commented 7 years ago

:)

codeguy commented 6 years ago

I want people to learn:

  1. What templating is;
  2. Why it is useful;
  3. What templating libraries are available;

Building a templating engine is out of scope. I think the current templating content is a bit longer than necessary and could be reduced to improve focus. New links to better resources also welcome.

codeguy commented 5 years ago

Closing for inactivity.