← Back to team overview

launchpad-dev team mailing list archive

Re: Reviewer question about style of new objects in JavaScript

 

Hi Aaron


I'd agree that consistency can be a good reason, but AFAIK, both
styles of oo are used in Launchpad, so either would be inconsistent.
And I also think that any JavaScript programmer ought to be familiar
with JavaScript's native oo.  They'll encounter it sooner or later,
perhaps even when debugging their own YUI-oo objects.


True. I used native Javascript oo when I did the BatchNavigatorHooks implementation for the simplistic ajax batch navigation support prototype. Anyone using YUI or another Javascript framework should be aware of the underlying language's base capabilities as you say.


As a concrete example of the consistency issue, we had/have
several different mockio implementations and it was/is a nightmare
trying to figure out which one to use.

I am sorry I gave you nightmares, but at the time I implemented
IORecorder (now unified with the lazr-js one as MockIo by henninge), I
could not find another implementation.  I believe I implemented
IORecorder essentially in parallel with lazr-js being integrated into
the tree.


Clearly I mis-communicated here! The IORecorder stuff is great and a nice solution which we really needed for better testing capability. I was talking about what was in place previously, prior to that and the unification work.



References