Last Updated: November 06, 2017
· peter_heard01

Angular Services are Just HTML

I see frameworks getting abused all the time. It's like they get written and then everyone says 'yay I got me a shiny framework I will use it for EVERYTHING'.

Unfortunately leaning on your Single Page Application framework to handle everything for you is like painting picture and using one colour. Ok this isn't art but you get my point.

Object Oriented architecture hasn't changed really for decades yet every time a new framework is released there is a lot of jumping up and down about how it will solve the problems of yesteryear, they do obviously solve lot's of problems but the architecture dilemma is still with us. The five original principles (aka SOLID) are still important, and the endeavour of any good software architect will always be DECOUPLE DECOUPLE DECOUPLE! A good engineer will always shield application logic from from the framework since they are essentially two different applications.

One thing with Angular I have seen is Directives which end up having way too many responsibilities just because 'they can'. I wrote this article as a journey through the directive to learn how they work. Then to address their limitations. Hopefully you can find a new found interest in how to leverage their power in a way that more robust in your applications!