var myCalculator = getCalculator();
myCalculator.setValue(10);
myCalculator.getValue(); // 10;
var newCalculator = getCalculator();
newCalculator.getValue(); // not the same as myCalculator
var myCalculator = getCalculator();
myCalculator.setValue(10);
myCalculator.getValue(); // 10;
var newCalculator = getCalculator();
newCalculator.getValue(); // 10;
Will always give you the same data.
Singletons are literally the same object.
Won't always give you the same data.
Non-singletons are copies of the same object.
View
Controller
Service
Use services for:
User Service
Home Controller
Profile Controller
Profile View
Home View