Hi all. This is partly a question, and partly a code/approach suggestion for seasoned plugin devs to knock down.
I'm new to WP development, but am an experienced PHP coder - working with Symfony 1.x and DooPHP professionally. I notice that plugins in the WP ecosystem take a variety of approaches to rendering templates - from echoing out HTML in functions and methods (!), to separating out the view layer into template files and using require/include to render them (much better).
I'm having a first go at a plugin, and as part of this, I've written a simple templating system. I've separated it out as a Git submodule in case it is of interest to anyone else. It enforces OO controllers, logic/presentation separation, and renders layouts, partials and components. I might add file/memcache fragment caching too.
So, is there existing WP best practise for this? I couldn't find anything on this in the docs. If there is no established best practise, is my approach of interest to anyone? Feedback welcome and appreciated.