Hello list,
first-off I am a bit of a newbie to using pureMVC, but so far it feels very nice to work with. I want to make a small test AIR application to get familiar with the frame work. The app will be using the Sqlite database so I will be creating a SqliteDatabaseProxy.I am just having some design questions.
I am creating a SqliteDatabaseProxy which extends Proxy. This class has a method initialize(databaseName:String , location:File) which checks if the db file excists if not creates is and opens a Async connection using dbaseConnection.openAsync( dbFile ), where dbaseConnection is an instance of SQLConnection. After all this, a sendNotification is called to notify observers.
Considering the fact that this SqliteDatabaseProxy is only there to establish, verify and serve a database connection, I might need another Proxy object, let call it QueryProxy, that deals with the querys like CREATE,INSERT and UPDATE. Do I then have to give QueryProxy and instance of SqliteDatabaseProxy and then implement an EventDispatcher in the SqliteDatabaseProxy so that the QueryProxy can addListeners to the SqliteDatabaseProxy and based on that send notifications to the rest of the system. Or do I have then SqliteDatabaseProxy and the QueryProxy communicate which each other through notifications only. Or do I just forget about two Proxy objects and just use one that deals with everything, where in this case I give up my goal to create a re-useable SQlite class.
I hope my questions are clear and that somebody can advise me.
Jir
|