TickerSrv – Timing service revamped

Mid 2014, I published a post about a timing service. You can read the post here.

Recently, I wanted to use this service for a client but the requirements meant that I had to refactor the code to be more robust.

Continue reading

Creating model objects, the Angular way

As part of a requirement I was implementing, I needed to create a model object.
I wanted to do this ‘The Angular Way’ – non-intrusive, extensible and injectable.
AngularJS provides us with the means to create Services, Controllers and Directives, Model Objects are somewhat of a missing piece.

I was thinking of implementing this with a service but ran a quick Google search just to make sure I was on the right track.
I stumbled on a very good article, written by Gert Hengeveld on this subject.

I liked the approach and the explanations, A really good read in my opinion.
Here is the link.

Local storage Cache service

We all need access to the local storage every once in a while.
Usually it’s for locally storing state variables or data retrieved from the server that does not change throughout the life of the application.
It can save up some loading time on subsequent executions as well as reduce server load.

Continue reading

Timing service

Every once in a while, I find myself in need of a timing mechanism. Something that will handle timing and scheduling, and allow me to hook with a custom functionality every interval.

Some uses can be, for example, a clock counting down or simply showing the time passing by, polling the server back-end for new data, etc. Basically, anything that needs to happen every given interval.

Continue reading