Blog

Sep 24

EdgeConf San Francisco 2014

By on September 24, 2014 9:57 am

At many conferences, the hallway track is more interesting than the track during presentations. It’s the serendipity of a small group of people interested in solving a similar problem that run into each other and just start talking through it that makes the hallway track the most interactive experience at most conferences.
edge
EdgeConf capitalizes on these discussions by turning the hallway track into what the conference is all about! There are a selected set of topics covering emerging trends in web technologies and a panel of 5-6 people take the stage with one stepping forward to bring the audience quickly up to speed. The discussion begins!

The panelists work through a set of curated questions and there’s a system for the audience to participate and join the debate. Everyone is encouraged to spend less than a minute at a time talking, ideally 30 seconds or less. If the speaker goes over 2 minutes, there’s a nice warning across the screen on stage that tells the speaker that their time’s up. Oh, and the whole thing was streamed live! You can watch all 10 hours of coverage or read the gist below!

Sep 12

Intern 2.1 released

By on September 12, 2014 9:06 pm

Today we’re happy to announce the release of Intern 2.1. This release contains several bugfixes and improvements to existing functionality, as well as new features to make running tests and handling test results easier. The full list of enhancements and bugfixes is available in the release notes. Here are some of the highlights!

More output options

Two new reporters have been added to Intern: an HTML reporter for the browser client and a JUnit XML reporter.

The HTML reporter is a new default reporter for Intern’s browser client runner (client.html). It displays at the end of a test run, summarizing the test results and presenting them in an easy-to-read format:

The output of the JUnit reporter, on the other hand, is meant for machine consumption. It aggregates test results and outputs them in a report.xml file that follows generally accepted standards for JUnit-compatible XML. This makes it much easier to plug Intern into tools that accept JUnit reports, like Jenkins.

Choosing which tests to run

We’ve added two new command line arguments, functionalSuites and grep, and new test skipping functionality.

The functionalSuites argument works just like the existing suites argument and overrides whatever is set in the functionalSuites configuration property:

intern-runner config=tests/intern \
    functionalSuites=tests/functional/myWidget \
    functionalSuites=tests/functional/myOtherWidget

The grep argument, available both on the command-line and as a configuration file property, lets the user filter test IDs (e.g., “main – mySuite – click the done button”) using a regular expression.

For example, to run only the tests whose IDs contain the phrase “done button”:

intern-runner config=tests/intern grep="done button"

When a test is filtered by grep, Intern skips it and reports it as skipped.

Test writers can also programmatically skip tests using the new skip function. A test can call this.skip(<message>) at any time to halt execution and move to the next test. The skip message will be reported by all built-in reporters, as well as any custom reporters that listen for the new /test/skip message.

General improvements

As always, this release contains many other smaller improvements to Intern’s existing functionality:

  • The Istanbul and Leadfoot dependencies have been updated to incorporate new features and bug fixes
  • Intern’s code instrumenation handles Windows file paths correctly
  • Suites now provide elapsed time on an elapsedTime property
  • Intern now works when started using a subdirectory proxy
  • Proxy performance has been improved
  • Intern no longer starts the unit test execution process if the suites property is empty

Conclusion

For more information on Intern’s features, usage examples, and documentation, please visit the Intern Web site. If you’re not sure where to start with Intern, or you need some help making your code more testable, SitePen can help! Contact us for a free 30-minute consultation.

Sep 9

On YUI, Dojo 2, and long-term JavaScript toolkits

By on September 9, 2014 9:20 am

In late August, YUI surprised the JavaScript world by announcing that, effective immediately, development efforts on YUI have been suspended. YUI was a well respected peer of Dojo over the years, and we were surprised to hear this news from Yahoo. The JavaScript community can be very fickle, with new projects created every day. It’s very easy to create open source software, but it’s difficult to create projects that last.

Aug 27

Dojo FAQ: How can I create dependent or linked select controls using Dijit?

By on August 27, 2014 10:09 am

DojoFAQ

