e-mission / e-mission-docs

Repository for docs and issues. If you need help, please file an issue here. Public conversations are better for open source projects than private email.
https://e-mission.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
15 stars 34 forks source link

ControlCtrl is extremely verbose now and should be restructured #142

Open shankari opened 8 years ago

shankari commented 8 years ago

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

shankari commented 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.

shankari commented 8 years ago

This is also true for metrics.js, which is currently 934 lines of code, and includes at least 2 fairly big factories.

sunil07t commented 8 years ago

I can look into ControlCtrl to start with and that way I can learn the functionality of this controller too.

shankari commented 8 years ago

Also, instead of wrapping four promisifed wrappers for CommHelper.getMetrics, the function should itself be promisified.