Relative Content

Tag Archive for packages

How to modularize and package a client-side Javascript library today?

I’ve been catching up with the modern client-side JS ecosystem and reading up on CommonJS and AMD (incl. associated tools – browserify, requirejs, onejs, jam, dozens of others). If I’m writing a Javascript library, how do I modularize/package it such that it can be most broadly accessible (ideally by users who swear by CommonJS, AMD, and especially neither)?

Component design: getting cohesion right

I currently have a set of components named DataValues, ValueParsers, ValueFormatters and ValueValidators. The first one defines an abstract base class DataValue and contains a whole load of implementations. The 3 other components each define in interface similar to their name (minus the “s”), and also contain a bunch of implementations of those. These 3 depend on DataValues. There are no further dependencies.

Component design: getting cohesion right

I currently have a set of components named DataValues, ValueParsers, ValueFormatters and ValueValidators. The first one defines an abstract base class DataValue and contains a whole load of implementations. The 3 other components each define in interface similar to their name (minus the “s”), and also contain a bunch of implementations of those. These 3 depend on DataValues. There are no further dependencies.

Component design: getting cohesion right

I currently have a set of components named DataValues, ValueParsers, ValueFormatters and ValueValidators. The first one defines an abstract base class DataValue and contains a whole load of implementations. The 3 other components each define in interface similar to their name (minus the “s”), and also contain a bunch of implementations of those. These 3 depend on DataValues. There are no further dependencies.