How it works

The site works by periodically (like every 1/2 hour) querying various web resources to get updated information on weather, alerts, air quality, etc. This information is stored (cached) until the next update.

When a web page is requested, the stored information is retrieved and compiled into the form needed for display, and then sent to a template that exists for each web page or piece of a web page. The template does the final formatting for displaying the page.

CacheManager runs the refresh operations, stores caches, and retrieves caches. No other page touches the caches.

DisplayManager retrieves data from CacheManger, formats it for display. It may utilize another class like Calendar or Camps.

All data is displayed using Templates in directory plates/.

Pages start out with

Web Sites

There are 4 web sites used for this site (see Sites and Security for details).

Live
The live site, accessed at https://jotr.digitalmx.com
Beta
The "next" version of the live site. Has its own data caches (weather, etc.) and admin settings, because structure may be different from current live. For testing before release.
Livex
An exact copy of the live site, but with it's own local settings (ranger admin, calendar, campgrounds). This is for people to learn how to use the site or try something out.
Dev
For developer test purposes only. Password protected. For testing work in process.

Local caches are the ones controlled by local admin settings: calendar, camps, ranger admin. Each site has its own set of local caches. External caches are caches refreshed by api to another place, like weather.gov.

Css

All sites use the css file main.css. It contains media rules for print which lowers font size and sets margins. The rotate page adds an additional file tv.css. This uses media rules to increase the root type size based on screen width, and changes the widely used h3 tag from left justified to center and underline.

Uses google font Rubik everywhere. san-serif fallback.

The "today.php" page is designed to be printed, so there are css pagebreaks between pages. The "rotate.php" page is divided into sections also, and a javascript is used to rotate visibility among the desired sections.

Development Process

Branch live is always the code on remote live and jotrx. Branch work is branched from live and is the main working copy Feature branches are branched from work
  1. Develop
    1. Development occurs on developers machine in repo work or branches derived from work and merged back in.
    2. Keep dev branches rebased to work
    3. For testing, push dev <dev branch>:dev
  2. Beta Test
    1. switch work,
    2. merge dev and commit
    3. push beta (work branch)
    4. make sure it works
  3. Live
    1. switch to live,
    2. merge --squash work
    3. change tag
    4. Commit -m "what's new" to set version/build in data/version
    5. push live to live
    6. push live to jotrx