Menu

yfi_develop_intro

Anonymous

How Yfi Hotspot Manager's code fits together

Introduction

Yfi Hotspot Manager makes use of the Cake PHP framework. Cake PHP is a MVC framework. YFi Hotspot Manager does things a bit different on the Viewer side of the framework.
Instead of using Cake PHP to generate dynamic HTML, we use Cake PHP to generate JSON data.
This JSON data is then used by DOJO to populate and build the Viewer component through JavaScript? inside a modern browser.
The DOJO toolkit is a very complete JavaSCript toolkit which makes development of RIA (Rich Internet Applications) a snap.
The advantages of moving the Viewer component into the Browser inclides the following:

  • More responsive interface
  • Ability to cache the static JavaScript? files in the Browser and only transfer raw data (JSON) between the web server and the client.
  • Greatly reduces web traffic

From Splash page to Login Screen

This section will explain what happens when you first attempt to open the Yfi Hotspot Manager's page.

The page /var/www/yfi/index.html has the following pieces to it:

  • A div element with id='divLoadingMessage' - This div's content gets manipulated - first with a splash screen and then later on it gets replaced with a log-in screen.
  • ShadedBorder? JavaScript? library included to give nice shaded border's to certain div elements.
  • When the window finished loading, it creates a JavaScript? node in the DOM and add it to the header. This JaveScript? node has the core Dojo library as source.
  • Once this library loaded, it triggers another load, the BIG JavaScript? library under components called Yfi.js.
  • As soon as the load of Yfi.js is completed, the splash screen is replaced by a log-in form (if not authenticated yet) or the main page if authenticated.
  • The file Yfi.js is a 'compiled' version which takes various JavaScript? files, roll it into one and optimises the code to keep the footprint as small as possible.

Various Javascript Files

There are various Javascript files which needs further explanation to better understand the working of the RIA application of YFi Hostpot Manager

components/LoginLight.js


Related

Wiki: Home