Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A major challenge with the edX platform today is that developers do not have a documented way to add new features to the web or mobile client. Worse still, there is no way to introduce such changes without both modifying the edx-platform code base and then also updating the mobile clients. The only exception is for features that can be purely implemented as XBlocks as they can be installed into the platform with minimal code changes. See See Extending the edX Platform for  for the documented ways in which developers can extend the platform today.

This is also a major roadblock to the community providing new features. If they have a contributor has a feature that they want wish to share, then they have to make a pull request against the edX platform. This needs to be carefully reviewed by edX across all of the dimensions that we are concerned with (i18n, accessibility, performance, security, theming, test coverage etc). This is often too high a hurdle for other organizations to want to take on.

...

Adding Features Today

There are four five major ways to introduce a new feature to the edX platform

  1. Update the platform directlyCohorted CoursewareNew XBlockNew Django app in its own Git repo
  2. New Django app in edx-platfom repo
      • XBlocks can currently only provide courseware components.
  3. Update the platform directly
    • Limitations: 
      • The feature now becomes a built-in part of the platform, and must be reviewed as such.
    • Examples:
  4. New Django app in edx-platfom repo
    • Limitations: 
      • The feature must be reviewed to be merged into the platform, and currently most of the static assets cannot live in the app itself
      • Note: edX is moving towards having more of the assets live in the app. See: How to add a new feature to LMS or Studio
  5. New Django app in its own Git repo
    • Limitations:
      • The only UX integration available is XBlocks which limits the functionality to courseware components. 
  6. New Independently deployable application (IDA)
    • Limitations: 
      • Most features today need a tighter integration with the edX platform

However, for options 1-34, the new capabilities need to be added to hard-coded lists in the platform. For example, there is a list of installed XBlocks, a list of URLs, a list of tab types, a list of reports, a list of instructor dashboard components etc. This seems simple to update, but it means that the platform has to be changed to receive each new feature.

 

 

Use Cases

Here is a quick summary of how four recent features were implemented. For more details, see the Appendix: Recent Feature Audit.

...

  • Stevedore extension points should be provided for each of the common UX changes that need to be made
    • Note: see the Audit below for a comprehensive list
    • The first such extension point has been provided by PR implemented: 
    • Some important first extension points are as follows:
      • "Feature flag"
        • Note: this will be a ConfigurationModel derivative (which includes a built-in enabled column)
        • We recommend this over using a Django settings feature flag
        • It would be useful to allow all associated extensions to obey the feature flag automatically
      • URLs for new UI and REST APIs
      • Instructor Dashboard components/tabs
  • XBlocks should be extended to provide more capabilities
    • Course-scoped fields for configuration settingsfor configuration settings
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-1804
    • Ability to add an xblock as a course tab
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-18042319
    • Studio editing tabs for xblocks
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-850
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-851
    • Admin views for both Studio and LMS
    • Need built-in support for RequireJS or AMD compliant dependency management
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyPLAT-481
  • The Django asset pipeline needs to be improved
    • Have the pipeline pick up assets from all installed Django apps (to support CDNs, minification etc)
      A spike was done at the beginning of the quarter: PR 7610: Django extension spike)
      • A spike was done to prove the approach: PR 7610: Django extension spike
      • The work was completed as part of the Teams epic:
        • Jira Legacy
          serverJIRA (openedx.atlassian.net)
          serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
          keyTNL-2242
    • RequireJS Optimizer support should be added to the LMS
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-1322
      • See also RequireJS in the LMS
  • There are some interesting aspects of supporting arbitrary plug-ins
    • An order must be established for visual aspects such as tabs. Today the order is implicit in the hard-coded list.
      • If in doubt, sort the items alphabetically by name
    • How can view page-level plug-ins render the correct page
      • For example, how does a new tab render the correct header and footer for itselfthe page that it renders?
      • The simplest solution is to document the boilerplate that each plug-in type is required to include
      • Miki suggests that maybe we should use inheritance to our benefit here, where the superclass renders the boilerplate
      • Eventually we might want to use a mechanism more like XBlock so that a plug-in only owns a block and not the entire page
        • Of course, supporting XBlocks themselves should also be supported
        • A possible challenge with this is that it is subverting the Django framework
    • It needs to be decided how mobile can benefit from these plug-ins
      • If they provide new UI as URLs then they won't just drop in to mobile
      • XBlocks will just appear, but only by using a web view to render the HTML
      • React, a JavaScript library from Facebook, might help with native rendering of HTML

...

The following is an audit of four recent feature features (CCX, Cohorted Courseware, ORA 2 and Student Notes) which enumerates all of the ways in which they extend the platform. The hope is that this gives a fairly representative sample of the types of changes that might need to be pluggable.

...