In Search for Template Reuse Between Angular.js and PHP

PHP itself is a great templating engine. No doubts. Why to add another overhead? From my perspective is the reuse between back-end and front-end. Why is there need to produce same code on server? Few of my concerns: SEO, usability (fallback for no-javascript on old devices)

Language diferences for building any web apps:

  • on client: HTML + CSS + Javascript
  • on server: HTML + CSS + PHP (or any language of your choice like Ruby, Pyton, Java, ASP,…)

If you are lucky, your host supports Node.js and reuse of templates is very doable. But most of the time you can consider yourself lucky when your host is running latest PHP codebase.

Continue reading “In Search for Template Reuse Between Angular.js and PHP”

PHP Elements in Pursue of a Dedicated API

A few months ago I was considering spicing my coding knowledge with Angular.JS. So I came upon the Dependency Injection concept and I fell in love with it.

I inspected Symfony’s creator thoughts about DI and concluded Symfony components being great but massive for my needs. I wrote my own very simple DependencyContainer class

Time for an excercise.

Continue reading “PHP Elements in Pursue of a Dedicated API”