So I am fairly new to app development, but I would say my app is near completition in terms of the functionality of it; but now comes the point where all the data is stored, like user posts, user information, and so forth. I have no idea how the backend really works or how to incorporates with fuse. When I think of a service with a backend, the first that comes to mind is Facebook and their large database of users and so forth. If I was to use a service like AWS S3, am I just going to be creating JSON files that I’ll be fetching and going through? I don’t really understand how the backend works in actual terms other than the fact that it is what is hosting all the data. So if anyone could elaborate on how to incorporate a backend to an app in an explanation I’d greatly apperciate it, or link me to a video or tutorial about it; because I was reading documentationt on the docs about fetching an http and the example of Amazon’s S3 service, and I don’t know if those two things go hand at hand or are two completely entities?
Edit: After doing a little bit of research and reading, I feel mangoDB may suit my needs for this. Does anyone know how I would go about linking mangoDB to my app, would it just be through a fetch()? If someone could link me to documentation or an example I’d greatly apperciate it
Thanks in Advance,
Hi!
There are many ways you could go about doing a backend for your app, but in almost any case you would end up accessing it using fetch or the more “low level” XMLHttpRequest. It is common to get the data as JSON, but this is totally up to you. The nice thing about getting it as JSON is that you don’t have to worry about parsing it (since this is already implemented for you). I’m very far from an expert on the topic of backends, but i’ve used Parse and Firebase in the past, and that has worked out OK for smaller projects.
The usual way these “backend as a service”-services work is that they give you a few native SDK’s, which can be used to access the data by forming queries (these can be wrapped using foreign code).
Usually though, they also have a pure REST API, which lets you use normal fetch/XMLHttpRequest to access data. This is probably the easiest just to get you started.
I hope this helps a bit. You have a lot of options, but none of them are specific to Fuse unless you decide to try to wrap a native SDK using foreign code (which might be a bit advanced until we get a couple examples out).
You can read about foreign code here if you are interested: https://www.fusetools.com/docs/native-interop/foreign-code
I would not recommend to go directly to a database from you application. Instead you should have a web application in front that processes your messages and reduce the amount of JSON and network calls. For mobile applications it is critical to keep the amount of data to a minimum since a lot of users are going to use your app while connected to a cellular network (thus in some cases slow connections and high roaming costs).
Some users have setup their own Parse server and also Syncano seems to work. I guess some other users can give you feedback on what works best for them.
Thank you both for your response it has helped me understand more about a field I have no information on. Anders could you possibly elaborate more on the web server and how that works, or possibly link me to information on the Internet in regards to that.
I’ll definitely be checking out docs for foreign code and looking at the few examples some users have provided!