Top Open Source JavaScript Libraries, Frameworks and Tools, Page 2

6. Easy JavaScript Testing with Jasmine

Testing is inarguably a crucial part of the software development process, insomuch that a great deal of effort has been put into incorporating testing directly alongside the coding phase by way of test-driven development (TDD). Jasmine offers JavaScript developers a great way to incorporate TDD, doing so in a fashion which does not place special emphasis on any particular browser, JavaScript library, or operating system. This means Jasmine can be used to test any JavaScript code, including that used within Node.js projects.

To learn more about Jasmine see this introduction, published on the Jasmine GitHub wiki. Additionally be sure to check out the series of example-based tutorials on the wiki.

7. Writing Less Code with Underscore.js

As mentioned earlier in this article, jQuery can be a great timesaver when writing JavaScript code thanks to the large number of shortcuts and syntactical conveniences built into the library. Underscore.js was created with a similar goal in mind, intended to serve as a "utility belt" for doing functional programming in JavaScript. Providing approximately 60 functions capable of slicing and dicing data in countless ways, you'll find native implementations for mapping, reducing, flattening, and sorting JavaScript data.

8. Avoiding JavaScript with CoffeeScript

Despite the increased availability of great JavaScript-based libraries and frameworks, a fair number of developers remain steadfast in their attempts to avoid the language at all costs. One enterprising programmer named Jeremy Ashkenas has even gone so far as to create an entirely new programming language which can be subsequently compiled into JavaScript, allowing developers to avoid writing JavaScript altogether.

While on its surface the idea of learning another language for the express purpose of avoiding JavaScript may sound strange, CoffeeScript has nonetheless gained quite a following, amassing almost 2,300 GitHub project followers and having recently been added to Rails 3.1 (with much ensuing controversy). One reason for such interest is CoffeeScript's concise code; for instance check out the following simple example:

hello = "1 + 1 = #{1 + 1}"
alert(hello)

Once compiled, this CoffeeScript example will be converted into the following JavaScript:

To learn more about CoffeeScript, be sure to check out the official website and additionally my Developer.com tutorial on the topic, CoffeeScript: Create Optimized JavaScript Code Without Touching JavaScript.

9. Yahoo UI Library

The Yahoo UI Library (YUI) is an incredibly powerful JavaScript- and CSS-based solution for building Web applications which in my opinion come closer to resembling their desktop-based brethren than those created by any of the competing JavaScript toolkits. Not convinced? Check out the amazing set of YUI-based examples available via the YUI website. One of my favorite widgets is Dial, which provides users with the ability to finely tune a setting using a familiar knob-like interface.

YUI goes beyond what we've come to expect from a typical JavaScript library, providing a variety of readily available CSS grids which take much of the guesswork and frustration out of creating grid-based layouts. See this example, which demonstrates YUI's grid layout capabilities by recreating the interface similar to that made available to My Yahoo users.

An open source project, the YUI project is managed via GitHub, and has attracted a large community of contributors who have extended YUI in numerous ways. See the YUI 3 Gallery for a comprehensive list of what's available.

10. Easier Debugging with Firebug

Although not exclusively used for JavaScript-specific purposes, the Firebug Firefox extension has long been such an indispensable tool to JavaScript developers that I thought this article would be horribly incomplete without mentioning it. Offering a powerful JavaScript debugger and profiler, DOM explorer, and network monitor, it's possible to closely examine the behavior of your JavaScript code throughout the entire execution lifecycle, even when that behavior involves Ajax-based interaction with the Web server.

To learn more about Firebug, be sure to peruse the official website and additionally check out my Developer.com tutorial Firebug: Add Browser-based Debugging to Your Ajax Development.

Conclusion

While all 10 of the projects covered in this article are certainly prominent, they by no means represent the entirety of what's available to JavaScript developers. Are you using a JavaScript library, utility or other development tool not listed here? Tell us about it in the comments!

About the Author

Jason Gilmore -- Contributing Editor, PHP -- is the founder of EasyPHPWebsites.com, and author of the popular book, "Easy PHP Websites with the Zend Framework". Jason is a cofounder and speaker chair of CodeMash, a nonprofit organization tasked with hosting an annual namesake developer's conference, and was a member of the 2008 MySQL Conference speaker selection board.

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.