Instead of reinventing the wheel with my custom V8 shell I decided to use nodejs. nodejs has an excellent module system which makes it easy to add new functionality.
Creating plugins for jQuery is a relatively straightforward task, however poorly named plugins can conflict with one another (or even with core jQuery functionality). I have seen numerous attempts at solving this problem which each have their advantages and disadvantages.
My take on this problem is to define widgets in a completely separate namespace and then refer to them using a single jQuery plugin `widget`. This plugin depends upon the following jQuery variant of my `$namespace` function from here.
Namespaces are an extremely useful tool when working with numerous classes, functions or even objects in many programming languages. They allow the developer to group these entities in an intuitive way to facilitate readability.
More importantly, namespaces are a mechanism which help to avoid clashing occurrences of unrelated objects which share the same name. This can easily happen when utilizing sources that were developed by separate parties.