1 person found this helpful
I usually make a DatabaseManager class as a Singleton extended from an EventDispatcher
dont know if thats right but works for me
I see, so you are using Async and waiting for events?
Also, you connect to the database file for each call?
no, I only connect it once
I figured I wanted several views to use it so made it static and singleton as I only have 1 database
I actually use synchronous calls but there is a sync with remote mysql database function, hence the eventdispatcher
... although I am thinking it might be better to use Async and dispatch a custom event and have the relative views subscribe
Could you show me a bit of what you do?