camilamacedo86 / contact-app

Cordova Contact List Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contact List App

It is a sample cordova client application built using JavaScript/Node.js1, Framework72, Handlebars3 `{{myValue}} for the templates, RequireJS4 to loading async the modules. Also, it was designed to connect and use the REST service API user-api5.

Platforms Supported

  • iOS
  • Android

Pre-requisites

To get started, you'll need to have the following requirements installed

  • Git
  • Node.js1
  • npm
  • Grunt-cli6
  • Cordova7

Getting started

$git clone <this repo>
$npm install
$npm install grunt-cli -g  # To install the grunt-cli
$npm install -g cordova    # To install cordova
$cordova plataform add ios # OR cordova plataform add <android> to run/emulate it for android
$cordova build             # To build all added platforms
$cordova run ios           # OR cordova run android

Documentation

Wireframes

See https://github.com/camilamacedo86/contact-app/blob/master/docs/wireframes.pdf

Screenshots

Check the screenshots of this application working into : https://github.com/camilamacedo86/contact-app/tree/master/docs/screenshots

Running tests

$grunt test

Debugging

iOS

$cordova plataform add ios $cordova emulate ios

Enable the remote debug with Safari. See https://dev4devs.com/2017/10/01/nodejs-cordova-how-to-debug-ios-emulations/ to know how to do it.

Android

$cordova plataform add android $cordova emulate android

Enable to remote debug into Chrome. See https://developers.google.com/web/tools/chrome-devtools/remote-debugging/?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3 to get further information. Also, see : https://dev4devs.com/2016/08/31/android-how-to-setup-remote-debugging-for-chrome-on-android-devices-with-a-mac/

Commands

Command Description
grunt test Check style and run all tests

App Structure

docs           # docs - wireframe.pdf
www
  css          # All css files.
  html         # html pages
  img          # images used into the project
  js
    controller # controller of the routers
    model      # Model of objects (E.g contact )
    view       # views definitions with handlebars
    persistence.js  # centralize the implementation to persist/manage the data
    router.js  # initialize pages and load the controllers
    utils.js   # utilities functions for the app
  app.js       # Startup configuration
  tests        # To add the tests of this application
    users.js   # To mock up data for local dev and tests

Notes:

  • Router.init(): To initialize router. It is using the Framework7 page events. See http://framework7.io/docs/pages.html#page-events
  • Router.load(<NameController>, <query>): It will loading the controller informed. The parameter is optional and is used in order to inform data for the controller as for example the id of the contact that need be loaded to render the page.

Links

Note: The layout of this application was based on into the demo templates of Framework72

About

Cordova Contact List Application


Languages

Language:JavaScript 80.1%Language:CSS 19.1%Language:HTML 0.8%