Join Joe Marini for an in-depth discussion in this video What is Underscore.js?, part of Up and Running with Underscore.js.
The great thing about Underscore is that it cam be used with other libraries, like jQuery, for example. jQuery is really great at manipulating the dom and the contents of web pages. Well, Underscore is really great at manipulating data. So you might use Undercore to manipulate the data, then jQuery to lay out the data in a web page. Using jQuery with Underscore is a very powerful combination. So if you're already using jQuery, I really strongly suggest that you look into Underscore for your data needs. So what kind of data-related operations can you do with Underscore? Well, first you can narrow large data sets down to smaller ones.
You can sort and group data based upon various criteria. You can transform data into different shapes and formats. You can derive new data from existing data and exchange data sets with new properties. You can also format data using templates which is a very powerful feature of Underscore. We'll see examples of each of these as we get further and further into the course. For now, let's jump over to the Underscore website to see how it's organized. This is the underscore JS.org homepage.
And you can see that it's organized as one giant webpage with documentation for all of the functions. Along with a change log here down at the bottom, and some links and suggested reading. Now, I'm not going to go deep into every one of the 80 plus functions that are documented over here in the left-hand side of Underscore. I'm going to focus in this up and running course, on just the most important and most powerful ones to get you quickly using Underscore to manipulate your data. Alright. If you're raring to go as I am, let's get started with using UnderscoreJS.
- Understanding what Underscore.js is and does
- Installing Underscore.js
- Sorting, grouping, and filtering data sets
- Extracting information about arrays and objects
- Using templates to format data