University Marketing & Communications

November 23, 2012

Alert Banner 2.0


This was originally posted on Chris Heiland’s staff blog while he was a member of the Web Team. Chris migrated this post to the Web Team blog before he left because we thought the content still had value to the UW community.

In celebration of the new version of the Alert Banner launching today, it’s time to give an overview of what’s new. If you did not know there was a banner please read about it. Basically there is a system in place that can deliver a dynamic notification on to your website if there is some sort of wide-spread emergency. If there is a reason to suspend operations, for example, we want to get the message out as widely as possible.

The old system was designed several years ago with some very specific goals. The system had to be lightweight, fast, and work well in a LAMP environment. The system was meant to be self-contained in case of a regional disaster, no matter what happened to the local infrastructure. The backbone of the system was WordPress with the actual banner dynamically generated by a javascript file written by a python script.

Now as better, cloud-based solutions are available it’s time for a change. The new system is powered by and based off their API. The biggest win is the reliability and the decreased cost. Instead of a dedicated server, which costs regardless traffic levels, we have a minimal yearly cost. The API allows a JSON output similar to what is currently used, with a bonus of finally being able to open it up to the greater community.

The software behind the system is the same as before so our editors won’t have to learn anything new. Importing the current posts was simple due to the import/export plugin. The banner was switched over relatively quickly and will allow much more customization and feature addition as we move forward. The main difference is the banner is now pure javascript and pull the data in using a callback function.

Instead of a potential one-minute delay, the banner is now instantaneous. There is a :30 second local cache to avoid hammering the service. The test banner is also callable via a #uwalert-<color> hash tag instead of including changing out the url to the script. The html behind the banner is also fully responsive and displays nicely on mobile. Please visit the toolkit page and read the detailed documentation if you haven’t yet. Otherwise, enjoy!