-
This short course assumes you’re already proficient in at least one language. In it, we focus on the tiny soul of JavaScript, a small set of rules, from which everything else logically follows.
Most tutorials skip to the end, they tell you the magic words to type to make a blog or an app. This course doesn’t do that, instead we start with the half dozen principles on which the language is founded, and build up to the rest of it. There’s actually not very much to know, it’s a tidy little language.
October 2023 ·
1 min read
-
React components are supposed to be modular and stackable, just like html. We achieve nesting in React components by passing children as an implicit prop to our component, but what if we want to do more than simply dump those children on to the page? What if we want to manipulate them in some way? Enter React.Children.map
September 2023 ·
3 min read
-
A Static site generator is a piece of software that lets you write pages, ideally in Markdown, then press a button to create a nested folder full of HTML that you can drop onto any old hosting environment. Static sites are fast, just HTML and CSS. They are trivial to make accessible, you actually don’t need any JavaScript at all.
My criteria for selecting a static site generator were as follows…
September 2023 ·
5 min read
-
Babel is a JavaScript transpiler that converts edge JavaScript into plain old ES5 JavaScript that can run in any browser (even the old ones).
It makes available all the syntactical sugar that was added to JavaScript with ES6 and ES7, including classes, fat arrows, multiline strings, generators, and many more.
You can convert prety much any modern JavaScript features into code that will run on any browser, even the really old ones. This is fantastic news if you need to support older browsers, mobile browsers, Safari, IE11, or anything other than edge Chrome.
April 2016 ·
5 min read
-
TL;DR: AngularJS is a complex, monolithic framework that makes lots of choices for you. React is a DOM manipulation library that fits into a dynamic evolving ecosystem. Both are actually rather good.
April 2016 ·
8 min read
-
March 2016 ·
4 min read
-
February 2016 ·
6 min read
-
February 2016 ·
4 min read
-
February 2016 ·
5 min read
-
AngularJS and Angular are philosophically different.
Angular 1 is at heart a DOM compiler. We write HTML, and the Angular compiler takes care of compiling it into a web application. It was a tidy little thing, and very small.
Over time Angular 1 was used to create larger and larger applications. We started arranging our code into components. We repurposed directives to make them serve as components, then used isolate scope to separate them one from another.
Angular 2 is the logical endpoint of this transformation. It is no longer a DOM compiler. Instead, it’s an component driven architecture with batteries included.
February 2016 ·
2 min read
-
Getters and setters let us create read only attributes of JSON objects. They work in all current browsers (except IE8), so you can use them today.
January 2016 ·
2 min read
-
Mongo has taken some heavy flak, particularly from the SQL crowd. It’s missing a few features, has bugs, and does things in an unfamiliar way. If your data is tree shaped, you like JavaScript, and you can live without transactions, it might still be the right tool.
July 2015 ·
3 min read
-
Today’s Angular is the angularInit function: the thing that makes ng-app work. It selects elements, discovers the root module name, then shells out to bootstrap.
June 2015 ·
1 min read
-
Organising JavaScript in a larger app becomes quite painful quite quickly. The issue is that order of inclusion matters. If I write a service that belongs to a module, I’d better make sure I have created my module before I try to append the service to it or my code will collapse in a messy heap. As we get more and more modules and more and more files, this becomes progressively harder.
April 2015 ·
6 min read
-
Backbone is a the grand-daddy of all the JavaScript MVC frameworks. It’s the progenitor of frameworks like Ember, Angular, even Meteor. It’s a sensibly put together library full of tools to help you organise your web application, a toolkit for tidy JavaScript.
June 2014 ·
10 min read
-
JQuery is a library written in JavaScript which is primarily about DOM manipulation. It lets you find parts of a web page and make changes to them with very little code. It’s wildly popular and is used extensively across the Internet. It also forms the basis of other larger frameworks. If you’re serious about web development you need to know jQuery.
June 2014 ·
35 min read
-
Looking at Rails or Angular there’s a tendency to think of MVC as something rather complicated and difficult to achieve, something that really demands a framework.
In fact, MV* style JavaScript really is trivially easy to write. It’s a pattern I’ll often drop into if I need to make anything beyond the basics, but I don’t want to break out Angular’s big guns.
In this post, we’ll create a simple MV pattern. We’ll build a Model and a View and wire these together using events.
July 2013 ·
3 min read
-
3 min read
-
1 min read
-
1 min read
-
3 min read
-
1 min read
-
3 min read
-
2 min read
-
1 min read
-
This short course assumes you’re already proficient in at least one language. In it, we focus on the tiny soul of JavaScript, a small set of rules, from which everything else logically follows.
Most tutorials skip to the end, they tell you the magic words to type to make a blog or an app. This course doesn’t do that, instead we start with the half dozen principles on which the language is founded, and build up to the rest of it. There’s actually not very much to know, it’s a tidy little language.
5 min read
-
1 min read
-
4 min read
-
1 min read
-
5 min read
-
1 min read
-
2 min read
-
1 min read
-
2 min read