Sep 30

SitePen JavaScript Support in Action

By on September 30, 2015 1:20 pm

SitePen’s team of JavaScript experts provide high quality development and production support to a wide range of companies, from the Fortune 500 to small startups.

Recently, we had the opportunity to assist BuyWinR, a company based in Brisbane, Australia. In this case, we went from initial inquiry to solution in less than 48 hours. To provide insight into how a typical support issue might be solved, the founder of BuyWinR has allowed us to share this story.

Sep 8

Recent TypeScript talks

By on September 8, 2015 11:04 am


SitePen is a huge supporter of TypeScript. It allows our developers to write using modern standards support for ES6 and some ES7 features while still targeting ES5 browsers. It also includes a type system that adds to our code’s integrity and makes it easier to write good software.

As noted in the Dojo 2 vision, we have chosen TypeScript as our approach to building tools we rely on for a next-generation JavaScript and TypeScript stack. With the emergence of ES6 (a.k.a. ES2015), as developers we’re currently in a state where the language and environments (browsers, servers, desktop apps, mobile apps, IoT devices, etc.) are greatly improved, but in a backwards-incompatible manner. In the short term, this means that to leverage new features of the platform, we need a tool to transpile to things that work in browsers today.

Jul 28

Simple Model-View synchronization with dstore and Dijit

By on July 28, 2015 7:14 am


Nearly every sufficiently large web application looks for a mechanism to efficiently synchronize or bind data between the Model and the View. There are many large scale application frameworks and approaches focused on this, whether the binding is one-directional like React, or follows other approaches such as those seen with AmpersandJS, Angular, Aurelia, Backbone, Ember, Knockout, Mayhem, or many others listed on ToDoMVC.

Simple Model-View synchronization

Many of our customers use Dojo and Dijit, because it’s a comprehensive toolkit for building web applications that work today, and while it does not intend to be an MV* framework, it already includes a lightweight approach to getters and setters.

Jun 19

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.

Jun 10

Dojo FAQ: How can I sequence asynchronous operations?

By on June 10, 2015 8:01 pm

Dojo’s Deferred module provides a convenient way of managing asynchronous operations. If you’re new to deferreds, you can get a good introduction by reading our blog post and some tutorials on Getting started with Deferreds and Dojo Deferreds and Promises.

There are a few features of the then method on a promise that are important to understand and remember:

  • then always returns a promise
  • the promise returned by then resolves to:
  • the value returned by the callback passed to then
  • OR

  • if the callback returns a promise, the value that promise resolves to
Jun 1

Multi-Platform Distribution with TypeScript

By on June 1, 2015 10:47 am

Over the past several years, JavaScript has grown to be relevant not only for rich browser applications, but also for server and console applications. Many types of JavaScript libraries can be useful on both ends of this spectrum. Dojo 2 is no exception, and one of our goals is therefore to make it as easily distributable and consumable across environments as possible.

Module Compilation in TypeScript Today

TypeScript can already help toward this goal by compiling to both the AMD and CommonJS module formats. For example, given the following simple TypeScript module:

export function myFunction() {
    // ...
May 1

SitePen Podcast – Ep. 1 The Pilot

By on May 1, 2015 2:07 pm
SitePen Podcast

At SitePen, we’ve always thought it would be fun to do a podcast, we just didn’t know what to talk about. My idea of doing a show about Fantasy Football was universally panned as were topics such as speedrunning SNES games, Birding and ‘just talk about the weather’. Finally the idea came to us, we should talk about JavaScript!

It turns out, we are all very passionate about this topic and quickly agreed! So we gave it a shot and created a podcast. Is the name the result of too many brainstorming by committee meetings? Marketing gone wrong? Or did we simply mess up the name and decide to keep it? Listen to the podcast and find out!

Let us know what you think

This episode is a pilot which means that we need to show the big studio execs that people are interested. At least I think that’s how pilots work in podcasting. I actually don’t know. Either way, let us know if you’re interested in hearing more!

Apr 17

dstore 1.1 released

By on April 17, 2015 12:21 pm


We have released dstore version 1.1, which features a new set of stores for local DB storage. This feature provides the ability to store data locally in browsers, and use high-performance querying capabilities through the disparate technologies of IndexedDB and WebSQL (and localStorage), through the consistent dstore interface. Complex queries can be formulated in your application, and data can retrieved from local database storage with the same APIs and query format as is currently supported with other stores. Queries can then be automatically translated to SQL or cursor operations, depending on the underlying technology available.

Apr 16

We’re Contributing to Dojo 2!

By on April 16, 2015 2:28 pm

At the end of 2014, we looked ahead to determine where to focus SitePen’s open source efforts in the coming year. After our successful contributions to dgrid and the new dstore package, it became increasingly clear that contributing to the future of Dojo was where our team would have the biggest impact and the most fun. So, we’re happy to announce that we are and will be actively contributing to the planning and development of Dojo 2!

SitePen In Action

So far, We have contributed our knowledge and expertise in developing enterprise web applications to what Dojo 2 needs to be; a modular, collection of packages that fit together to deliver high-performance web applications that are well-designed, highly performant and maintainable.

We’ve also poured our hearts (and design resources) into the overhaul of the Dojo Website, which was in dire need of a modern design and cleaner information architecture.


So Much Excitement!

A few of the reasons we’re looking forward to contributing to Dojo 2:

  1. the final result will be a tight collection of packages that feel familiar to Dojo developers while leveraging the capabilities and improvements of the modern web platform.
  2. It’s going to be authored in TypeScript! As a superset of JavaScript, TypeScript makes it simpler to support many of the recent ES2015 improvements and provide support for types and interfaces.
  3. Helping to reshape and grow the Dojo community!

Don’t delay! Check out the new Dojo Web site, read the Dojo 2 vision and roadmap and when you’re spun up like us, hit the contribute button and tell us that you want to be part of the future of Dojo!

Apr 14

Minimizing Dijit Instances in dgrid

By on April 14, 2015 11:22 am


Dijit and dgrid provide a powerful set of user interface components, allowing for fast construction of sophisticated web applications with excellent performance and interactivity. However, one particular configuration of dgrid that can impact memory and performance: heavy use of persistent Dijit editors within grid cells. The dgrid’s Editor plugin makes it very easy to leverage various Dijits for editing cells. However, using the default “always-on” mode, where a Dijit is instantiated for every editable cell, in combination with a several columns with numerous rows can quickly consume a lot of memory and create a noticeable drag on your application’s performance.

Dijit editors can help provide some fantastic functionality, with powerful widgets for auto-completion, date input, and validation. In this post, we’ll review two approaches to achieving advanced data input in dgrids that are designed for heavy data manipulation without compromising performance or memory consumption.