Marcus Pope

Husband, Father, Inventor, Programmer Austin, TX - °

Software » VerbotenJS

Project Type: JavaScript Library

Status: Alpha


Preface:

This project stemmed from an effort to disprove the common misconception that object prototype extensions should be forbidden in JavaScript. While Erik Arvidsson coined the phrase, it was frowned upon amongst many in the community. And though I didn't make a dent in the group-think I did manage to produce an awesome general purpose library.

Overview:

VerbotenJS is based on Data Oriented Programming, which takes preference of objects, arrays and scalars over classes. All functionality is oriented towards those types and logic is applied across the Object/Array/Number/String/etc prototypes.

For instance, a core function is Object.prototype.ea, which allows for iterating over anything. It's a useful interface that provides all of the functionality of Array.prototype.filter|every|find etc without having 20 different namespaces to memorize. Plus it works on all data types, not just arrays. Need asynchronous iteration? Just provide a callback after the iteration function.

For..In

The only adjustment developers need to make in order to use this framework is to understand that for..in in JavaScript is a reflection mechanism not an iteration mechanism. It is designed to reflect the object's properties and prototype extensions. In VerbotenJS you can still use for..in constructs if you also use .hasOwnProperty checks. Or you can just use .ea() and never bother with either again.

3rd Party Libraries

Some packages like jQuery or Express are not compatible because they rely on reflection for the purposes of iteration. No matter, I wrote a verbotenizer script that parses any script into an abstract syntax tree, then makes modifications to the tree to ensure fixes compile back into JavaScript. But you won't want jQuery after you've tried HTMLElement prototype extensions.

Performance

Verboten has a light version that clocks in around 65k gziped. And because it doesn't wrap every element you ever touch in an array, memory and dom performance untouchable. Verboten will never be the bottleneck in your SPA.

Release Date

I have a bit more work to do on this project before I'd consider releasing it for public use. I have a couple more major design changes planned and I don't want to subject users to that change. I suspect this library will be ready in 2018.