From: Jakub Narebski <jnareb@gmail.com>
To: jaseem abid <jaseemabid@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: GSOC Proposal.
Date: Tue, 27 Mar 2012 13:47:55 +0100 [thread overview]
Message-ID: <201203271447.58519.jnareb@gmail.com> (raw)
In-Reply-To: <CAH-tXsAY0GErMAwi_TMaq0S4GuGx-OcPtEkJnXNqfGEyQq44_A@mail.gmail.com>
On Tue, 27 Mar 2012, jaseem abid wrote:
> Hello everyone,
>
> I am interested in participating in GSoC 2012. I have gone through the
> ideas page and mailing list archives by now. I would like to suggest a
> new approach for the git instaweb rather than just JavaScript rewrite,
> which i believe can improve the overall quality of the software.
First of all, it is _gitweb_ that is git web interface subsystem.
git-instaweb is the name of script that runs gitweb (using available
web server, including apache, lighttpd, webrick and plackup) and by
default also start web browser opening gitweb, for a repository you
are in. This is important difference.
For the rest I'll assume s/instaweb/gitweb/.
Second, the proposed "Use JavaScript library / framework in gitweb"
project has the advantage of being possible to be done in incremental
improvements (even without expanding client-side scripting in gitweb,
i.e. adding new features possible with using JavaScript library),
rather than all-or-nothing complete rewrite. The potential for failure
is much higher in "rewrite" project.
It is nice that there is a would-be prospective student that proposes
his own blue-sky idea of a project. The projects listed on
https://github.com/peff/git/wiki/SoC-2012-Ideas
were meant to be only _example_ ideas.
> Data and presentation are too tightly bound in the current code base of
> gitweb. CSS classes are hard coded in the Perl script and it makes
> further development difficult and is considered to be a bad practice
> generally.
Separation of content and presentation is considered a good practice,
but it would require in my opinion heavy rewrite to use one of existing
Perl web (micro)frameworks[1] rather than pure old CGI.pm and hand-crafted
code plus some templating engine[2]. This is IMVHO too much work to do
in a single Google Summer of Code.
Though rewriting gitweb using Perl web framework / creating new web
interface based on gitweb could be a good GSoC project. The problem
might be with selecting self contained set of work that can be done
in time available for GSoC.
Also there is advantage in gitweb using only minimal number of non-core
required Perl modules. There is always Gitalist, a git web interface
written using Catalyst MVC framework (based originally on some old gitweb
code, much extended since).
[1] For example one of modern PSGI-based microframeworks like Dancer
or Mojolicious.
[2] For example Template::Toolkit, or HTML::Zoom, or Template::Declare.
> Presentable HTML is the only output from gitweb as of now that
> can't be used by anything other than a browser.
It doesn't make much sense to use in something other than a browser.
_What_ other use do you think about?
YAGNI, and don't overengineer.
> Using Perl to generate raw
> data in JSON format (XML will also do, but not preferred) and using
> JavaScript to render it in the browser will lead to the separation of the
> application into multiple modules.
NO. Requiring JavaScript to be able to render gitweb output is totally
out of question. Especially for intended audience, which is composed
heavily of programmers and hackers, both of which are prone to using text
web browsers and running NoScript-equivalents or just with JavaScript
turned off.
Note also that splitting gitweb into smaller modules would be not easy,
as it will require reworking current "longjump"-based (non-local goto
outside subroutine) error handling into e.g. exception-based one
(e.g. Try::Tiny + HTTP::Exception)... or porting gitweb to web framework
which does that for us.
Anyway using JSON for output and _client side_ JavaScript for generating
(X)HTML and CSS looks like monumentally stupid idea.
> A Perl hacker can improve JSON
> generating modules someday without bothering what is being done to the data
> after it is generated.
If / when gitweb is properly split into separate modules, this can be
done by generating Perl data structures (OOP or not), rather than going
microkernel-like design of bogging down performance with marshalling
and unmarshalling to and from JSON.
Proper separation of responsibilities and proper API design and improving
contents side can be done independently on presentation side.
> A JavaScript programmer can use this data to do any
> of the tasks listed efficiently without bothering how it is being
> generated. This potentially opens the project to a wide developer audience
> and most probably much more efficient code. Generating UI in Perl for non
> JavaScript browsers can be implemented as a 3rd module. The languages fit
> in the context very well.
<irony>
Yep, and adding new view, or new feature in an existing view will require
both knowledge of Perl (to get data) and JavaScript + JS library (to show
data). Wonderfull way of enlarging pool of possible gitweb developers.
</irony>
> I have submitted a detailed proposal on the melange website. Mentors please
> be kind to go through the same.
>
> http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/jaseemabid/1
--
Jakub Narebski
Poland
next parent reply other threads:[~2012-03-27 12:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAH-tXsAY0GErMAwi_TMaq0S4GuGx-OcPtEkJnXNqfGEyQq44_A@mail.gmail.com>
2012-03-27 12:47 ` Jakub Narebski [this message]
2016-03-24 20:15 GSoC proposal work
-- strict thread matches above, loose matches on Subject: below --
2011-03-24 22:01 GSOC proposal Fredrik Gustafsson
2011-03-24 23:27 ` Jens Lehmann
2011-03-24 23:47 ` Junio C Hamano
2011-03-25 10:06 ` Fredrik Gustafsson
2011-03-25 23:07 ` Jens Lehmann
2011-03-25 10:08 ` Fredrik Gustafsson
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=201203271447.58519.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=jaseemabid@gmail.com \
/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).