Open shankari opened 8 years ago
If you want to see an example, see my code for the splash screen, now split between controllers.js
and the two javascript files in splash
. Also note how I hide details of the storage implementation in the service. This makes it easier to change the storage later without changing all the code.
This is also true for metrics.js
, which is currently 934 lines of code, and includes at least 2 fairly big factories.
I can look into ControlCtrl to start with and that way I can learn the functionality of this controller too.
Also, instead of wrapping four promisifed wrappers for CommHelper.getMetrics
, the function should itself be promisified.
From a software engineering perspective,
ControlCtrl
is now way too verbose and complicated. It should be restructured into a proper MVC pattern.https://github.com/e-mission/e-mission-phone/pull/88
either @krisma or @sunil07t can do this