BBC Glow?

P

pete

Many (perhaps all) JS frameworks are despisèd and rejected in this
newsgroup. I am impressed by the design of the BBC framework called
Glow; and by the quality of its documentation:

http://www.bbc.co.uk/glow/

Has anyone an opinion of this open-source product?

Thx.

-- pete
 
M

Mychal Hackman

Many (perhaps all) JS frameworks are despisèd and rejected in this
newsgroup. I am impressed by the design of the BBC framework called
Glow; and by the quality of its documentation:

 http://www.bbc.co.uk/glow/

Has anyone an opinion of this open-source product?

Thx.

-- pete

I think the first thing to notice about this is:

ua = navigator.userAgent.toLowerCase(), (24, glow.js)

and the env object created that uses this.
This library is fully dependent on browser sniffing.

http://www.jibbering.com/faq/notes/detect-browser/
 
P

pete

I think the first thing to notice about this is:

    ua = navigator.userAgent.toLowerCase(), (24, glow.js)

and the env object created that uses this.

This library is fully dependent on browser sniffing.

Yeah, that is for sure. The mitigating goal is that it follows the
"BBC standard [that] exists so as to produce web pages that can be
viewed (as consistently as can reasonably be achieved) by the greatest
number of people possible," meaning afaics all browsers/versions
achievable within a single generation:

http://www.bbc.co.uk/guidelines/futuremedia/technical/browser_support.shtml

BBC lends more or less support to IE 1-8; FF 1.0-3.6; Safari 1.x-5.x;
and others. (Think of /testing/ all of that crap.)

Given the goal, browser sniffing seems to me a must-have.

I am awfully impressed by the library's overall design, its priorities
and attentions, and its conciseness. I'm pleased that, unlike the
Google library and others, it doesn't include your whoreson prototype,
jquery, mootools, yahoo, booboo, igloo, yeehaw, heyou, bayou, or
yoohoo.

-- pete
 
M

Mychal Hackman

This library is fully dependent on browser sniffing.

Yeah, that is for sure. The mitigating goal is that it follows the
"BBC standard [that] exists so as to produce web pages that can be
viewed (as consistently as can reasonably be achieved) by the greatest
number of people possible," meaning afaics all browsers/versions
achievable within a single generation:

http://www.bbc.co.uk/guidelines/futuremedia/technical/browser_support...

BBC lends more or less support to IE 1-8; FF 1.0-3.6; Safari 1.x-5.x;
and others. (Think of /testing/ all of that crap.)

The table you linked to states that you _must_ test 8 browsers, and
that you _should_ test in 6 others.
Everything else is not supported. It looks like you still have to test
"all of that crap".
Given the goal, browser sniffing seems to me a must-have.

Browser sniffing _limits_ your range of browser support by
unnecessarily restricting user agents that could possibly be capable
of the functionality you wish to achieve.
Feature detection is a far superior solution. The FAQ describes this
clearly.
I am awfully impressed by the library's overall design, its priorities
and attentions, and its conciseness. I'm pleased that, unlike the
Google library and others, it doesn't include your whoreson prototype,
jquery, mootools, yahoo, booboo, igloo, yeehaw, heyou, bayou, or
yoohoo.

I don't understand what you meant here.
 
G

Gregor Kofler

Am 2010-08-23 22:57, pete meinte:
BBC lends more or less support to IE 1-8; FF 1.0-3.6; Safari 1.x-5.x;
and others. (Think of /testing/ all of that crap.)

IE 1?
Given the goal, browser sniffing seems to me a must-have.

Why? Given a reasonable goal, browser sniffing seems to me a
avoid-at-all-cost.

Gregor
 
R

RobG

I think the first thing to notice about this is:
ua = navigator.userAgent.toLowerCase(), (24, glow.js)
and the env object created that uses this.
This library is fully dependent on browser sniffing.

Yeah, that is for sure. The mitigating goal is that it follows the
"BBC standard [that] exists so as to produce web pages that can be
viewed (as consistently as can reasonably be achieved) by the greatest
number of people possible,"

Whether pages are "consistent" between browsers is irrelevant, the
point is whether they are functional or not. Doing that should not be
left to javascript, or browser sniffing.

If widest possible access is a goal, using an XHTML DOCTYPE is not a
good tactic. As usual, to compensate pages are served as text/html.

meaning afaics all browsers/versions
achievable within a single generation:

Employing a strategy based on capability detection and falling back to
basic functionality obviates the requirement for any list of
"supported" browsers. Sites can then be made compatible with any UA
implementing HTML 4, with additional features for those also
supporting various W3C DOM standards and perhaps vendor enhancements
and extensions.


[...]
Given the goal, browser sniffing seems to me a must-have.

Quite the opposite. Browser sniffing leads to never-ending maintenance
as new browsers come into use. It may also prevent access by otherwise
capable user agents because of a misinterpreted sequence of characters
in their UA string.

I am awfully impressed by the library's overall design,

Which particular design features stand out as being better than other
libraries?

I had a quick look at glow.js, I'm underwhelmed.

glow.lang.trim() references a blog entry that investigation trim
functions in 2 browsers, then doesn't use the one recommended as
"probably the best all-around approach". The one chosen was fastest in
IE, very much slowest in Firefox and requires support for the greedy
operator. Further, it is dependent on the vaguaries of \s, which has
been shown to be inconsistent across browsers and to not match all
possible whitespace.

How is this consistent with the goal of a consistent cross-browser
experience? If they can screw up something so simple in the name of
cross-browser support, what hope for more complex tasks?

glow.lang.hasOwnProperty() will always return true for browsers where
{}.hasOwnProperty and {}.__proto__ are falsey, so even that basic
attempt at feature detection is a failure.

How about glow.lang.toArray():

toArray: function(aArrayLike) {
if (aArrayLike.constructor == Array) {
return aArrayLike;
}
//use array.slice if not IE? Could be faster
var r = [], i=0, len = aArrayLike.length;
for (; i < len; i++) {
r = aArrayLike;
}
return r;
},

So if you pass it an array (or at least something where
obj.constructor == Array, which will likley fail across frames), it
returns the same array. If you pass it something else, it returns a
new array. A fairly crass attempt that will likely result in some very
hard to find bugs.

Consider glow.lang.apply(). Given the native
Function.prototype.apply() method, you might expect it to do something
similar - you'd be wrong. It copies properties from one object to
another. It doesn't use any filtering of inherited properties, so
what's the point of glow.lang.hasOwnProperty()?

That's enough for me to decide it's not worth further investigation.

its priorities

Such as?

and attentions,

Which are?

and its conciseness.

The core is 70kB minified, hardly concise.
 
G

Garrett Smith

One more "setDate" that I missed:

"...the clipboard is the clipboardData object, and further, that calling
the setDate method of that object..."

(should be `setData`).

I'll fix and upload that tomorrow.
Done.
 
P

pete

Has anyone an opinion of this open-source product?

Thank you, everyone, for taking the trouble to make your detailed
comments. They're extremely helpful, and I appreciate them very much.

-- pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top