Skip to content
Joshua Monson edited this page Aug 5, 2013 · 2 revisions

Ayamel is built on an extended MVC pattern. In addition to the models, views, and controllers, it has data access and service layers. By having a service layer much of the logic can be extracted from the controllers which leaves them less cluttered.

OAuth 1.0a Message Signing

Several external services we use, such as LTI and PlayGraph, require OAuth 1.0a signatures. However there is no really good library which does this correctly in Java or Scala, so I created my own. See my blog post about this.

The OAuth library is under app/service/joshmonson/oauth.

File uploading

Ayamel requires a significant amount of file creation and saving. Right now we are using Amazon S3 for storage, but there is potential to use other services. The file uploading system consists of several sources.

  • FileUploader.scala - This is the interface for file uploading. It defines a generic upload engine trait which can be extended for any kind of storage service.
  • S3Uploader.scala - This extends the UploadEngine trait for uploading to Amazon S3.

Other services

  • AdditionalDocumentAdder.scala - This deals with adding annotation sets and caption tracks to content. It sets up the relation in the resource library and the content settings.
  • ContentManagement.scala - This deals with the specifics of creating different content types (audio, image, etc.)
  • DocumentPermissionChecker.scala - This looks at the user, the content, and the course context (if applicable) to see if the user is allowed to do certain things with content such as edit, view, or publish.
  • EmailTools.scala - This offers a few methods for sending out emails.
  • ExcelWriter.scala - This exports a set of activity stream entries to an Excel worksheet.
  • HashTools.scala - This provides a couple of cryptographic hashing functions.
  • ImageTools.scala - This provides some image editing functions such as resizing and cropping.
  • LMSAuth.scala - When connecting via LTI, this deals with authenticating the LMS.
  • MobileDetection.scala - A basic utility to see of the request is coming from a mobile device.
  • ResourceHelper.scala - This offers helper functions to the basic resource library.
  • SerializationTools.scala - This service provides methods for converting Scala objects to strings. One use is in the content model--the settings attribute is a map which is serialized to a string when saving to the database.
  • TimeTools.scala - Basic time formatting functions.
  • VideoTools.scala - This offers methods for parsing time codes and generating thumbnails from video.
Clone this wiki locally