git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: chaitanyaa nalla <nallachaitu@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: GSoC idea: adding JavaScript library / framework in gitweb
Date: Sat, 24 Mar 2012 14:17:09 +0100	[thread overview]
Message-ID: <201203241417.10478.jnareb@gmail.com> (raw)
In-Reply-To: <CACeyogcFJoUyAiTReDJK_nCMGBp+23OjcS407A1X=fqFR+aGag@mail.gmail.com>

On Sat, 24 Mar 2012, Chaitanyaa Nalla wrote:

> Hello everyone,
> 
>  I am Chaitanya Nalla, a final year undergraduate student from India and I
> am pretty much interested in doing the project "Adding javascript library /
> framework in gitweb" suggested by respected Jakub.  I have good experience
> in javascript libraries like jQuery, Dojo etc. As per the goals of the
> project I will use the efficient, concise, cross browser compatible
> frameworks where ever needed.

JavaScript library / framework is required not only to cover differences
between web browsers in DOM manipulation, event handling and Ajax with
XmlHttpRequest, but also add features which are still[1] lacking from
JavaScript such as handling cookies, formatting strings, date manipulation,
etc.

Currently gitweb uses hand-crafted micro-library in `gitweb/static/js/lib/`
Using existing JavaScript library, be it jQuery (most popular), Dojo,
MooTools or YUI (probably too much for gitweb) will give us, as you said,
well tested code, and new abilities like client-side sorting of tables
which we would be able to use in further work.

[1] http://www.nczonline.net/blog/2011/10/03/when-web-standards-fail-us/

>                                Also I am planning to create a local library 
> version with support for configuration and a good documentation.

I don't quite understand what you mean here.  The JavaScript code specific
to gitweb would have to be modified to use chosen JavaScript library, but
I wouldn't say it is "local library".  I'd rather we use stock JavaScript
library, which would allow us to leverage existing CDNs like (for jQuery)

  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
  http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js
  http://code.jquery.com/jquery-1.7.2.min.js
 
We probably would ultimately need to be able to serve local fallback copy
(but this might be out of scope of GSoC project).

This gitweb-specific JavaScript code (files in `gitweb/static/js/`)
is IMVHO quite well documented using JSDoc.

> Using the DOM features of JavaScript and traversing the whole document
> object is quite cubersome and error prone, so I want to replace them using
> well tested libraries that are cross browser compatible.

I think there is missing "using hand-crafted code" in this sentence
to make it sense.

> 
> Emulating onprogress in XMLHttpRequest :
> 
> jQuery and YUI provide only statuses success and error.

Right.

> Even MooTools provide progress but are constrained to some browers
> only.

To be more exact MooTools support 'onprogress' event handler only if
web browser supports it.  Not all do (e.g. older browsers), that is why
there is need for emulation using timers.

> It can be handled by using $.ajax Transport utility .

You mean in jQuery here, isn't it?  It would be a bit different, I think,
in MooTools or YUI.

C.f. http://stackoverflow.com/questions/5652229/javascript-framework-with-or-easily-extendable-with-support-for-xmlhttprequest

> I will also take care progressive enhancement, by carefully implementing the
> basic functionality of the gitweb so that what ever may be the browser
> version and type, internet connection the basic functionality will not
> disrupted.

Errr... "progressive enhancement" is about using client-side scripting
in such way, that even if web browser doesn't support JavaScript
(e.g. text browsers such as lynx, elinks or w3m), or has JavaScript
turned off or blocked, we would get a basic functionality.

Note also that "progressive enhancement" part applies only to writing
new features, and this is strictly 'as time permits' part, I think.
But I thin that you would need to lay more complete proposal, i.e.
what features are you planning to add. 

-- 
Jakub Narebski
Poland

  reply	other threads:[~2012-03-24 13:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24  6:32 gsoc idea adding javascript library / framework in gitweb chaitanyaa nalla
2012-03-24 13:17 ` Jakub Narebski [this message]
2012-03-24 16:09   ` GSoC idea: adding JavaScript " chaitanyaa nalla
2012-03-24 16:48     ` chaitanyaa nalla
2012-03-24 18:49     ` Jakub Narebski
2012-03-24 18:57       ` chaitanyaa nalla
2012-03-25  8:31       ` chaitanyaa nalla
2012-03-25 17:55         ` Jakub Narebski
2012-03-25 18:08           ` chaitanyaa nalla
2012-03-26  0:44             ` Jakub Narebski
     [not found]           ` <CACeyogdhChrGe-k+VLkAzq1F9U1TFYsCN5Kc_u7jAwRhaz+fJQ@mail.gmail.com>
2012-03-27 14:55             ` chaitanyaa nalla
2012-03-27 19:14             ` Jakub Narebski
2012-03-27 20:35               ` chaitanyaa nalla
2012-03-28 10:38                 ` Jakub Narebski
2012-03-28 18:05                   ` chaitanyaa nalla
2012-03-29  9:14                     ` Jakub Narebski
2012-03-29 18:37                       ` chaitanyaa nalla
2012-03-30 13:29                         ` Jakub Narebski
2012-04-01  9:47                           ` chaitanya nalla
     [not found]                       ` <CACeyogeh7SSfx5NPFSt=gDdUzrUj0zxQKh84MDA-dW2e7UNGcw@mail.gmail.com>
2012-03-30 12:56                         ` 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=201203241417.10478.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nallachaitu@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).