On Feb 3, 6:39 pm, Guillaume Andrieu <gh...@taleo-initiative.org>
wrote:
> Hi Rob.
>
> A consequence of using most general purpose libraries is that because
>
> > they only support a small number of current browsers and don't
> > tolerate new browsers very well (a consequence of their poor code
> > quality and architecture), they not only disenfranchise perhaps 5 or
> > 10% of web users who don't have a compliant browser, but also require
> > constant upgrades and maintenance because of new or upgraded browsers.
> > This is the antithesis of the web.
>
> I'm not sure I see the alternative.

Well written, robust code that uses appropriate feature detection and
fall back strategies is not difficult to write.


> Coding the thing yourself would lead to
> the same maintenance, probably even worse, each time a new browser (or
> browser bersion) appears which you had not targeted at first.
> How do you manage this better without using libraries ?

Then you don't understand how to implement feature detection. No one
is saying write every application from scratch, or that you shouldn't
use any kind of library. Just don't use poorly written general
libraries.

If you design an application to just use basic, simple javascript then
you don't need complex CSS selectors, chaining and so on. You just
need a library of basic functions that does what you need and no more.
And that can easily be written to be cross-browser with very little
extra effort and maintained in your (or the corporate) repository.

>
> My favourite chuckle is over enterprises that deliver web applications
>
> > that only run in one version of one browser (IE 6 being the the worst
> > culprit). They end up with web applications that are more restrictive
> > than the desktop applications they replaced - I'm sure "more
> > restrictive operating environment" wasn't in the business case for
> > changing to browser-based apps.
>
> I don't laugh at this. This is rational.

No, it was completely irrational. I use a timesheet system every day
that some idiot built so that it is based on ActiveX and IE 6. I've
written more complex systems that can run perfectly in any browser
since Navigator 4 without javascript. They are nicer with script, but
don't need it. And by being able to not use script at all, fallback
for missing features (pretty rare since they are based on very basic
functions) is simple.

One system has been running for nearly 8 years without a single
modification. None. And works perfectly in every browser that accesses
it.


> Most of the applications are
> written under time/cost constraints. When your initial requirements are to
> support only IE6, and you don't have time/money to invest in supporting
> other browsers, you take shortcuts.

It doesn't cost any extra to write cross-browser applications. You may
no test them in a wide variety of browsers, but if your library is
developed to be cross browser to start with, and you understand the
issues, your application should be cross browser anyway.

> It's not always (even rarely) the
> developper's decision, but under pressure you have to deliver something that
> meets the requirements and only the requirements.

In my experience, the choice of browser is almost never a business
decision, it's usually made by some IT manager backed up a business
that doesn't know any better. You only need to ask them how they are
going to deal with mobile devices to get them on the back foot.

[...]
> > If the time and effort spent learning a general purpose library is
> > instead spent learning javascript, then far better outcomes can be
> > achieved.
>
> Wait... Are we talking about people writing applications only within the
> boundaries of one library (people starting every line of JS code with a $) ?
> If yes, then I agree. Knowing the language is necessary.
>
> If not, which DOM traversal-only library do you suggest I use ?

Any javascript programmer who needs a library to do DOM traversal
should not be writing production code. It would take me 10 minutes to
teach a programmer what they need to know to do it.

> What should I recommend to new employees in my company when they have to
> learn Javascript, who have to start coding with Javascript without having
> had any proper formation ?

If you are in any kind of supervisory or management position then it
is your responsibility to ensure that the people you are in charge of
are competent to perform the tasks they are set. If they aren't, you
either ensure they get appropriate training or get someone who has
appropriate skills to do the job instead.

--
Rob

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to