This post is part of a 4-posts series. It describes a solution to painlessly "publish" Rich Internet Applications in Drupal. The first post in this series lists the requirements that I set to myself for this weekend project.
A Rich Internet Application (RIA) is a single-page application. It consists of an HTML markup, CSS resources and JavaScript resources. The JavaScript resources are two-fold: external API rsources and application resources. The suggested solution involves the creation of a new content type representing an RIA and a Drupal module to load the RIA's required resources.
The RIA content type should have the following fields:
- Title: The name of the RIA.
- Description: A description of the RIA's functionality.
- HTML: The HTML markup of the application.
- Application Directory: The directory where application files are to be stored.
- JavaScript API: One or many URLs pointing to external JavaScript APIs. The cardinality of this field may be static or dynamic.
- Application JavaScript: The name of the application's JavaScript file. Typically, all application JavaScript files should be bundled together, then obfuscated prior to application deployment.
- CSS: The name of the application's CSS file, if any.
The new module should add the proper HTML markup for loading all the CSS and JavaScript resources required by the RIA. This module is also responsible for creating the new RIA content type.
The next posts in this series deal with following topics:
- Implementation of RIA module.
- Creation of RIA content type.