From Fedora Project Wiki

No edit summary
(Reformat, replies, more questions)
Line 1: Line 1:
dmalcolm 2008-07-21: I've submitted a jsmin package for review as: https://bugzilla.redhat.com/show_bug.cgi?id=455507
= Packages =


The following metadata was found in MoinMoin that could not be converted
* I've submitted a jsmin package for review as: https://bugzilla.redhat.com/show_bug.cgi?id=455507 --dmalcolm 2008-07-21
to a useful value in MediaWiki:
** This will help us to compress javascript files from within Fedora. --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)


* : Apache config file to load MochiKit from /MochiKit/
* I've submitted jquery: https://bugzilla.redhat.com/show_bug.cgi?id=457343 --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)


= Issues =
== mootools ==
mootools is much better now; there are direct download links for the "enchilada" builds, but projects are still encouraged to use the customizer to build just what they need.  In many ways this makes sense, because these files may be sent to millions of clients, but it doesn't get along with general packaging.
mootools is much better now; there are direct download links for the "enchilada" builds, but projects are still encouraged to use the customizer to build just what they need.  In many ways this makes sense, because these files may be sent to millions of clients, but it doesn't get along with general packaging.


One possibility would simply be to carry a couple of customized versions as needed by other packages if there's actually a real space savings.
One possibility would simply be to carry a couple of customized versions as needed by other packages if there's actually a real space savings. --Tibbs 00:11, 10 August 2008 (UTC)
 
I don't like having multiple versions but I can't think of a ready alternative.  There are javascript frameworks to specify a set of javascript files that you need and while developing they are separate files but when you deploy they are made into a single compressed file transparent to your code.  Maybe in the future someone who cares can look into tying this into a dynamic program of some sort.  Not for us to do now, though. --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)
 
== Naming ==
* Do we need a naming standard for various compressed versions? --Tibbs 00:11, 10 August 2008 (UTC)
** Definitely.  Should we just make up extensions as we add "compressed" versions?  MAINFILE-COMPRESSIONMETHOD.js.  ex: jquery.js => jquery-min.js This means that we'd have to have some registry of compression methods. --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)
 
* If multiple versions (say, of mootools with different modules enabled), do we need a naming standard for that? --Tibbs 00:11, 10 August 2008 (UTC)
** This one's harder.  Does upstream have a name for these or is everything just "mootools.js"? --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)
 
* Do we need a naming prefix like perl, python, etc?  javascript-jquery, for instance. --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)
 
== Compression ==
* Do we need to generate the compressed versions ourselves, or is it permissible to get them from upstream? --Tibbs 00:11, 10 August 2008 (UTC)
** I vote that we have to do it ourselves.  it's not immediately discernable what the code is doing once it's been compressed so it's better to treat it as non-source at that point. --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)
 
== Versioning ==
* I think it's obvious that we'll soon run into the problem of different packages needing different javascript library versions, since upstreams expect packages to simply code to the version that they copied.  Should we consider having multiple upstream versions in one package as necessary, or would we force them to be in different packages? --Tibbs 00:11, 10 August 2008 (UTC)
** Do we want to encourage multi-versioning?  Having multiple versions means if we have a security issue, we end up having to look for and patch the problems in all versions instead of letting upstream do the work on their trunk and then shipping the latest version.  I think we want to get upstreams to be better about tracking the latest versions of the javascript libraries just like we try to port code to newer versions of C libraries....  Since this is going to have short term pain, we should allow multiple versions but not make it easy. --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)


Some questions:
* When we have to have separate versions, I'd put them into separate subdirectories ie: jquery-1.2/jquery.js jquery-1.3/jquery.js --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)
* Do we need a naming standard for various compressed versions?
* Do we need to generate the compressed versions ourselves, or is it permissible to get them from upstream?
* If multiple versions (say, of mootools with different modules enabled), do we need a naming standard for that?
* I think it's obvious that we'll soon run into the problem of different packages needing different javascript library versions, since upstreams expect packages to simply code to the version that they copied. Should we consider having multiple upstream versions in one package as necessary, or would we force them to be in different packages?


Also, some projects like zoneminder actually want to see the javascript files located in their web space.  Should it be permissible to symlink to the files as necessary instead of coding things such that clients are diverted to the specific /js web space for those files?
== Symlinking ==
* Also, some projects like zoneminder actually want to see the javascript files located in their web space.  Should it be permissible to symlink to the files as necessary instead of coding things such that clients are diverted to the specific /js web space for those files? --Tibbs 00:11, 10 August 2008 (UTC)
** I think symlinks are fine at this point.  If the idea of putting javascript into specific places catches on with other distros this might be something to reconsider. --[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)


  - [[User:Tibbs|Tibbs]] 00:11, 10 August 2008 (UTC)
