Blockchain Basics

By on September 21, 2017 7:20 am

“Blockchain” is the newest term to enter the tech industry’s buzzword repertoire. Whether a company is processing sub-second banking transactions or transporting artisanal goat cheeses across state lines, it seems as though any company not investigating this technology, the same technology that powers infamous cryptocurrencies like Bitcoin, will surely go the way of the dodo. But what is this magical “blockchain” and how can a technology commonly associated with dark and scary cryptocurrencies ever be used to change entire industries as we know them? Well, let’s find out!

Rethinking Inheritance

By on September 19, 2017 10:19 am

Over the past year we’ve been heads-down working hard on Dojo 2 and its component architecture. The ability to change default component behavior is essential to a widget library, and several tactics exist for doing so. After extensive battle testing of different viable approaches to component modification, we decided to once again equip ES6 inheritance as our primary method of extending component functionality. Here’s why.

Inside Answers: Intern and async functional testing

By on September 20, 2016 5:43 am

SitePen Support is a service used by companies to improve the productivity and efficiency of their enterprise development teams. Our customers often ask questions about best practices when using various development tools for modern JavaScript and TypeScript development. Recently, we were asked to better explain some of the asynchronous syntax used by Intern. For example, where to put a .end() statement and where to resolve promises with Intern. Here was our response!

Dojo + Koa

By on June 19, 2015 7:03 am

Dojo and its AMD loader provide outstanding tools for structuring a Web application on the client-side. However, the notion of “writing a JavaScript application” has widened in definition over the past few years with the increased popularity of Node.js. Though Dojo can be used in a Node.js environment with the AMD module pattern, other key frameworks have gained prominence in the server-side JavaScript space, including Express, Flatiron, Sails.js and the Dojo Foundation’s very own Persevere. These frameworks give structure and handle common tasks such as routing, template rendering, and content negotiation. Still, since most operations on a Node.js server are asynchronous, server-side JavaScript can be a complex, treacherous mess of callbacks. Enter Koa, a Node.js framework that attempts to save us from this callback hell by using ECMAScript 2015 Generators. Using Dojo on the client-side and Koa on the server-side makes for a robust, clean, and expressive application. In this post, we’ll explain what generators are and how to use Koa with Dojo for ultimate code cleanliness.

Dojo FAQ: Dynamically loading CSS

By on July 2, 2014 11:46 am


In large JavaScript applications, it can be beneficial to dynamically load CSS stylesheets. For example, if a certain JavaScript widget, such as a complex grid, uses a large standalone stylesheet for its display aesthetics, it would be optimal to only load this stylesheet if the widget is in use, rather than always including the CSS source on each application load.

Meet your newest Intern

By on May 1, 2013 9:10 am

The Intern

JavaScript tooling has gained a huge amount of attention over the past few years, no doubt due to the language’s rapidly increasing popularity and maturity. Many fantastic utilities and powerful debuggers have emerged to help close painful gaps for Web developers, but despite these advancements, high-quality JavaScript testing is still notably absent.

Up to this point, JavaScript authors have had to pick and choose testing tools with incredibly fragmented feature sets. Whereas one tool might support easily running tests manually in many browsers, another might allow command-line automation but only use PhantomJS. A third might be designed to integrate with a continuous integration service, where a fourth might support none of that but allow you to emulate true browser events from outside the JavaScript sandbox. One might have so many plugins that it’s impossible to figure out which ones to use, whereas another might be so inflexible that adding any new features is impossible. It’s a mess.

Intern, from SitePen Labs, is different. It combines all the best features from various testing tools (plus a few new ones of our own) into a single, versatile, easy-to-use, standards-based browser testing stack for JavaScript. We’ve been using this testing framework internally for a while with great success and are really excited to be able to make this level of JavaScript testing available to the entire Web community.

For more information on Intern’s features, usage examples, and documentation, please visit the Intern Web site. If you just want to get started straight away, take a look at the quick start guide. We’ll be making an npm package available very soon to make getting started even easier. Bug reports and feature requests can be posted to the GitHub issue tracker. If you have any other questions, we’re here to help! Free end-user support is currently available via Stack Overflow. SitePen also offers commercial JavaScript support if you need a little extra TLC.

Please let us know in the comments how Intern can work better for you, so you can focus on delivering high-quality code while the Intern does the testing. Happy coding!

Generating and Viewing Custom Dojo API Documentation

By on January 18, 2013 12:30 am

When developing a JavaScript framework that others will consume, it’s hugely beneficial to provide clean, organized API documentation to accompany your codebase. With the August release of Dojo 1.8, we saw a brand new, extensible documentation parser, which is used to generate output for Dojo’s API viewer. Generating documentation for any project and serving up a custom API viewer is easy, and this post will show you exactly how to do it.