Suggestions and information about SQL And Swift - ios

I am working on a new app, until now i used firebase as database but this app will save much complex data and i think that firebase and noSQL at all is not the right solution in here.
I ran into this Pod: https://github.com/IBM-Swift/Swift-Kuery that helps to use PostgreSQL on swift.
I also ran into ElephantSQL that helps you to load PostgreSQL on an AWS server (if i got it right), but i found it pretty hard to understand everything about it and I'm not sure that this is the best solution for me.
I would love to get some help from somebody that know more on SQL and SWIFT and could help me to choose right services to use it.
Thank you very much.

My suggestion to you is to avoid doing the SQL right from the mobile App unless this is extremely needed (till now I haven't found a reason to do it).
It's a better design to expose your data from your backend server (AWS, Azure, Hosted, etc) with a Webservice/API. For this you can use any backend language. Depending on your needs you could use vapor which is a web framework based on swift so that you wouldn't have to learn another language.

Related

ReactJS integrated with rails or separated rails api

Ok guys i was thinking about this question and didnt find anything related or that could clarify my mind about this. Its not an issue that im facing right now, its more curiosity and maybe it could help someone someday.
Whats the best way or best practice to create a reactjs application? Integrated with rails? Or with a separated rails api and separated reactjs?
I would say separate them. If you ever wanted to rebuild your API with Node.js or Python for example, it will make it much easier than trying to rip out all of your Rails code, and Vice Versa– If you wanted to keep your Rails API and build out a new front-end with Angular it makes it easier.
Another thing to keep in mind is scalability. When your front-end code is separate from your back-end code, you can scale up your backend independently, which would ultimately save you money. This is more applicable to large scale applications though.
Also deployment. If you need to make updates to your API, you shouldn't have to re-deploy all of your front end code as well.

CMS, Backend for iOS App

My question might be too easy. But i come from web development background and just started creating iOS app by learning from here and there. I have made 2 prototypes, but the second one need backend, cms.
From my prev experience i used php, mysql, html, css. I custom made the cms to organize my content and all user data, etc would be stored into database and can be maintained from the cms.
I use swift, but i seem to miss something important. in ios area what are the tools to develop the db (not local storage, coredata, and such) and maintain that; like what i used to use in web dev area? i dont even know how to ask the right question, but i really hope you guys would understand
can you guys give me direction? a link to basic knowledge of this will be fine
thanks
I think usually it will be database on a server and you will send requests and get answers in JSON format. You will have to parse them and use in your app.

Best Method for iOS Application to Update & Retrieve Files from SQL Server?

First let me say in advance that after having done a bit of research, I am aware that there is a ton of information regarding this question. A bit overwhelmed, I wanted to consolidate the approaches that I have found into one question and ask for confirmation as to whether each step in the path is:
The best resource/method to accomplish this task and
All encompassing (is there a gap in functionality I am not aware of)
I have written an iOS app which currently stores/loads data from a parsed csv file on the app's Documents path. Currently I must manually place the data to and retrieve the data from disk by connecting the device to my computer, and then take this csv file and enter into SQL. The next step in development is for me to perform this task via a web service of some kind which automates the process for me when I update/record data in the application. However I have no experience with this!
So after looking into this process, I think I have split the task into the following components, beginning and ending with the app and a SQL server:
___iOS App
__RestKit Framework to communicate w/ web service using JSON
_Ruby on Rails RESTful Web Service
__ActiveRecord Gem to communicate w/ SQL server using JSON
___SQL Server
At this point I have almost zero knowledge of RestKit, RoR, or ActiveRecord, and so before I dive in headfirst I want to be confident that comprehensively, hooking these elements together will provide the medium for communication between my app and a SQL database that I am looking for and that I am going about this the right way.
So am I on the right track? Is there anything else I should be aware of? Is this how you would accomplish the same thing?
Many thanks in advance!

ejabberd: manage adding / removing friends

Serious headaches, trying to get ejabberd to integrate into an existing Rails app to support the chat part. Hope anyone wich has gone true this could share some insights on how to best approach cause currently everwhere there are issues.
My goals:
1. Store all data in mysql database for easy backup
for this I have setup mysql usage for ejabberd using the mysql drivers so far so good
2. Easy add and remove users from each others roster ( add and remove friend connections ) for this I have setup module rest and mod_admin_extra to be able to do restfull calls to ejabberd from the rails app. The ejabberd admin module allows to add and remove users BUT ( overflow: https://stackoverflow.com/a/5229902/355281 ) This author says its not possible to store data in mysql Mnesia is always used by mod_admin_extra
3. Temporarily add users to each others list or preferrable have some temp room to add 2 users to so they can chat as long as this group exists. No idea how to approach this
Problems with all this
Seems not all data can be stored in mysql, so data shattering Mnesia & Mysql , very bad to have data in 2 places and be unable to easy backup the mysql database
Have to use rest module to do stuff to the database wich is on itself fine, but how to add 2 users to each friendlist is unclear to me.
Although ejabberd seems to be the most complete out of the box xmpp server I might need to look for another server that tackles above issues. This part of my project has been big headaches hope someone can clarify, provide some suggestions on how to approach.
for example:
If facebook used ejabberd how did they tackle these issues?
Is there a clean rewrite of ejabberd that tackles above problems? perhaps a commercial xmpp server with decent api and ways to add/ remove users and store data in 1 central location?
Since you're already using MySQL, you can just manage the roster using Rails/MySQL Directly.
If you don't wanna do it directly in the DB, which is totally understandable, you can connect to the server through bosh (http://xmpp.org/extensions/xep-0206.html), where you can do all you're asking for. There is a JS bosh client that you might be able to use as a guide to implement it in Rails, it's called http://strophe.im/
Regarding having the data in two places, you should have (or be able to have) all the roster specific tables in MySQL, additionally you can configure pretty much every persistent piece of data to be on mysql, I'd need to know more about your specific concerns and configuration to be able to elaborate more on this though.
eJabberd is highly configurable and extendable, in my experience (over 8 years working with eJabberd) you can basically achieve any kind of behavior one way or the other.

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

Resources