[buddypress-trac] [BuddyPress Trac] #7218: Only load component action and screen code when we're on the component's page
buddypress-trac
noreply at wordpress.org
Tue Dec 12 17:14:14 UTC 2017
#7218: Only load component action and screen code when we're on the component's
page
-----------------------------+-----------------------
Reporter: r-a-y | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.0
Component: Core | Version:
Severity: normal | Resolution:
Keywords: has-patch early |
-----------------------------+-----------------------
Comment (by boonebgorges):
I have no strong opinions about class organization. I will say that the
term "God class" feels like an exaggeration here, as does "anti-pattern".
The methods/classes in question are closely linked in functionality, and I
don't see an architectural principle that very clearly dictates the
"right" answer. We're trying to balance performance, organization, ease-
of-maintenance, and this will require trade-offs.
Given that we autoload classes, it's likely that more-but-smaller classes
will provide a slight memory benefit, as @r-a-y suggests. I also lean
toward not doing so much inside of a `__construct()` method, but for these
kinds of specialty classes, I don't think it makes a difference.
Unless @DJPaul feels strongly otherwise, I'm fine with the approach in the
most recent patches.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7218#comment:40>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list