4 ms·
Such as? Still no examples, I see. Without a real architecture you don't get to complain that a hamhanded solution is less than optimal
by atoko 9y ago
Such as? Still no examples, I see.
Without a real architecture you don't get to complain that a hamhanded solution is less than optimal
- LeoNatan25 9y agoFor example, a mail app, a chat app. Would not scale at all with RN (or mobile web in web view). Imagine having to preload hundreds or thousand messages or other existing content while the user is viewing or typing. None of that is applicable to "server side business logic". Not if you want a quality app.
- doublerebel 9y agoThis is false, mail and chat apps work fine with multiple hybrid app frameworks. I've created plenty of hybrid apps that have 100s of items in lists, this is what ListViews are designed for. There's no limitation inherent to hybrid apps that prevents holding 1000s of objects in memory. This also works fine on mobile web if it's designed right. If the mobile client can't handle 100,000 messages (probably more an issue of bandwidth or latency than local memory), then page them from the server. That's where serverside becomes relevant, at huge scale. I'm not sure you understand how architecture of a mail or chat app would work.
- LeoNatan25 9y agoIn the past, I have built both a large enterprise-grade mail/calendar/contacts app which interfaces with Exchange, as well as a chat app: https://www.checkpoint.com/products/capsule-workspace/#overview https://www.checkpoint.com/products/capsule-workspace/#overv... https://itunes.apple.com/il/app/check-point-capsule-workspace/id522091441?mt=8 https://itunes.apple.com/il/app/check-point-capsule-workspac... RN list views are terrible, as all the data is held in memory. For a chat or a mail apps, that's catastrophic. "Paging on the server" is not a solution; users want all their data on the device. In my previous comment, I actually meant a different scenario than displaying a list. Take any proper mail client or a chat app; the first thing they do once a user logs in is start preloading previous data that can be found in cloud / on the server. Depending on the amount of data available, that is a very serious undertaking in and of itself, doing it efficiently enough in the background while updating the UI where needed upon insertion. This is just not possible in a single-threaded JavaScript. Your mindset of only holding a small subset of data on the mobile is erroneous and is empirically not what users want; it's a web mentality and has no place in any app development but web. We went with this approach, albeit for security reasons. The result was the vast majority of users were unhappy. Users wanted a full blown Outlook in their mobile, and there was no reason not to give it to them.
- doublerebel 9y agoI don't see how any of this is a limitation of React Native and not a result of poor app architecture. If a list is too big to fit in RAM, but not too big for the device, page it from the local SQlite DB. All kinds of web and mobile apps asynchronously fetch remote data while keeping a responsive UI. There are also service workers and other ways to prioritize UI. The vast majority of popular chat and email apps keep at least some of the data on the server by default -- Gmail, K9 mail, Outlook itself -- so I don't see where there is proof that users want something different.
- martinald 9y agoThe problem is paging the local SQlite DB requires you to use the main UI thread without causing nasty bugs. The main problem is large redux objects, which you're right - needs major refactoring. It's a pain.