Library for building object-oriented APIs
- Creating class hierarchies
- Class mixins
- Method overloading
- Declaring default arguments and properties
- Type checking arguments and return values
- Custom events
- and more...
The two easiest ways to install solv are npm and bower. Solv can also be installed by downloading or cloning from github. Solv is a modular library and doesn't offer a concatenated file for distribution. Once Solv is installed each of it's modules can be pulled in when and where needed.
- To install into a node project - run
npm install solv
- To install into a browser project - run
bower install solv
- To get a copy of the source - run
git clone https://github.com/bob-gray/solv.git
The browsers and platforms represented below are those that are tested as part of Solv's build.
Solv strives to be as simple and robust in its implementation as possible. Code quality is important. Clean, obvious code is valued over clever, obfuscated code accompanied by verbose comments. Comments are only present in Solv when all attempts to refactor for clarity have failed. Developer productivity is valued over premature optimization. Solv's API is designed to be easy and fun to use.
Solv augments native prototypes to provide the best possible API. There are risks when altering native prototypes. Native prototypes are global and collision with other code or future native APIs is possible. On the other hand, member functions enhance the clarity of many operations. This makes augmenting native prototypes very attractive.
###Test from Command Line
npm install -g grunt-clito install grunt command line interface
npm installto install test dependencies
grunt testto execute test
See Gruntfile for more test and analysis options.
###Test in Browser
npm install -g bowerto install bower
bower installto install test dependencies
tests/index.htmlin the browser of your choice
Solv is being developed in conjunction with
api-meta, projects advocating the use
of meta data declared as JSON. This meta data can then drive runtime behavior and be
parsed statically for documentation generation. Solv includes a
implementation that is meta-json compliant and many of the methods contained
in Solv accept options objects comforming to api-meta. Building application with Solv and
declaring options with
meta means documenations is tied directly to
implementation. meta-json and api-meta are still works in progress as is Solv.