Last modified: 2013-08-28 03:54:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51990, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49990 - More tightly couple object model and interface model in UploadWizard
More tightly couple object model and interface model in UploadWizard
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
master
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: javascript
Depends on:
Blocks: 49987
  Show dependency treegraph
 
Reported: 2013-06-21 23:31 UTC by Mark Holmquist
Modified: 2013-08-28 03:54 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mark Holmquist 2013-06-21 23:31:35 UTC
While we have an UploadWizardUploadInterface class, its utility is somewhat questionable, given that we still have myriad selectors for known elements strewn around the code.

Ideally it would be commonplace to save an interface DOM element (or more appropriately jQuery object) to an object when you create it, for example, this.interface.details.$titleField is a lot simpler than $j( '#title_' + id ), and way more readable. And it makes it easier to extend the project - once bug 49989 is fixed, we'll have sound documentation on all the available interface objects as well.
Comment 1 Derk-Jan Hartman 2013-06-25 20:52:36 UTC
We should also pick a model and follow it. I mean, is our code (supposed to be) MVP or is it MVC or should it be something totally different ? What is common in jQuery world ?
These are unanswered questions in our JS code conventions I believe, but they are starting to become more important.
Comment 2 Mark Holmquist 2013-06-25 21:01:18 UTC
I think UW itself is pretty much MVP, but MediaWiki is sort of up in the air. The WMF/Wikia meeting that happened last week had some chatter about making MediaWiki more MVCy, but whether that will actually move forward remains to be seen. But this isn't the place to decide that.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links