Let me explain a bit: I am developing an app that will
be published as an AIR application using SQLite, as well as a FLEX application that will use MyDSQL via web services.
I want to develop both applications in such a way that all the components can be reused, and I only have to do minimal redevelopment. I have started witht the AIR application. Once I have it completed, I want to publish the application (with minimal redevelopment) as a FLEX web app.
My thinking is that I contain the database accesses in the Application, and passing the data via interfaces to the respective modules, as well as receiving data from the modules back to the Application to be written to the database. This was the only changes between the FLEX and the AIR application will be how the database access is handled in the Application file, and I can leave all modules as is and will be able to maximize reusability,
I haven't done this before, and was wondering what the best approach for this is?
My thougt is to encapsule all database access in RemoteObjects. That way the only changes I need to make between the FLEX and AIR applications is the data handling in the ROs.
Is there an even simpler, more efficient, or practical approach?
It seems very difficult to find best practices on how to structure your database layer in FLEX. None of the books I have go into detail about it, nor do any of the websites I have found so far, including the Adobe Flex tutorials. Sure, they explain how to interact with databases, but don't seem to care about best practices for structuring your application.
Can anyone point me in the right direction for this?