Talk:JS2 Overview

User scripts
I understand that the script loader also packages user skin js. Do you see a way to pack some additional scripts, too, which are currently just imported using importScript? Or could one query the script loader oneself to retrieve an additional batch of scripts? This would help a lot with scripts like Twinkle, which currently imports 17 seperate scripts. If it could use the script loader to retrieve them minified with one call it would speed things up quite a bit. --Amalthea 10:39, 21 April 2009 (UTC)
 * yes you want to use the mwLoad function. You need to define your classes both in javascript and in the php (if you want to support usage without the scrtiploader). see updated documentation. Mdale

Javascript Localization Alternatives
Some have pointed out that localizing msgs in javascript is problematic or difficult. (Also bug thread: bug 19190). But the alternative of packing interfaces msgs with data results on the php server side poses several difficulties:
 * We can't as easily use the data api's directly / have to proxy all the data requests and do costly HTML generation server side. (obviously its cheaper to just send the clients the data and have them do the dynamic transformations locally)
 * Any interface improvements involve both php and js modification as opposed to quick javascript changes.
 * Application complexity grows, a whole new framework has to be adopted, and code is much more difficult to review since any dynamic msg interface interaction now involves php server side html code generation.
 * Applications have to be developed in a way that avoid extra trips to the server solely for localized msgs which means merging all dynamic data requests with interface code or more round trips to the server.