Moodle.com is betting seriously on adapt Moodle to provide services to external applications.
The main objective is to publish all interesting core functions as web services, therefore, other applications will be able to retrieve calendar events, Virtual Campus management applications will be build easily, etc.
During last year, I’ve been working with Ludo and other students to design and develop a prototype of these webservices. During last MoodleMoot at Barcelona, Martin validated the idea and, after some modifications, we started the development. I’m developing some components and coordinating a development team here in Barcelona, Jérôme Mouneyrac is coordinating the whole project from Australia, Petr Skoda is working on security issues, and other many people is contributing to this project.
The image over these words is a diagram about the decided architecture.
We have designed a 3 layers architecture: Connectors layer, External layer and Core layer. I’m going to explain them a little right now:
Core Layer
Core layer consist of all the Moodle core libraries that contain interesting functions to publish: functions about users, courses, groups, calendar, etc.
This layer is being improved in Moodle 2.0 because many of these interesting functions were printing messages to the screen. Moodle had not an API, it had several useful functions that had been developed during last last years. Because of the need of the webservices we are doing a refactor of all these core libraries and it starts to look like an API. Moodle core does not print messages, it throws exceptions for errors and does not have void methods.
External Layer
External layer consist of several new files called external.php, placed all over Moodle directories. external.php files contain wrappers to the layer below.
These wrappers are responsible for checking capabilities and parameters, and call the correct core function(s).
Connectors Layer
Connectors Layer is consist of several connectors. This layer will have a REST connector, a SOAP connector, a XML-RPC connector and a AMF connector. This layer admits plugins so many connector could be build easy to intergrate other systems with Moodle using other protocols.
This layer will be only responsible of accepting http connections, creating sessions and act as a bridge with the external layer.
This post is only an overview of the whole architecture, I hope I’ll have some time to make a couple of posts about external and connector layers, the ones that will be new at Moodle 2.0 and the most interesting layers of webservices.
Interesting Links:
- http://potato.lsi.upc.edu/projects/moodlewebservices
- http://docs.moodle.org/en/Development:Web_services_API_-_Function_List
- http://tracker.moodle.org/browse/MDL-12886
- http://docs.moodle.org/en/Development:Core_Function_List



Recent Comments