Skip to content
Jayson Harshbarger edited this page Oct 6, 2016 · 5 revisions

Project X is an open-source JavaScript platform for publishing and sharing datasets and visualizations associated with scientific publications. The guiding principle behind Project χ is portability and ease of deployment. Project χ integrates front end tools like the D3.js visualization library, AngularJS JavaScript framework, Bootstrap CSS framework and development tools such as the npm package manager, jspm browser package manager, and the gulp build system to create a template or boilerplate for creating static website based interactive data visualizations.

Static sites are useful for:

  • rapid prototyping, offline work, and presentations
  • easy deployment, portability and replication

A typical dynamic (server based) web application requires that the data files (model) and template (view) be stored on a server, usually in a database. The source data is often preprocessed and injected into the database along with the view layer using either the web application itself or maybe desktop scripts and applications. When a user requests a web page the result is a request to the web server application and ultimately a database query for the data and templates. These get combined on the server, perhaps cached in the local file system, and sent to the users as a complete HTML page. Each time a new page or data item is requests a new HTML page is generated, cached, and sent to the user. One of the most difficult parts of this process is cache invalidation, ensuring that the user is getting the most up-to-date data and view. In many systems when new data is added the entire cache must be invalidated (i.e. cleared).

Typical Dynamic WebsiteIn contrast a static website uses only (or primarily) flat files, bypassing the web application and database entirely. These flat files can be combined at compile time and stored in the file system in a manner similar to the caching mechanism typically used for dynamic sites. However, this system requires that pages are pre-generated for each web page or url that the user may load.

In the Project χ framework, however, we store both data and templates in the file system as flat files and rely on the client browser (using AngularJS, d3, etc) to render the views. With this system there is no need to pregenerate HTML views, as each page is generated on demand, using the source data as it exists on the filesystem. This also eliminates the requirement for server side dependencies such as PHP or MySQL. A Project χ website can be deployed on a standard HTTP server, WebDAV server, or GitHub pages. The end user has access to the raw data files, the same files that we typically distribute as supplemental data along with scientific publications. Another advantage is that because the view and data are sent to the user separately, and cached by the browser separately, when a user requests a new page only the data is transmitted. The view (and application) is already in the user's browser.