With all the many helpful Javascript libraries out there (YUI, Dojo, jQuery, Prototype, MooTools, ...etc), does it make sense to write an abstraction layer that allows developers to switch from one library to another without changing their code?
Abstraction layers and wrappers of this sort have proven very successful in hiding differences between database client libraries (i.e. specific implementations) by introducing one, clean and consistent interface to developers. It allows them to switch from one database to another with very little overhead and code change.
Providing an abstraction layer for developers would empower them to decouple their code from the direct implementation of these Javascript libraries. This is a big gain especially when a decision is made to switch from one library to another for whatever reason.
All the aforementioned libraries handle the following:
- Dom manipulation
- Event management
- Ajax management
- Element manipulation
- User Agent awerness
- Object extension
- Drag and Drop
I think I might just give it a shot :-) I'll keep you posted.
Comments