Username:
Password:
JavaScript Libraries Tutorials

Define JavaScript Libraries / Advantages & Disadvantages

Subtitles of the Movie

In this tutorial we continue to discuss what JavaScript Libraries are, specifically focusing on what are the advantages of using a JavaScript Library. Now, there are a lot of different advantages to utilizing a JavaScript Library and here are just a few of the many reasons you may wish to use one of these tools. So first of all, it's quick. Typically the toolkits will allow you to accomplish with two lines of code what would normally take ten lines. Going along with quick, it's easy. Now, the thing is these JavaScript Libraries are going to give you code that's already been built. So it's kind of like going shopping for the features you want to use and then slapping them together. So in short order you're going to have an amazing application with just a little bit of elbow grease. Third, there's not need to be a master. These JavaScript Libraries make it so easy and quick for you to get the stuff that you need without having to worry about everything there is to know about JavaScript and the implementation issues with the specific browser that you're going to be using in your application because most of your JavaScript Libraries are going to take care of that. There's no need to reinvent the wheel so if you need to code something, there's probably a good chance that somebody else has already done it because well, you know, people tend to try to do the same thing. So if you just do a quick search on the Internet, you're probably going to find some code out there that's going to help you do what you need to do using these JavaScript Libraries. As mentioned above, there's these cross-browser issues which, if you've been developing for web for any amount of time, you are probably already aware that different browsers are going to interpret things differently. Well, the JavaScript Libraries for the most part are going to take those issues and negate them because the JavaScript Libraries are going to be handling these cross-browser differences so it's going to give us an additional level of abstraction from the browser so we can code and not really worry about how the browser's going to be reacting to it. Also, there's very little code maintenance on our part because the code is maintained by an external source. We just have to update our implementation of that code whenever they release a new version. So there is a little bit of code maintenance but we don't have to really worry about refactoring once we have implemented it appropriately. Now, if we end up changing that code in some way, of course we're going to need to maintain that code but the amount that we're going to have to maintain is drastically reduced. Also, because somebody else has created this, we're going to see a drastic reduction in our programming hours because the companies that have created this, they have had multiple people working on all these different projects and so we're going to see that their work is going to benefit us. So it's a win-win situation to use these JavaScript Libraries. Also, we're going to see that the JavaScript Libraries are going to give us a way that we're going to be able to quickly develop across a team. So one application can be developed by multiple people on a team with different programming styles but because you're using a common platform, there's going to be some type of consistency between the different elements of that application. Also, you can mix your libraries. That's one of the great things about most of these JavaScript Libraries is that you're going to be able to mix the libraries, pulling in the pieces that you like from the different libraries and not using the pieces you don't like. So you're going to have all the best from all the libraries if you choose to do that; however, keep in mind that whenever you pull in more scripts from different places, you're going to make it more complicated to find where the problems are. So those are the advantages of using JavaScript Libraries. Let's take a look at some of the disadvantages. First of all, someone else created it, which essentially means that you didn't. So you don't know how it works. And since you don't know how it works, you also may not know how to fix problems when they arise. And, of course, these issues are going to become more complex when you introduce multiple libraries into the mix. So in some ways, these libraries can be like playing with fire, especially if you don't know enough about JavaScript to dig your way around through the code. Also these JavaScript Libraries can become a type of crutch because the JavaScript Libraries do cover a lot but, you know, there, there's more to JavaScript than what's available inside of a particular library. So just like any tool, they can only take you so far. And that's the third point here is it can be somewhat limited. So the JavaScript Libraries can be somewhat limited in what they're doing and if you look at the library and you say oh, well, the library can't do that so I can't implement that feature in my application, you're using the JavaScript Library inappropriately because the JavaScript language itself is far more robust than what any of these single libraries are capable of doing. So don't be afraid to kind of throw the library aside and get in there and code it yourself. So the disadvantages, if you get into the mind frame of you're using these libraries, then that's all that JavaScript can do. So be aware that there indeed is more that JavaScript can do than just that. And that concludes this tutorial on taking a look at the advantages and disadvantages of using the JavaScript Libraries.

Tutorial Information

Course: JavaScript Libraries
Author: James Street
SKU: 33984
ISBN: 1-935320-39-4
Release Date: 2009-04-06
Duration: 12.5 hrs / 157 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available