Now you may ask yourself what is this SandBox I am referring to. Sandbox is a pattern used for our new FW Toolkit, part of our development framework that is JavaScript based and will reduce the chance of code collision. It will also help to organize our code by using namespaces and modules. Here at Frameweld we use many external libraries to assist us in our project development and have to integrate components into our existing code. Until recently, we were lacking in a structure that ensured there weren’t any conflicts when integrating said components.

Keeping this in mind, I decided we needed some type of organized space that would help us speed up the process of integration and assist us in creating one more seamless step for developing our clients sites. This is where the new FW Toolkit began to form. We have been putting together a comprehensive list of libraries we actively use and now we are in the process to namespace and modulate them in order for the SandBox pattern to easily pull components into your websites.
Below is an example of how the new FW Toolkit will function:

FW_Toolkit([‘ajax’, ‘event’, ’carousel’], function (object) {

// your code will go here and the modules listed will be available for use.
});
The great thing about the pattern is you can call many sandboxes and even nest them if needed:
FW_Toolkit(‘*’, function (object) {

// your code for this sandbox will go here and all modules will be available for use (asterisk is the
// flag for all modules).

FW_Toolkit([‘navigation’, ‘tabs’, ’widgets’], function (object) {
// more code will go here without having to worry about the outer code conflicting with // the inner code. They use their own sandbox!
}
});

With this pattern, we will be able to code freely without any concern of collisions and/or redundancy, which in essence will provide a unified structure for our code. Please share your thoughts on our new FW Toolkit, which is set to launch the first week of October. We would love to hear how the public weighs in on this, and also, stay tuned in for our upcoming Visitor Tracking and User Tracking components!








Comments may be moderated. Please do not repost if you do not see your comment right away. It may be held for moderation.