Suggestions on how to get started on a backend besides PHP?

Discussion in 'iOS Programming' started by Dookieman, Mar 13, 2016.

  1. Dookieman macrumors 6502

    Joined:
    Oct 12, 2009
    #1
    Hey all,

    I'm currently working on a small personal iOS app. I wrote the backend in PHP with MySQL as the database, but I want to branch out into something more "new". I've heard tons of times that sticking with old and boring is your best bet, but ignoring Ruby/Python seems to be foolish now. Does anyone have tips on where to get started with these? I attempted learning rails a while ago but it was so confusing getting the webserver up and running, it didn't seem straight forward like PHP, (write PHP file, uploaded, point app/browser to .php file and have the code execute as expected). Python seemed to be equally challenging to get working, (maybe I'm just an idiot).

    Also, recommended IDE for any of these?
     
  2. tyche macrumors 6502

    Joined:
    Jul 30, 2010
    #2
    The new hostess these days is MEAN which you can read up mean.io. Node.js is all the rage and for good reason.

    Also, if you're looking for a database backend, take a look at Firebase from Google. It has limitations on its use cases but it's fast and realtime.
     
  3. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #3
    I definitely recommend Node.js with Express for a backend. My personal favorite database solution is MongoDB.

    The reason is that it's just so easy and simple to build a good, scalable, fast backend with Node, MongoDB, AND Express, they all work very well together and it's so incredibly easy to learn and use. Significantly easier than PHP in any case.

    Personally, I feel like I am good enough in Swift & Objective-C that I've moved on to learning Java for android development, and my Node backends don't need any changes at all to work for Android. Though I'm sure this would be equally true with a well designed PHP backend as well.

    Since Javascript has almost reached "required" status for nearly everyone in the iOS development community I would definitely suggest it.

    My personal favorite strategy is to build out the backend first, get it fully operational and tested, and then focus on iOS. In iOS, my favorite strategy is to build Core Data subclasses for all my data model objects, and have methods to serialize/deserialize them from JSON and have all their HTTP endpoints baked right in to the data model classes as functions, making heavy use of blocks/closures. This has worked well for me, it makes caching extremely easy and ridiculously fast, and it has caused me very few headaches.
     
  4. teagls macrumors regular

    Joined:
    May 16, 2013
    #4
    My vote is for MongoDB. So much better than MySQL. I have converted all my production projects over to MongoDB. Although I do use python instead of node js. But, my use-cases are probably very different. I do a lot of GPU computing web services for the backend. Python has a lot of existing packages and is very easy to use as well.
     
  5. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #5
    That's interesting, makes sense. I've never thought of using Python for a backend but I can see it could work. For myself, whenever I have a compute-intensive task that Javascript just isn't efficient enough to do (like some custom strong encryption scheme or some kind of Monte Carlo calculation) I usually write a C or Java application, which is then launched by my Node server as needed.
     
  6. Dookieman thread starter macrumors 6502

    Joined:
    Oct 12, 2009
    #6
    Know of any tutorials that show explain how to get this up and running?
     

Share This Page