Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVC Redesign #40

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ The sponsor is responsible for managing the review stage and votes.

### Accepted

| Num | Title | Editor | Sponsor |
|:---:|--------------------------------|-------------------------|-------------------|
| 0 | [RFC Procedure][rfc-procedure] | Niels Braczek <[email protected]> | Marco Dings <[email protected]> |
| Num | Title | Editor | Sponsor |
|:---:|--------------------------------|----------------------------------------------------|------------------------------------------------|
| 0 | [RFC Procedure][rfc-procedure] | Niels Braczek <[email protected]> | Marco Dings <[email protected]> |

### Review

Expand All @@ -35,15 +35,16 @@ The sponsor is responsible for managing the review stage and votes.

### Pre-Draft

| Num | Title | Editor | Sponsor |
|:---:|--------------------------------|----------------------------------|-------------------|
| N/A | [Content Elements][contentelements] | Niels Braczek <[email protected]> | N/A |
| N/A | [Authorisation Service][authorisation] | Niels Braczek <[email protected]> | N/A |
| N/A | [Joomla Command Line][joomla-cli] | Roland Dalmulder <[email protected]> | N/A |
| N/A | [Mobile App][mobile-app] | Elisa Foltyn <[email protected]> | N/A |
| N/A | [Simplify Admin Views*][simplify-admin] | Elisa Foltyn <[email protected]> | N/A |
| N/A | [Simplify Admin Views*][simplify-admin2] | Astrid Günther <[email protected]> | N/A |
| N/A | [Composer support][composer] | Astrid Günther <[email protected]> | N/A |
| Num | Title | Editor | Sponsor |
|:---:|------------------------------------------|---------------------------------------------------------|----------------------------------------------------|
| N/A | [Content Elements][contentelements] | Niels Braczek <[email protected]> | N/A |
| N/A | [Authorisation Service][authorisation] | Niels Braczek <[email protected]> | N/A |
| N/A | [Joomla Command Line][joomla-cli] | Roland Dalmulder <[email protected]> | N/A |
| N/A | [Mobile App][mobile-app] | Elisa Foltyn <[email protected]> | N/A |
| N/A | [Simplify Admin Views*][simplify-admin] | Elisa Foltyn <[email protected]> | N/A |
| N/A | [Simplify Admin Views*][simplify-admin2] | Astrid Günther <[email protected]> | N/A |
| N/A | [Composer support][composer] | Astrid Günther <[email protected]> | N/A |
| N/A | [MVC Redesign][mvc-redesign] | Herman Peeren <[email protected]> | Niels Braczek <[email protected]> |

*) Two different proposals on the same target, need to be merged

Expand All @@ -55,15 +56,15 @@ The sponsor is responsible for managing the review stage and votes.

### Rejected

| Title | Editor | Sponsor |
|-----------------------------|-------------------------|-------------------|
| [Append Form][append-form] | Niels Braczek <[email protected]> | Llewellyn van der Merwe <[email protected]> |
| Title | Editor | Sponsor |
|----------------------------|----------------------------------------------------|------------------------------------------------------------------------|
| [Append Form][append-form] | Niels Braczek <[email protected]> | Llewellyn van der Merwe <[email protected]> |

## Numerical Index

| Status | Num | Title | Editor | Sponsor |
|--------|:---:|-----------------------------------------|----------------------------------------------------|-------------------|
| A | 0 | [RFC Procedure][rfc-procedure] | Niels Braczek <[email protected]> | Marco Dings <[email protected]> |
| Status | Num | Title | Editor | Sponsor |
|--------|:---:|-----------------------------------------|----------------------------------------------------|------------------------------------------------------------------------|
| A | 0 | [RFC Procedure][rfc-procedure] | Niels Braczek <[email protected]> | Marco Dings <[email protected]> |
| D | 1 | [Decpoupling Output](decoupling-output) | Niels Braczek <[email protected]> | Llewellyn van der Merwe <[email protected]> |
| D | 2 | [Form Admin](form-admin) | Niels Braczek <[email protected]> | Llewellyn van der Merwe <[email protected]> |
| D | 3 | [Simple CCK](simple-cck) | Niels Braczek <[email protected]> | Llewellyn van der Merwe <[email protected]> |
Expand All @@ -83,3 +84,4 @@ _**Legend:** A = Accepted | D = Draft | P = Pre-Draft | R = Review | X = Depreca
[form-admin]: https://github.com/joomla/rfc/pull/31
[simple-cck]: https://github.com/joomla/rfc/pull/26
[append-form]: https://github.com/joomla/rfc/pull/18
[mvc-redesign]: https://github.com/joomla/rfc/pull/40
100 changes: 100 additions & 0 deletions proposed/mvc-redesign-meta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# MVC Redesign Meta Document

