Prev: Interactive web-based graphs for iPads?
Next: FAQ Topic - How can I disable the back button in a web browser? (2010-06-17)
From: Garrett Smith on 17 Jun 2010 12:34 On 6/17/2010 5:24 AM, Thomas 'PointedEars' Lahn wrote: > Garrett Smith wrote: > >> I've looked for, but found no unit tests. If I'm going to use something, >> I want to run tests on it to verify the edge cases. > > What's wrong with JsUnit?<http://www.jsunit.net/> > There aren't any JsUnit tests on cinsoft.net, so I assume you are asking what I think of JsUnit in general. From memory, last I used JsUnit (over 3 years), my complaints were: * UI problems. Nested frame layout makes it hard to view source * Doesn't scale well; large suites, such as those on w3.org, are a runaway train that can't be stopped (the UI is really bad). * poor stack trace functionality / reporting * No dom abstraction layer for dispatching events * No asynchronous testing features. Garrett
From: VK on 17 Jun 2010 12:46 Maybe the most logical preliminary step would be to make an informational (for now) RFC like "JavaScript Web oriented library design principles" http://en.wikipedia.org/wiki/Request_for_Comments So first state on public what is considered good, what is considered bad and why. Because many of frequent posters in here are having their own strong opinions on good and bad. Plus the prevailing dream in here - as I may conclude - of all more-or-less known libraries disappeared at once with their authors going to the programming hell :-) As nothing of it will happen in any close perspective, it would be nice to take some sufficiently respected document for the approach principals. I would suggest the W3C letter that ended the 2nd Browser Wars. It is a nice summary of reasons why W3C failed once again, so it could be good to produce a RFC that would be of anyone interest besides its clj authors. HTML Design Principles http://www.w3.org/TR/2007/WD-html-design-principles-20071126/ The core point IMO would be: Do not Reinvent the Wheel http://www.w3.org/TR/2007/WD-html-design-principles-20071126/#do-not-reinvent-the-wheel Evolution Not Revolution http://www.w3.org/TR/2007/WD-html-design-principles-20071126/#evolution-not-revolution Priority of Constituencies http://www.w3.org/TR/2007/WD-html-design-principles-20071126/#priority-of-constituencies As a side note: no, $ identifier will never be expelled again for that mysterious "machine generated code only" usage - and any of existing library in use will not be rewritten to accommodate that ECMA-262 suggestion. That could be as a flag to see people able to any reasonable compromises at all.
From: Thomas 'PointedEars' Lahn on 17 Jun 2010 13:31 Garrett Smith wrote: > Thomas 'PointedEars' Lahn wrote: >> Garrett Smith wrote: >>> I've looked for, but found no unit tests. If I'm going to use something, >>> I want to run tests on it to verify the edge cases. >> What's wrong with JsUnit?<http://www.jsunit.net/> > > There aren't any JsUnit tests on cinsoft.net, so I assume you are asking > what I think of JsUnit in general. Yes, I misunderstood what you were aiming at. > From memory, last I used JsUnit (over 3 years), my complaints were: The master branch at github was last updated 2010-02-18, the latest release (2.2) was uploaded 2009-11-28. So it might be time for another review. > * UI problems. Nested frame layout makes it hard to view source That hasn't changed, but I do not consider it a problem in itself. I have a source code editor to view and edit the source if it turns out to be erroneous. What I have a problem with is that the test site of JsUnit 2.2 is apparently not scrollable in Firefox (so I need full screen), but that could be remedied. > * Doesn't scale well; large suites, such as those on w3.org, are a > runaway train that can't be stopped (the UI is really bad). There is a Stop button, so that appears to have changed in the meanwhile. > * poor stack trace functionality / reporting It can only be as good as what the ECMAScript implementation provides. I think they are doing not bad there. I could even reuse their approach in providing a stack trace along with my exceptions. > * No dom abstraction layer for dispatching events That appears to have changed. > * No asynchronous testing features. How do you propose that to be implemented? Which alternatives to JsUnit are you recommending? PointedEars -- var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) // Plone, register_function.js:16
From: John G Harris on 17 Jun 2010 15:27 On Thu, 17 Jun 2010 at 09:46:25, in comp.lang.javascript, VK wrote: <snip> >Do not Reinvent the Wheel <snip> Reasons for reinventing the wheel : 1 Because lorry tyres are too heavy for bicycles. 2 Because wire frame wheels are too fragile for lorries. 3 Because wire frame wheels were very right for aeroplanes in 1910 (see any good museum) but no good for jumbo jets. 4 Because wheels are no use for mud; use tracks instead. 5 Because vehicle wheels are far too big and expensive for supermarket trolleys. In other words, "Do not Reinvent the Wheel" is more often than not a substitute for thinking. John -- John Harris
From: VK on 17 Jun 2010 16:29
On Jun 17, 11:27 pm, John G Harris <j...(a)nospam.demon.co.uk> wrote: > Reasons for reinventing the wheel : > > 1 Because lorry tyres are too heavy for bicycles. > 2 Because wire frame wheels are too fragile for lorries. > 3 Because wire frame wheels were very right for aeroplanes in 1910 (see > any good museum) but no good for jumbo jets. > 4 Because wheels are no use for mud; use tracks instead. > 5 Because vehicle wheels are far too big and expensive for supermarket > trolleys. > > In other words, "Do not Reinvent the Wheel" is more often than not a > substitute for thinking. It is not what reinventing the wheel means in the context which should be clear from the quotation as given. People don't need to sit on a wheel for now on, but: people don't need to find another equiradial shape just because the wheel is already taken. |