Closed Bug 1154988 Opened 7 years ago Closed 7 years ago

[Calendar] remove db initialization and store factory from app.js

Categories

(Firefox OS Graveyard :: Gaia::Calendar, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mmedeiros, Assigned: mmedeiros)

References

Details

Attachments

(1 file)

right now we instantiate the database inside the app.js file, I think we should remove the `db` instance from the app module and convert it into a Singleton/Static or create a SingletonFactory.

there are a couple places that access `app.db` and many others that call `app.store()` (which calls `this.db.getStore()`)

this will reduce the likelihood of circular dependencies and almost kill the need of passing the app instance to all the views & controllers.
Summary: remove db initialization and store factory from app.js → [Calendar] remove db initialization and store factory from app.js
Assignee: nobody → mmedeiros
Comment on attachment 8598974 [details] [review]
[gaia] millermedeiros:1154988-store-db-app-refactor > mozilla-b2g:master

Great work Miller. I only had one nit on GH. Not flagging checkin-needed since the commits still need to be squashed.
Attachment #8598974 - Flags: review+
Duplicate of this bug: 1157736
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.