From d06bc098b4e67e3d8f66a3677f580e136a059f80 Mon Sep 17 00:00:00 2001 From: Niels Braczek Date: Tue, 9 Apr 2024 13:55:00 +0200 Subject: [PATCH 1/2] Initial proposal --- index.md | 38 +++++++------ proposed/mvc-redesign-meta.md | 100 ++++++++++++++++++++++++++++++++++ proposed/mvc-redesign.md | 19 +++++++ 3 files changed, 139 insertions(+), 18 deletions(-) create mode 100644 proposed/mvc-redesign-meta.md create mode 100644 proposed/mvc-redesign.md diff --git a/index.md b/index.md index 8e2a4d3..e1394ae 100644 --- a/index.md +++ b/index.md @@ -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 | Marco Dings | +| Num | Title | Editor | Sponsor | +|:---:|--------------------------------|----------------------------------------------------|------------------------------------------------| +| 0 | [RFC Procedure][rfc-procedure] | Niels Braczek | Marco Dings | ### Review @@ -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 | N/A | -| N/A | [Authorisation Service][authorisation] | Niels Braczek | N/A | -| N/A | [Joomla Command Line][joomla-cli] | Roland Dalmulder | N/A | -| N/A | [Mobile App][mobile-app] | Elisa Foltyn | N/A | -| N/A | [Simplify Admin Views*][simplify-admin] | Elisa Foltyn | N/A | -| N/A | [Simplify Admin Views*][simplify-admin2] | Astrid Günther | N/A | -| N/A | [Composer support][composer] | Astrid Günther | N/A | +| Num | Title | Editor | Sponsor | +|:---:|------------------------------------------|---------------------------------------------------------|----------------------------------------------------| +| N/A | [Content Elements][contentelements] | Niels Braczek | N/A | +| N/A | [Authorisation Service][authorisation] | Niels Braczek | N/A | +| N/A | [Joomla Command Line][joomla-cli] | Roland Dalmulder | N/A | +| N/A | [Mobile App][mobile-app] | Elisa Foltyn | N/A | +| N/A | [Simplify Admin Views*][simplify-admin] | Elisa Foltyn | N/A | +| N/A | [Simplify Admin Views*][simplify-admin2] | Astrid Günther | N/A | +| N/A | [Composer support][composer] | Astrid Günther | N/A | +| N/A | [MVC Redesign][mvc-redesign] | Herman Peeren | Niels Braczek | *) Two different proposals on the same target, need to be merged @@ -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 | Llewellyn van der Merwe | +| Title | Editor | Sponsor | +|----------------------------|----------------------------------------------------|------------------------------------------------------------------------| +| [Append Form][append-form] | Niels Braczek | Llewellyn van der Merwe | ## Numerical Index -| Status | Num | Title | Editor | Sponsor | -|--------|:---:|-----------------------------------------|----------------------------------------------------|-------------------| -| A | 0 | [RFC Procedure][rfc-procedure] | Niels Braczek | Marco Dings | +| Status | Num | Title | Editor | Sponsor | +|--------|:---:|-----------------------------------------|----------------------------------------------------|------------------------------------------------------------------------| +| A | 0 | [RFC Procedure][rfc-procedure] | Niels Braczek | Marco Dings | | D | 1 | [Decpoupling Output](decoupling-output) | Niels Braczek | Llewellyn van der Merwe | | D | 2 | [Form Admin](form-admin) | Niels Braczek | Llewellyn van der Merwe | | D | 3 | [Simple CCK](simple-cck) | Niels Braczek | Llewellyn van der Merwe | @@ -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/pulls diff --git a/proposed/mvc-redesign-meta.md b/proposed/mvc-redesign-meta.md new file mode 100644 index 0000000..dc7f425 --- /dev/null +++ b/proposed/mvc-redesign-meta.md @@ -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 + +### 6.2 Sponsors + +* Niels Braczek, + +### 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 + +... diff --git a/proposed/mvc-redesign.md b/proposed/mvc-redesign.md new file mode 100644 index 0000000..c2fb6f9 --- /dev/null +++ b/proposed/mvc-redesign.md @@ -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 From c00791d23e4624779dda0a54e8a80d95d380d163 Mon Sep 17 00:00:00 2001 From: Niels Braczek Date: Tue, 9 Apr 2024 13:57:54 +0200 Subject: [PATCH 2/2] Update link to pull request --- index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.md b/index.md index e1394ae..b391c8f 100644 --- a/index.md +++ b/index.md @@ -84,4 +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/pulls +[mvc-redesign]: https://github.com/joomla/rfc/pull/40