Looking for best practices: Persistence in Flex Mobile Apps with Robotlegs

FlexMobile dev's Avatar

FlexMobile dev

20 Sep, 2012 09:52 AM

Hello FlexDeveloper Fellows,

I'm building a mobile app that uses the camera api. Because of the high memory usage the application sometimes gets closed while using the native camera app, After I'm finished taking a photo the app gets restarted. Flex offers view persistence by using the data property of the view and the ViewNavigator property persistNavigatorState="true". I'm getting the feeling if i would utilizes the data property in the view to manage persistence my views will be cluttered with all sorts of logic that do not belong there. However on the other side of things by reimplementing this stuff in Robotlegs with commands and services im getting the felling of "reimplementing the square wheel"

Any suggestions how to solve this issue?

  1. Support Staff 1 Posted by Ondina D.F. on 20 Sep, 2012 02:34 PM

    Ondina D.F.'s Avatar

    Hello FlexMobile dev,
    I don’t have enough mobile development experience, so I hope you’ll get answers/suggestions form other, more experienced, FlexMobileDeveloper fellows ;)

    From the little I know, PersistenceManager is like a Service, having access to external resources. So, I’d have a Service class implementing IPersistenceManager.

    Also, for lots of data to be saved I’d probably use SQLite.

    I'm getting the feeling if i would utilizes the data property in the view to manage persistence my views will be cluttered with all sorts of logic that do not belong there.

    Even more reasons not to do it in the view :)

    Just my opinion.
    Ondina

  2. Ondina D.F. closed this discussion on 04 Oct, 2012 11:53 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac