How to set up a server for my app - api

At the moment I am making an app. I am relatively new but have experience with a lot of different languages like PHP and SQL. My app needs to communicate with a server to post/retrieve data for everyone to see. People also need to be able to login and register. Right now I am using parse because it gives a lot of the requirements in an easy package but parse is retiring soon and I have no experience with setting up my own server.
I was thinking of making my own 'server' from an old computer but not use parse because it will no longer support push notification. Then of course the app needs to communicate with this server. I started looking online and found a lot of terms but not a real clear explanation on how to proceed. I need it to be able to communicate with iOS and Android. Furthermore I was wondering how to execute a script on the server itself. I want to do something with time, once someone uploads something it needs to disappear after 48 hours, but of course it also needs to do this even if the app isn't active on a smartphone
Can anyone tell me how I need to proceed, what to use and where i can find useful info.
My plan for now is creating my own server with something like MongoDB but then i still need something called a backend and different SDK's to communicate with the apps. Maybe its possible to install parse on my own server and add something so i can still use Push and run a script on the server itself.
All help would be very much App-reciated ;)!

The reason of a backend service or framework is to let developer focus on front end app development. Maybe you can check other options like firebase, meoter, or even leancloud. Don't be hurry jump to the decision to make your own backend.

Parse Server is already supporting Push Notifications. I think should keep using Parse. It will become the best framework for backend and API development in a short time. You can also use services like https://www.back4app.com that helps you in all process of configuration of your server.

Do you mean by create your own server running a personal derver pr you mean create your own back end application?

Related

Discussion on best way to create a "backend" for my apps

Over the years I have written many apps for myself and for customers using VB.NET, most of these were standalone apps which worked on workstations and servers and didn't involve much if anything to do with networking, client/server or a backend.
I want to evolve and learn more, and specifically am interested in creating a "backend" for some of my apps so that the data from the client app, whether it be error information or custom data for a client can be sent from the "client" to whatever is the best option for the "backend". I would then store the received data in a database I assume and then have ability to view it, and parse the data to show specific results etc
This is a new area to me but one I want to learn more about, so I am hoping that others who have this knowledge / experience can give me some pointers as to the best route to take etc, especially covering the points below and anything else you think I need to know but have missed
What to use for the "backend"? I prefer to have it in the cloud rather than having my own server, so do I use something like Azure? if so what? or do I sign up for hosting with a company which provided ASP and .NET Core hosting and create something there? if so what would I use?
What are the best methods for sending data from a to b - I notice most services I currently use for my apps e.g. for sending mail or error reports etc often use JSON? is that best option?
How do I send the data, any built in or suggested frameworks or API's to use to "post / send" information from my client to my backend / remote endpoint?
Hope this all make sense, please ask if not, all comments appreciated, as I say I want to use this both as a way to create / modernize some of my existing apps, but also as a learning exercise to learn areas I don't know and hopefully also make user of newer / evolving technologies and solutions.
Thanks

How to handle external database updates in react-native/redux?

