Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   [announcement] ISKEET library 0.0.2 (http://www.velocityreviews.com/forums/t875190-announcement-iskeet-library-0-0-2-a.html)

Ekkehard Morgenstern 01-17-2004 11:57 AM

[announcement] ISKEET library 0.0.2
 

Hi,

I'd like to announce version 0.0.2 of my ISKEET library for ECMAScript / JavaScript.

http://www.iskeet.de

It helps to encapsulate browser-specifics and provides a unified document API.

Current main features:

o Free of charge, licensed under the terms of the GNU General Public License.
o Encapsulates event handling for all event types.
o Supports Document Object Model (DOM) 1.0 and 2.0.
o Simplifies finding elements and getting actual element size and position.
o Supports all JavaScript-enabled versions of Internet Explorer.
o Supports all JavaScript-enabled versions of Netscape / Mozilla.
o Implemented in ECMAScript (ECMA 262 standard of JavaScript).
o Truly object-oriented implementation.

The ISKEET website is implemented using the ISKEET library.

Current downsides:

o Since it is version 0.0.2, a very early release, it does not directly
support other browser types other than those mentioned. It'd be great
if someone could test it on old or unusual browsers. :-)

I will add Opera support soon, but it'd be great if someone could test it on Opera,
perhaps it might already work.

ISKEET website defects:

o Requires JavaScript and HTML Frames enabled browsers.

The website is using XHTML 1.0, if you experience any problems viewing it, please
notify me. :-)

On the website, you'll find download and manual areas. :-)

greetings,
Ekkehard.




Janwillem Borleffs 01-17-2004 01:00 PM

Re: [announcement] ISKEET library 0.0.2
 
Ekkehard Morgenstern wrote:
> Hi,
>
> I'd like to announce version 0.0.2 of my ISKEET library for
> ECMAScript / JavaScript.
>


<snippet>
this.HTTPUserAgent = usrag;
if ( usrag.indexOf( "MSIE", 0 ) != -1 ) {
/* defined by Microsoft Internet Explorer */
var msie = usrag.indexOf( "MSIE", 0 );
var dot = usrag.indexOf( ".", msie );
this.IsIE = true;
</snippet>

As mentioned many times in this NG, parsing the user agent property is an
unreliable way of browser detection.

See http://jibbering.com/faq/#FAQ4_26 for info.


JW




Richard Cornford 01-17-2004 01:24 PM

Re: [announcement] ISKEET library 0.0.2
 
"Ekkehard Morgenstern" <ekkehard.morgenstern@onlinehome.de> wrote in
message news:bub8hn$qpb$1@online.de...
>I'd like to announce version 0.0.2 of my ISKEET library for
>ECMAScript / JavaScript.
> http://www.iskeet.de
>
>It helps to encapsulate browser-specifics and provides a
>unified document API.

<snip>

A home page that does not work with Opera 7 is not a place to visit when
looking for a script designed to "encapsulate browser-specifics and
provides a unified document API". What's up, a full Core and HTML DOM
level 2 and ECMA Script implementation not good enough for you?

Richard.



Ekkehard Morgenstern 01-17-2004 06:42 PM

Re: [announcement] ISKEET library 0.0.2
 

"Richard Cornford" <Richard@litotes.demon.co.uk> wrote:
> A home page that does not work with Opera 7 is not a place to visit when
> looking for a script designed to "encapsulate browser-specifics and
> provides a unified document API". What's up, a full Core and HTML DOM
> level 2 and ECMA Script implementation not good enough for you?


Well, if you had read my post properly, you would've noticed that I
mentioned that I haven't tested it with Opera yet.

But thanks for telling me! :-)



Ekkehard Morgenstern 01-17-2004 06:44 PM

Re: [announcement] ISKEET library 0.0.2
 

"Janwillem Borleffs" <jw@jwscripts.com> wrote:
> As mentioned many times in this NG, parsing the user agent property is an
> unreliable way of browser detection.
>
> See http://jibbering.com/faq/#FAQ4_26 for info.


Yes, I've read many concerns about doing so. Thanks for link! :-)



Ekkehard Morgenstern 01-17-2004 10:42 PM

Re: [announcement] ISKEET library 0.0.2
 

"Janwillem Borleffs" <jw@jwscripts.com> wrote:
> As mentioned many times in this NG, parsing the user agent property is an
> unreliable way of browser detection.
>
> See http://jibbering.com/faq/#FAQ4_26 for info.


BTW, in other languages, like PHP, the HTTP user agent string is the only
way to recognize the user's web browser.

In my library, I might use browser identification by objects, but it's
unsafe also, because it doesn't tell you exactly what browser the user
has, and hence it might be that a presumed implementation does not behave
as expected, whereas when I use the HTTP user agent string, I can
identify the browser.

If the user doesn't tamper with the UserAgent string, it should be
sufficient, so I could use object recoginition as a fallback method.

And if the user sets the UserAgent string to a particular value,
they might _want_ to pretend they use a specific browser. Either for
testing, or for other purposes. If someone changes the string just
for the fun of it or to introduce some "anonymity" (which doesn't
exist on the internet anyway), then it's their problem, IMO.

There are also lots of browser-version specific JavaScript issues,
which can only be shipped around by checking the HTTP user agent string.

