Re: widgets, plone4/5 and mockup
Rok Garbas <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <CAGDZX-w7aXHiNhUnQr0g92fLTJuS6OO0BMuECf_VYYk37HFW0Q@mail.gmail.com> |
On Mar 28, 2014 2:01 PM, "Kai Hoppert" <[email protected]> wrote: > > Hi, > > ok because you answer a lot i will go through this point by point to make it more easy to reply > > one great advantage of require js is that a js file like maybe jquery is firstly loaded if i use it with require(['... > > i now refere to plone.app.widgets. if you don't have mockup you have to use the bundled js file. And in the js file everything is in. jquery. select2, related items etc. > > So this main feature of requirejs is not working here. Am i right or not? > > relateditems is something wich i think is only usable for logged in users and on edit masks but it will be delivered to everyone, on every page because it is in the bundle. > > And that i thing is not good. You are at the same time right and wrong :) framework team is aware that we currently ship all JavaScript in one file and is aware of the issue. Solution is actually not that obvious as you explained. RequireJS is there (and we are using it) to give us async loading of all scripts if we need it. But it does not force us to do it, because it also enables us to bundle everything in one file (which was easier to implement that why we have it in one file). Probably best would be to remind us why we are actually doing this. So that plone pages load faster, right? But will it load faster by using ONLY RequireJS or one bundled file or mix of both approaches. Also performance numbers vary from different device type, internet connection... So its definitely a complex problem, which I wouldn't dare to solve without some performance numbers to back up the decision. Now when this is going to happen its hard to tell. Currently focus is to get all our JavaScript converted to mockup only the we can measure performance and see which approach gives us better numbers. Biggest obstacle right now is that we need to get more developers contributing to JavaScript part of Plone 5 development. Hope this clears some stuff ------------------------------------------------------------------------------ _______________________________________________ Plone-developers mailing list Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-developers