473,488 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Great Examples of JavaScript code

Does anyone have an example of well written JavaScript applications
that they know about? I would prefer the code to be readable. I
particularly like YUI's code. Does anyone have any more applications/
examples? Thanks .

Jul 26 '07 #1
11 1976
On Jul 26, 12:55 pm, Jang <jangc...@gmail.comwrote:
Does anyone have an example of well written JavaScript applications
that they know about? I would prefer the code to be readable. I
particularly like YUI's code. Does anyone have any more applications/
examples? Thanks .
Look at any of the big libraries - jQuery, Prototype, YUI, etc.
What kinds of things are you trying to learn from the code/style?

Matt Kruse

Jul 26 '07 #2
David Mark said the following on 7/26/2007 2:27 PM:
On Jul 26, 2:01 pm, Matt Kruse <m...@mattkruse.comwrote:
>On Jul 26, 12:55 pm, Jang <jangc...@gmail.comwrote:
>>Does anyone have an example of well written JavaScript applications
that they know about? I would prefer the code to be readable. I
particularly like YUI's code. Does anyone have any more applications/
examples? Thanks .
Look at any of the big libraries - jQuery, Prototype, YUI, etc.
What kinds of things are you trying to learn from the code/style?

Matt Kruse

I gather the OP likes reading applications written for YUI, rather
than the YUI code itself.
How do you read "I particularly like YUI's code" and interpret it as "I
like applications written for YUI"? Sounds more like the OP is looking
for libraries to view/review and that puts Matt's questions dead in line
with being proper and right.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 26 '07 #3

"Randy Webb" <Hi************@aol.comwrote in message
news:eI********************@telcove.net...
David Mark said the following on 7/26/2007 2:27 PM:
>On Jul 26, 2:01 pm, Matt Kruse <m...@mattkruse.comwrote:
>>On Jul 26, 12:55 pm, Jang <jangc...@gmail.comwrote:

Does anyone have an example of well written JavaScript applications
that they know about? I would prefer the code to be readable. I
particularly like YUI's code. Does anyone have any more applications/
examples? Thanks .
Look at any of the big libraries - jQuery, Prototype, YUI, etc.
What kinds of things are you trying to learn from the code/style?

Matt Kruse

I gather the OP likes reading applications written for YUI, rather
than the YUI code itself.

How do you read "I particularly like YUI's code" and interpret it as "I
like applications written for YUI"? Sounds more like the OP is looking
YUI is clearly not an application.
for libraries to view/review and that puts Matt's questions dead in line
with being proper and right.
Even if it was. I wouldn't recommend reading the library code to how write
well-written JS applications.
Jul 26 '07 #4
On Jul 26, 3:19 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
[snip]

Oops. Previous response cut short by real world distraction. Now
back to the surreal world this thread has become.
>
How do you read "I particularly like YUI's code" and interpret it as "I
like applications written for YUI"? Sounds more like the OP is
You are quoting out of context. The OP asked for examples of "well
written JavaScript applications" and specifically ones that were
"readable." YUI is not an application, not well-written and, from
what I have seen of it, unreadable. In contrast, libraries like YUI
claim to enable application developers to write concise, readable
code.

Furthermore, it is hardly a stretch to call a YUI application "YUI
code." It is in the same vein as "MFC code." If you follow this
link, you will see that "YUI code" is used to describe code written
for YUI as often as it is to describe the actual library code.

http://www.google.com/search?sourcei...%22YUI+code%22

Clear?

Jul 26 '07 #5
David Mark said the following on 7/26/2007 4:57 PM:
On Jul 26, 3:19 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
[snip]

Oops. Previous response cut short by real world distraction. Now
back to the surreal world this thread has become.
I have no reason to doubt that....
>How do you read "I particularly like YUI's code" and interpret it as "I
like applications written for YUI"? Sounds more like the OP is

