https://bugzilla.wikimedia.org/show_bug.cgi?id=23809

--- Comment #1 from Michael Dale <[email protected]> 2010-06-06 03:42:13 UTC ---
Thanks for looking into mwEmbed. Is there somewhere else you looked for the
documentation that I should add documentation links to? Or maybe a link inside
the comments of the gadget? 

The gadget mode for mwEmbed is somewhat complex since it does a few tricks to 
minimize round trips and package size. All the module gadgets share a common
"remote" for efficient and easy to manage page rewrites for multiple usage
contexts. ( en, commons, other language encyclopedias etc. ) 

I have targeted most documentation towards extension based use of the framework
and modules. You can see some extension documentation about JS2 on the js2
page: http://www.mediawiki.org/wiki/JS2_Overview  Do you think more gadget
usage documentation would be helpful? If so I can work on improving that. 

The gadget modules share the same code used in extensions, and in the extension
context it never touches the mediaWiki remote file. As an extension the php
includes the appropriate "activator" code ( AddMediaWizardEditPage.js or
uploadPage.js etc.  )  The activators then load the modules on demand with
context specific configuration. This lets modules be re-used in different
contexts with different configuration options, while not sacrificing
performance in extra round trips to the server, or downloading unnecessary
code. We want to promote a "clean separation of configuration, invocation
binding and interface code" while optimizing for reusable client cache and high
perceived page performance.  


In terms of "development" or debugging in the remote "gadget" mode ... I can
quickly share how I work on it and how it can be much more friendly to
development debugging once your in "develop mode". 

1) You will want to-switch away from using the script that is served from the
prototype server to a version you check out to local web server. you can check
out the code from 
http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/

Disable the gadget and reference the script in your user js file. ie something
like http://commons.wikimedia.org/wiki/User:Mdale/vector.js

2) You will want to include the "debug" in the url parameter. as of r67420
debug param also disables script-grouping so you get direct reference to all
the javascript and css files. 

3) Now you should be able to directly modify the scripts in your code editor
and run it directly on commons or en wiki.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to