Lurker News

Comments (53) 17 threads

Earlier comments
HodGreeley1 reply#
Hod @ Couchbase. Looks like an excellent tutorial. I understand you have limited time, and this is providing a great resource to the community. I'd ask, if you have the chance, to take a look at Couchbase Mobile. I'm of course biased, but I think I can legitimately claim that Couchbase is on par with Realm (as evidenced by business critical apps using it in large scale deployments). Happy to chat about it (hod@couchbase).
dabbott#
For sure! There was definitely demand to know more about Couchbase Mobile at my class, so I know it's relevant for people using RN.
WhitneyLand2 replies#
Can anyone give pros/cons of RN vs Native in a nutshell?

I'm already familiar with native coding, but not sure how much better RN is than say PhoneGap.

18nleung#
IIRC PhoneGap is just your app in a WebView while RN uses native components. (e.g. RN maps to UITextView, while in PhoneGap it's rendered by the WebView)
cobar#
Development time is a lot quicker with RN. Not only are you targeting a single code base instead of maintaining two apps, but the React environment helps you to be productive.

The React way of managing views makes a lot of sense - change a variable and the whole UI updates accordingly. Also, rather than going through the typical debug, modify code, recompile cycle, there is a Hot Reload mode in RN where your code updates are immediately applied when you save. Laying the UI out with RN's CSS-style syntax is a lot easier than doing it by hand or mucking with Interface Builder / Android XML files. There is a lot that RN wraps around that gives easier management of than the native approach to, e.g. a BackButton component vs. dealing with a stack of Android fragments.
I haven't done any PhoneGap programming, the lack of native UI always scared me off. Without that, I never felt like I could hit a level of polish that was acceptable. The nice thing with RN is you can build you own native components and access native functionality as needed. It's not super well documented, but powerful when you need it.

pbrb1 reply#
The sections with ES6 vs output compiled with babel is amazing. Javascript really has come a long way.
RubenSandwich1 reply#
Amazing yes. But I think that on certain sections they should output the console value instead. I'm specific talking about the Array Spread example as the Babel output in that case is a very roundabout and verbose way of showing me what the Array Spread Operator actually does. I think it would be better to allow the user to play with the operator and see the output of it right next to the code.
dabbott2 replies#
Totally agree with you on that. When I have a little more time I'm gonna add that.

The compiled output starts out awesome with the first few sections, and then just gets tedious and weird.

pbrb#
Still useful, but yeah, adding the console output would be even better for said sections. Either way, I'm loving this write up. I saved it to run through the entire tutorial, starting tonight.
weaksauce#
perhaps add the compiled option as a toggle button instead of an always on thing and have the log output be the main attraction.
dabbott1 reply#
Ah, thanks. I will change. I was going off my own memory from talking to a few Realm guys months ago, but clearly I should've just rtfm :)
RubenSandwich1 reply#
No worries. Just glad to help, thanks for putting this tutorial together. :)
dabbott#
Fixed! Man, deploying while on HN is scary.
hackcrafter3 replies#
How would you compare Realm vs Couchbase Mobile in terms of a syncing mobile store?

Maybe a more fair comparison is to IBM's CloudantSync[0] which is the managed service version of Couchbase compliant Cloudant.
[0] https://developer.ibm.com/clouddataservices/offline-first/

dabbott#
I honestly haven't tried Couchbase mobile or CloudantSync. I got a few questions about Couchbase when I was teaching my last class on RN, and I've been meaning to try it. It sounds powerful and popular.
HodGreeley#
Hod @ Couchbase. Couchbase Mobile has had sync for a long time. It's used in serious, large scale deployments. (Check out the video from Ryan Air if you want to see a really cool example of how they were able to improve their app with it.) Couchbase is a document oriented database storing JSON and blobs. (I'm not a Realm expert, so I won't attempt to compare sync solutions.)
bigfish24#
(Adam from Realm) Realm is an ACID compliant object database. Compared to Couchbase it is much more performant and memory efficient. In terms of data sync, Realm works by transferring the compressed changes from the transaction log (so just the diffs and capturing the semantic intent of the action) and automatically resolving conflicts using operational transformation. This approaches leads to extremely low latency enabling realtime collaboration functionality. This is quite different than Couchbase which is sending the entire object, requiring the developer to manually resolve conflicts.

Load more comments