Are there any techniques to separate code and markup in WordPress?
I find putting all reusable template items as separate php, and including presentation logic as a theme function/object and business logic in a plugin in an okay way to separate concerns as such objects/functions are always available if loaded correctly. The template parts do save significant time if you use particular code all the time (like breadcrumbs for example).
I know its not satisfactory, but separation of concerns is possible.
I generally work with Python to create web apps and love how I can work separately with the code and presentation layers. I really like working with Jinja2. But, I sometimes have to work with WordPress for my clients. So, I wonder, if there are any ways to make developing for WordPress a less headache with all its header.php, index.php and footer.php as well as all other pieces that may join together well or may not. Are there any suggestions to make it more convenient?