- google closure library
Classified by functionality, there are two kinds of library
- Full functional library: library contain all the function we need
- Single functional library: library focus on particular problem
Full functional library tends to solve all problems, such as jx, dojo, jquery provide a suit of solutions including module load, core object extend, browser compability, DOM operation and ajax etc. They provide a lot of functions, but it’s learning curve is not easy, and hard to maintain.
Single functional library tends to solve particular problem, such as seajs only solve module load, async focus on asynchrounous problem, underscore providing FP suger. By using several single functional library, we can do whatever full functional library can do. That’s why there are ender which is no library library only used for organize libraries.
I prefer to single functional library than full functional library such as extjs, because:
- Who is powerful: by organize single functional library, we have full functional library
- Who can do better: single functional library could do better by performance, bug fix because there contributor are easier to understand what they do.
Through, single functional library faced with some problem:
- how to maintian module dependencies
- code style
- compilation and compression
and also there are solutions:
- seajs, requirejs
- google closure deps, module, compile tool suit
In the browser - small, loosely coupled modules are the future and large, tightly-bound monolithic libraries are the past!