? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
1 Mar 2017

Pull Request for Issue # .

Summary of Changes

This PR makes change to the original namespace controller class in Joomla 4. Like #14258, It is not for merging, I open it for discussion only. The goal is implementing a new MVC layer which allows us to build namespace + HMVC components in Joomla 4.

Compare to the original Controller class, below are the changes:

  1. Removed some class properties

  2. Removed the following methods, it is helpers method for adding paths for model/view classes, it is not needed now because we use autoloader

  • addModelPath
  • createFileName
  • getInstance (the job for creating controller was moved to Dispatcher class)
  • addPath
  • addViewPath
  • createModel (the logic is merged into getModel method in same class)
  • createView (the logic is merged into getView method in same class)
  • setPath
  1. Application object is now a property of the class. It is passed from Dispatcher

  2. The $prefix argument in getModel and getView method is replaced with $namespace. Now, we can create a backend model/view from frontend controllers and vice versa.

And some other minor changes....

Hope to receive your feedback to have it implemented in proper way.

avatar joomdonation joomdonation - open - 1 Mar 2017
avatar joomdonation joomdonation - change - 1 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Mar 2017
Category Libraries
avatar mbabker
mbabker - comment - 2 Mar 2017

I don't think we'd get away with dropping support for the current component infrastructure in 4.0. Especially as none of it has any real form of deprecation right now, and IMO it's too late to try and do any deprecations for 3.x.

So the MVC layer will have to be able to operate in a "dual mode" until 5.0 (basically if namespaces classes exist use those else fallback onto existing behavior).

avatar joomdonation
joomdonation - comment - 2 Mar 2017

What if we leave current Legacy MVC (the none namespaced MVC) classes and use the namespace MVC as new MVC?

avatar joomdonation
joomdonation - comment - 2 Mar 2017

So as I mentioned in the Dispatcher PR, if we agree with the direction, then in Joomla 4, we will basically, there would be 2 MVCs

  1. The legacy MVC

  2. The new namespace MVC

avatar mbabker
mbabker - comment - 2 Mar 2017

It's all going to depend greatly on how it's done. I'm not going to rule out having two layers, but the benefits and maintainability of it all have to rate well so we don't end up on our fourth or fifth MVC rewrite attempt pretty quickly (this includes the com_config rewrite and an old GSoC project trying to do it).

avatar joomdonation
joomdonation - comment - 2 Mar 2017

We have marked our current MVC layer as Legacy for year, so it would be great if we can introduce a new, proper MVC implement for Joomla 4.

That would require a serious effort. I am willing to give it a try, however, to be honest, I would have so many questions during the process.

I would expect to receive support, advice from experience developers here. Basically, for each step (for example, Dispatcher, Base Controller, Form Controller,Admin Controller , Base Model....), I would like people to help review the code, tell me what's wrong, what should be changed.....I am open for suggestion and willing to make changes until it is good

Without that, I am afraid of we would get no where with new MVC like how @wilsonge and @Mathewlenning tried in the past.

avatar joomdonation joomdonation - change - 2 Mar 2017
Labels Added: ?
avatar joomdonation joomdonation - change - 2 Mar 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-03-02 13:56:08
Closed_By joomdonation
avatar joomdonation joomdonation - close - 2 Mar 2017

Add a Comment

Login with GitHub to post a comment