473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

is yahoo ... good javascript ?

http://developer.yahoo.com/yui/index.html

Is this rubbish, evil, bad, wrong, not to recommend, "go away"-folks,
"knitting suits them better"-people etc

or

something that a new javascript wannabe programmer should set as an example
of good principles?

Apr 12 '06 #1
11 1264
On Wed, 12 Apr 2006 11:42:44 +0300, "optimistx"
<op*************@poistahotmail.com> wrote:
http://developer.yahoo.com/yui/index.html

Is this rubbish, evil, bad, wrong, not to recommend, "go away"-folks,
"knitting suits them better"-people etc

or

something that a new javascript wannabe programmer should set as an example
of good principles?


Somewhere in the middle - the principles are fine but they are only
one of many fine ways of going, you may or may not like the style.

Jim.
Apr 12 '06 #2
optimistx wrote:
http://developer.yahoo.com/yui/index.html

Is this rubbish, evil, bad, wrong, not to recommend, "go away"-folks,
"knitting suits them better"-people etc

or

something that a new javascript wannabe programmer should set as an example
of good principles?


It is good stuff.
Apr 12 '06 #3
On Wed, 12 Apr 2006 13:14:51 GMT, Douglas Crockford
<no****@sbcglobal.net> wrote:
optimistx wrote:
http://developer.yahoo.com/yui/index.html

Is this rubbish, evil, bad, wrong, not to recommend, "go away"-folks,
"knitting suits them better"-people etc

or

something that a new javascript wannabe programmer should set as an example
of good principles?


It is good stuff.


hmm... it might be relevant to mention the fact you're an employee
of yahoo.

Jim.
Apr 12 '06 #4
Jim Ley wrote:
Somewhere in the middle - the principles are fine but they are only
one of many fine ways of going, you may or may not like the style.


I agree.

PROS:
1. A lot of their code is pretty solid
2. The Event stuff seems pretty good and greatly simplifes a topic that can
be very confusing to many developers
3. Very well documented. They clearly have money to burn ;)
4. It's free and re-distributable.
5. It will most likely continue to be supported and extended in the future

CONS:
1. Excessive use of the YAHOO.* namespace is over-kill and annoying, IMO
2. try/catch is used when not really necessary, causing ungraceful
compilation errors for older script engines
3. It looks like it's leaning towards a huge monolothic library approach,
rather than targetted solutions for specific situations
4. Some of their code, such as their DOM.getXY() is not very robust and even
resorts to browser-sniffing

I'm considering using the Event code in a project, but so far I've use other
(IMO, better) alternatives for many of their other utilities.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Apr 12 '06 #5
Matt Kruse wrote:
CONS:
1. Excessive use of the YAHOO.* namespace is over-kill and annoying, IMO
I'm glad they use this for everything. If they want to be really robust
and make it difficult for people to screw up isn't this essential?
3. It looks like it's leaning towards a huge monolothic library approach,
rather than targetted solutions for specific situations
But not like Dojo with it's complex package manager etc. I like how
Yahoo! has broken up the library. For example, if I am going to use the
Yahoo! event library, it is likely I will use most of the code that is
in that library. I won't be asking people using my site to download a
big library and only be using 10% of the code in the site.

I would add as a con that...

The drag drop constructor (and many others) only takes an id string and
I cannot send the constructor an actual DOM element. This means I have
to add all sorts of dummy id's to elements so I can tell the drag drop
library how to find them. Kludge. I hope they will fix this so the
constructor can take an id string or a DOM element.

I'm considering using the Event code in a project, but so far I've use other
(IMO, better) alternatives for many of their other utilities.


I'm using the Event code and it seems good so far. Seems quite flexible
without too much code to use it.

Peter

Apr 12 '06 #6
Matt Kruse wrote:
2. try/catch is used when not really necessary, causing ungraceful
compilation errors for older script engines


Matt -

Would you please elaborate on this? What sort of problems would
try/catch cause, and on what engines?

