Re: The future of gitweb - part 2: JavaScript
From: Pau Garcia i Quiles <hidden>
Date: 2016-06-15 22:51:03
On Sun, Apr 17, 2011 at 4:59 PM, Jakub Narebski [off-list ref] wrote:
quoted
My suggestion is going to be tremendously unpopular, but still: if I were to develop my own gitweb, I'd use Wt ( http://webtoolkit.eu ) + libgit2. In fact, there is a very basic gitweb-like example bundled with Wt sources, it's available online at http://www.webtoolkit.eu/wt/examples/gitWell, nothing prevents you or anybody else from writing (yet another) web interface in C++ + Wt + libgit2.
I do not have the slightest intention of doing that, at least not in my spare time. The existing interfaces (gitweb, cgit, etc) are good enough for me. I made the suggestion of going with Wt just in case a rewrite of gitweb was in mind.
Gitweb has the advantage that if you can install git, and you have web server with CGI support, you can install and run gitweb. First part of series was about relaxing this "no non-core dependencies required" requirement. Requiring to install C++ / libstdc++, Boost and Wt...
Sure, that's why I mentioned the dependencies. No dependencies is a major feature in itself in some environments.
BTW. do I understand correctly that Wt generates JavaScript code, in similar vein to GWT for Java, or Pyjamas for Python?
Wt generates Javascript only if the visitor has Javascript enabled. If
Javascript is not available, it will generate plain HTML pages, with
"update" buttons, etc and it will do that automatically: there is no
need for you to write code "if Javascript is available { ... } else {
... }".
The advantage of Wt is you can compile a hypothetical gitwebwt as a
static executable and the result will be a single executable file that
depends only on libc (or libc + git, if you call git instead of
linking to libgit.a or libgit2). Also, performance and memory
requirements are very good, which is important for not-that-powerful
devices such as routers, etc.
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)