Menu

#1182 Dojo Toolkit not up to date, minified

1.4
closed-duplicate
None
1.2
5
2015-10-17
2014-07-28
John Locke
No

From IRC:

[09:42:46] <jame> btw; dojo?
[09:42:55] <ehu> 1.4.0
[09:43:22] <ehu> 1.4.0 uses dojo, not scriptaculous
[09:46:31] <jame> ah. " Modular JavaScript toolkit" ?
[09:48:04] <ehu> that's the one.
[09:48:15] <ehu> Dojo Toolkit, I think it is by its full name.
[09:49:07] <jame> I see that Debian has three packages for it. core, Digit, DojoX. v1.3 for squeeze. 1.7.2 for the rest..
[09:49:39] <jame> haven't checked Ubuntu yet...
[09:50:53] <ehu> I think we use parts of all of them.
[09:51:00] <ehu> at least core and dijit I know for sure.
[09:53:14] <jame> they're currently embedded?
[09:53:40] <ehu> in 1.4? yes.
[09:53:58] <jame> path?
[09:55:40] <ehu> UI/lib/
[09:56:01] <ehu> {dojo,dojox,dijit} (I think)
[09:58:04] <jame> I see 'em now. Bit more complex than with scriptaculous, but I should be do the same thing. (adding to my ToDo list for it)
[10:03:08] <jame> s/be do/be able to do/
[10:15:08] <ehu> right. do you know if the version(s) shipped in Debian (and derivatives) will be the minified versions?
[10:20:43] <jame> don't think so, but let me check...
[10:25:56] <jame> scriptaculous isn't...
[10:28:20] <ehu> ok. neither is ours, so there's no difference there.
[10:28:26] <ehu> Dojo is pretty big.
[10:28:35] <ehu> would be nice to have a minified version for that.
[10:32:48] <jame> some 43Mb... (just installed in my jessie chroot)...
[10:33:12] <jame> how much difference does it make, do you know?
[10:42:29] <jame> and aren't there apache modules for that? an same for web servers?
[10:42:48] <ehu> for dojo?
[10:43:02] <ehu> I think Dojo is 190MB non-minified
[10:43:10] <ehu> but I don't know where I got that from.
[10:43:30] <ehu> it's not possible to replace it by web-server modules, no.
[10:43:38] <ehu> it's a javascript library
[10:43:49] <ehu> which helps to create applications in webpages.
[10:45:46] <jame> mod_pagespeed, for instance. filter that auto minify the js libraries as they're downloaded the browser. Or so I understand...
[10:47:44] <jame> or is it mod_minify? (more research needed...)
[11:15:18] <ehu> mod_pagespeed, indeed.
[11:15:27] <ehu> https://developers.google.com/speed/pagespeed/module/filter-js-minify</ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu>

Related

Bugs: #1182

