Skip to content

Instantly share code, notes, and snippets.

@karlstolley
Created February 2, 2014 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlstolley/8772183 to your computer and use it in GitHub Desktop.
Save karlstolley/8772183 to your computer and use it in GitHub Desktop.
Stolley: #cwcon Programming Workshop

Abstract

This workshop will teach participants to program in JavaScript. No previous experience in programming is necessary. The workshop will introduce the basic conceptual foundations shared by contemporary programming languages and cover both functional and object-oriented styles of programming. Over the course of the workshop, participants will begin to write their own library of higher-order JavaScript functions for use in the browser and server-side in Node.js. These libraries will be developed and reused over several simple but useful projects. More than just a how-to, the workshop advances and embodies the argument that programming can become an integral part of writing courses and entire curricula, and that even the humble Web browser can be a powerful teaching, learning, and communication tool.

Proposal

This day-long workshop (or two half-day workshops) will teach participants to program, using JavaScript. The workshop will introduce the basics of data types, control structures, and functional and object-oriented styles of programming. Over the course of the workshop, participants will start to write their own library of higher-order JavaScript functions, which can be reused for many different kinds of JavaScript projects. The workshop itself will walk participants through creating several simple but useful projects that illustrate core concepts of programming and showcase the flexibility and capabilities of JavaScript: the morning session will begin by writing JavaScript in the Web browser's JavaScript console; the afternoon session will introduce the server-side Node.js JavaScript framework.

Despite its reputation as the monster behind pop-up ads and irritating visual effects, the ECMAScript standard and its actual implementations (known as JavaScript) have evolved into a first-class language. This development has been driven in part by Google's V8 JavaScript engine, which has been ported to run outside of the browser and powers the Node.js framework. And because JavaScript is readily available, given that it is built into all modern Web browsers, JavaScript makes teaching and learning programming possible without the complexities of installing the interpreters and compilers that most other languages demand.

Beyond the coverage of programming concepts, the workshop itself will advance two primary arguments: One, that programming is an accessible activity that can be taught with readily-available technology (the humble Web browser) that requires no special technical support or infrastructure; and two, that writing teachers looking to develop a programming component at the course or curriculum level can turn to JavaScript to provide students with a rich continuity between user-facing interfaces/interactivity in the browser and data-driven operations on the server (where, again, 'the server' can be a student's own computer running an installation of Node.js).

Here is a rough outline of the workshop:

I. Morning Session: JavaScript in the Browser

  1. Finding the JavaScript console (Google Chrome will be recommended)
  2. Working with basic types and operators: Numbers, Strings
  3. Naming conventions: Variables, Named Functions, and Objects
  4. Working with complex types: Objects, Arrays
  5. Working with Native JavaScript Objects: Date, Math, JSON
  6. Putting JavaScript to work: the Document Object Model (break)
  7. Control structures: if/else; loops (for,while)
  8. Higher-Order Functions and Functional Programming
  9. Project: Manipulating static HTML with JavaScript and a jQuery Assist
  10. Object-oriented Programming
  11. Project: Accessing remote API data in the browser and writing HTML dynamically

II. Afternoon Session: JavaScript on the Server with Node.js

  1. Installing Node.js (simple installers)
  2. The Node REPL vs. the Browser JavaScript Console
  3. Structuring Node applications: package.json and the node_modules directory
  4. Working with the Node Package Manager and require();
  5. Project: Node-based Command-Line Application (break)
  6. Asynchronous JavaScript: Callbacks and Non-Blocking I/O
  7. Building a Web Server in under a dozen lines of JavaScript
  8. Project: Node-based Web application using the Express MVC framework
  9. Tying it all together: AJAX in the Browser, Node.js on the Server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment