Friday, January 15, 2016

Day 60

iOS with Full MEAN


So yesterday we did some basic socket connections. Now, we're moving onto Full MEAN where we are going to use MongoDB. This means we need 4 additional files: mongoose.js file where we connect to our MongoDB. Routes.js to connect to our server side controllers from different HTTP's. Then we need our model file where we create our schemas and finally, our controller where we write our functions to retrieve and send info to the MongoDB.

Again, there really wasn't any issues since I've done it already but the trouble starts when we're getting information from the webserver. All the info in MEAN are in JSON format. Swift is not developed well to handle JSON data, instead preferring to opt to its NSData, NSwhatever data types. Luckily a TA and one of my classmate wrote a parseJSON function that works instead of the wrong one on the learning platform. With all these components, we are able to freely move information to and from a MEAN web server on our iPhone.

Over this weekend, I and David, my classmate will be building a project based on iOS with socket connections.

No comments:

Post a Comment