And FTR I’ve started this design page to evaluate our options with the various JS frameworks: http://design.xwiki.org/xwiki/bin/view/Proposal/JavaScriptFrameworkEvaluation
Thanks -Vincent On 2 Feb 2014 at 16:36:33, Ludovic Dubost ([email protected]) wrote: Since we will be working on investigating Javascript Frameworks the following might be useful to help compare how the frameworks can be integrated. After last year's experimentation with AngularJS available at http://extensions.xwiki.org/xwiki/bin/view/Extension/AngularJSDemo I've done an experimentation with emberjs which is a similar framework. The result is available here: http://extensions.xwiki.org/xwiki/bin/view/Extension/TodoList%20Application%20using%20emberjs Some feedback on the process: 1/ The templates (handlebars) can be put directly in the wiki pages which is good. In this case I put them in the todolist macro which I created. You can see the code in the WikiMacro TodoListMacro 2/ The JS and CSS could be put in JS and CSS extension 3/ The storage could be integrated by implementing an Adapter. In this case I did some special server code in order to store the content in the content field of my todolist macro. However in most case we will probably want to map the emberjs model to the XWiki Object model. For this we can either improve our REST api to provide an API that emberjs would natively understand (this is from what I saw very possible), but we can also write an adapter that maps the emberjs store api to our REST API. This is also very possible, however we might still need some improvements in the XWiki rest api (some improvements have already been commited as part of the mobile app development). emberjs has a chrome extension to help see the results. I did not have too many bugs because I use the tutorial so I cannot say how easy or not it is to debug issues in emberjs. I remember it was a bit painful with Angular. This is something important to look at. In general it was not too difficult to adapt the emberjs todo demo to XWiki and wire it to an XWiki storage. This type of framework can be very productive if we have already some generic wiring to XWiki storage. Now to be fully productive we also need to improve a it the way we develop in Javascript in XWiki. When you do a complex applications with multiple JS/CSS/Template then you need a better way to navigate between the different content with some nice syntax coloring. So we need to improve the way we can edit this type of files. This will revive the XEclipse/WebIDE and file system view of XWiki code debate. Ludovic -- Ludovic Dubost Founder and CEO Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