## 1. Summary

This specification describes a fundamental shift in the approach to the Model-View-Controller (MVC)
architecture within our system, moving from a hierarchical class structure to one that favors composition over
inheritance. The motivation behind this transformation is to increase modularity, flexibility, and ease of maintenance
within the application. A preliminary effort toward this goal has already been initiated through the adoption of a
service locator as a form of dependency injection, indicating a move towards a more compositional architecture. This
specification aims to explore and define the next steps in evolving the MVC framework to fully embrace this
compositional approach. Additionally, it seeks to reevaluate the roles and interactions of the MVC components to better
align with the needs of a client-server web architecture, such as that of Joomla. The objective is to discuss potential
directions for the MVC classes, considering the dependencies of all features and how they might be optimally composed.

## 2. Why Bother?

The transition to a compositional MVC architecture addresses several critical challenges and opportunities within the
current system design:

* **Increased Modularity**: By defining features as independent dependencies that can be composed as needed, the system
becomes more modular. This modularity facilitates easier updates and enhancements, as changes to one component can be
made with minimal impact on others.

* **Enhanced Flexibility**: Composition over inheritance provides greater flexibility in how functionality is organized
and utilized within the application. It allows for more granular customization of the MVC components, enabling
developers to tailor the system to specific needs without altering the core architecture.

* **Improved Maintainability**: A compositional approach simplifies the MVC framework, making it easier to understand,
debug, and maintain. This is particularly beneficial in a complex system like Joomla, where simplifying interactions
between components can significantly reduce development and maintenance overhead.

* **Alignment with Modern Practices**: Moving towards a compositional architecture aligns Joomla with current best
practices in software design, particularly in the context of client-server web applications. This alignment not only
enhances the system's architecture but also makes it more appealing to developers familiar with modern development
methodologies.

* **Future-Proofing**: As web technologies evolve, the flexibility provided by a compositional MVC architecture will
make it easier to adapt to new trends and technologies. This ensures that the system remains relevant and capable of
incorporating advancements in web development.

## 3. Scope

These goals and non-goals help to frame the specification’s intent and scope, focusing efforts on enhancing the MVC
architecture through a compositional approach while clarifying what the proposal will not cover or achieve directly.

### 3.1 Goals

This specification aims to provide a clear roadmap for transitioning from a hierarchical to a compositional MVC
architecture within the system. It seeks to outline the principles of composition over inheritance, detail the
implementation of a service locator for dependency injection, and define how MVC components can be restructured and
composed for enhanced modularity and flexibility. Furthermore, the specification will explore the reevaluation of MVC
roles to better suit client-server web architectures, aiming to establish a framework that supports more granular and
adaptable interactions between model, view, and controller components.

### 3.2 Non-Goals

This specification does not aim to propose a complete overhaul of the application's existing functionality or business
logic. The focus is specifically on the MVC architecture and its optimization for better system design.

Completely removing all hierarchical class structures immediately is not a goal. The transition will be progressive,
ensuring system stability throughout the process.

The specification does not commit to integrating specific new technologies or frameworks for implementing the
compositional approach. It remains technology-agnostic, focusing on architectural patterns and principles.

This specification is dedicated to the MVC architecture and does not aim to solve unrelated architectural or design
issues within the application.

Specific performance optimizations are not a dedicated goal of this specification.

## 4. Approaches

## 5. Design Decisions

## 6. People

### 6.1 Editor(s)

* Herman Peeren <[email protected]>

### 6.2 Sponsors

* Niels Braczek, <[email protected]>

### 6.3 Contributors

* N/A

## 7. Votes

* **Entrance Vote:** _(not yet taken)_
* **Acceptance Vote:** _(not yet taken)_

## 8. Relevant Links

_**Note:** Order descending chronologically._

## 9. Errata

...
19 changes: 19 additions & 0 deletions proposed/mvc-redesign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# MVC Redesign

This specification describes a fundamental shift in the approach to the Model-View-Controller (MVC)
architecture within our system, moving from a hierarchical class structure to one that favors composition over
inheritance.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in [RFC 2119][].

[RFC 2119]: http://tools.ietf.org/html/rfc2119

### References

- [RFC 2119][]: Key words for use in RFCs to Indicate Requirement Levels

## 1. Specification

## 2. Interfaces