Re: [xwiki-users] Create Javascript application in XWiki
Thanks for all your replies, Vincent and Thomas. I'm quite ... worried by the fact to directly put my webjars dependencies in WEB-INF/lib, directly or through Advanced Search, as it would prevent me to have explicit link between the JS lib and the place where it is used. What I fear is the WEB-INF/lib folder becoming kind of messy, with all JS dependencies dropped there without proper usage identification, and a zealous sysadmin coming there and purging the folder aggresively. Have you got any kind of best practices to avoid that ? Le 24/03/2015 11:16, vinc...@massol.net a écrit : On 24 Mar 2015 at 11:12:54, vinc...@massol.net (vinc...@massol.net(mailto:vinc...@massol.net)) wrote: Hi Nicolas, On 23 Mar 2015 at 16:33:55, Nicolas Delsaux (nicolas.dels...@gmx.fr(mailto:nicolas.dels...@gmx.fr)) wrote: I would like to create a Javascript application in XWiki. My precise goal is to go get some content from Jenkins (build status) and render it over a static image using d3.js or any other rich rendering framework. I suppose the only way to implement that is to write my webpage as HTML. But, then, how will I use external frameworks ? (typically d3.js) Regarding D3js you have an example here: http://extensions.xwiki.org/xwiki/bin/view/Extension/D3+Example And there’s even a macro here (not tried it myself): http://extensions.xwiki.org/xwiki/bin/view/Extension/d3js Just a note: these examples were written prior to us having the webjar integration support. So with webjars, it’s even easier and you don’t need to include d3js in an XWiki Object anymore. You can just put the webjar in WEB-INF/lib and it’ll be usable. See http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration Thanks -Vincent Hope it helps -Vincent Thanks -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create Javascript application in XWiki
Le 24/03/2015 11:24, vinc...@massol.net a écrit : If you’re doing dev and writing an extension for your code then all you need is add a dependency to the webjar in your extension’s POM and then install it through the Extension Manager and it won’t go in WEB-INF/lib :) Oh, I see, you're enforcing good practices by making sure any other practice will be a tremendous pain. Nicely done ;-) (I'm not joking on you, I really find it is the right way) -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create Javascript application in XWiki
Hi Nicolas, On 23 Mar 2015 at 16:33:55, Nicolas Delsaux (nicolas.dels...@gmx.fr(mailto:nicolas.dels...@gmx.fr)) wrote: I would like to create a Javascript application in XWiki. My precise goal is to go get some content from Jenkins (build status) and render it over a static image using d3.js or any other rich rendering framework. I suppose the only way to implement that is to write my webpage as HTML. But, then, how will I use external frameworks ? (typically d3.js) Regarding D3js you have an example here: http://extensions.xwiki.org/xwiki/bin/view/Extension/D3+Example And there’s even a macro here (not tried it myself): http://extensions.xwiki.org/xwiki/bin/view/Extension/d3js Hope it helps -Vincent Thanks -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create Javascript application in XWiki
On 24 Mar 2015 at 11:22:52, Nicolas Delsaux (nicolas.dels...@gmx.fr(mailto:nicolas.dels...@gmx.fr)) wrote: Thanks for all your replies, Vincent and Thomas. I'm quite ... worried by the fact to directly put my webjars dependencies in WEB-INF/lib, directly or through Advanced Search, as it would prevent me to have explicit link between the JS lib and the place where it is used. What I fear is the WEB-INF/lib folder becoming kind of messy, with all JS dependencies dropped there without proper usage identification, and a zealous sysadmin coming there and purging the folder aggresively. Have you got any kind of best practices to avoid that ? If you’re doing dev and writing an extension for your code then all you need is add a dependency to the webjar in your extension’s POM and then install it through the Extension Manager and it won’t go in WEB-INF/lib :) Thanks -Vincent Le 24/03/2015 11:16, vinc...@massol.net a écrit : On 24 Mar 2015 at 11:12:54, vinc...@massol.net (vinc...@massol.net(mailto:vinc...@massol.net)) wrote: Hi Nicolas, On 23 Mar 2015 at 16:33:55, Nicolas Delsaux (nicolas.dels...@gmx.fr(mailto:nicolas.dels...@gmx.fr)) wrote: I would like to create a Javascript application in XWiki. My precise goal is to go get some content from Jenkins (build status) and render it over a static image using d3.js or any other rich rendering framework. I suppose the only way to implement that is to write my webpage as HTML. But, then, how will I use external frameworks ? (typically d3.js) Regarding D3js you have an example here: http://extensions.xwiki.org/xwiki/bin/view/Extension/D3+Example And there’s even a macro here (not tried it myself): http://extensions.xwiki.org/xwiki/bin/view/Extension/d3js Just a note: these examples were written prior to us having the webjar integration support. So with webjars, it’s even easier and you don’t need to include d3js in an XWiki Object anymore. You can just put the webjar in WEB-INF/lib and it’ll be usable. See http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration Thanks -Vincent Hope it helps -Vincent Thanks -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create Javascript application in XWiki
Extensions don't go in WEB-INF/lib, they go in a special local repository in the configured permanent directory. On Tue, Mar 24, 2015 at 11:24 AM, vinc...@massol.net vinc...@massol.net wrote: On 24 Mar 2015 at 11:22:52, Nicolas Delsaux (nicolas.dels...@gmx.fr(mailto:nicolas.dels...@gmx.fr)) wrote: Thanks for all your replies, Vincent and Thomas. I'm quite ... worried by the fact to directly put my webjars dependencies in WEB-INF/lib, directly or through Advanced Search, as it would prevent me to have explicit link between the JS lib and the place where it is used. What I fear is the WEB-INF/lib folder becoming kind of messy, with all JS dependencies dropped there without proper usage identification, and a zealous sysadmin coming there and purging the folder aggresively. Have you got any kind of best practices to avoid that ? If you’re doing dev and writing an extension for your code then all you need is add a dependency to the webjar in your extension’s POM and then install it through the Extension Manager and it won’t go in WEB-INF/lib :) Thanks -Vincent Le 24/03/2015 11:16, vinc...@massol.net a écrit : On 24 Mar 2015 at 11:12:54, vinc...@massol.net (vinc...@massol.net(mailto:vinc...@massol.net)) wrote: Hi Nicolas, On 23 Mar 2015 at 16:33:55, Nicolas Delsaux (nicolas.dels...@gmx.fr(mailto:nicolas.dels...@gmx.fr)) wrote: I would like to create a Javascript application in XWiki. My precise goal is to go get some content from Jenkins (build status) and render it over a static image using d3.js or any other rich rendering framework. I suppose the only way to implement that is to write my webpage as HTML. But, then, how will I use external frameworks ? (typically d3.js) Regarding D3js you have an example here: http://extensions.xwiki.org/xwiki/bin/view/Extension/D3+Example And there’s even a macro here (not tried it myself): http://extensions.xwiki.org/xwiki/bin/view/Extension/d3js Just a note: these examples were written prior to us having the webjar integration support. So with webjars, it’s even easier and you don’t need to include d3js in an XWiki Object anymore. You can just put the webjar in WEB-INF/lib and it’ll be usable. See http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration Thanks -Vincent Hope it helps -Vincent Thanks -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create Javascript application in XWiki
On 24 Mar 2015 at 11:12:54, vinc...@massol.net (vinc...@massol.net(mailto:vinc...@massol.net)) wrote: Hi Nicolas, On 23 Mar 2015 at 16:33:55, Nicolas Delsaux (nicolas.dels...@gmx.fr(mailto:nicolas.dels...@gmx.fr)) wrote: I would like to create a Javascript application in XWiki. My precise goal is to go get some content from Jenkins (build status) and render it over a static image using d3.js or any other rich rendering framework. I suppose the only way to implement that is to write my webpage as HTML. But, then, how will I use external frameworks ? (typically d3.js) Regarding D3js you have an example here: http://extensions.xwiki.org/xwiki/bin/view/Extension/D3+Example And there’s even a macro here (not tried it myself): http://extensions.xwiki.org/xwiki/bin/view/Extension/d3js Just a note: these examples were written prior to us having the webjar integration support. So with webjars, it’s even easier and you don’t need to include d3js in an XWiki Object anymore. You can just put the webjar in WEB-INF/lib and it’ll be usable. See http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration Thanks -Vincent Hope it helps -Vincent Thanks -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Create Javascript application in XWiki
I would like to create a Javascript application in XWiki. My precise goal is to go get some content from Jenkins (build status) and render it over a static image using d3.js or any other rich rendering framework. I suppose the only way to implement that is to write my webpage as HTML. But, then, how will I use external frameworks ? (typically d3.js) Thanks -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Create Javascript application in XWiki
Hi Nicolas, Typically, the flow is the following: 1. You create a page and the markup (wiki syntax + additional HTML if you need form UI elements or if you can not reuse property displayers from velocity, e.g. $doc.display('someProperty', 'edit') [1] ) 2. You add a skin extension [2] object to that document where you add your CSS and JS needs 3. Inside that JSX object you can depend on 3rd party libraries using the recommended require.js approach [3] or anything else that suites you 4. Profit More such information is available on the dev guide's tutorials and resources page [4]. Hope this helps, Eduard P.S.: Regarding javascript, be aware that we are currently moving away from Prototype.js and towards jQuery, but a lot of documentation still talks about how to do things with Prototype.js, you just need to digg deep enough to find the jQuery alternatives, figure them out, ask people for help and, document back your findings (on xwiki.org pages) so that you can help others in your same situation :) -- [1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/API [2] http://extensions.xwiki.org/xwiki/bin/view/Extension/Skin+Extension+Plugin [3] http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI#HRequireJSandjQueryAPIs [4] http://platform.xwiki.org/xwiki/bin/view/DevGuide/ On Mon, Mar 23, 2015 at 5:33 PM, Nicolas Delsaux nicolas.dels...@gmx.fr wrote: I would like to create a Javascript application in XWiki. My precise goal is to go get some content from Jenkins (build status) and render it over a static image using d3.js or any other rich rendering framework. I suppose the only way to implement that is to write my webpage as HTML. But, then, how will I use external frameworks ? (typically d3.js) Thanks -- Nicolas Delsaux ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users