When building a select control in a form there are times where its available options need to change dynamically in response to a change in another control. For instance, a form with both country and state/province select controls might require the options in the state select to change based on the country select’s current selection. This is what we would call a dependent, or linked, select. One way to accomplish this is by watching changes in the selection state of one select and finding and setting the appropriate selection values on the other.

The selection values of Dijit Select widgets can be provided as an array of options objects or a dojo/store instance. We will walk through an example creating a dependent select for both types of source data.

Aug 25

dgrid 0.3.16 is born!

By on August 25, 2014 1:40 pm

dgrid 0.3.16 has been released!  It includes the following improvements:

  • Various improvements to keyboard accessibility, including interoperation with the ColumnSet mixin and editor column plugin
  • Additional ARIA attributes for improved accessibility in the ColumnHider and Pagination extensions
  • Improvements to logic for drag-and-drop operations with DnD extension

More information on dgrid 0.3.16 is available in the release notes.

We are working hard on our next release, dgrid 0.4!

Aug 22

Advanced TypeScript concepts: Classes and types

By on August 22, 2014 8:38 am

While TypeScript is very simple to understand when performing basic tasks, having a deeper understanding of how its type system works is critical to unlocking advanced language functionality. Once we know more about how TypeScript really works, we can leverage this knowledge to write cleaner, well-organised code.

If you find yourself having trouble with some of the concepts discussed in this article, try reading through the Definitive Guide to TypeScript first to make sure you’ve got a solid understanding of all the basics.

Aug 20

SitePen Unplugged 2014: A face-to-face adventure

By on August 20, 2014 9:31 am


SitePen is a rather unique company. For those of you who don’t already know, everyone in our company works from home. We are all spread across the United States. Despite that, the magic of our culture is that we feel closer to our coworkers at SitePen than at our previous office-based jobs. How is that even possible?!? We have grown together (think Katamari Damacy) through phone and online conversations and the virtual office we share is a very real thing for us. However, as a result, most of us haven’t seen each other’s faces before. Unplugged was a treat for everyone as it gave us a week to indulge in the opposite end of the social spectrum. No electronic devices, only face to face interactions and (gasp! frightening, I know) eye contact! Hey seriously, stop looking at the floor… I’m up here!

Leading up to the Unplugged event itself, nobody knew exactly what we were getting ourselves into. We only knew that we signed a few scary waivers, there would be rafting, no electronic devices, and that our flights were taking us all to Colorado on the same day. Suspense and intrigue leading into a new, shared adventure!

Aug 13

Dojo FAQ – How do I use Bootstrap with Dijit?

By on August 13, 2014 12:15 pm

DojoFAQ

Bootstrap is a framework created by Twitter’s developers to consolidate their HTML/CSS design and widgets. Bootstrap provides a clean responsive design, but the set of widgets it includes is limited, especially when compared to what’s available in the Dijit library. The CSS/HTML theme can be used independently of the widgets, but how do you use the Bootstrap theme with the Dijit library?

As you may have guessed, it’s not quite as simple as including the relevant Bootstrap CSS files. However, Dijit supports custom themes, so with a bit of work the elements of the Bootstrap theme could be ported to Dijit widgets. Fortunately, this was just what the dbootstrap project set out to accomplish.

For a better idea of what this Dijit/Bootstrap marriage looks like, check out the dbootstrap gallery, a modified version of Dijit’s Theme Tester that also includes dgrid. Let’s take a closer look at dbootstrap and how to use it in your Dojo application.

Jul 30

Dojo FAQ: Why do I need to use an HTTP server with Dojo?

By on July 30, 2014 11:52 am

DojoFAQ

When developing for the web, it is a recommended best practice to always test your application during development with a web server. This is for two primary reasons. By running a web server, you can approximate a production environment similar to how your application will be served to your users. Also, browsers implement a same-origin policy that is different for quasi-protocols like file://. Many of Dojo’s modules like dojo/i18n, dojo/text, Dijit templates, and dojox/gfx depend on loading files from the same origin.