? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
19 Mar 2017

Pull Request for Issue # .

Summary of Changes

This PR is the combination of my 4 different PRs #14258, #14511, #14567, #14721. The main goal is support building namespace components in Joomla 4 while the current none namespace components will still work (backward compatible changes).

This PR also bring some new classes (FormView, ListView which help removing repeating code, making developing component faster). More improvements will continue being added in later phase

Some new concepts

Component Dispatcher

See #14258 for very long discussion. The role of component dispatcher is that it receives input, find the target controller, execute a task and perform redirection if needed. With the dispatcher, the component entry file will just become simple like this (we can remove the necessary if this file if agreed)

(new Joomla\Cms\Dispatcher\Dispatcher())->dispatch();

Component dispatcher is also prepare for HMVC support in next phase.

Namespace component structure

The component needs to be restructured so that all (or at least Models, Views, Controllers classes) will be autoloaded with PSR-4 Autoloader:

  • Controller classes will be located inside administrator/components/com_mycom/Controller, components/com_mycom/Controller folders.
  • Model classes will be located inside administrator/components/com_mycom/Model, components/com_mycom/Model folders.
  • View classes will be located inside administrator/components/com_mycom/View, components/com_mycom/View folders.

See https://github.com/joomdonation/joomla-cms/tree/namespace-com-content/administrator/components/com_content for sample namespace com_content in the backend. The component is namespaced by @laoneo, I just modified the code a bit to make it works with the structure I proposed.

Testing Instructions

Only developers review for now. If the concept is accepted, we can call for human testing later

avatar joomdonation joomdonation - open - 19 Mar 2017
avatar joomdonation joomdonation - change - 19 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2017
Category Libraries
avatar joomdonation joomdonation - change - 19 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2017
Category Libraries Libraries Unit Tests
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Mar 2017

thanks for Info in "Testing Instructions".

f259b75 19 Mar 2017 avatar joomdonation CS
avatar joomdonation joomdonation - change - 19 Mar 2017
Labels Added: ?
c50773f 19 Mar 2017 avatar joomdonation CS
avatar joomdonation
joomdonation - comment - 19 Mar 2017

Close because Component Dispatcher is implemented in a different PR (and it better).

avatar joomdonation joomdonation - change - 19 Mar 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-03-19 16:04:22
Closed_By joomdonation
avatar joomdonation joomdonation - close - 19 Mar 2017

Add a Comment

Login with GitHub to post a comment