CouchDB in iOS / Xcode? - ios

Is there a simple solution or framework to use a couchDB database in an iOS application? I need to copy a database and store it locally in the app, so I need functions like pulling down a remote database, etc. What would be the best route for me to take to access my couchDB in my app (in swift)? I have tried couch base lite, but have had much trouble using it.

Here are few options :
CouchBase Lite
CouchCocao
TouchDB-IOS
According to my search, CouchBase Lite seems the best options.
You can also develop your own library. Since CouchDB has a HTTP RestFul API, it's pretty easy to do.
Otherwise, PouchDB if a very powerful library to use CouchDB on mobile. Therefore, it's only available for hybrids applications(JavaScript).

I know this was asked over 3 years ago, and just wanted to update the list.
You might want to also take a look at this
https://github.com/cloudant/swift-cloudant
A Swift Lang client for Cloudant and CouchDB
I haven't tried it yet, but plan to as I am also still looking for a way to use CouchDB on an iOS project of mine.

Related

How do I link two apps in node.js and rails?

I run a social network app built in ruby on rails 4. We want to improve it and add realtime and add live streaming features. We also want to make 'likes', 'comments' features real time. My lead programer says ruby on rails is not good for this and not possible and only way is to do it in node.js however doesnt know any solution to link node.js application to rails. I'm a business guy and not technical and need info to let him know it can be done.
Rails 4 doesn't have streaming(like websocket, maybe streaming is not good word in this context) functional from box, but many gems exist for this: https://rubygems.org/search?utf8=%E2%9C%93&query=websocket.
However you can use websocket.io if you decide it is a better solution, for example, in my current project we use websocket.io for send a notifications for mobile application through websocket: rails and nodejs exchanging data through Redis.

iOS database programming

I am looking for something that would act as a database for an iOS application. I have read about SQLite, but this seems to be only useful if you want to store the database locally. I want to have multiple people be able to write to the database from multiple phones.
Does anyone have any information? Can you just use a MySQL database?
Not looking for any code, just to be pointed in the right direction, brand new to the topic!
You might want to look at Couchbase Lite which is an embedded lightweight, document-oriented (NoSQL), syncable database engine.

Using rails with phonegap

I have a fully functional rails app but, I want to create a mobile version using Phonegap. I've got Phonegap and Xcode set up but, I'm not quite sure how to go about it.
I want the mobile version to pull from the same database as the web version.
What technology can I use to achieve this?
Thanks,
Ramario
You should probably expose your database through a REST API abstraction layer either with Rails or a separate application using something like Sinatra, which I personally find better suited to API development.
Then your mobile app can make REST calls to allow users to manipulate data from the same database.
Or you can of course just make your existing web UI mobile-friendly and have people just as easily work with your Rails app through the browsers in their phones as they do the browsers on their laptops.

Simplest way for understanding MongoDB iphone

What is the simplest way of understanding about mongoDB? i know there's something called as NuMongo wrapper to to interact with mongoDB, but yet its not yet clear in my head. Can some please share the knowledge ?
Thanks
Directly accessing a MongoDB database from a mobile device is probably not a good idea. The main limitation is that the Mongo wire protocol has no encryption.
You can build an application server as middleware, in almost any language you like.
That said, ObjCMongoDB (of which I'm author) has support for iOS, so if you decide you want to give it a go anyway, you can.
If you want to write an application server on Mac OS using Objective-C, you can also use ObjCMongoDB for that, along with something like CocoaHTTPServer.
An very simple way is to set up a Rails Application with some mongoDB PlugIn, e.g. mongomapper and in Rails you can define the web service to communicate with the iPhone.
These links are very good to understand Rails and mongomapper:
Rails Guides
MongoMapper Documentation

Using MongoDB for a calendar web app

I have been doing web programming for few years. All this time, I have been using RDBMS. As a side project, I would like to create a web application and would like to use NoSQL. I have never used NoSQL. So I would like to use a NoSQL solution. Web app is going to be a calendar and article list that are going to be shared among a project group. I would be using Ruby on Rails.So would it be fine to use MongoDB for this web app? or do you have any other recommendation?
MongoDB should be fine. I can't think of a particularly compelling reason as to why it'd be superior to an RDBMS or one of the other key-value stores out there for this particular problem, but I can't think of a reason not to use it, either. For a learning project, it should be more than fine.
As far as interfaces go, I'm currently using MongoMapper and am happy with it, and Mongoid is picking up a lot of steam. You can even just use the Mongo driver directly - it's very usable.
Candy looks quite nice as ruby lib. There are other like MongoMapper and Datamapper + do_mongo and likely more.

Resources