[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensolaris-opengrok-discuss
Subject:    Re: [opengrok] opengrok and text browsers
From:       Jens Elkner <jel+opengrok () cs ! uni-magdeburg ! de>
Date:       2012-04-02 18:05:31
Message-ID: 20120402180530.GA22858 () trex ! cs ! uni-magdeburg ! de
[Download RAW message or body]

On Mon, Apr 02, 2012 at 01:19:59PM +0200, Trond Norbye wrote:
Hi Trond,

>    What are the consequences of a change from jquery to yui for:
> 
>    * Us - In terms of code change. Does it solve any problems we have today?

It just provides a more complete but still highly scalable framework.
Thus instead of tracking several individual modules like jQuery,
jQueryTooltip, jQueryCompletion, etc. incl. their dependencies and the
need to test one against each other, one has just to track YUI3 and can
be sure, that all those modules work hand in hand and are already tested
to work with each other. So less maintainance burden/trouble. Also YUI3
has a well established dependency tracking mechanismen as well as an
Object-like (even with multiple inheritance) architecture, which also
makes maintainance easier and helps to avoid uneccessary code
duplication within modules and also assures consistent behavior.
Beside that, it opens the door for a lot of more enhancements - no need
to re-invent the wheel and thus it makes it possible to provide new
features much faster (e.g. clickable directory tree GUI for faster
navigation) and to solve problems in a consistent manner by using
aphttp://src.iws.cs.ovgu.de/source/xref/opengrok-jel/web/static/opengrok.js#226propriate APIs.
Examples are:
- the enhanced symbols panel
  http://src.iws.cs.ovgu.de/source/xref/opengrok-jel/web/static/opengrok-symbols-panel.js
- the enhanced tooltip, which makes it possible to use it for the new
  way (XHTTP) as well as the old way (?a=true) annotations
  http://src.iws.cs.ovgu.de/source/xref/opengrok-jel/web/static/opengrok-tooltip.js
- the use of XHTTP (YUI.io, JSON) to pull just the annotations on demand
  and use of the tooltip to provide the tt text directly via an indirect
  compact map (instead of duplicating it several times for ech LOC),
  which enhance performance on the client as well as server side and
  reduces memory consumption on the client quite a bit ...
  http://src.iws.cs.ovgu.de/source/xref/opengrok-jel/web/static/opengrok.js#226

So as said, I see jQuery more like PHP: If you need to hack something
quickly [for home], they are ok, but as soon as the apps get more
complex/enriched, maintainance becomes a nightmare (run-of-the-mill code)
and sooner or later one realizes, that this is a dead end and the code
base needs to be re-written. So the sooner one switches the more
resources get saved/are not wasted. Other people made the same experience -
Just take the time and watch
http://www.yuiblog.com/blog/2012/01/17/video-yuiconf2011-rcannon/
IMHO it is really worth it.

>    and how likely are we to introduce bugs as part of the change

After pulling out all JS code from *.jsp + related code and grouping it
step-by-step into more or less meaningfull "units" (see 
http://src.iws.cs.ovgu.de/source/xref/opengrok-jel/web/utils.js)
one has a pretty good overview, what, where and how it is used [and lets
one recognize, that we already had a simple JS based client application].
Thus the switch over to YUI3 could be made almost 1:1 (see 
http://src.iws.cs.ovgu.de/source/xref/opengrok-jel/web/static/opengrok.js?r=1356%3A07929c1db0b2).
So introduction of new bugs is very unlikely, but the fix of old/hidden
bugs and enhancements are very likely ;-)

>    * User deployments. May this break customizations people may have done on
>    their deployments

Yes. But if one wants to go a step further, this often unavoidable,
unless it makes sense AND one has the resources to maintain the old
bloat. AFAIK both do not apply to opengrok and IMHO its legitimate for a
0.x version. Last but not least due to the more compact/central and
unit-like structuring, adaption as well as enhancing it should now be
much easier and faster. So yes, may break user customizations but
shouldn't be a real problem.
  
>    (I assume you've verified that there is no license complications..)

Yes: http://src.iws.cs.ovgu.de/source/xref/opengrok-jel/NOTICE.txt#34
* Copyright 2011 Yahoo! Inc. All rights reserved.
* Licensed under the BSD License.
* http://yuilibrary.com/license/

Have fun,
jel.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 12768
_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic