Showing posts with label new features. Show all posts
Showing posts with label new features. Show all posts

Tuesday, February 1, 2011

Connexions Makes the Switch to MathJax

Today, we updated Connexions to use MathJax to display MathML. MathJax is a JavaScript library that can render MathML across all browsers. This is allowing us make several improvements:
  • Support Math display and module editing in Chrome and Safari.
  • Remove the requirement of the MathPlayer plugin for Internet Explorer.
  • Remove all of the warning messages regarding math not rendering correctly in certain browsers.
MathJax has a nice feature that opens a "zoom box" when users click on math. You can see an example in the screenshot with this post. The switch to MathJax also included an upgrade to our content MathML to presentation MathML conversion stylesheet. We are now using the latest from the W3C along with some improvements of our own.

Along with the MathJax change, we have fixed several defects. Two of the defects are worth mentioning.
  • Adobe based ebook readers (Original B&N Nook, Entourage Edge, etc.) will now render math correctly. We embedded the needed math fonts in our EPUBs.
  • We removed original authors from the author role on derived copies. This was a big source of confusion for authors. The original authors are still listed when a derived copy is published, they are just not included in the author role of the derived copy.
You can see the full list of corrected defects in our release notes. Please let us know what you think of the new math either in the comments or at cnx@cnx.org.

Wednesday, December 15, 2010

Connexions for Android Updated


The Connexions for Android app has been updated. The changes are detailed on the Connexions blog. You can download the app and view screenshots on the Connexions for Android splash page. It is also available in the Android Market and in AppsLib. The source code is available in our SVN Repository. Let us know what you think at techsupport@cnx.org.

Thursday, November 11, 2010

New Collection Editor


Thanks to @hedleyroos and @rochecompaan out at Upfront Systems, we're delighted to have a shiny new collection editor. There's a separate post that gives a great overview of how to use it but in this post I'll go under the hood and describe a bit about the technologies used and how they were implemented. Finally, there are a couple of "gotchas" we ran into that are worth discussing.

The editor uses two JavaScript frameworks, ExtJS and jQuery, along with Zope Page Templates (ZPT). Zope is the templating engine used to implement Connexions. The editor uses AJAX (Asynchronous Javascript And XML) to call the server on Connexions. This eliminates the need to refresh the entire page as the old editor did. Users start off with an ExtJS tree that shows how the collection is organized. The tree is reorderable with links to add/delete Subcollections or modules. On load, the collection hierarchy is requested as JSON from a ZPT. JSON (JavaScript Object Notation) is a lightweight data-interchange format.

Every time a module or subcollection is dragged and dropped, a call is made to Zope to update its objects. Since these objects can be moved anywhere in the hierarchy they may get a new parent. To handle this in Zope, we cut, paste, and reorder.

Gotcha 1: Initially the Zope UID was used to keep the Javascript and Zope objects in sync. However, when an object is pasted the UID changes. In the code both the UID and path to the object (using ids) were used but in order to support moving the node to a different parent both would have to be updated so we switched to calculating the path on each update.

The editor also has popup dialog boxes for editing properties of the collection. When a button to open a dialog box is clicked an AJAX call is made to Zope and the resulting HTML is injected directly into the page. The HTML that is sent back also contains a Javascript tag that contains all the logic needed for the dialog. Sending back HTML from the server has the advantage of using the Zope internationalization machinery to support other languages and by keeping the Javascript in the same file it is easier to keep track of which code goes with which dialog box.

Gotcha 2: Those pesky corner cases (in form submission, cancellation, and validation).
Since we request HTML from Zope, very little state is stored on the browser. To support canceling a dialog box, we had to first store the default values. When a user enteres some invalid data and submits, Zope does a nice job of rendering the form with how to fix the problem. However, if the user cancels, we needed to scrub the form clean, removing the validation errors as well.

So, that's a quick run through the new Collection Editor and if you're interested in the code, it can be viewed at our trac page.

Friday, October 1, 2010

Introducing Connexions SWORD API

In collaboration with the Public Knowledge Project, makers of the Open Journal System (OJS) software, Connexions has rolled out a new API allowing content in Word format from OJS journals to be imported for republication in Connexions/Rhaptos. The transfer is accomplished via SWORD (Simple Web-service Offering Repository Deposit). See our development site for technical documentation.

From an OJS journal that has been set up to work with Connexions, an author or editor enters their Connexions username and password and is provided a list of their work areas in Connexions. Having selected one of these, the user then chooses the articles in Word format that they want to deposit, and the submitted articles will be imported into the indicated location in Connexions. A new module is created with the title and metadata provided by the journal.

Since the content is likely to have already been published in the journal, features have been added to support that workflow.


  • A citation to the original publication is automatically added to the end of each module (this can be removed by the author), if one is provided by the journal.

  • A prominent reminder to review the citation, to review the authors/editors, and to preview the module appear in the module editing interface.

  • The role management interface includes convenient links to search the repository for names of people found as role-holders in the original publication.

  • The Creative Commons license must be agreed to before the content can be published in Connexions/Rhaptos.

While developing this new feature, we also provided a pathway for users of all content in Connexions to upgrade the version of their existing Creative Commons licenses. Content published under older versions of the license now require an agreement to upgrade to the latest version before it can be republished.

Since SWORD is an open standard, The Connexions SWORD API can be used outside OJS also. The API covers new module creation with appropriate metadata and importation and translation of Word documents into CNXML in new modules.

This work was supported by Indiana University as part of the Big Digital Machine project to enhance scholarly workflow for the digital age.