Blog

Aug 7

Working with Intern Recorder

By on August 7, 2015 7:00 am

intern

So you’ve had a chance to try out Intern Recorder, our new Chrome DevTools extension for recording functional tests, and now you want to efficiently work these tests into your workflow? This post will guide you through these steps and provide helpful advice for improving the tests you record.

The goal with Intern Recorder is to reduce the tedium of creating functional tests by 80-90%, but to make tests work flawlessly, you still have some steps to follow to perfect them. Intern Recorder is very useful for getting started when creating functional tests, but the test code should ultimately be fine-tuned by hand and maintained and updated manually. It may take multiple runs with the Recorder to get the sequence of actions just right, but once you have it, plan to discontinue using Recorder for ongoing updates to the test as you will now have code you can continue to improve.

Aug 6

Introducing Intern Recorder

By on August 6, 2015 8:52 am

Intern Recorder demo

Intern Recorder is a new Chrome Developer Tools extension that makes creating functional tests for Intern faster and easier. The Recorder automates test creation by recording your interactions with a page in Chrome and converting those interactions into a test file that can be downloaded and added to your Intern test suite. The resulting test file works across all browsers and devices that are supported by Intern’s functional testing system.

The first release of the Recorder supports the most frequent operations that you’d commonly want to automate when writing a test suite, like keyboard and mouse interaction (including support for drag & drop). It can target elements based on ID and position within the DOM, for pages with deterministic DOM structures, or it can target elements based on the text content of those elements, for pages where content is deterministic but IDs and DOM structure are not.

You can download and install Intern Recorder from the Chrome Web Store. Once installed, the Recorder will show up on the “Intern” tab in Dev Tools. Full usage instructions can be found in the README.

This version of the Intern Recorder was sponsored by SITA. If you or your company find Intern or Intern Recorder useful, please help support ongoing development of these tools and consider a similar sponsorship to add features and fixes you’d like to see! Just send us an email letting us know of your interest and we’ll set up a call to talk you through the process and what you can expect.

Jul 30

Intern 3 is here!

By on July 30, 2015 11:00 am

Today, we’re very happy to announce the release of Intern 3! This newest version of Intern is a culmination of several months of effort to overhaul the primary portions of the test system in order to provide a more stable and robust platform for building future features and enhancements.

Jul 28

Simple Model-View synchronization with dstore and Dijit

By on July 28, 2015 7:14 am

dstore

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, 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.

Jul 7

JavaScript Support in action: Using dgrid and dstore with the Django REST Framework

By on July 7, 2015 8:23 am

Throughout the course of June, the dgrid StackOverflow tag saw a series of questions regarding usage of dgrid and dstore with the Django REST Framework. Based on the flurry of closely-related questions that popped up, I became quite curious as to the actual level of difficulty involved with this integration.

Over the holiday weekend here in the US, I decided to let that curiosity get the better of me. In this blog post, I share the results of that endeavor, stepping through the process of customizing a simple Django Rest Framework project to communicate with dgrid using dstore’s Rest store.

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 17

JavaScript in the Enterprise: Where do your developers turn for JavaScript Support?

By on June 17, 2015 8:45 am

The Situation

Deadlines are looming and it looks like it’s is going to come down to the wire. A developer has hit a roadblock while trying to integrate code from another team and connect it to a third-party API. He can’t figure out where things are going wrong. Is it his code? Is it the other team’s code? Is it the API? A few hours in and he’s going in circles — with no answer in sight.

‘Who can I even ask to help me with this?’

The rest of the developers on the team are heads down trying to complete their own tasks, and googling for an answer has proven fruitless due to the number of moving parts involved.

After pinging a couple of the developers on the other team and getting the runaround, the developer is completely stuck. Due to confidentiality and the rapidly approaching deadline, going to a public forum is out of the question and, even if he could, he’s unlikely to get an answer – let alone the right answer – in time.

This leaves him with with only a couple of viable ways to solve his problem.

Option 1: Keep hacking on it and hope the answer comes.

Option 2: Escalate to a development manager who will need to stop what they’re doing, review the issue, and work to solve it.

At this point, one thing is certain, the project is delayed and multiple tasks are stopped while this bug remains at large. The developer did the best he could with what he had to work with. But what if there was an…

Option 3: SitePen Support

The developer logs into his SitePen Support account, provides the details of his issue and asks for an answer. A SitePen engineer who is familiar with the developer’s source code, reviews the issue and works with the developer to get him unstuck. Meanwhile, the rest of his team continues on their tasks, uninterrupted. The project is saved!

With SitePen Support, each developer on your team has instant access to their very own dedicated help desk, staffed by SitePen’s expert JavaScript engineers. Inevitable problems like bugs, bad implementations, questions, and indecision are constantly wreaking havoc on project timelines and there are dozens of these issues popping up, around the clock, that kill team efficiency and threaten a project’s success. Choose OPTION 3 and eliminate problems quickly and efficiently by having SitePen’s team of senior JavaScript engineers on call to extend the knowledge, manpower and expertise of your development team.

Learn how SitePen Support can help your team!

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 dojotoolkit.org: 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!

JavaScript Workshops