JavaScript Scopes

  • window
    • APP
      • io
        • app
        • user
        • comments
        • worksets
        • workset
        • search
        • costobject
        • person
        • scenario
      • model
        • comment
        • costobject
        • scenario
        • pickList
        • preference
        • people
        • worksest
      • grids
        • forecasting
        • worksets
        • objList
        • tracking
        • cost_object_status
        • search
        • dwsearch
        • glList
      • slickGrids
        • authGrid
        • forecastingGrid
        • summaryGrid
        • trackingGrid
        • wsPeopleCoGrid
        • myWSgrid
      • dialogs
      • picklists
      • router
    • MIT
      • RAFT
    • private application scope

The majority of the application is contained within an immediately invoked function expression [aka IIFE].  The IIFE is in place without using the _module pattern which could expose some of the IIFE globally if that was needed.

The APP global is defined outside of the IIFE and is used directly from within the IIFE.  

The MIT global created from within the Main() function.  

The MIT.RAFT scope is assigned to the "this scope" from within the IIFE.  Likely the module pattern could be put in place to make this assignment by adding a left side assignment to the IIFE declaration.

Inside the main IIFE

Internal Scope (set to MIT.RAFT)

  • tempConfig
  • sysPollAgent

Internal Functions

  • Main()
  • sysPoll()
  • globalError()
  • chkScreenRequirements()
  • preRoute()
  • postRoute()
  • initModel()
  • dialog()
  • hideFavoritesStar()
  • updateBreadcrumbs()
  • inputManagement()
  • generateGridHeaders()
  • renderUserInfo()
  • UIBehaviorsGeneral()
  • objectSearch()
  • enableQuickSearch()
  • dwsearch()
  • search()
  • UIBehaviorsDWSearch()
  • dwcleanRows()
  • addDWSearchRow()
  • addFirstWorksetRow()
  • UIBehaviorsSearch()
  • cleanRows()
  • addSearchRow()
  • createQuerySelect()
  • createOperatorSelect()
  • createValueInput()
  • getCriteria()
  • getDWCriteria()
  • executeSearch()
  • executeDWSearch()
  • unlock()
  • UIBehaviorsPerson()
  • renderPersonDetails()
  • UIBehaviorsPeople()
  • renderPeopleGrid()
  • UIBehaviorsForecasting()
  • renderForecastingGrid()
  • lockScenario()
  • unlockScenario()
  • renderScenariosList()
  • renderReports()
  • renderCostobjectDetails()
  • renderPersonContextDetails()
  • renderWorksetContextDetails()
  • renderCostobjectContextDetails()
  • UIBehaviorsContext()
  • parseWRKfromRoute()
  • parseCOfromRoute()
  • UIBehaviorsTracking()
  • renderSummaryGrid()
  • renderTrackingGrid()
  • UIBehaviorsSignin()
  • UIBehaviorsHome()
  • renderFavorites()
  • renderMessages()
  • renderSettings()
  • renderComments()
  • UIBehaviorsWorksetScenarios()
  • renderWorksetScenarios()
  • UIBehaviorsWorksetCostObject()
  • renderWorksetAuthGrid()
  • UIBehaviorsWorksetAuth()
  • renderCostobjectOverview()
  • renderPersonOverview()
  • UIBehaviorsWorksetOverview()
  • renderWorksetCostObjectGrid()
  • UIBehaviorsWorksetPeople()
  • renderWorksetCoPeGrid()
  • renderWorksetPeopleGrid()
  • UIBehaviorsWorksets()
  • renderWorksets()
  • UIBehaviorsSummary()
  • renderSummary()

App Lifecycle

The IIFE Main() function is called via a method call that is chained to the IIFE.  The call to Main() starts up the application.

  1. Main
    1. MIT scope created
    2. MIT.RAFT is created as a pointer to the this scope
    3. chkScreenRequirements()
    4. initModel()
    5. UIBehaviorsGeneral() 
      1. creates window resize handlers
      2. creates APP.dialog.locked
    6.  APP.io is created from a call to Porter with the config set in ioconf
    7. The Address Bar is setup to be used to route changes to the hash part of the url to javascript functions via a call to Router with the content of rconfig.
  • No labels