These issues have to be considered very carefully, because a library
like ISKEET is a major endeavor. Once used, tested, and spread around,
it'll be impossible to change some of the design basics.



Janwillem Borleffs 01-17-2004 11:09 PM

Re: [announcement] ISKEET library 0.0.2
 
Ekkehard Morgenstern wrote:
> BTW, in other languages, like PHP, the HTTP user agent string is the
> only way to recognize the user's web browser.
>


But it is never used here to influence the page or script behaviour.

> In my library, I might use browser identification by objects, but it's
> unsafe also, because it doesn't tell you exactly what browser the user
> has, and hence it might be that a presumed implementation does not
> behave as expected, whereas when I use the HTTP user agent string, I
> can identify the browser.
>


Take a look at Opera, the user can specify how this browser should identify
itself.

> If the user doesn't tamper with the UserAgent string, it should be
> sufficient, so I could use object recoginition as a fallback method.
>


It's not the user, but the vendor which may temper the user agent string
because it's never a fixed value as a rule. Per example, when the developers
of the Mozilla browser decide to use "gecko" instead of "Gecko", your
detection is broken.

Sure, you can fix this by lowercasing the user agent string, but it is
better to skip detection all together and test for the objects/methods you
want to use...


JW





Ekkehard Morgenstern 01-18-2004 01:21 AM

Re: [announcement] ISKEET library 0.0.2
 

"Janwillem Borleffs" <jw@jwscripts.com> wrote:
> Take a look at Opera, the user can specify how this browser should identify
> itself.


Actually, for version 0.0.4, which I've just released, I had to work around
a specific Opera bug (non-standard JavaScript implementation that does not
conform to the ECMAScript 262 standard, unlike Netscape/Mozilla and Internet
Explorer). If the user changes the user agent string to omit "Opera", then
*poof* all sites using ISKEET will not load properly anymore. Tough luck, eh!

As soon as the Opera developers correct their JavaScript implementation
to conform to the standard (i.e. do proper parameter passing of objects
by reference), then I can lift the workaround for the new version.

This would be impossible to detect without the HTTP UserAgent field,
and that's exactly what it's there for.

> It's not the user, but the vendor which may temper the user agent string
> because it's never a fixed value as a rule.


Then the user has to deal with the results. Many sites depend on the
UserAgent string, especially PHP sites, but also JavaScript sites.

> Per example, when the developers
> of the Mozilla browser decide to use "gecko" instead of "Gecko", your
> detection is broken.


Which will never happen, because then a lot of sites depending on this
will stop working. For example, PHP sites that generate optimized JavaScript
code for specific browser types.

> better to skip detection all together and test for the objects/methods you
> want to use...


Which doesn't work for problems like a broken JavaScript implementation
in Opera 7.

See my website, http://www.iskeet.de for a detailed problem description.
Download version 0.0.4 to see my workaround.



Ekkehard Morgenstern 01-18-2004 01:23 AM

Re: [announcement] ISKEET library 0.0.2
 

"Richard Cornford" <Richard@litotes.demon.co.uk> wrote:
> A home page that does not work with Opera 7


I've added Opera 7 support in Version 0.0.4 of ISKEET now! :-)

http://www.iskeet.de

(which also means the website is working with Opera 7)


Randy Webb 01-18-2004 01:47 AM

Re: [announcement] ISKEET library 0.0.2
 
Ekkehard Morgenstern wrote:
> "Janwillem Borleffs" <jw@jwscripts.com> wrote:
>
>>Take a look at Opera, the user can specify how this browser should identify
>>itself.

>
>
> Actually, for version 0.0.4, which I've just released, I had to work around
> a specific Opera bug (non-standard JavaScript implementation that does not
> conform to the ECMAScript 262 standard, unlike Netscape/Mozilla and Internet
> Explorer). If the user changes the user agent string to omit "Opera", then
> *poof* all sites using ISKEET will not load properly anymore. Tough luck, eh!


Opera 7, in any spoof mode, contains the word "Opera" in the user agent
string. If you had bothered testing that, you would know it. And your
statements seem to indicate that your knowledge base of Opera is very
limited with regards to its userAgent string and how to detect Opera in
general.

> As soon as the Opera developers correct their JavaScript implementation
> to conform to the standard (i.e. do proper parameter passing of objects
> by reference), then I can lift the workaround for the new version.
>
> This would be impossible to detect without the HTTP UserAgent field,
> and that's exactly what it's there for.


if (window.opera){
//opera code here.
}

<sarcasm>
Wait, I didn't check the userAgent string, I must have done it wrong.
</sarcasm>


>
>>It's not the user, but the vendor which may temper the user agent string
>>because it's never a fixed value as a rule.

>
>
> Then the user has to deal with the results. Many sites depend on the
> UserAgent string, especially PHP sites, but also JavaScript sites.


Then "many sites" are poorly written by amateurs posing as professionals
that know what they are doing.

>
>>Per example, when the developers
>>of the Mozilla browser decide to use "gecko" instead of "Gecko", your
>>detection is broken.

>
>
> Which will never happen, because then a lot of sites depending on this
> will stop working. For example, PHP sites that generate optimized JavaScript
> code for specific browser types.


Again, if you are trying to "optimize" javascript, PHP is *not* the
place to try to do it. If you want javascript optimized, use javascript
to do it.

--
Randy



All times are GMT. The time now is 03:37 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.