Chesapeake Bay Estimated Streamflow: WEBSITE HISTORY
by Brad Garner, Hydrologist USGS
This website originated as a dynamic web application (hereafter, simply webapp). That is, content such as data and graphs, were generated "on-the-fly" as requests were made by web-browser clients. This was made possible by automating the methods of Bue (1968), and by using dynamic web-content software technology.
Beginning in 2019 the original dynamic web application was discontinued, and all website content and interactive graphics were transistioned to the new USGS Drupal content management framework. The older dynamic web application technologies are described here however, for those who may be interested in the history of this initial, and now discontinued, programming.
Use of trade names and links to non-USGS websites are provided for information only and do not constitute endorsement, express or implied, by the USGS, U.S. Department of the Interior, or U.S. Government, of the referenced organizations, their suitability, content, products, or services, whether they are governmental, educational, or commercial.
Programming Language and Application Framework: The original webapp was written entirely in the PHP 5 programming language. While almost any programming language can, in theory, be used to create a webapp, the primary target of PHP always had been the World Wide Web. It enjoys widespread use, but has a reputation for promoting unstructured programming that is difficult to maintain and that has security vulnerabilities. PHP 5, released in 2004, addressed many of these concerns with major revisions, including a redesign of its object-oriented programming model.
This webapp was not written "from scratch"; instead, an application framework called Zend Framework was used (under the New BSD License). Application frameworks solve many common tasks and problems typically encountered in application development. This greatly reduces total development time, and reduced those unsettling "reinventing the wheel" feelings programmers can get when writing an application entirely from scratch.
Software design patterns also were used to reduce development time and improve readability and maintainability. These included:
- Model-view-controller — separated database access, business logic, and HTML presentation; and automated the routing of web requests to the appropriate section of code.
- Command — modularized the complex process of computation of streamflow values and populating the database.
- Template — abstracted the common steps of computation of streamflow values, minimizing redundant code.
- Factory — centralized the creation and management of all objects.
- Strategy — allowed different approaches to rounding numeric values to be applied easily.
- Singleton — prevented errors arising from inadvertently creating multiple copies of what should be only one system-wide object.
- Iterator — provided uniform, elegant access to large arrays of sequential streamflow data.
Additional Software Libraries Used: Graphs were created using JpGraph, used under the Q Public License 1.0 for non-commercial use. The ability to use enhanced browser-side JavaScript was enabled by Prototype JavaScript Framework, used under an MIT-style license. Dynamic sorting of the table by clicking column headings was courtesy of the table sorting library, which had an unrestricted license. Code for improving speed by caching frequently accessed content was courtesy of a Zend Developer tutorial.
Web Standards: The original webapp used XHTML 1.0, tableless design, semantic markup, Cascading Style Sheets, and unobtrusive JavaScript. These all shared common goals, including increased interoperability with various web browsers, and programming was relatively easy to maintain and read.
More Information
More information about USGS Chesapeake Bay studies and activites may be found here.
This website would not be possible without long, uninterrupted records of streamflow data made possible by funding through partnerships between federal, state, and local agencies, and the USGS National Streamflow Information Program.
by Brad Garner, Hydrologist USGS
This website originated as a dynamic web application (hereafter, simply webapp). That is, content such as data and graphs, were generated "on-the-fly" as requests were made by web-browser clients. This was made possible by automating the methods of Bue (1968), and by using dynamic web-content software technology.
Beginning in 2019 the original dynamic web application was discontinued, and all website content and interactive graphics were transistioned to the new USGS Drupal content management framework. The older dynamic web application technologies are described here however, for those who may be interested in the history of this initial, and now discontinued, programming.
Use of trade names and links to non-USGS websites are provided for information only and do not constitute endorsement, express or implied, by the USGS, U.S. Department of the Interior, or U.S. Government, of the referenced organizations, their suitability, content, products, or services, whether they are governmental, educational, or commercial.
Programming Language and Application Framework: The original webapp was written entirely in the PHP 5 programming language. While almost any programming language can, in theory, be used to create a webapp, the primary target of PHP always had been the World Wide Web. It enjoys widespread use, but has a reputation for promoting unstructured programming that is difficult to maintain and that has security vulnerabilities. PHP 5, released in 2004, addressed many of these concerns with major revisions, including a redesign of its object-oriented programming model.
This webapp was not written "from scratch"; instead, an application framework called Zend Framework was used (under the New BSD License). Application frameworks solve many common tasks and problems typically encountered in application development. This greatly reduces total development time, and reduced those unsettling "reinventing the wheel" feelings programmers can get when writing an application entirely from scratch.
Software design patterns also were used to reduce development time and improve readability and maintainability. These included:
- Model-view-controller — separated database access, business logic, and HTML presentation; and automated the routing of web requests to the appropriate section of code.
- Command — modularized the complex process of computation of streamflow values and populating the database.
- Template — abstracted the common steps of computation of streamflow values, minimizing redundant code.
- Factory — centralized the creation and management of all objects.
- Strategy — allowed different approaches to rounding numeric values to be applied easily.
- Singleton — prevented errors arising from inadvertently creating multiple copies of what should be only one system-wide object.
- Iterator — provided uniform, elegant access to large arrays of sequential streamflow data.
Additional Software Libraries Used: Graphs were created using JpGraph, used under the Q Public License 1.0 for non-commercial use. The ability to use enhanced browser-side JavaScript was enabled by Prototype JavaScript Framework, used under an MIT-style license. Dynamic sorting of the table by clicking column headings was courtesy of the table sorting library, which had an unrestricted license. Code for improving speed by caching frequently accessed content was courtesy of a Zend Developer tutorial.
Web Standards: The original webapp used XHTML 1.0, tableless design, semantic markup, Cascading Style Sheets, and unobtrusive JavaScript. These all shared common goals, including increased interoperability with various web browsers, and programming was relatively easy to maintain and read.
More Information
More information about USGS Chesapeake Bay studies and activites may be found here.
This website would not be possible without long, uninterrupted records of streamflow data made possible by funding through partnerships between federal, state, and local agencies, and the USGS National Streamflow Information Program.