Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Javascript Source Maps support

    Our app currently uses hundreds of small ("developer manageable") Javascript files.

    Unfortunately, having so many files loaded by the client involves a lot of network overhead on the wire to communicate with the server.

    We're looking into minifying our JS files into a single large file using the "Closure compiler" (https://developers.google.com/closure/compiler/) so we can have access to "Javascript Source Maps". To us, that would seem like the best of both worlds: always compact yet debuggable if/when needed.

    I'd like to know if there are best practices we could adhere to in order to have "Closure Compiler" and Smartclient co-habit together.

    Thanks !

    Version: SmartClient 9.1p

    #2
    We wouldn't recommend this yet, as JavaScript Source Maps aren't widely supported yet, so this makes things quite a bit harder to debug.

    Instead, there are many other tools to pick from that merely combine files together, and have various options for stripping whitespace or applying obfuscation without radically modifying the structure of the code.

    Comment


      #3
      Can you provide details about what tool (and options) you use to minify SmartClient's production version ?

      Are there tools we should not use because other people on the forum reported problem when combining this with SmartClient ?

      I'm looking for best practices to make sure what we do will not conflict with SmartClient's production code.

      Thanks in advance.

      -C

      Comment


        #4
        We use the FileAssembler, which is a documented feature of SmartClient (Power Edition or better) which you can use as well.

        There are a variety of free tools as well. We can't really recommend any particular tool.

        Note that we were not saying the Closure "conflicts" with SmartClient production code, it just complicates debugging *of your own code* in a way that we feel is not currently worth the benefits. It may become worth the benefits once Source Maps are more widely supported.

        Comment


          #5
          Originally posted by couimet View Post
          Our app currently uses hundreds of small ("developer manageable") Javascript files.

          Unfortunately, having so many files loaded by the client involves a lot of network overhead on the wire to communicate with the server.

          We're looking into minifying our JS files into a single large file using the "Closure compiler" (https://developers.google.com/closure/compiler/) so we can have access to "Javascript Source Maps". To us, that would seem like the best of both worlds: always compact yet debuggable if/when needed.
          We use the FileAssembler, which is a documented feature of SmartClient (Power Edition or better) which you can use as well.

          There are a variety of free tools as well. We can't really recommend any particular tool.

          Note that we were not saying the Closure "conflicts" with SmartClient production code, it just complicates debugging *of your own code* in a way that we feel is not currently worth the benefits. It may become worth the benefits once Source Maps are more widely supported.
          I have the same issue, however the I have no idea about which free tool to use, can you give a suggestion?

          Comment

          Working...
          X