Joomla Google Summer of Code 2019

Hi! My name is Oleksandr Samoilov. I am a student at Dnipro National University where I am studying PHP development. I am glad to participate in GSoC in the project "Web Services in Joomla".

About the Project

Joomla is a popular CMS, which is actively developed and it is very important to implement web services for further development, as it will help create more functional and complex projects with Joomla.

As an example, we have a Joomla website, where we sell pizzas and we want to start selling them on some other popular platform. For this task, the platform, through our API, gets our contacts and content.

Web services in Joomla can also be called the REST API for components.

Community Bonding

During the first stage of training of GSoC, I had weekly meetings with my mentors in hangouts. It was really interesting. We firstly discussed the plans for the project implementation. We selected some components for which it was necessary to implement CRUD API.

During this stage, we implemented web services for some Joomla components:

  • com_banners
  • com_categories
  • com_config
  • com_contact
  • com_fields
  • com_newsfeeds
  • com_plugins
  • com_privacy

To do this, it was necessary to understand the processing of API requests. It was really helpful that there was already an existing example, com_content.

The main things are:

  • API Application - In Joomla are exits applications that implements CMSApplicationInterface. One of them, ApiApplication, handles API calls.
  • API Router -This is a very flexible thing that makes it easy to implement the REST protocol for API.
  • API Controller 
  • API Views

More details about the project can be found here.

Next Steps

  1. Implementation of the following components for API:
    • com_weblinks   
    • com_media   
    • com_menus
    • com_contenthistory
    • com_finder 
    • com_languages
    • com_messages
    • com_modules/com_templates
    • com_tags
    • com_redirect
  2. Improving error handling in ApiDispatcher and ApiController. It’s is an important improvement for all web services.
  3. Creating tests for web services.This will greatly help to catch bugs at an early stage.