You are quoting out of context.
I quoted directly what the OP wrote and what you wrote as a response to
that, how that it is "out of context" is elusive at best.
The OP asked for examples of "well written JavaScript applications"
and specifically ones that were "readable."
Yes, as anyone that reads the original post will be aware of.
YUI is not an application, not well-written and, from what I have
seen of it, unreadable.
Nobody said it was. They didn't even come close to implying it.
In contrast, libraries like YUI claim to enable application developers
to write concise, readable code.
Most libraries make that false claim, one that I have never believed.
Furthermore, it is hardly a stretch to call a YUI application "YUI
code." It is in the same vein as "MFC code."
The OP did not say "YUI Code", the OP wrote "YUI's code" and YUI's is
possessive and implies the code in YUI itself, not code written to work
with YUI. And hence my question as to how you got from one to the other.
If you follow this link, you will see that "YUI code" is used to
describe code written for YUI as often as it is to describe the
actual library code.
Again, the OP did not say "YUI Code", he said "YUI's code". Small but
very distinct difference.
http://www.google.com/search?sourcei...%22YUI+code%22

Clear?
What is clear is that you didn't understand my question, nor the impact
of YUI's versus YUI.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 28 '07 #6
On Jul 28, 4:32 am, Randy Webb <HikksNotAtH...@aol.comwrote:
David Mark said the following on 7/26/2007 4:57 PM:
On Jul 26, 3:19 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
[snip]
Oops. Previous response cut short by real world distraction. Now
back to the surreal world this thread has become.

I have no reason to doubt that....
How do you read "I particularly like YUI's code" and interpret it as "I
like applications written for YUI"? Sounds more like the OP is
You are quoting out of context.

I quoted directly what the OP wrote and what you wrote as a response to
that, how that it is "out of context" is elusive at best.
You quoted one sentence out of a context that gives further indication
of its meaning. What is elusive about that concept?
>
The OP asked for examples of "well written JavaScript applications"
and specifically ones that were "readable."

Yes, as anyone that reads the original post will be aware of.
I assume you didn't read it or you would never have posted your
question about my thought process.
>
YUI is not an application, not well-written and, from what I have
seen of it, unreadable.

Nobody said it was. They didn't even come close to implying it.
But, again, if you understood the original post, you wouldn't have
been confused about by response. The OP was clearly not talking about
the code inside YUI as YUI is none of the things he expressed
admiration for. Get it now?
>
In contrast, libraries like YUI claim to enable application developers
to write concise, readable code.

Most libraries make that false claim, one that I have never believed.
Nobody sane person would believe it. That is beside the point.
>
Furthermore, it is hardly a stretch to call a YUI application "YUI
code." It is in the same vein as "MFC code."

The OP did not say "YUI Code", the OP wrote "YUI's code" and YUI's is
possessive and implies the code in YUI itself, not code written to work
with YUI. And hence my question as to how you got from one to the other.
This isn't a forum for inquiries about my thought process. The OP got
his answers and is apparently not in need of further assistance.

Don't you have a FAQ to work on?

Jul 28 '07 #7
David Mark said the following on 7/28/2007 4:57 AM:
On Jul 28, 4:32 am, Randy Webb <HikksNotAtH...@aol.comwrote:
>David Mark said the following on 7/26/2007 4:57 PM:
>>On Jul 26, 3:19 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
[snip]
<snip>
>>Furthermore, it is hardly a stretch to call a YUI application "YUI
code." It is in the same vein as "MFC code."
The OP did not say "YUI Code", the OP wrote "YUI's code" and YUI's is
possessive and implies the code in YUI itself, not code written to work
with YUI. And hence my question as to how you got from one to the other.

This isn't a forum for inquiries about my thought process.
Nothing about your "thought process" has any sense to it anyway. But,
your inability to realize the difference between "YUI Code" and "YUI's
code" - even after it is pointed out to you - speaks volumes about your
mental processes.
The OP got his answers
If he did, then it came from Matt Kruse as nothing else has been posted
to answer that question.
and is apparently not in need of further assistance.
Or can't find his way back to this group.
Or is on vacation and can't post back yet.
Your assumptions are amusing sometimes.

