Jump to content

Submissions/JavaScript and long-term relationships

From Wikimania 2014 • London, United Kingdom

This is an accepted submission for Wikimania 2014.

Submission no. 5027
Title of the submission
JavaScript and long-term relationships
Type of submission (discussion, hot seat, panel, presentation, tutorial, workshop)
Presentation
Author of the submission
Trevor Parscal
E-mail address
tparscal@wikimedia.org
Username
User:Trevor Parscal
Country of origin
United States
Affiliation, if any (organisation, company etc.)
Wikimedia Foundation
Personal homepage or blog
[1] [2]
Abstract
In a world where javascript is the web’s language of love, falling head-over-heels for template libraries that promise to make user interface development trivial, or even ‘fun’, is all too easy. But as the days turn into weeks, and the functions turn into classes, the honeymoon period eventually ends and there comes a moment in which you realize — and have to finally admit to yourself — that things just aren’t working out. The ephemeral nature of pre-processing – a common enemy of robust software design – has struck again.
Meanwhile, far away on a web server, the better half of your application lives behind a narrow and latent API. This distance is only exacerbated with the addition of each new feature, while the user is still waiting to be allowed to proceed with their task. But how much of the back-end really must be on the server. How much interaction must be bottlenecked through the API. It may be time for the front-end of your application to have a back-end of its own.
OOjs (pronounced "oh oh jay ess") is a small library that provides functionality for building classes, dealing with inheritance, utilizing mixins and connecting objects with events. It also provides utilities that facilitate extension using registries and factories. Equally at home in the browser or within Node.js, OOjs provides utilities to write robust and extendable javascript applications.
OOjs UI (normally just called "oh oh you eye") builds on OOjs, providing not only a suite of common widgets, but also the building blocks for new widgets that your application will eventually require. Taking advantage of inheritance, mixins and composition, reuse of code is maximized without sacrificing customizability.
These two libraries were born from necessity, and refined through the development of VisualEditor. However, they are completely independent from VisualEditor and available as a ResourceLoader module in MediaWiki core, or as a package through NPM.
Trevor walks through how to build rich client-side applications with data models using OOjs and user interfaces using OOjs UI. Showing real-world patterns and anti-patterns pulled from the past and present MediaWiki and VisualEditor code bases, he will help you to decide if and when this rich-client technique should be used, and how to use it within MediaWiki.
Track
  • Technology, Interface & Infrastructure
Length of session (if other than 30 minutes, specify how long)
30 minutes
Will you attend Wikimania if your submission is not accepted?
Yes
Slides or further information (optional)
Special requests


Interested attendees

If you are interested in attending this session, please sign with your username below. This will help reviewers to decide which sessions are of high interest. Sign with a hash and four tildes. (# ~~~~).

  1. the wub "?!" 23:39, 13 April 2014 (UTC)[reply]
  2. Legoktm (talk) 21:35, 17 April 2014 (UTC)[reply]
  3. Elitre (talk) 13:20, 20 April 2014 (UTC)[reply]
  4. Sshhiivv (talk) 22:27, 4 August 2014 (UTC)[reply]
  5. Santhosh.thottingal (talk) 06:58, 7 August 2014 (UTC)[reply]
  6. Add your username here.