git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Sam Vilain <sam@vilain.net>
Cc: Christian Couder <chriscool@tuxfamily.org>,
	Petr Baudis <pasky@ucw.cz>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Shawn O Pearce <spearce@spearce.org>,
	Scott Chacon <schacon@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	John Hawley <warthog9@eaglescrag.net>,
	git@vger.kernel.org
Subject: Re: [spf:guess,iffy] Re: "Integrated Web Client for git" GSoC proposal
Date: Fri, 16 Apr 2010 11:18:30 +0200	[thread overview]
Message-ID: <201004161118.32163.jnareb@gmail.com> (raw)
In-Reply-To: <1271293123.6248.147.camel@denix>

On Thu, 15 April 2010, Sam Vilain wrote:
> On Thu, 2010-04-15 at 02:04 +0200, Jakub Narebski wrote:

> > gitweb was and is meant to be simple, easy to install git web interface
> > (single script + some static files), with minimal dependencies outside
> > Perl core, and running with as old Perl as feasible (good Unicode support
> > is requirement that forces minimal Perl version).

By the way, is the above statement correct?  What should be the *goal*
for gitweb?  Is it running on oldest Perl possible (which IIRC is Perl
5.8.6, because gitweb needs good Unicode support)?  Is it minimal 
required non-core dependencies (core as of Perl 5.8.6)?  Is it being
easy to install (single monolithic script + some minimal number of static
files like CSS, JavaScript, images + perhaps extra files with optional
features like output caching) by hand?  Is it being easy to configure
by hand?

With local::lib it is easy to install Perl modules from CPAN locally
(in home directory), so perhaps we could ease on minimal dependencies
rule.  On the other hand gitweb is web app, and one would have to be
able to configure web server to use locally installed Perl modules,
which might be not possible; this swicthes the problem from "not being
able to install Perl modules as non-root" to "not being able to install
Perl modules that web server can use without help from sysadmin".


One of requirements is backwards compatibility of gitweb links (URLs),
both query string based, and path_info URLs.  Yet another is ability
to *scan* for projects (this is IIRC requirement for git.kernel.org),
rather than using project index file (perhaps (re)generated 
(semi)automatically).

> > 
> > Gitalist requires Catalyst web framework, which while it is (one of)
> > modern Perl web frameworks is not exactly lightweight.
> 
> Ok, I just re-checked the dependencies and my assertion that a pure-perl
> Gitalist would be possible is indeed wrong.  It certainly is though with
> very lightweight frameworks like CGI::Application.  If you are splitting
> the script up, all the best to you, but please do consider something
> like that rather than re-inventing the wheel!

There exists very many web frameworks in Perl[1][2][3][4]: Catalyst
(one of more popular, used by Gitalist), Jifty, CGI::Application (and
its offshot Titanium), Mojolicus, Dancer, Squatting, Web::Simple,...

Nowadays many (all mentioned) of those web frameworks are either built
on top of PSGI / Plack (Perl Superglue for Web Frameworks and Web Servers),
or have PSGI / Plack adapter (see http://plackperl.org).  So another
solution would be to use bare-bones Plack instead of CGI with help
of CGI.pm, perhaps also using one of URI dispatchers[5][6].  Plack/PSGI
looks like the future of Perl web scripting... but is currently quite new,
at version 0.9930.

[1]: http://www.perlfoundation.org/perl5/index.cgi?web_frameworks
[2]: http://plackperl.org/ ("Frameworks" section)
[3]: http://perl.worldken.org/search?q=web+framework
[4]: http://search.cpan.org/search?query=web+framework&mode=all

[5]: http://www.perlfoundation.org/perl5/index.cgi?web_application_dispatchers
[6]: http://github.com/miyagawa/plack-dispatching-samples


As to splitting gitweb into smaller modules (like e.g. SVN::Web)...
Gitweb isn't the largest script in git sources: gitk is.  But splitting
gitk should be much easier - git-gui is already split.  Close after
gitweb is git-svn, which probably also need splitting; and again it
would be easier to split parts of git-svn e.g into Git::SVN module,
as git-svn already depends on Git.pm.

The trouble with splitting is installing split web script.  I have no
idea how to do this in cross-webserver way, cross-distribution and
cross-system way (the filesystem hierarchy used by web server may
differ from distribution to distribution, and from operating system
to operating system).

-- 
Jakub Narebski
Poland

       reply	other threads:[~2010-04-16  9:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201004130403.42179.chriscool@tuxfamily.org>
     [not found] ` <201004150204.42813.jnareb@gmail.com>
     [not found]   ` <1271293123.6248.147.camel@denix>
2010-04-16  9:18     ` Jakub Narebski [this message]
2010-04-17  3:09       ` [spf:guess,iffy] Re: "Integrated Web Client for git" GSoC proposal Sam Vilain
2010-04-17  6:27         ` Tatsuhiko Miyagawa
     [not found]           ` <r2we72faaa81004170021z9920e6e9k4c3aa06fe46431b0@mail.gmail.com>
2010-04-17  7:22             ` Fwd: " Pavan Kumar Sunkara
2010-04-17 12:53               ` Jakub Narebski
2010-04-17 12:50           ` [spf:guess,iffy] " Jakub Narebski
2010-04-17  9:54         ` Jakub Narebski
     [not found] ` <20100414110242.GZ3533@machine.or.cz>
     [not found]   ` <7vvdbuqh2c.fsf@alter.siamese.dyndns.org>
2010-04-16 13:03     ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004161118.32163.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pasky@ucw.cz \
    --cc=sam@vilain.net \
    --cc=schacon@gmail.com \
    --cc=spearce@spearce.org \
    --cc=srabbelier@gmail.com \
    --cc=warthog9@eaglescrag.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).