Firebase instead of rails for backend - ruby-on-rails

I’m used to developing in rails for the web. So when I want to fetch records matching specific fields and then manipulate the data as I see fit, I can easily do it with Rails.
However, I am now developing an Expo app and want to give Firebase a try.
To do what I described above, can that be achieved entirely on Firebase? Is it done with Cloud Functions?
Is there something I am missing about Firebase in that respect I should know?

Related

how to create a flutter app like wikipedia

I'm trying to create a Flutter app like wikipedia where a user can search and display the information but I'm don't have a lot of backend knowledge so it'll be appreciated if someone can guide me what I should do or learn in order to start this project.
The reason I'm trying to build this app is for my ethnic group. I want to have an app where we can read articles/information in our own language.
My goals is basically get all the article or documents about our cultures from other people and store in one database and display it in my app.
I'm not really sure where will be the best place to store all the article and retrieve that in Flutter. I've been looking Firebase but I'm not really sure if I can store the whole articles and display it.
Just to give you an idea, this is minipedia app and I'm thinking about creating an app just like this.
Any suggestion will be really helpful. thanks
You can use Firebase Firestore for this project. I've used FB before and to the best of my knowledge, there shouldn't be any problem with doing what you mentioned above.
I've been looking Firebase but I'm not really sure if I can store the whole articles and display it.
Yes, you can store whole articles on Firestore and retrieve them whenever you need them. Each document has a maximum limit of 1MB, which is approximately 1 million characters but should you need more space(which I highly doubt), you can always separate your articles into chunks.

Firebase chat backup/export like whatsapp in SWIFT

i implemented a chat app in swift using firebase real time db, there user can send images, emojis and Text.Now i have a requirement of export chat or get the conversation's backup with media and text as per whatsApp.help me to solving it out.
While Firebase offers a backup for the Realtime Database, this doesn't fit your needs here, since you'll want a per-user export of the data.
Since this is specific to your application, you will have to code it yourself, just like the good folks at WhatsApp have probably done. It should be a matter of iterating over all data sources for the user, getting the data through the relevant API (that you're already using to display that data), and then writing to a local file). You can do this either client-side in your Swift code, or server-side on a server you already may have, or using Cloud Functions.
If you're looking for some inspiration for the latter, there is a sample repository that shows how to clean up a user's data, based on a set of wipe-out rules. You'll need to significantly modify this example though, so I'm not convinced this will be less work than rolling your own from scratch.

How would I go about building and hosting my own backend for an iOS application?

As a preface: I want to do this as a learning exercise. I'm not trying to produce a commercially viable app.
What are the layers/abstractions of an iOS application that is connected to a custom, self hosted backend? What technologies are needed to build this stack?
This post has helped my understanding a bit. I'm currently using Firebase as my backend but have found its NoSQL structure wrong for my app. The data I'm storing is relational, so I think an SQL database storing JSON would work better. The data is modeling Vehicles shared between Users.
From my research, the Realm Platform looks like a good choice. Am I understanding the technologies correctly here? Does this sentence make sense?
General functionality:
Sign Up and Login of users
Upload/download vehicle data
Some server side logic
Pushing data updates to users in real time
So would the stack look like the following?
User Front End: iOS app written in Swift
Database: Realm Database (SQL)
Server: Realm Object Server
I'm really looking for an overview of the general architecture. I don't know anything about that, so I'm sure I have failed to provide many details that are necessary for a thorough answer.
I apologize if this question is redundant; most answers I've seen for similar questions typically end with "just use AWS, Firebase, etc".
Thanks!
For a start you want to build your own backend and you should create your own API's that your IOS application will connect to. in short this is called REST api
https://www.sitepoint.com/developers-rest-api/
you will need to use many more technologies more than just a server like Apache
once you create your backend API you will need to connect it to the IOS app which can be done using NSURLSession builtin framework form Apple or Alamofire which is based on NSURLSession but its easer to use if you are learning
you will need to learn how to do an http/https request to understand how the request is made
check this
https://medium.com/#MuraliKathir/build-a-simple-api-search-with-alamofire-and-swiftyjson-80286e833315
Now to Realm. Realm is a local database that will be inside of your IOS app which helps you save data downloaded online or even user generated
https://realm.io/docs/swift/latest/#queries

Can a Meteor web app serve data to an iOS app?

Pretty straight forward question i think. I have created a web app in meteor and its using mongoDB storage. I have UI to update the data in the backend through the web app.
The question then becomes, I have designed an iOS app that i would really love for it to read the data being served to the web app from the mongoDB. As it stands, the app takes a url to a JSON file that i update regularly and serializes it accordingly. I want to pass on the tasks of updating the backend but exposing company employees to the potential mess of JSON backend, where missing/deleting a bracket / brace causes the app to break is out of the question.
My question is, since the meteor web app stores data as JSON documents, is there a way i can access the same JSON from the iOS app? It would really help because then, the person updating the backend only deals with UI, not code. I know this is a pretty broad question, but any pointers would be fantastic. Links, tutorials, frameworks to learn... anything. I've been googling around but can't seem to find anything solid.
Thanks!
You'll want to look into using one of the many iOS based DDP clients, like this one. With these libraries you can connect native iOS apps to the backend of any deployed Meteor app.
As far as I understand, you are looking for a way to get/update the data of your meteor server from the IOS app.
To do that, you can expose an API, like a REST one. Basically, your IOS app will call your Meteor server via HTTP and send/receive JSON data. Like that, you can get your collections, update, add, delete their items as well. There is a lot of literature around REST.
I used a very old one that I do not recommend because it is not maintained anymore, I will put the link anyway Old Rest API.
I invite you to have a look at atmosphere, the meteor package library: Atmosphere. I did a quick search on it and I found this package that looks promising: Simple Rest.
Have a look at the packages on Atmosphere, you can use 'rest' as keyword and pick the one that fits your needs. I am especially thinking of security ;).

Xcode 6 - iOS8: Allow Master User To Update Information

I was wondering if anyone could point me to any useful tutorials on allowing a master user to update information for their app. I am looking into creating an application for a local restaurant and I want the owner to be able to update information like the soup of the day and such by themselves.
I have been looking into JSON and CMS for this, but I am unable to find any useful information regarding iOS 8 or xCode 6. If anyone could provide me with this information, or any other suggestions on how to achieve this I would be very grateful!
(I am using Swift not Objective-C)
This is not a code issue, rather it is a development concept issue. You have many choices including making an API that is updated by the restaurant. The app then connects to the API and gets the recipes. If you feel you need to do this via the App make a special username that is allowed access to modify the menu. This can be accomplished via matching username exactly or via using a regex. It all really depends on the structure of your app platform.

Resources