473,584 Members | 2,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1273
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****@sbcglob al.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**********@gm ail.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

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

Similar topics

12
22095
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 the Yahoo/Gmail page. What technology is most appropriate for this kind of work? My current solution is not so satisfying: I download...
11
1957
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 is different from what I am seeing. If I right click on a message link and select "copy shortcut", I can paste this link into my browser. This...
1
2726
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 free is from Yahoo. Are there any more? Now, for my web page I can get this to work fine:
14
2430
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 validating my code with the W3C Validator, I pass (get "The Green") while my files reside on my local computer. However, once I upload them to the...
7
1714
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 categories, a clean info window pops up with pictures and a quick description of what is in the article. I've tried to figure out how it's done but haven't...
6
2235
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 onreadystatechange, the library polls the readystate of the request object until it becomes 4. Then it calls the handler function. This polling seems like a...
2
1968
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 Safari and Opera. I am doing a lot of dragdrop experimentation and in some situations need a position reporting function. The function doesn't need to...
3
2662
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 javascript dar und nicht die Verbindung zu PHP. Es gab einen Artikel in der Internet Professional 09/2006, allerdings ist genau der Teil, wo die Arrays...
1
2031
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... <!--#ystore_catalog id=neo2-digital field=name --> Where "id=" follows the product name. "field=" follows the information field stored on Yahoo's servers...
0
7897
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7829
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8190
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8331
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5379
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3824
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3850
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1441
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.