And what method would you use to determine when to use and when not to use?
Apr 12 '06 #7
Tony wrote:
Would you please elaborate on this? What sort of problems would
try/catch cause, and on what engines?
try/catch was introduced in Javascript 1.4, IIRC. So Netscape 4.x, for
example, will choke on it. And it's not like it will just cause an error
when/if it hits the statement - it will cause a compilation error right from
the start. Netscape 4.x is ancient and mostly ignored these days, but I
don't know about current mobile devices and which versions of javascript
they support and whether that would be a problem.
And what method would you use to determine when to use and when not
to use?


I've never had the need to use try/catch in javascript, except for
IE-specific blocks of code for instantiating ActiveX objects.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Apr 12 '06 #8
pe**********@gmail.com wrote:
1. Excessive use of the YAHOO.* namespace is over-kill and annoying,
IMO I'm glad they use this for everything. If they want to be really
robust and make it difficult for people to screw up isn't this
essential?


Which is such a long namespace required?

Instead of YAHOO.util.DOM.getXY() they could have just used DOM.getXY()

Introducing packages into javascript similar to Java is over-kill.
The drag drop constructor (and many others) only takes an id string
and I cannot send the constructor an actual DOM element.


Indeed, they should accept an object or string, and resolve the string to an
object as necessary.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Apr 12 '06 #9
Yahoo! UI

Matt Kruse wrote:
3. Very well documented. They clearly have money to burn ;)


I think the idea is to centralize all utility javascript development
for Yahoo and document it well to *save* money.

Peter

Apr 12 '06 #10
pe**********@gmail.com wrote:
3. Very well documented. They clearly have money to burn ;)

I think the idea is to centralize all utility javascript development
for Yahoo and document it well to *save* money.


Of course, but my point was that most javascript developers who create
packages in their spare time don't have the resources to document their code
so fully and provide so many examples. So the documentation output from
yahoo's project is excellent because they have money to fund the effort.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Apr 12 '06 #11
Matt Kruse wrote:
Instead of YAHOO.util.DOM.getXY() they could have just used DOM.getXY()


Imagine they did as you suggest, you already have an object called DOM
in your site and you want to incrementally start using the Yahoo! UI
library. That would hurt. Very unlikely that people have a "YAHOO"
object in their existing sites. Somewhat likely that people have a
"DOM" object. Perhaps Yahoo! didn't need the "util" part. This might
indicate how big they expect the library to grow.

Peter

Apr 12 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Stanley | last post by:
Hi, I'd like to write a HTML page which can help me directly log in my Yahoo!mail or Gmail account without typing user name and password. Basically, I want to set up a link, click it and pop up...
11
by: Brett | last post by:
In Yahoo mail, I click the Inbox link and see my messages. If I view source, I don't have HTML which contains the URL of each message. The source HTML contains javascripting and framesets. This...
1
by: it hates me | last post by:
Hey gang, I hope you're all well and you're having an enjoyable week I'd love to be able to have a custom news feed on my web page through Javascript The only custom news feed I can find for...
14
by: Greg Heilers | last post by:
Greetings, It is wonderful to find such a useful group. This is my first time here, so I apologize up front, if this question has been asked (and answered) a thousand times before. While...
7
by: HI-Liter | last post by:
On the web page http://news.yahoo.com if you go down the page to "Top Stories", "Most Popular", or any of the other categories, and hover over the links to various articles in any of these...
6
by: petermichaux | last post by:
Hi, Reading the Yahoo! UI AJAX library, there is a unique workaround for an apparent IE 6 memory leak with binding a function to onreadystatechange. Instead of binding a function to...
2
by: petermichaux | last post by:
Hi, It seems like determining element position in a web page is a difficult task. In the position reporting source code I've looked at there are special fixes for at least some versions of...
3
by: Sascha Deus | last post by:
Hallo NG, ich möchte gerne die Yahoo UI TreeView Komponenten mit Daten befüllen. die aus PHP per ajay.request asynchron geladen werden. Das Beispiel bei Yahoo stellt alles in html und...
1
by: PeterAlt | last post by:
I have a Yahoo store. In order for me to access via javascript or HTML (on the client side) any information stored in Yahoo's product fields, I have to use something that looks like this... ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.