Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Platform overview

jessevondoom edited this page · 3 revisions

The CASH Music platform is actually several independent pieces of software working together. The core framework can be run as a standalone PHP library, the admin app is a full-featured webapp that interacts with the core without directly touching the database or core logic, etc.

The goal of the platform is to provide compartmentalized functionality with a consistent data format and API — so each component works with that goal in mind.

Everything is written in PHP with few requirements, making it suitable to run on shared hosting using PHP 5.2 and a choice of underlying databases. (We currently support MySQL and SQLite, but built on PDO we could conceivably expand that.) The reason for this choice is ubiquity. Well-written PHP is a powerful thing because it can run virtually anywhere, giving the power of the platform directly to anyone who wants it regardless of budget.

All public-facing functionality (like email-for-download) is bundled as an element — a mini app that relies on the core framework to deliver deeper functionality and render it's views as embeds via PHP, JavaScript, or with a plugin like our WordPress plugin.

Platform components

A quick run-down of the components that make up the CASH Music platform:

  • Core framework
    This is basically where all the real work happens. Two main objects, the CASHRequest and CASHResponse drive most of the process. The CASHRequest is created with an array or series of POST values defining the type, action, and parameters, always answered in consistent fashion by setting the request's "response" object to a CASHResponse object. This is sort of an unusual interaction for native PHP, but allows full parity between native and API-driven calls.

  • Elements
    Elements are like bite-sized little MVC apps, designed to work with the core framework around specific states. They consist of a main controller Class, an admin interface that works with the CASH admin app (or any custom admin), and Mustache views for each possible element state. Logic is handled in the controller, and the element is rendered appropriately for embed as PHP or as a full-blown iFrame app via JavaScript — all with consistent behavior. Just a handful of code and you can create an app working against the core that will deploy via PHP, JavaScript, or plugin as needed. (An in-admin element installer is coming soon...)

  • Admin app
    The admin app stands on it's own with a basic MVC-patterned architecture, using the core framework as it's Model rather than a database access object. A controller works along with an .htaccess file to route requests to the correct action controller which interfaces with the core and then renders the appropriate output to a Mustache template view. All of that is rolled into a master Mustache template in the /ui folder, which is set up to allow radical re-skinning of the admin with relative ease.

  • API
    The API has both a verbose mode and the beginnings of a proper RESTful API. It wraps the core framework providing consistent JSON access to any API-allowed methods. Security is handled in the core, and the API is more of a formatting aid and endpoint.

  • Public assets
    These live in /interfaces/php/public and provide static files like our cashmusic.js and images needed for basic public access.

Software licenses

The core framework and default elements are licensed using an AGPL license. While most of our code is licensed using AGPL (most JavaScript is licensed as BSD) we do not consider elements or other freestanding applications that use our core as derivative works. This means you are free to create elements, alternative admin apps, or entirely new applications under GPL or even closed licenses as long as any changes to the core framework remain open under the terms of the AGPL license.

Something went wrong with that request. Please try again.