SmartWeb

It is MVC skeleton using Java Script to enforce scalable and extensible business logic layer implementation. SmartWeb recommends generic design skeleton that can be used to develop typical client server application for handheld device. Following are the features support at SmartWeb layer:

  • MVC skeleton for Web development
  • Google analytics inbuilt support
  • Ajax based communication

There should be set of View Html, Controller and Modal JS classes corresponding to each page. index.html represents to generic view template and Body represents to page specific content. AppController.js is parent controller that takes care of initiation of first application controller. This is singleton class and can be used for application common business logic.

Base Classes

BaseModal is base class for all modal and provides generic functional support to all extended controllers. Hence individual Modal classes must extend to BaseModal. Modal classes’ stores parsed information as per application need.

BaseController is base class for all controllers and provides generic functional support to all extended controllers. Hence individual <Screen>Controller classes must extend to BaseController. <Screen>Controller classes takes care of

  • Loading of View Html inside Body tag of index.html
  • Screen specific validations
  • Creation of HTTP request as per the enterprise specific protocol
  • Response parsing and data filling in corresponding Modal class (There could be multiple Modals corresponding one controller)

App Flow

Below is the diagram to show flow for loading html and first controller with and without SmartWeb.

SmartWeb – Guidelines

Below are some considerations or guidelines for SmartWeb architecture and design:

  • Separate HTML’s <CDATA> on “ScreenTemplates.XML” file for all views
  • “index.html” will be first html page which will come on view
  • “index.html” will be a temple HTML with common handling for header, footer, list etc.
  • Each view will have respective controller like “LoginController.js”. Controller will have responsibilities like load view, event handling, create request, parse data, populate data on data modal etc.
  • Support data storage at web as per application need
  • Support for data sharing among different HTML pages

Application folder structure

The application folder structure bifurcates asset based on the form factors i.e. smartphone and tablet. The substructure within the form factor folders is same for all form factors (smartphone & tablet). Each form factor folder contains the following subfolders:

  • html: Contains a standard HTML file index.html that is responsible for application startup, view and navigation handling .
  • js: Application business logic comes here. This folder’s substructure is designed to reflect the MVC design architecture. It also contains configuration files that acts as Application Descriptor and also helps provide the configuration parameters to be used across the application.
  • resources: As the name suggests, this folder holds the platform specific image and CSS resources for the application .

results matching ""

    No results matching ""