Change: Refactor the App functions ahead of release #343

Closed
opened 2025-07-10 07:14:29 +00:00 by jamie · 5 comments
jamie commented 2025-07-10 07:14:29 +00:00 (Migrated from git.hazaar.io)

Problem Statement

The Hazaar framework currently uses the term Application in function names related to userland apps, such as Hazaar\Loader::getApplicationPath(). A new naming convention has been adopted where App is used to represent userland application code, and Application is used exclusively for the framework namespace (Hazaar\Application). This leads to a mismatch between the conceptual separation and the function naming.

Who will benefit?

  • Developers working with the Hazaar framework, by improving consistency.
  • Documentation and tooling maintainers, by aligning terminology across the system.
  • Long-term maintainability of the framework.

Benefits and risks

Benefits:

  • Aligns function naming with the new App vs Application namespace convention.
  • Reduces confusion between framework internals and userland code.
  • Makes the framework easier to learn and reason about.

Risks:

  • Requires renaming functions, which is a breaking change unless backward compatibility is maintained.
  • May require updates to a significant amount of existing user code and documentation.
  • Could introduce inconsistencies if not thoroughly applied across all relevant components.

Proposed solution

  • Identify all public functions that reference Application in their name but operate on userland code.
  • Rename these to use App instead. Example:
    • getApplicationPath()getAppPath()
    • setApplicationNamespace()setAppNamespace()
  • Add aliases for renamed functions where feasible to avoid immediate breakage.
  • Update documentation and internal references to reflect the new terminology.
  • Mark old function names as deprecated with a warning scheduled for removal in the next major version.

Examples

None required.

Priority/Severity

  • High (This will bring a huge increase in performance/productivity/usability/legislative cover)
  • Medium (This will bring a good increase in performance/productivity/usability)
  • Low (anything else e.g., trivial, minor improvements)
## Problem Statement The Hazaar framework currently uses the term `Application` in function names related to userland apps, such as `Hazaar\Loader::getApplicationPath()`. A new naming convention has been adopted where `App` is used to represent userland application code, and `Application` is used exclusively for the framework namespace (`Hazaar\Application`). This leads to a mismatch between the conceptual separation and the function naming. ## Who will benefit? - Developers working with the Hazaar framework, by improving consistency. - Documentation and tooling maintainers, by aligning terminology across the system. - Long-term maintainability of the framework. ## Benefits and risks ### Benefits: - Aligns function naming with the new `App` vs `Application` namespace convention. - Reduces confusion between framework internals and userland code. - Makes the framework easier to learn and reason about. ### Risks: - Requires renaming functions, which is a breaking change unless backward compatibility is maintained. - May require updates to a significant amount of existing user code and documentation. - Could introduce inconsistencies if not thoroughly applied across all relevant components. ## Proposed solution - Identify all public functions that reference `Application` in their name but operate on userland code. - Rename these to use `App` instead. Example: - `getApplicationPath()` → `getAppPath()` - `setApplicationNamespace()` → `setAppNamespace()` - Add aliases for renamed functions where feasible to avoid immediate breakage. - Update documentation and internal references to reflect the new terminology. - Mark old function names as deprecated with a warning scheduled for removal in the next major version. ## Examples None required. ## Priority/Severity - [x] High (This will bring a huge increase in performance/productivity/usability/legislative cover) - [ ] Medium (This will bring a good increase in performance/productivity/usability) - [ ] Low (anything else e.g., trivial, minor improvements)
jamie commented 2025-07-10 07:14:38 +00:00 (Migrated from git.hazaar.io)
created branch [`343-change-refactor-the-hazaar-application-namespace-to-hazaar-app-ahead-of-release`](/hazaar/framework/-/compare/master...343-change-refactor-the-hazaar-application-namespace-to-hazaar-app-ahead-of-release) to address this issue
jamie commented 2025-07-10 07:14:51 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !232

mentioned in merge request !232
jamie commented 2025-07-11 02:07:10 +00:00 (Migrated from git.hazaar.io)

changed title from Change: Refactor the Hazaar\Application namespace to Hazaar\App ahead of release to Change: Refactor the App functions ahead of release

<p>changed title from <code class="idiff">Change: Refactor the <span class="idiff left right deletion">Hazaar\Application namespace to Hazaar\App</span> ahead of release</code> to <code class="idiff">Change: Refactor the <span class="idiff left right addition">App functions</span> ahead of release</code></p>
jamie commented 2025-07-11 02:07:11 +00:00 (Migrated from git.hazaar.io)

changed the description

changed the description
jamie commented 2025-07-11 02:17:15 +00:00 (Migrated from git.hazaar.io)

mentioned in commit 5abcaf3fb1

mentioned in commit 5abcaf3fb1849fcd15bf4f47da855e8073fe56c1
jamie (Migrated from git.hazaar.io) closed this issue 2025-07-11 02:17:16 +00:00
jamie self-assigned this 2025-09-04 01:13:37 +00:00
jamie removed their assignment 2025-09-04 01:13:44 +00:00
jamie self-assigned this 2025-09-04 01:13:49 +00:00
jamie removed their assignment 2025-09-04 01:13:54 +00:00
jamie self-assigned this 2025-09-04 01:14:01 +00:00
jamie removed their assignment 2025-09-04 01:14:07 +00:00
jamie self-assigned this 2025-09-04 01:14:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/framework#343
No description provided.