SWAD
shared workspace at a distance

Source code

CC BY-SA Antonio Cañas Vargas, 1999-2014

Free software

SWAD is free software, so it can be used at any university or educational institution (schools, colleges, academies, ...), and other programmers can contribute to its development.

Downloading and installing

You can download all the software from the download page respecting free software licenses indicated in each case, and install it by following the steps in the installation procedure.

Collaborate in the development

"Cuando me preguntan cuándo estará listo un programa, contesto: depende de cuánto trabaje usted en ello."
--Richard Stallman 1

SWAD not assigned a budget for its development, although it has received some scholarships in teaching innovation projects. Therefore potential partners generally should not expect money for their work, but learning, fun, achievement, recognition, and, if desired, a certificate of collaboration in the development of SWAD.

Description of modules

SWAD platform is implemented mostly as a single program (actually one for each language) that uses the CGI specification. This program runs on the server every time a user clicks a button or link within the platform, queries database and performs the necessary calculations for the current action, and generates all the XHTML code that is sent to client.

Main core (swad-core)

Main swad core code lines

Programmed by Antonio Cañas Vargas.

SWAD main core (the CGI mentioned above) performs almost all the functionality of the platform, with the exception of photographs processing, chat, log in from a extern web service, and mobile applications.

The module has been programmed in ANSI C and the database can use database management system MySQL or MariaDB. The reader will probably think "a web application written in C?" Yes, it is not usual, but... ;-)

SWAD core has more than 170 000 lines of source code. Each executable program (one for each language) has a size of 1.8 MiB and in most of the possible actions generates the page in few milliseconds.

For encryption of passwords the SHA-512 algorithm is used. For encryption of session codes, users' photograph names and user codes sent as parameters, the SHA-256 algorithm is used. In both cases we have employed the Olivier Gay's C implementation.

SWAD core uses DropzoneJS, an open source library that provides drag'n'drop file uploads with image previews.

SWAD core uses the tool gSOAP to implement the SOAP server protocol of the web service.


Photo processing module (fotomaton)

Programmed by Daniel Jesús Calandria Hernández.

The photographic processing is performed by a separate module written in C++. The first version of this module was developed by former students of Computer Engineering Jesús Álvarez Martín and Alberto Rodrigo Gámiz. Currently it uses a version completely rewritten by Daniel Jesús Calandria Hernández. The module detects human faces present in the picture, resize the image, and performs various improvements such as checking the clarity of background, noise removal, contrast and saturation improvement, and white balance. The module uses the Intel OpenCV library, and detects human faces present in images using a cascade classifier trained by AdaBoost algorithm (Paul Viola, Michael Jones: "Robust Real-time Object Detection". International Journal of Computer Vision, 2001).

Photographs averaging modules (foto_mediana and foto_promedio)

Programmed by Daniel Jesús Calandria Hernández.

The photographs averaging is performed by two separate programs written in C++. These two programs respectively calculated the median and average (pixel by pixel) of several photographs, and are called by swad core to calculate the average photograph for each degree.

Chat server (swad-ircd)

Programmed in C++ by Daniel Jesús Calandria Hernández.

Chat client (swad_chat)

Chat client is a Java applet programmed by Daniel Jesús Calandria Hernández.

Application for Android devices (SWADroid)

SWADroid, the app for Android devices, is written in Java and has been programmed by Juan Miguel Boyero Corral, Antonio Aguilera Malagón and Helena Rodríguez Gijón.

You can find more information about SWADroid on the blog http://swadroid.wordpress.com/