Page MenuHomePhabricator

Separate object creation and object initialization
Open, LowestPublic

Description

Migrated from: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/276

It is an OOP best practice to have simple constructors which only do trivial things, and have a separate initializaton function for everything else. That way, it is easy to change where objects are created, so it is easier to do proper dependency injection; also, tests can change or mock the behavior of the init function without having to resort to modification of the prototype.

Event Timeline

MingleTerminator raised the priority of this task from to Normal.Dec 8 2014, 4:47 PM
MingleTerminator added a project: Multimedia.
Tgr added a subscriber: Tgr.
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:29 PM
Restricted Application added a subscriber: Matanya. · View Herald TranscriptSep 4 2015, 6:29 PM

Mass-removing the Multimedia tag from MediaViewer tasks, as this is now being worked on by the Reading department, not Editing's Multimedia team.

Jdlrobson lowered the priority of this task from Normal to Lowest.Dec 21 2015, 4:55 PM
Jdlrobson added a subscriber: Jdlrobson.
Tgr removed a subscriber: Tgr.Tue, Jul 9, 6:05 PM