== Plugins ==
* While packaging jquery I realized that some frameworks have lots of plugins. This guideline implies that those plugins will need to be put in separate packages.  I think this is good as the licensing and security considerations are still there but it is a source of inefficiency since we'll have a lot of spec files that do nothing but:
  install -p %{SOURCE0} %{_datadir}/jquery/plugins/jscalendar.js}}}
--[[User:Toshio|abadger1999]] 00:48, 11 August 2008 (UTC)

Revision as of 00:48, 11 August 2008

Packages

Issues

mootools

mootools is much better now; there are direct download links for the "enchilada" builds, but projects are still encouraged to use the customizer to build just what they need. In many ways this makes sense, because these files may be sent to millions of clients, but it doesn't get along with general packaging.

One possibility would simply be to carry a couple of customized versions as needed by other packages if there's actually a real space savings. --Tibbs 00:11, 10 August 2008 (UTC)

I don't like having multiple versions but I can't think of a ready alternative. There are javascript frameworks to specify a set of javascript files that you need and while developing they are separate files but when you deploy they are made into a single compressed file transparent to your code. Maybe in the future someone who cares can look into tying this into a dynamic program of some sort. Not for us to do now, though. --abadger1999 00:48, 11 August 2008 (UTC)

Naming

  • Do we need a naming standard for various compressed versions? --Tibbs 00:11, 10 August 2008 (UTC)
    • Definitely. Should we just make up extensions as we add "compressed" versions? MAINFILE-COMPRESSIONMETHOD.js. ex: jquery.js => jquery-min.js This means that we'd have to have some registry of compression methods. --abadger1999 00:48, 11 August 2008 (UTC)
  • If multiple versions (say, of mootools with different modules enabled), do we need a naming standard for that? --Tibbs 00:11, 10 August 2008 (UTC)
    • This one's harder. Does upstream have a name for these or is everything just "mootools.js"? --abadger1999 00:48, 11 August 2008 (UTC)
  • Do we need a naming prefix like perl, python, etc? javascript-jquery, for instance. --abadger1999 00:48, 11 August 2008 (UTC)

Compression

  • Do we need to generate the compressed versions ourselves, or is it permissible to get them from upstream? --Tibbs 00:11, 10 August 2008 (UTC)
    • I vote that we have to do it ourselves. it's not immediately discernable what the code is doing once it's been compressed so it's better to treat it as non-source at that point. --abadger1999 00:48, 11 August 2008 (UTC)

Versioning

  • I think it's obvious that we'll soon run into the problem of different packages needing different javascript library versions, since upstreams expect packages to simply code to the version that they copied. Should we consider having multiple upstream versions in one package as necessary, or would we force them to be in different packages? --Tibbs 00:11, 10 August 2008 (UTC)
    • Do we want to encourage multi-versioning? Having multiple versions means if we have a security issue, we end up having to look for and patch the problems in all versions instead of letting upstream do the work on their trunk and then shipping the latest version. I think we want to get upstreams to be better about tracking the latest versions of the javascript libraries just like we try to port code to newer versions of C libraries.... Since this is going to have short term pain, we should allow multiple versions but not make it easy. --abadger1999 00:48, 11 August 2008 (UTC)
  • When we have to have separate versions, I'd put them into separate subdirectories ie: jquery-1.2/jquery.js jquery-1.3/jquery.js --abadger1999 00:48, 11 August 2008 (UTC)

Symlinking

  • Also, some projects like zoneminder actually want to see the javascript files located in their web space. Should it be permissible to symlink to the files as necessary instead of coding things such that clients are diverted to the specific /js web space for those files? --Tibbs 00:11, 10 August 2008 (UTC)
    • I think symlinks are fine at this point. If the idea of putting javascript into specific places catches on with other distros this might be something to reconsider. --abadger1999 00:48, 11 August 2008 (UTC)

Plugins

  • While packaging jquery I realized that some frameworks have lots of plugins. This guideline implies that those plugins will need to be put in separate packages. I think this is good as the licensing and security considerations are still there but it is a source of inefficiency since we'll have a lot of spec files that do nothing but:
 install -p %{SOURCE0} %{_datadir}/jquery/plugins/jscalendar.js}}}

--abadger1999 00:48, 11 August 2008 (UTC)