Typings for dojox/gfx

By on April 25, 2017 10:02 am

dojox/gfx is Dojo 1.x’s vector graphics library, with support for SVG, Canvas, and other legacy rendering environments through a drawing API based on the semantics of SVG. This API also provides the foundation for dojox/charting. Often the biggest challenge in working with vector graphics is the large number of possible configuration settings and permutations.

TypeScript makes it easier to leverage auto-complete within an editor. We’ve been working for a while to add and maintain typings for Dojo 1.x. One of SitePen’s support clients kindly suggested that it would be very valuable to put gfx and TypeScript together, and happily sponsored our efforts in making this happen!

What TypeScript can offer to Dojo 1.x

By on March 29, 2017 7:24 am

As many of you know, Dojo 2 is being built on TypeScript. Many of us involved in Dojo 2 believe that TypeScript brings several advantages to developing with web technologies these days. Features like structural typing and interfaces help us write code that is less prone to errors as well as being able to express to those consuming Dojo 2 what the intent of the code is.

If you have worked with Dojo 1 for any extended period of time, you will realise how feature rich and complex the Dojo Toolkit is. Because of the power and backwards compatibility of Dojo 1, it can often be daunting, even for an experienced user, to effectively use Dojo. If as a developer, you need to utilise a new part of Dojo, it can be confusing to understand what part of the API to use and how to use it. I know from personal experience, I would often review the test cases for a part of Dojo I wasn’t familiar with to try to figure out what the intent of the original author was.

As we have continued to work on Dojo 2, several of us realised that TypeScript could offer a lot to Dojo 1, potentially allowing people to start to migrate code to TypeScript and ES6+, making their current code even better, but giving them an easier path to the future. In order to be effective at using TypeScript with Dojo 1, we need to do a bit of enablement.

Functional reactive programming and Observables in JavaScript, TypeScript, and Dojo 2

By on February 27, 2017 7:45 am

Functional programming and reactive programming principles are not new to JavaScript, but their adoption has recently become widespread across most modern frameworks and toolkits. The ease of using these approaches has improved as we’ve finally seen the decline of legacy browsers, and as we’ve seen the introduction of functional and reactive paradigms within ES6 and ES8.

Dojo FAQ: How do I optimize a Dojo app for mobile?

By on February 14, 2017 8:25 am

Web applications can be deployed to many environments, including desktops, tablets, and mobile devices. We can even deploy web applications natively using a wrapper such as Apache Cordova to gain access to device features such as GPS, battery, and accelerometer data. However, it is not always optimal to package our application into a universal layer file, as we may be sending Cordova-specific code to our web users and packaging web-specific code with our native application. Luckily, Dojo provides us with tools to limit or exclude platform-specific code from our deployments by using dojo/has feature detection and staticHasFeatures within our build profiles.

State of JavaScript 2017

By on January 25, 2017 11:55 am

It’s been two very active years since the release of ES6, and we’ve seen pretty substantial changes in how we build JavaScript applications. While some complain of fatigue, there’s never been a more exciting time to be a JavaScript engineer. So with the new year upon us, it’s time to look at where we are, and where things are going!

Exploring WebVR

By on October 26, 2016 12:12 pm

This October, we delivered meetup talks on WebVR in London and Phoenix on the same day to share our early efforts in exploring WebVR with TypeScript, Dojo 2, Intern, and A-Frame.

What is WebVR?

WebVR is an experimental JavaScript API that provides access to Virtual Reality (VR) devices, such as the Oculus Rift, HTC Vive, Samsung Gear VR, and Google Cardboard. These VR devices are used with your web browser. Native browser support is currently limited to experimental releases of Chrome, Firefox, and Samsung Internet Browser for Gear VR. You can also try it using shims that add support to today’s browsers. WebVR is not another graphics rendering engine, but instead adds APIs that support rendering VR scenes with WebGL in the web browser’s Canvas.