Why Multiple Files Using RequireJS vs. 1 Big One

A YouTube watcher of my channel regarding my Basics of Require JS Part 1 writes:

… main.js is a concatenated and minified version of all the js. Just wondering why do you still need requirejs if you concatenate and minify your js in a single file [via r.js].

Is there an advantage of using requirejs in this instance? Or can you just straight target main.js?

I’ve seen 2 clients now who put all of their JavaScript into a single, large file vs. using classes, modules, and packages; traditional computer science concepts that Require does its best to enable in JavaScript.

Continue reading “Why Multiple Files Using RequireJS vs. 1 Big One”

Adventures In JavaScript

Missing a comma in a class.

Firefox: “Everything’s cool, brosef!” :: empty screen ::

Chrome 1st time: “You can’t load local files, lol, eff you!” :: empty screen ::

Chrome 2nd time via sudo: “Uncaught SyntaxError: Unexpected token :”

Safari 1st time: “‘with’ statements aren’t allowed in strict mode”

Safari 2nd time: “SyntaxError: Expected token ‘}'”

TypeScript for ActionScript Developers

Introduction

The following covers what the TypeScript language is compared to ActionScript 1, 2, and 3 with as much context as possible and compares the syntax side by side. This article should help serve as a reference while you learn TypeScript. Also, these articles always help me learn while writing them and I like to have documentation I can refer to later.

You cannot really talk about ActionScript without talking about the Flash Player internals just like you can’t really talk about JavaScript for web development without also talking about browser internals. Thus, I’ve tried my best to make what the ActionScript equivalents are in the JavaScript browser world.
Continue reading “TypeScript for ActionScript Developers”