User tests: Successful: Unsuccessful:
Pull Request for Issue # .
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:
Removed some class properties
Removed the following methods, it is helpers method for adding paths for model/view classes, it is not needed now because we use autoloader
Application object is now a property of the class. It is passed from Dispatcher
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.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
What if we leave current Legacy MVC (the none namespaced MVC) classes and use the namespace MVC as new MVC?
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
The legacy MVC
The new namespace MVC
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).
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.
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-02 13:56:08 |
Closed_By | ⇒ | joomdonation |
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).