Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm building an app which fetch posts from server. My question is straightforward: My UITableview has a data source. The data source can load data directly from the server when user hit reload. So why do I want a local store like core data?
One benefit is that loading from a local data store is much faster than loading from a web service. As such, a common pattern is to cache the most recently retrieved data in a local data store and display that while you're making an asynchronous request for any updates.
One example would be Facebook's apps. When you open them from a completely shutdown state they are populated with previously loaded posts, and when a refresh request completes the UI then refreshes with the new data.
The thing to remember is that with mobile devices network connectivity can be highly variable and/or non-existent. If your app requires connectivity and up to date info at all times, then maybe you don't need a local store? But it does help improve the overall user experience generally speaking.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am developing an iOS calendar app using swift.
I'm using a firebase database because the server needs some data.
But it takes too long to fetch data, and nothing is visible unless there's a wifi (or cellular) connection.
I want to make my schedule visible even if I turn off wifi or cellular, like Google Calendar or iCalendar.
I heard that there are sqlite, realm, and core data available. Which of these should you use? Can all three be synchronized with firebase?
If you are using Firebase then there is no need of using another Database or saving mechanism. Firebase has offline Capabilities which should suffices your situation.
Have a look at this Offline-Capability
You can enable offline access with just single line of code:
Database.database().isPersistenceEnabled = true
With this enabled, Firebase will automatically handle the synchronisation.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I would like to know what are the best practices regarding, Modeling data when no network connection available, if the app you are building is cloud computing based, but still you want to be able to have basic functionality and I guess some persistent data?
PD: I am kind of new to IOS development
UserDefaults is okay for small bits of data that don't change often, but as it has to rewrite the entire user defaults dataset to a file each time a change it made, it is not robust enough for anything of volume or with frequent changes. For that you would want CoreData or a third party open source solution like Realm.io.
You can try to using the 'cache' where you store temporary data.
One way to achieve this is NSUserDefaults where you set a variable (let's say users profile photo) and when the user opens his app again, the image will be loaded even if there is no internet connection since its cached. Hope this helps!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm making an iOS app where I fetch data from a MySql database via a web api (in JSON format). When I load a specific screen the first time should I always save the fetched data local or it is okay that I fetched the data again when the app opens again from being closed/killed? My app has a login in module so right now I only store the current users information local. I also fetch images but those I cache.
You're asking whether to cache the information you download from an API or toss it and grab new every time? This is a very opinionated answer, but to me, it depends on how often the information you're fetching updates or changes itself. Do your users expect to see totally different information every time the app loads? If yes, maybe you don't need to bother caching. The Facebook app, after being killed, opens to a pulsating loading newsfeed. The twitter app, on the other hand, shows you the most recent tweets it loaded then shows an inline notification that more tweets have loaded and you should scroll up to read them. There's no right or wrong answer, it's really up to you.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I went through the online Falcor videos and tutorials and it sounds very interesting. I am trying to determine if this would be a good fit for our application needs. Somewhere in the presentation I heard that it is very well suited for fairly static application, meaning the data is huge but mostly static. In our case, the data is huge but also gets updated frequently. So, the question how Falcor works when the backend data gets updated frequently.
If data held in client memory becomes stale due to its server-side representation changing (e.g. two separate users manipulating the same part of the graph) then you'll need some sort of server-push-to-client event stream thingy to notify the client of changes so it can keep its data cache fresh.
To my knowledge Falcor doesn't have any built-in hooks for this sort of thing. That doesn't mean Falcor can't be used for dynamic data; most MVC framework have this caveat. Just something to be aware of.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am developing an app where I am going to use NSUserDefaults to store some profile variables (name, picture, etc), I think.
I think I need to store some long huge lists of values for each user and I read about Parse and Core Data. What is the best? Can Parse replace Core Data?
What is useful on this case? Both?
Thanks in advance
Parse will store your data on their infrastructure on the cloud. You can enable Parse object caching to keep that data for offline use as well. For most apps I build, I avoid using CoreData (although Parse may be internally using some for of local store, could be CoreData) and use Parse explicitly with caching.