I am creating a react-native mobile app for a service that has to interact with the service's API to get and update data.
This service also has a web interface through which users can sign in and use the service (aka getting and updating data.
Since I am only developing the mobile applications, I have no access to the code on the web side of things and my only way to make changes to that code is to go through someone else.
From the resources available online, I feel like I should be able to make a mobile app that interacts with and updates data through the API, however my thought process for how I am going to handle a user updating data through the web interface and reflecting that in the app has hit a standstill.
Does anyone know of a term that I can use to describe this in such a way that I will likely find more results online (or even better, a react-native npm package that achieves this functionality)?
So far I have tried searching the following, but have found few results:
redux caching
handling data updated on the server redux
redux how to handle data changing on the server
how to handle database updates redux
Sockets.io seems like it would work for realtime updates.
Essentially, it works by shifting the connection from a request-based HTTP deal (where the client asks the server for stuff) to a websocket in which the client and server can send each other things (like database changes :D) over a constantly open stream, even if after a delay.

Node webkit database support and Browser support

I am planning to use node webkit for porting my existing html/css/javascript from a web app to desktop native app.Before doing this, i was trying to see if there are any downsides of using node webkit.
Which is the best database supported by nodewkit
My understanding is that it does not require any browser to run this node webkit app and that it provides webkit engine and the app provides a UI to it by using html5, and css.Is this understanding of mine correct?
All your pointers will be helpful.
Thanks!!!
Yes that is correct. Node webkit works as an HTML5/Node.js application wrapped around simple browser app written on Chromium Engine, and it doesn't need anything installed to work.
As far as I understand You want to connect to remote database, not create a local one for user data. If that's true, You shouldn't implement it on client side, but on server side. Which means your server side implementation shouldn't differ from Your actual one.
I create some applications with the following struct :
- folder : server (for any php/db request or response)
- folder : client (for js/css and images)
the relation beetween the client and the server is AJAX.
and the best db for a local use I prefer : Sqlite (in a network MongoDB or MySQL)
in all the cases it's preferably to use an ORM like Doctrine.
and make sure that in the response of server you send allways a json (not a formatted divs or any html) the client must be able to organise his data him self.
as a sample : openerp use this structure (with python istead of php).
for use of sqlite here is link that explane the way:
http://tejasrpatel.wordpress.com/2011/12/29/create-sqlite-off-line-database-and-insertupdatedeletedrop-operations-in-sqlite-using-jquery-html5-inputs/
that's the advices from my experience. and hope this be helpfull for someone.
I am currently developing a node-webkit app myself as well. I had this same question so as I was looking around I found PouchDB. This looks very promising for a node-webkit environment so that's what I'm going to be using. I hope this helps you out as well.
Actually there is one major part of node-webkit that you don't mention in your question, that is the 'node' part, specifically node.js. This is important because just about anything you can do in node.js is available to you in node-webkit.
I don't know what your application does, so I can't tell for sure, but you may or may not need an actual database. If all you want to do is store some data, you may find a file to be sufficient (JSON or whatever format is convenient for your purpose) which is easy to do with the fs module. Or you might only need to use localStorage, which is also available in the 'webkit' part of node-webkit.
If you do actually need a database, then anything works with node.js should be available to you, such as the aforementioned pouchdb, or any number of other possibilities.
In any case, you don't need to set it up as a client server model if you don't want to, you can just access files or databases directly in your node.js code. Conversely, if you do want to do a client-server model, you can have both running locally within your node-webkit program.
Hope that helps.
I use node-webkit insted of Qt, PySide, etc. and I tell you why:
webkit (the most full feature browser)
nodejs (what can I say is javascript)
cross platform (almost all)
To package and distribuite the software I use Web2Executable
For the GUI I use ExtJs 4.2 from Sencha
Database (engine) I use NeDB but you can use internal engines from webkit found here persistent-data-in-app

Xcode - Web services and my confusion

I am having a problem here. I am totally new to this concept of servers and web services and being able to get data uploaded and retrieved on different devices, but I want to learn it, say if I want to create an app like Instagram.
But that is EXACTLY what I dont want, a link to a long tutorial on the internet on how to create the most complex app ever, I want to start slow. After doing extensive power searches on Amazon there are basically no books that will help me. So I want to start slow, here is my goal:
Get a great understanding of how web service backends and servers work and be able to apply it in other app ideas I have and want to start developing
I would like to start by being able to create an app that allows a user to enter some text into a field, it uploads to the server, another device can press a button to retrieve the text and display it in a text view.
I do not know php, and every single tutorial I have entered on this website is literal mindeff, the reason for this is because everyone has a different solution, sync web service backend with Core Data, MySQL, parse, Rails and it truly overwhelms me because I do not know which one to pick! And even worse some people provide code but I have no understanding whatsoever, and its like looking at a totally new language!
I am not asking for code, in fact that is the exact opposite. I am asking for someone to really lay out their knowledge, how does it all work? What is the best tool? Some resources and links. Nothing too complex...
I hope you can truly understand my extreme confusion and frustration. I think the reason might be is I might not be ready yet for all this, but I want to push forward and carry out my app idea!
Thank you...
Update:
I have finally decided on a web service I would like to use, it is the Amazon S3 web service, I am still not fully comprehending the full process though, any help or ideas!?
Since you wanted to create an Instagram-type app, look at this: http://www.raywenderlich.com/13511/how-to-create-an-app-like-instagram-with-a-web-service-backend-part-12
This is a good link to servers: http://www.youtube.com/playlist?list=PLC71D7CFB6AF935E6&feature=plcp. Watch the list to get an understanding of servers.
Maybe you want to read up on sql. Understanding sql will help.. Again: http://www.youtube.com/course?list=EC32BC9C878BA72085&feature=plcp. Watch the list to get an understanding of sql...
I can pass you the link and you got to do the work....
Hope this helps...

Android MySQL php+JSON alternative

I have written a simple database driven app in C# which uses a 2 table MySQL database. This is all a learning curve for me (except c#, which I am now comfortable with)
The app is small, has a couple of datagridviews, uses a few sql select/inserts statments to populate the datagridviews and also update records.
I want to port this app to Android. All of the internet sources I can find recommend a middle php sript which accepts http requests in order to fetch the data from MySQL and then return the results back to the android device where it is parsed with JSON etc etc.
This method is a little out of my reach since I dont have php experience, all of my attempts to implement the php layer have failed, speciially the android app was not receiving any data back, I'm assuming I messed up somewhere inside the php file.
Is there an easier (more noobproof) way to interact with the MySQL database from within android which doesnt require the need for php + JSON? Any ideas are appreciated, thank you in advance.
If you are comfortable with C#, why not use ASP.Net MVC for the middle man?
MVC is especially easy to deal with JSON, and you actually only need to create those "controllers" (as models should already be there from your existing app, and JSON don't need the View to display).
You can create a Web Service with C# that handles the data retrieval from the database; no need to go with PHP. Try create one with WCF API (check this question in order to create one). In order to create an Android client that consumes JSON on Android check this link.
If your mobile application have to access a database over the network you should indeed build a web service fronted to the database.
By putting a web access layer on top of the database you can expose the required queries in an abstracted, secure and convenient manner.
Though this sort of web service architecture can be implemented with PHP + JSON other technologies can be used as well. If you feel more comfortable with C# you can use it to build the web service instead. By doing so you may even be able to reuse some of the code from your existing application.
Actually, it would be better to take php in middle of android & mysql, due to the security concern and by the way this is the most easiest & comfortable method. here is link link. I hope you like it.