Discussion

  • John Locke

    John Locke - 2014-07-28

    For a long time, I've always built Dojo libraries using Dojo's build system to make a minified run-time. I just hadn't done this with Dojo's post 1.7 AMD syntax. Since then I have, so I just need to put together a package script and build this.

    The output of the build does contain the full source tree, but it adds "layers" that have packed and aggregated copies of the modules we choose to build into the layer, making for a much faster load time in the browser, while not really decreasing the disk footprint.

    My main question is whether we want to include the source at all. I'm thinking I'll add the main Dojo libraries as git submodules for the source file, create a layer file for the build, and add the "compiled" dojo build to the Ledger tree essentially where it is.

    That way a clone of LSMB should get everything needed to run, but if you want to develop/rebuild the JS files, you'll need to pull in the git submodules (git submodule init; git submodule update).

    Any objection to this approach?

     
    • Robert James Clay

      On Sun, Jul 27, 2014 at 8:40 PM, John Locke freelock@users.sf.net wrote:

      My main question is whether we want to include the source at all. I'm thinking I'll add the
      main Dojo libraries as git submodules for the source file, create a layer file for the build,
      and add the "compiled" dojo build to the Ledger tree essentially where it is.

      Is there an actual requirement of some sort to have it embedded and
      distributed with LSMB? I'd rather it just use the standard packages
      already available. (Influenced, I'll admit, by that I work and
      develop on Debian and "convenience" copies of code are against
      policy.)

      --
      Robert J. Clay
      rjclay@gmail.com

       
      • John Locke

        John Locke - 2014-08-03

        Hi, Robert,

        Dojo runs entirely in the browser. There's no standard way I know of
        provisioning a JS library on a server to deliver to a browser in all web
        applications running on a server -- even if we could rely on a standard
        URL pattern for loading JS libraries, you still have the problem of
        providing known working versions across all the web applications
        potentially in use on a server. The only practical way of shipping JS
        for a web application is to either use a CDN (which introduces a 3rd
        party dependency and NOT something I would want to see in a sensitive
        application like LSMB) or bundle it in the app.

        With Dojo, there's also a build process akin to compiling -- it strips
        out whitespace, shortens variable names, packs it all into a much
        smaller footprint with many fewer http requests. To get the best result,
        you create a build containing only the widgets the specific application
        uses -- strike a balance between including what you use and excluding
        everything else.

        I'm proposing shipping the built copy of the code in our tarballs, and
        leaving out the full source (although the built copies do include a full
        source tree -- the builds are "layers" that can still pull in code if
        needed). And then include the actual source tree as a git submodule, so
        any contributor can pull it in to add to the build layer.

        Cheers,
        John

        On 08/01/2014 09:18 AM, Robert James Clay wrote:

        On Sun, Jul 27, 2014 at 8:40 PM, John Locke freelock@users.sf.net
        freelock@users.sf.net wrote:

        My main question is whether we want to include the source at all.
        I'm thinking I'll add the
        main Dojo libraries as git submodules for the source file, create
        a layer file for the build,
        and add the "compiled" dojo build to the Ledger tree essentially
        where it is.
        

        Is there an actual requirement of some sort to have it embedded and
        distributed with LSMB? I'd rather it just use the standard packages
        already available. (Influenced, I'll admit, by that I work and
        develop on Debian and "convenience" copies of code are against
        policy.)

        --
        Robert J. Clay
        rjclay@gmail.com


        [bugs:#1182] http://sourceforge.net/p/ledger-smb/bugs/1182 Dojo
        Toolkit not up to date, minified

        Status: open
        Group: 1.4
        Created: Mon Jul 28, 2014 12:35 AM UTC by John Locke
        Last Updated: Mon Jul 28, 2014 12:40 AM UTC
        Owner: John Locke

        From IRC:

        [09:42:46] btw; dojo?
        [09:42:55] <ehu> 1.4.0
        [09:43:22] <ehu> 1.4.0 uses dojo, not scriptaculous
        [09:46:31] ah. " Modular JavaScript toolkit" ?
        [09:48:04] <ehu> that's the one.
        [09:48:15] <ehu> Dojo Toolkit, I think it is by its full name.
        [09:49:07] I see that Debian has three packages for it. core,
        Digit, DojoX. v1.3 for squeeze. 1.7.2 for the rest..
        [09:49:39] haven't checked Ubuntu yet...
        [09:50:53] <ehu> I think we use parts of all of them.
        [09:51:00] <ehu> at least core and dijit I know for sure.
        [09:53:14] they're currently embedded?
        [09:53:40] <ehu> in 1.4? yes.
        [09:53:58] path?
        [09:55:40] <ehu> UI/lib/
        [09:56:01] <ehu> {dojo,dojox,dijit} (I think)
        [09:58:04] I see 'em now. Bit more complex than with
        scriptaculous, but I should be do the same thing. (adding to my ToDo
        list for it)
        [10:03:08] s/be do/be able to do/
        [10:15:08] <ehu> right. do you know if the version(s) shipped in
        Debian (and derivatives) will be the minified versions?
        [10:20:43] don't think so, but let me check...
        [10:25:56] scriptaculous isn't...
        [10:28:20] <ehu> ok. neither is ours, so there's no difference there.
        [10:28:26] <ehu> Dojo is pretty big.
        [10:28:35] <ehu> would be nice to have a minified version for that.
        [10:32:48] some 43Mb... (just installed in my jessie chroot)...
        [10:33:12] how much difference does it make, do you know?
        [10:42:29] and aren't there apache modules for that? an same
        for web servers?
        [10:42:48] <ehu> for dojo?
        [10:43:02] <ehu> I think Dojo is 190MB non-minified
        [10:43:10] <ehu> but I don't know where I got that from.
        [10:43:30] <ehu> it's not possible to replace it by web-server
        modules, no.
        [10:43:38] <ehu> it's a javascript library
        [10:43:49] <ehu> which helps to create applications in webpages.
        [10:45:46] mod_pagespeed, for instance. filter that auto
        minify the js libraries as they're downloaded the browser. Or so I
        understand...
        [10:47:44] or is it mod_minify? (more research needed...)
        [11:15:18] <ehu> mod_pagespeed, indeed.
        [11:15:27] <ehu>
        https://developers.google.com/speed/pagespeed/module/filter-js-minify</ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu></ehu>


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/ledger-smb/bugs/1182/
        https://sourceforge.net/p/ledger-smb/bugs/1182

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/
        https://sourceforge.net/auth/subscriptions

         

        Related

        Bugs: #1182

        • Robert James Clay

          John,

          Sorry for the delay in my reply...

          On Sun, Aug 3, 2014 at 11:28 AM, John Locke mail@freelock.com wrote:

          Dojo runs entirely in the browser. There's no standard way I know of
          provisioning a JS library on a server to deliver to a browser in all web
          applications running on a server -- even if we could rely on a standard URL
          pattern for loading JS libraries, you still have the problem of providing
          known working versions across all the web applications potentially in use on
          a server.

          That rather depends on the system being used... On Debian & its
          derivatives, for instance; standard JavaScript debian packages
          install to, and are made available from (at least for Apache),
          a sub-directory in /usr/share/javascript named after the package.

          Dojo v1.10 is what is now (as of 8/27) in Debian testing... There had been
          issue(s) with building the package but with the new version that
          apparently was resolved in favor of using nodejs for it.

           
  • Chris Travers

    Chris Travers - 2014-08-27

    This doesn't have to be distributed with ledgersmb given that some people may want to get it from the distro. I have no problem with the link being replaced by a symlink to a shared js location during packaging.

    The question is what we want to install with the tarball. The reason for bundling dojo is that it gives us a little more control over what people get when they install from source. This decision was made based on security-minded reasoning but it isn't clear to me right now whether it is the right decision. It might be better to have a script which downloads and unpacks?

     
  • Chris Travers

    Chris Travers - 2014-09-03

    I will be looking into how to work better with debian packaging as well. I am assuming that symlinks to the debian install of dojo is either not acceptable or suboptimal. There may however be some difficulties because of the fact that we have some dojo widgets we have written.

     
    • Robert James Clay

      On Wed, Sep 3, 2014 at 4:02 AM, Chris Travers wrote:

      I will be looking into how to work better with debian packaging as well. I am
      assuming that symlinks to the debian install of dojo is either not acceptable
      or suboptimal.

      Why would that be?

      There may however be some difficulties because of the fact that we have some
      dojo widgets we have written.

      Well, how do they use dojo? (I'll admit I'm not very familiar with it yet..)

       
      • Chris Travers

        Chris Travers - 2014-09-04

        Why would that be?

        I don;t know if it adds to maintenance headaches of anything ever moves. However you can just drop the UI/lib/dojo and instead symlink it to /usr/share/javascript if you want (that would be easiest and not require any changes to our code).

        I think you'd want to make ledgersmb dependent on libjs-dojo-core libjs-dojo-dijit libjs-dojo-dojox

         
  • Anonymous

    Anonymous - 2015-06-23

    In sofar as that this item was related to creating Debian packages, I think this item has been resolved: Debian replaces the embedded Dojo version with a link to Dojo from the Debian packages.

     
  • Anonymous

    Anonymous - 2015-06-23
    • status: open --> pending-fixed
    • Version: --> 1.2
     
    • Chris Travers

      Chris Travers - 2015-06-24

      yeah, let's close it for now.

      I think we do need a build system but that's another topic.

      On Tue, Jun 23, 2015 at 2:17 PM, Erik Huelsmann ehuelsmann@users.sf.net wrote:

      status: open --> pending-fixed
      Version: --> 1.2
      Comment:

      The debian issue being fixed, I wonder if we should leave this open much
      longer.

      The item John reports isn't easy to fix: we don't have a build, so we don't
      have a good time to introduce the minification step. I'm guessing that
      what's left here should be taken out and moved to "development tasks" -- the
      creation of a build system/step.


      [bugs:#1182] Dojo Toolkit not up to date, minified

      Status: pending-fixed
      Group: 1.4
      Created: Mon Jul 28, 2014 12:35 AM UTC by John Locke
      Last Updated: Tue Jun 23, 2015 09:15 PM UTC
      Owner: John Locke

      From IRC:

      [09:42:46] <jame> btw; dojo?
      [09:42:55] <ehu> 1.4.0
      [09:43:22] <ehu> 1.4.0 uses dojo, not scriptaculous
      [09:46:31] <jame> ah. " Modular JavaScript toolkit" ?
      [09:48:04] <ehu> that's the one.
      [09:48:15] <ehu> Dojo Toolkit, I think it is by its full name.
      [09:49:07] <jame> I see that Debian has three packages for it. core, Digit,
      DojoX. v1.3 for squeeze. 1.7.2 for the rest..
      [09:49:39] <jame> haven't checked Ubuntu yet...
      [09:50:53] <ehu> I think we use parts of all of them.
      [09:51:00] <ehu> at least core and dijit I know for sure.
      [09:53:14] <jame> they're currently embedded?
      [09:53:40] <ehu> in 1.4? yes.
      [09:53:58] <jame> path?
      [09:55:40] <ehu> UI/lib/
      [09:56:01] <ehu> {dojo,dojox,dijit} (I think)
      [09:58:04] <jame> I see 'em now. Bit more complex than with scriptaculous,
      but I should be do the same thing. (adding to my ToDo list for it)
      [10:03:08] <jame> s/be do/be able to do/
      [10:15:08] <ehu> right. do you know if the version(s) shipped in Debian (and
      derivatives) will be the minified versions?
      [10:20:43] <jame> don't think so, but let me check...
      [10:25:56] <jame> scriptaculous isn't...
      [10:28:20] <ehu> ok. neither is ours, so there's no difference there.
      [10:28:26] <ehu> Dojo is pretty big.
      [10:28:35] <ehu> would be nice to have a minified version for that.
      [10:32:48] <jame> some 43Mb... (just installed in my jessie chroot)...
      [10:33:12] <jame> how much difference does it make, do you know?
      [10:42:29] <jame> and aren't there apache modules for that? an same for web
      servers?
      [10:42:48] <ehu> for dojo?
      [10:43:02] <ehu> I think Dojo is 190MB non-minified
      [10:43:10] <ehu> but I don't know where I got that from.
      [10:43:30] <ehu> it's not possible to replace it by web-server modules, no.
      [10:43:38] <ehu> it's a javascript library
      [10:43:49] <ehu> which helps to create applications in webpages.
      [10:45:46] <jame> mod_pagespeed, for instance. filter that auto minify the
      js libraries as they're downloaded the browser. Or so I understand...
      [10:47:44] <jame> or is it mod_minify? (more research needed...)
      [11:15:18] <ehu> mod_pagespeed, indeed.
      [11:15:27] <ehu>
      https://developers.google.com/speed/pagespeed/module/filter-js-minify</ehu></ehu></jame></jame></ehu></ehu></ehu></ehu></ehu></ehu></jame></jame></jame></ehu></ehu></ehu></jame></jame></ehu></jame></jame></ehu></ehu></jame></ehu></jame></ehu></ehu></jame></jame></ehu></ehu></jame></ehu></ehu></jame>


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/ledger-smb/bugs/1182/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1182

  • Anonymous

    Anonymous - 2015-06-23

    The debian issue being fixed, I wonder if we should leave this open much longer.

    The item John reports isn't easy to fix: we don't have a build, so we don't have a good time to introduce the minification step. I'm guessing that what's left here should be taken out and moved to "development tasks" -- the creation of a build system/step.

     
  • Robert James Clay

    For the Debian package builds: attempting to set up the sym links like was done for the scriptaculous javascript libraries has not been working, because things like the .js.uncompressed.js files are still not getting sym linked and are still ending up causing lintian issues like the following:

    P: ledgersmb source: source-contains-prebuilt-javascript-object UI/lib/dojo/dojox/gfx.js mean line length is about 7748 characters
    O: ledgersmb source: source-is-missing UI/lib/dojo/dojox/gfx.js

    What I'm trying for now is repacking the source archive with the embedded dojo directories excluded altogether, and having the packaging install the three sym links to them as installed by their debian packages. (If that works well enough; I'll just need to set up a process that can download a source archive, check the pgp signature of the archive, and then repack it without the dojo directories.)

     
  • Anonymous

    Anonymous - 2015-08-09

    Hi Jame,

    Can we close this? Been a long time again...

    Also, I'd rather remove the dependencies from our tree/archive entirely, if you're telling me the debian packaging process currently suffers from the fact that we currently have them in our tree/package.

    (Maybe we need to add a separate package or a package for other download purposes with the dependencies, but if we add dojo, then why don't we add TeX or any of the other required Perl packages?)

    Regards,

    Erik.

     
  • Robert James Clay

    Can we close this? Been a long time again...

    Yes, I think so.

    Also, I'd rather remove the dependencies from our tree/archive entirely,

    Well, I agree that's the best way to go.

    if you're telling me the debian packaging process currently suffers from the fact that we currently have them in our tree/package.

    OTH; it's not that hard to create a debian 'orig' source archive without the problem files, though it's not as easy as simply renaming it.

     
  • Chris Travers

    Chris Travers - 2015-10-17

    Due to the need for a longer-term permanent solution, moving this to github

     
  • Chris Travers

    Chris Travers - 2015-10-17
    • status: pending-fixed --> closed-duplicate
     
MongoDB Logo MongoDB