git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: The future of gitweb - part 2: JavaScript

From
Ddavid@lang.hm <david@lang.hm>
Date
Apr 15, 2011, 01:56 UTC
Message-ID
<alpine.DEB.2.00.1104141854210.13309@asgard.lang.hm>
In-Reply-To
<BANLkTik1dZ-_DGmj70=-+9j0EsUQZ=BbaQ@mail.gmail.com>
On Thu, 14 Apr 2011, Micha? ?owicki wrote:
Show 47 quoted lines
> 2011/4/14 Jakub Narebski <jnareb@gmail.com>:
>>
>> Second issue is how to use it / how to include it:
>>
>> * Use some external Content Delivery Network (CDN), like
>>  Google Libraries API
>>     http://code.google.com/apis/libraries/devguide.html
>>  e.g.:
>>
>>  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
>>  <script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
>>
>>  or
>>
>>  <script src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.1/mootools-yui-compressed.js"></script>
>>
>>  This is nice solution... if we don't need plugin / extension
>>  which usually are not available in CDN version of library.
>>
>>  Also this makes gitweb dependent on third-party service, and require
>>  network connectivity to Internet to have access to JavaScript-based
>>  features.
>>
>> * Mark appropriate JavaScript library as dependency in gitweb/INSTALL
>>  to be downloaded in appropriate place but do not provide sources.
>>  Perhaps add target in gitweb/Makefile that automatically downloads
>>  it.
>>
>>  This would make installing gitweb correctly more complicated.
>>  JavaScript-based features would not work if somebody instals gitweb
>>  incorrectly.
>>
>>  I think we can set up gitweb build so that one can configure at
>>  build stage whether to use CDN or download library, or use
>>  pre-downloaded (and perhaps instaled somewhere) version of framework
>>  (combining JavaScript on build in all but first case).
>
> I'm not sure about pre-downloaded version of libs. Most of the time
> it's not a big deal but sometimes it may introduce hard to detect
> issues when someone use different version of the lib -
> http://ejohn.org/blog/learning-from-twitter/ .But the idea with
> options - CDN or download is very good. CDNs can improve the page
> download speed by increasing simultaneous connections if files are
> downloaded from many hostnames but for companies where instances of
> gitweb are on the Intrantet the 2nd option could be better I think (at
> least in my case). Additionaly CDNs can save some money when you pay
> for data traffic :)

another advantage of using the library from a CDN is that the user may already have it cached in their browser and not have to download it at all.

as long as there is a build-time option to make a version that does not depend on being able to get to the Internet I think it's a good idea to make the default use the Internet.

David Lang
Previous: Michał ŁowickiNext: Peter Vereshagin
Message 10 of 30 in “The future of gitweb (long term goals)”
  1. Jakub NarebskiFeb 14, 2011
  2. Michael J GruberFeb 15, 2011
  3. Jakub NarebskiFeb 21, 2011
  4. Michael J GruberFeb 23, 2011
  5. The future of git-instaweb (was: Re: The future of gitweb (long term goals))Jakub Narebski, Feb 25, 2011
  6. Ævar Arnfjörð BjarmasonFeb 22, 2011
  7. Jakub NarebskiFeb 22, 2011
  8. The future of gitweb - part 2: JavaScriptJakub Narebski, Apr 14, 2011
  9. Michał ŁowickiApr 14, 2011
  10. david@lang.hmApr 15, 2011
  11. Peter VereshaginApr 16, 2011
  12. Jakub NarebskiApr 16, 2011
  13. Peter VereshaginApr 16, 2011
  14. Jakub NarebskiApr 16, 2011
  15. Peter VereshaginApr 16, 2011
  16. Jakub NarebskiApr 16, 2011
  17. Jakub NarebskiApr 16, 2011
  18. Peter VereshaginApr 16, 2011
  19. Jakub NarebskiApr 17, 2011
  20. Gitweb != HTTP back-end {Was: Re: The future of gitweb - part 2: JavaScript}Drew Northup, Apr 20, 2011
  21. Jakub NarebskiApr 20, 2011
  22. Pau Garcia i QuilesApr 16, 2011
  23. Jakub NarebskiApr 17, 2011
  24. Pau Garcia i QuilesApr 17, 2011
  25. Jakub NarebskiApr 18, 2011
  26. Petr BaudisApr 17, 2011
  27. Jakub NarebskiApr 18, 2011
  28. Petr BaudisApr 18, 2011
  29. Jakub NarebskiApr 18, 2011
  30. Drew NorthupApr 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.