rtCamp / blank-theme

Customized Blank theme based on Underscore and Foundation
25 stars 23 forks source link

Update Considerations: autoloader, singleton #90

Open divyarajmasani opened 3 months ago

divyarajmasani commented 3 months ago

Summary

  1. Currently, 'blank-theme' uses a custom autoloader, which works fine. However, to align the code more with how things are done for PHP in general, we can update to use the composer autoloader and remove the custom one.

  2. Revisit the Singleton pattern used to compose and load the necessary components for the theme. Now, this may result in unnecessary classes being loaded on all requests. This may be fine with a small-scale code base; however, the complexity of features may add to memory cost. Identify/update to only load classes when needed.

References

Acceptance Criteria