Skip to content

The clock app is developed with the Ember.js MVC framework and coded using HTML5, CSS3, JavaScript, and jQuery. It is a lightweight, web app demonstration of the clock app from iOS.

License

Notifications You must be signed in to change notification settings

hinsenchan/iOS_clockapp_emberjs_demo

Repository files navigation

What is iOS Clock App Ember.js Demo?

It is a lightweight, web app demonstration of the clock app from iOS. The clock app is developed with the Ember.js MVC framework and coded using HTML5, CSS3, JavaScript, and jQuery. Ember.js uses the Handlebars template language which extends the Mustache template syntax. It uses plain HTML expressions and describes the user interface using good semantics. Each template is also backed by a model object which updates the template automatically. There is a router which monitors the browser window and automatically keeps track of the application state. A model which is a JavaScript object is used to store persistent state. The controllers decorate models with display logic. Data is stored and retrieved by using the REST API.

Utilizing the power of the Ember.js framework, the clock app is developed using only a single page. It functions as both a native-style mobile and desktop web application. Its components are modularized to ensure its maintainability, reusability, and extendability. The clock app contains a World Clock, Timer, and Stopwatch function. Each of these functions appear as its own page to the user. The state of each clock function can operate individually, so all 3 "pages" may run at the same time. This implementation allows you to move between each function without terminating its previously set states.

Mobile

clockapp_ember_collage

Desktop

clockapp_ember_desktop_collage

Features

World Clock

The World Clock will load a list of cities along with its GMT time offsets using a JSON call. The app will update each fixture item in real time, calculate the local offset in the timezone relative to the system time, and display the correct time in the application.

The World Clock list uses the DS.LSAdapter which uses local storage via the browser to save the list of clocks persistently.

The World Clock and Timer refreshes its display time every second using Ember's built in Ember.run.later() function. The Stopwatch refreshes every 1/100 of a second. World Clock will continue to run even if the user switches to the Timer or Stopwatch function.

img1_worldclock_mobile

Search: query the list of cities from the JSON API

The query will attempt to auto-complete as the user is typing.

img7_worldclock_add

The search results are alphabetized and scrollable.

img8_worldclock_scrolladdlist

Add: target city can be added to the list of clocks displayed

Target clock is added to the main clock list.

img9_worldclock_addedClock

Remove: delete stored clocks from the list

Edit opens up the function to delete clocks. Click the icon to remove a clock.

img10_worldclock_edit

Clock has been removed.

img11_worldclock_removedCity

Clicking done exits the edit mode.

img12_worldclock_completedEdit

Timer

The Timer can be running, cancelled, paused, and resumed. Hours and minutes can be used to set the total countdown time. The timer will continue to operate even if the user switches to the World Clock or Stopwatch function.

img2_timer_mobile

Setup: select time to countdown

img13_timer_setup

Running: timer is counting down

img14_timer_running

Paused: timer is paused

img15_timer_paused

Resumed: timer is resumed

img16_timer_resumed

Cancelled: countdown is cancelled

img17_timer_cancelled

Stopwatch

The Stopwatch can be running, stopped, resumed, lapped, and reset. Lap will record the elapsed time since the last lap was recorded. Stopwatch will continue to operate even if the user swithces to the World Clock or Timer function.

img3_stopwatch_mobile

Running: stopwatch is running

img18_stopwatch_running

Stopped: stopwatch is stopped

img19_stopwatch_stopped

Resumed: stopwatch is resumed

img20_stopwatch_resumed

Lapped: stopwatch records lap times

img21_stopwatch_lapped

Reset: stopwatch resets all elapsed time

img3_stopwatch_mobile

Setup Instructions (with Ember.js previously installed)

  1. run “ember server” to start ember server service
  2. goto http://localhost:4200/ to view app
  3. add "/node_modules" and "/vendor/*" to .gitignore to stop git from updating these static dependencies

Setup Instructions (without Ember.js installed)

This README outlines the details of collaborating on this Ember application.

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

Reference

Credits

This software was developed by Hinsen Chan at Santa Clara University in Summer 2014.

About

The clock app is developed with the Ember.js MVC framework and coded using HTML5, CSS3, JavaScript, and jQuery. It is a lightweight, web app demonstration of the clock app from iOS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published