Systematic Data Design in JavaScript – Featuring Three Data Types

In the previous article, we discussed systematic function design: a test, example, and documentation-driven approach to designing functions using the HtDP methodology. In this post, we are exploring systematic data design in JavaScript.

In this three-part series, we are covering systematic design as it applies to:

  1. Functions
  2. Data
  3. Worlds

Let’s now turn our attention to the design of data. Read more

Systematic Function Design in JavaScript

Habits can be damning or liberating. Perhaps you are like me. I know having tests, examples, and documentation are good things for any program but why do they always seem to be an afterthought? Wouldn’t it be great to have a coding methodology that propels me to write well-documented and tested programs that are easy to change? Thankfully, a team of professors/researchers have tackled this very problem and distilled their insights in what is called systematic program design or the HtDP methodology (How to Design Programs).

Why would you want to learn the HtDP methodology? HtDP gives you a process for designing functions, data, and worlds that driven by documentation, example, and tests. Well-designed HtDP programs are clear, tested, and easy to change. In this three-part series, we will look at some core concepts of HtDP as they apply to JavaScript: Read more

Isomorphic JavaScript Mobile Apps

The method of delivering content to a browser has continued to evolve over the years. In the early days, every page was a full payload. If you clicked a link, you got a new page. If you hit the back button, you were delivered a new full page.

With the advent of AJAX (Asynchronous JavaScript and XML), web pages started to become more interactive without full page loads. Form submissions are the perfect example: a user fills out a form, hits the submit button, a spinner shows that something is happening, and finally the page displays a success/fail message. Previously, a user would click Submit on the form, that would perform an HTTP POST of the form data to the server, which would return a new page showing success or fail. This new AJAX method felt slicker and more “app-like”. This was only the beginning…

Read more

Building JavaScript Charts Powered by LoopBack

When we discuss APIs and LoopBack, often we’re talking about external consumers, but you can use LoopBack APIs on your own site as well. For example, one cool way to use a LoopBack REST-based API is to power client-side charting for your web site. In this post I’ll demonstrate a simple LoopBack API and how I built charts with it using Google’s Chart service.

Read more