Changes between Version 1 and Version 2 of DeveloperGuidelines/EdenMobile/Structure


Ignore:
Timestamp:
03/30/17 08:16:40 (7 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/EdenMobile/Structure

    v1 v2  
    33
    44== Overview ==
     5
     6The following diagram illustrates the general structure of the EdenMobile app.
     7
     8[[Image(EdenMobile_overview.png)]]
     9
     10=== User Interface ===
     11
     12The user interface layer implements AngularJS directives (i.e. HTML extensions) to render the user interface, represent data and facilitate user interactions.
     13
     14EdenMobile directives can be found in the www/directives folder.
     15
     16=== App States and Controllers ===
     17
     18Being a single-page application (SPA), EdenMobile implements "states" (instead of pages) to render different views, i.e. the single front-page is loaded only once, and has parts of its contents replaced as the user interacts with it.
     19
     20Each state has its own "view template" that defines the inner HTML of the front-page for that state, and a controller that supplies data and processing methods for the UI widgets. The view template is rendered and the state controller executed when the state is entered.
     21
     22The routing of user actions to the different app states is provided by the AngularJS UI router. The UI router works with so-called "state references", and can either be called directly, or via HTML links using fragment identifiers to encode the state reference. State references can contain parameters which are then passed to the state, so that it is possible to implement a REST-like routing schema.
     23
     24The states for the EdenMobile app, including their respective view templates and state controllers, are configured in www/config/routing.js.
     25
     26State controllers live in the www/controllers folder, and view templates in www/views. The role of controllers and views is equivalent to controllers/views in the Sahana Eden web application.
     27
     28=== Framework Layer ===
     29
     30The framework layer provides services for state controllers and UI directives - i.e. generic/common functionality and introspection methods, as well as interfaces to access data and configuration settings.
     31
     32This layer is largely what the "S3" package is for the Sahana Eden web application (except for the front-end widgets, which are implemented as directives instead).
     33
     34=== Back-end Abstraction Layer ===
     35
     36The back-end abstraction layer provides abstract interfaces to external components - which are mainly the mobile database, the device's file system and the Sahana Eden server.
     37
     38This layer has a role similar to "PyDAL" in the Sahana Eden web application (except that it also covers other external resources).