Principles of vary javascript plugins