Quantcast
Channel: A Frontend Engineer's Blog » frontend
Viewing all articles
Browse latest Browse all 2

How to chose a javascript library

$
0
0

There are so many free 3rd party libraries out there that are able to solve a problem. The question is which of these libraries to pick for the job.

Identifying reliable libary

How to chose a 3rd party library and make sure it’s reliable. The focus lies on libraries that are free to use.

  • The library’s source code is on a public repository such as Github.
  • The library is top ranking in search results. This means the library has been linked to often, perhaps from blogs where it has also been discussed.
  • There are questions and answers on Stackoverflow. Questions will arise if the library is used.
  • There are independent blog posts about the library. Only worthwhile libraries will be spoken about.

Github helps

Github makes identifying reliable libraries very easy. At the time of writing Javascript makes 21% of Github’s hosted source code, so it is very likely, that a javascript library is hosted on Github.

Have a look at the screenshot in Listing 1. There are three marked areas:

  1. Stars. The more the better. Only a reliable library’s repository will be favourited often.
  2. Forks. The more the better. Only a promising or otherwise interesting library’s repository will be forked to work on. More forks means more people are working on improving the library.
  3. Last update. The more recent the better. Recent updates means the library’s repository is alive and probably well kept.
github_2013-05-12_10.15.15.png

Listing 1: jQuery-Mobile on Github (2013-05-12 20:15:15)

Other things to look at are tests. A folder named test in the repository’s root directory is a good sign. Tests provide confidence. A detailed documentation with examples and usage instructions is also a sign of a popular library. The author wouldn’t make this effort, if the library wasn’t meant for re-use.

Conclusion

Avoid re-inventing the wheel at all costs. If there are libraries out there then use them, but be careful about which library to use. The wise web developer will take some time in selecting a reliable library. He will do this eagerly because he is lazy and because he is aware of the price of using a poorly maintained library or creating an own one.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images