Tuesday 20 May 2014

Implementation in Parse - April

Already Implemented

The following functionality has already been implemented before April:

Web Hosting

  1. Login
  2. Register
  3. Answer Questions
  4. Simple badges
  5. View basic personal and team information

Android

  1. Login

Newly Implemented

The following functionality has been implemented in April:

Web Hosting

  1. Create new teams

  2. Admin login

  3. Admin dashboard

  4. Admin view list of
    1. users

    2. teams


  5. Admin view the information of
    1. a user

    2. a team

  6. Admin create questions

Android

  1. View basic personal and team information
  2. Answer questions

Implementation in Parse: Connect to Parse in Android


  1. Get the App ID and client key in the app's setting --> application key page
  2. Download the Parse SDK for Android
    https://www.parse.com/downloads/android/Parse-Starter-Project/latest
    and add it to the Android project
  3. In the project code (init part), use the App ID and client key to init the Parse SDK
  4. Call Parse SDK to manipulate the cloud data
    1. ParseObject
      1. getString
      2. getBoolean
      3. ...
      4. put("FIELD_NAME", value)
      5. saveInBackground
    2. ParseQuery<ParseObject>
      1. whereEqualTo("FIELD_NAME", value)
      2. findInBackground(new FindCallback<ParseObject>(){...})

Implementation in Parse - Creating a new Parse project


  1. Create a new app in Parse dashboard
  2. Set its domain name in app setting
  3. Check out the cloud files
    1. install the client if it has not been installed yet
      for Mac/Linux:
      curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash
    2. check out the files
      parse new FolderName
      Enter email and password, and choose the target project
  4. Add node.js - express code
    parse generate express
  5. Add any initial code and/or files
  6. Upload
    parse deploy
Now the project can be changed locally and uploaded by the same command.


About Implementation and Hosting

The project is preferred to be implemented in Java-Spring. And as AWS EC2 provides a 1-year free trial, the project can be hosted in AWS.

But I have not learnt Spring before, and I will have a unit about Spring (ELEC5619: Object Oriented Application Frameworks) in the next semester. So I will start changing the implementation method to Spring next semester.

In this semester, I will implement the project in node.js - express and host it in Parse. I choose Parse because I am familiar with it, and Parse provides an easy way to cooperate between mobile and web platforms. It supports only node.js - express hosting. As a cloud service provider, Parse sets some limitation on the hosted node.js code (e.g. on file operations, Regex, resources). It is better not to host the final code in Parse.

Mock Up - 1

The following 2 images are the 1st version mock up.


Mock up for webpages



Mock up for Android