P.S. YGCIB
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 28 '07 #8
On Jul 26, 10:55 am, Jang <jangc...@gmail.comwrote:
Does anyone have an example of well written JavaScript applications
that they know about? I would prefer the code to be readable. I
particularly like YUI's code. Does anyone have any more applications/
examples? Thanks .
Hi Jang,

If you are interested in OOP application design, I recommend reading
books on design patterns.

The classic book is "Design Patterns" by Gamma, Helm, Johnson,
Vlissides and this is a book worth having on your desk.

Before I studied that book I read "Head First Design Patterns" by
Freeman, Freeman, Bates, Sierra which is really just a reformatting
and possibly more accessible version of the Gamma et al. book.

A more direct answer to your question may be to read the Model-View-
Controller chapter of "Essential ActionScript 2.0" by Moock.
ActionScript is only a small step away from JavaScript and they are
both ECMAScript implementations (each with some extensions). I think
Moock's chapter on MVC is the best description I've read about using
MVC in the browser. There is now a new edition of Moock's book called
"Essential ActionScript 3.0" which I haven't seen yet. I've done quite
a bit of experimentation with Moock's framework in JavaScript and it
works well. If you want more info about my experimentations let me
know.

Peter

Jul 29 '07 #9
Also make sure to read these:

http://javascript.crockford.com/

He (Douglas Crockford) is one of the main architects behind YUI!.

--
Andreas M.
Oct 14 '07 #10
On Oct 14, 3:26 pm, "Andreas M." <foo...@invalid.invalidwrote:
Also make sure to read these:

http://javascript.crockford.com/

He (Douglas Crockford) is one of the main architects behind YUI!.
I know he works at Yahoo! but is he intimately involved in the design
of YUI? I have not seen any evidence that is true. For example, The
YUI style of JavaScript OOP does not seem inline with the types of
JavaScript OOP Crockford promotes.

Peter

Oct 15 '07 #11
Peter Michaux said the following on 10/15/2007 1:11 AM:
On Oct 14, 3:26 pm, "Andreas M." <foo...@invalid.invalidwrote:
>Also make sure to read these:

http://javascript.crockford.com/

He (Douglas Crockford) is one of the main architects behind YUI!.

I know he works at Yahoo! but is he intimately involved in the design
of YUI? I have not seen any evidence that is true. For example, The
YUI style of JavaScript OOP does not seem inline with the types of
JavaScript OOP Crockford promotes.
Try running the YUI libraries through JSLint.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 15 '07 #12

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

Similar topics

4
2190
by: Python Baby | last post by:
learning Python, planning on making an interactive website. To me, "interactive website" = "web app" = websites such as NetFlix, Amazon, Orbitz, Hotmail, MyYahoo, etc. Something stateful that...
0
1944
by: Matt | last post by:
Hello, I am attempting to get a software prototype UI/demo built in Flash to talk with existing C++ (so I can exchange data and commands between the application-software already developed in the...
5
10350
by: planetthoughtful | last post by:
Hi All, I'm curious to know if anyone in the group can recommend any free Access2003 applications that are available for download and which feature great interface (ie GUI) design? I'm...
7
2893
by: Manne | last post by:
I'm looking for a library of practical JavaScript examples. Can you recommend any? Thanks for your time.
32
2474
by: Tom Cole | last post by:
I bet 50% of the posts I've read lately have had at least one bad thing to say about every website or book dedicated to javascript. There are clearly a few posters (you know who you are) who...
0
1240
by: gt8887b | last post by:
Hello! In his recent newsletter embedded expert Jack Ganssle says that programming students, as well as professional developers should readh "great code" (hight quality/well-crafted code that...
42
2201
by: gt8887b | last post by:
Hello! In his recent newsletter embedded expert Jack Ganssle says that programming students, as well as professional developers should readh "great code" (hight quality/well-crafted code that...
1
1209
by: optimistx | last post by:
I am trying to learn, which type of javascript code is really good according to the experts of this newsgroup. It might be easy to show few lines of code with nothing to blame, but what about...
0
7108
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
6967
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...
0
7142
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,...
0
7181
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...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7352
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
4565
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...
0
3078
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...
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.