Calendar

  1. Welcome, Tech Setup; Some JavaScript; “Interface” August 21

    In Class

    1. Review course policies, schedule, and projects
    2. Lab setup
    3. Some introductory JavaScript to get you through the week

    For Next Class

    To Read
    1. Haverbeke: Introduction; Basic JavaScript; Functions
    2. Crockford: Good Parts; Grammar; Style
    3. jQuery API Documentation (browse all sections)
    To Do
    1. Email Karl from your preferred email account
    2. Set up your computer with an editor of your choice; Unix-style line endings (LF) and UTF-8 (Unicode) character encoding; two-space tab insertions
    3. Work through Haverbeke with the Google Chrome JavaScript console open on this page.
    4. Sign up for a GitHub account
    5. Sign up for a Twitter account
    6. Sign up for a 37signals’ account (invite will arrive via email)
  2. “Programming”August 28

    In Class

    1. Reading discussion
    2. JavaScript: Basic Grammar, Functions; previewing Objects
    3. Idea sharing & workshopping for project 1

    For Next Class

    To Read
    1. Haverbeke: Data Structures
    2. Crockford: Objects; Arrays
    To Do
    1. Begin working in earnest on Project 1
  3. “Application” September 4

    In Class

    1. Reading discussion
    2. Working with arrays and objects in JavaScript

    For Next Class

    To Read
    1. Haverbeke: Error Handling; Functional Programming; Object-Oriented Programming
    2. Crockford: Functions; Objects (again); Methods
  4. Documentation September 11

    In Class

    1. Discussion of higher-order functions & OOP
    2. 25 minutes worth of jQuery for Project 1 load event & DOM-manipulation purposes
    3. Work time for Project 1

    For Next Class

    To Read
    1. Haverbeke: Web Programming; The Document Object Model
    2. Crockford: Appendix E. JSON
    To Do
    1. Finish project 1; post to GitHub
  5. Data Formats: XML; JSON & JSONP September 18

    In Class

    1. Project presentations
    2. Reading discussion
  6. No Class September 25

    For Next Class

    To Read
    1. Haverbeke: Modularity; Regular Expressions; Browser Events; HTTP Requests
    2. Crockford: Inheritance; Regular Expressions
  7. Regular Expressions; Client-side Consumption/Work Week October 2

    In Class

    1. Regular expressions
    2. Q&A on client-side consumption
    3. Project 2 Description & Work Time

    For Next Class

    To Read
    1. Video: Node.js creator Ryan Dahl demonstrating Node.js
    2. Handling Untrusted JSON Safely
    3. README.md file from the node-validator module
    To Do
    1. Complete client-side API access demonstration to proceed with Project 2
    2. Begin working on proposal memo for Project 2
  8. Data Conversion and Sanitization October 9

    In Class

    1. A small matter of security

    For Next Class

    To Read
    1. Rauch, Smashing Node.js: Chapters 1 (beginning with section “Ensuring that it works”), 2, 3, 4
    2. Node.js: Installation instructions (find the ones relevant to your operating system)
    3. Mac users: Consider installing Homebrew on your machine for easier installation of software packages such as Node.js
    To Do
    1. Get node.js and NPM set up on your own computer; work through the Node.js book
    2. Begin constructing Project 2 application, based on approved memo to instructor
  9. Server-Side JavaScript: Node.js I October 16

    In Class

    1. Demonstration of Node.js basics
    2. Reading discussion

    For Next Class

    To Read
    1. Rauch: Chapters 5, 6, and 16
  10. CLI Applications: Node.js II October 23

    In Class

    1. Changes to Project 4
    2. Reading discussion
    3. Walk and talk thru node-reader CLI app docs and code
    4. Work time (if time)

    For Next Class

    To Read
    1. Rauch: Chapter 7, 8, 10, 11
  11. Web Applications: Node.js III October 30

    In Class

    1. Reading discussion (brief)
    2. Express tutorial (work through together)
    3. Work time (if time)

    For Next Class

    To Read
    1. Rauch: Chapter 9
    To Do
    1. Draft of Project 2 sent as GitHub repository URL to instructor
  12. Work Week November 6

    In Class

    1. Work time & Q&A

    For Next Class

    To Do
    1. Finish Project 2 and prepare presentation for 11/13
  13. Project Presentations November 13

    In Class

    1. Project 2 Presentations

    For Next Class

    To Read
    1. A Social Network Free of Ads,” MIT Technology Review
    2. Early (December 2012) version of App.net API Response Objects
    3. Current App.net API Resources
    4. Developer Experience Matters,” Mashery
  14. API Production: Specifications & Documentation November 20

    No Class (Thanksgiving Break) November 27

  15. Finals Week

    Final Meeting/Presentations, Weds. December 4 at 5:00pm; Project due to instructor by 5:00pm on December 6

Projects

Project 1: JavaScript Program Due September 18

This project asks you to build a small program in JavaScript that runs in the browser. It will operate on a small piece of JSON data that you will provide. The program should manipulate that data in some way, and present it in the browser.

Project Goals

  • Understand the basics of JavaScript values, variables, functions, and objects
  • Understand the basics of writing, accessing, and manipulating data in JSON
  • Learn to use a version control system (Git and GitHub)

Deliverables & Milestones

  1. A single HTML page that either loads your program as a separate .js file or includes your JavaScript on the page, inside of <script> tags
  2. A self-critique memo that evaluates your project and your progress in the class to this point (2-3 paragraphs; submit via email or as a README.md in your GitHub repository for the project)
  3. A GitHub repository of your project

Requirements

Your JSON data must:
  • Use obvious/understandable basedfield names written in camelCase
  • Include some piece of date/time information, in a standard format
  • Include a number, a string, and a boolean
  • Include an array (which could itself contain numbers, strings, and/or booleans
Your JavaScript program must:
  • Run error-free in the browser, but also provide some form of error handling
  • Operate on a standards-compliant DOM
  • Be attached to an HTML/CSS design that has the foundations of responsive design
  • Be written in native JavaScript (no CoffeeScript or other pre-processors...yet)

Project 2: API Data on the Server Due November 13

The major project of the course. You will develop an application in Node.js that pulls in external data from a third-party API. There is an option as to what kind of application you will build: either a command-line application (e.g., for storing API data for further analysis in another piece of software) or a Web application (e.g., for creating an interface that displays a mashup of data coming from different APIs).

Project Goals

  • Learn to authenticate to and access third-party APIs in accordance with their host’s terms of service
  • Learn to build an application in Node.js and draw on the community-developed modules available through the Node Package Manager (NPM)
  • Understand and apply techniques for asynchronous, non-blocking I/O
  • Develop a useful and interesting way of manipulating the data from third-party APIs

Deliverables & Milestones

  1. A small demonstration that you are able to pull data from an open API and display it on an HTML page in a Web browser; this should be based on your work for Project 1. Due ASAP.
  2. A proposal memo that outlines the application that you intend to build, and a week-by-week plan for how you intend to complete it. Due 10/9.
  3. A self-critique memo that evaluates your project and your progress in the class to this point (2-3 paragraphs; submit via email or as a README.md in your GitHub repository for the project). Due 11/13.
  4. A GitHub repository of your files. Due 11/13.

Requirements

If you choose to create a CLI application, it must:
  • Do some basic data checks and sanitization to protect against malicious/malformed code originating from third-party sources
  • Be able to run unassisted for long periods of time (e.g., to capture data from an API over a period of hours or days or more)
  • Provide output to the console and/or to log files that indicate its functionality and any errors that it encounters
  • Writes data to a structured set of flat files or to a database or similar data store
  • Include a small test suite to ensure its functionality as you make changes to it
If you choose to create a Web application, it must:
  • Do some basic data checks and sanitization to protect against malicious/malformed code originating from third-party sources
  • Feature some kind of interface to enable a user to interact with or change the data
  • Communicate with the browser using either AJAX or Websockets
  • Deliver to the browser standard forms of HTML5 and CSS; the use of a library such as jQuery is encouraged for DOM scripting tasks
  • Include a small test suite to ensure its functionality as you make changes to it

Project 3: Creating a Custom API Due December 5

This project gives you the opportunity to write the specification for an API of an app of your own creation. You will take the knowledge and experience of working with other APIs over the course of this class and bring it to bear in making an original, more usable API of your own imagination.

Project Goals

  • Leverage your knowledge of API shortcomings to make a more usable API than those you have encountered
  • Understand the benefit of writing a specification document (or 'spec') in preparation for building a system that relays data to users/developers
  • Use GitHub Gists to quickly and more easily communicate an idea for public development and perhaps feedback.

Deliverables & Milestones

  1. A GitHub Gist of your API specification that includes both URL patterns for your API and sample JSON data that the different patterns return
  2. A self-critique memo that evaluates your project and your progress in the class to this point (2-3 paragraphs; submit via email or as a separate README.md in your GitHub Gist)
  3. A 10-minute presentation of your work on the evening of December 4

Requirements

Your API URL schemes must:
  • Have a component that enables Semantic Versioning of the API
  • Be as short, direct, and yet descriptive as possible
Your API data returned must:
  • Be expressed in JSON
  • Include all relevant data fields, expressed in their proper type (e.g., using ISO date formats)
  • Make a sensible trade-off between server- and client-side manipulation (who does the heavy lifting in terms of sorting data? you, or your developers?)

Project 4 (COM580 Only): Better Know a Format Due At Some Point

For this project, you will prepare for other members of our class a report on some format/vocabulary used in data exchange. Formats will be posted in the Campfire room on October 2.

Project Goals

  • Learn to research formats for data exchange, including their history and real-world usage
  • Learn to determine how well a particular language (in this case, JavaScript) works with a given data-exchange format
  • Develop classroom expertise on common data-exchange formats

Deliverables & Milestones

  1. A one-page handout in digital form (e.g., Markdown, PDF) that covers the requirements below. Due October 30; link posted to Campfire room.

Requirements

Your handout must cover the following for your format:
  • The origins/history of the format, including any ancestor formats
  • An example of what the format looks like, and who uses it (bloggers, meteorologists, librarians, etc.) and for what purposes
  • A short full or partial example of the format in action on the internet
  • Example code (does not have to be functional) of how the format would be parsed in JavaScript/Node.js, including any Node modules or JavaScript libraries that aid in parsing the format

Instructor

Prof. Karl Stolley

  • karl.stolley@gmail.com
  • karlstolley on Twitter, App.net, & Kik.
  • Office in Siegel Hall 218
  • Office hours on Wednesdays, 4pm to 5pm & by appointment

Policies

Course Description

This is a production-intensive course in the theory and applied involvement with Application Programming Interfaces (APIs), especially Web-available APIs for exchanging and mashing up content and data. The course begins with a consideration of the classical sense of APIs: as interfaces into programming languages and libraries, including a consideration of the quality and navigability of documentation. An understanding and command of those APIs will be necessary to more fully explore and manipulate data APIs later in the course. The course concludes with the groundwork necessary to construct, document, and share an API with the outside world, using lightweight data serialization formats (e.g., JSON) and RESTful distributed architecture. Students will have the opportunity to focus on a specific use of APIs, such as visualization, “scraping” for the purposes of creating datasets for research, or building custom and novel visual interfaces for interacting with a particular dataset or service (e.g., App.net). Throughout the course, students will encounter issues of licensing, API request limits, and other legal and ethical issues surrounding terms of service (TOS) and documentation.

  1. Course Goals

    • Develop familiarity with the key principles of Application Programming Interfaces, for both programming languages and data/software services, and as both a consumer and producer of APIs
    • Develop critical reading skills for navigating and comprehending the documentation for APIs
    • Learn to locate, read, and act in accordance with Web API providers’ terms of service
    • Understand and employ lightweight data serialization formats (e.g., JSON) on both the client- and server-side
    • Understand and implement web standards from the World Wide Web Consortium (W3C), Ecma, ISO, and other standards-issuing groups
    • Understand and apply progressive enhancement and responsive design in any user-facing web design and development
    • Develop an agile approach to digital development, supplemented by the use of a version control system (Git)
    • Apply course concepts and adjust/extend course projects to fit your own academic and professional interests
  2. Materials and Technologies

    Required Texts

    • Crockford, Douglas. (2008). JavaScript: The Good Parts. O’Reilly.
    • Haverbeke, Marijn. (2011). Eloquent JavaScript: A Modern Introduction to Programming. No Starch Press.
    • Rauch, Guillermo. (2012). Smashing Node.js: JavaScript Everywhere. 2nd edition. Wiley.
    • Plus other electronic books, articles, and materials linked to from the course calendar

    Required Technologies

    • A GitHub account (free/public or pay/private)
    • A private/public RSA key pair (we will create these in class if you don't yet have them)
    • A sketchbook

    Recommended Texts

    • Copeland, David Bryant. (2012). Build Awesome Command-Line Applications in Ruby: Control Your Computer, Simplify Your Life. Pragmatic Bookshelf.

    Recommended Technologies

    • A Ubuntu installation (or Ubuntu Live CD) to run Ubuntu Linux on your own computer
    • A Twitter account
  3. Grading Policy: COM381 Students

    • Project 1: 10pts
    • Project 2: 40pts
    • Project 3: 10pts
    • Class Participation: 40pts
    • TOTAL: 100pts

    A = 90+ pts; B = 80-89pts; C = 70-79pts; D = 60-69pts; E =< 59 pts

    Grading Criteria

    • A - Student has turned in all required components of a project, the work is exceptional in quality, and reflects the student’s dedication to adjusting the project to his or her own interests.
    • B - Student has turned in all required components of a project, and the work is exceptional for undergraduate work.
    • C - Student has turned in all required components of a project and submitted work that is acceptable as undergraduate level.
    • D - Student has turned in all required components of a project, but the work is below undergraduate level.
    • E - Student has not turned in all required components of a project.
  4. Grading Policy: COM580 Students

    • Project 1: 10pts
    • Project 2: 40pts
    • Project 3: 10pts
    • Project 4: 10pts
    • Class Participation: 30pts
    • TOTAL: 100pts

    A = 90+ pts; B= 80-89pts; C=70-79pts; E =< 69 pts

    Grading Criteria

    • A - Student has turned in all required components of a project, the work is exceptional in quality, and reflects the student's dedication to adjusting the project to his or her own interests.
    • B - Student has turned in all required components of a project and submitted work that is acceptable as graduate level.
    • C - Student has turned in all required components of a project, but the work is below graduate level.
    • E - Student has not turned in all required components of a project.
  5. Course Technology Policy

    Because technology is an essential part of working with APIs, it is essential to this class. You are just as responsible for learning to command various technologies (JavaScript and Node.js in particular; some Ruby, as well as Git) as for any other course content. Difficulty with technology is not an acceptable excuse for being unprepared for class.

    If you are having trouble with technology or any other material covered in this course, it is your professional responsibility to do research beyond the resources and guidance provided in class and find materials that work for you. I also encourage all students to meet with me during my office hours or at another arranged time outside of class or to contact me via email or GChat, or our Campfire room, well in advance of project deadlines.

    Note that coming to class with broken or malfunctioning work is far better than showing up with nothing but an excuse like “I just didn’t get it.” For most of the semester, it is expected that you’ll show up with broken work. When you’re learning, effort is more important than perfection. Just be sure to put in the effort early, and not the night before a project is due.

  6. Attendance and Participation

    Your attendance and active participation are required both for your own success in the class, and for the success of the class as a whole. However, if you absolutely must miss, please contact me ahead of time via email.

  7. Academic Honesty

    As with any course at IIT, you are expected to uphold the Code of Academic Honesty as described in the IIT Student Handbook). All work for this course must be your own original effort, including print and digital page design and computer code. Summarizations and quotations of text, as well as any use of open-source code libraries and images not of your own making, should be clearly cited as legally and ethically warranted and rhetorically appropriate. Access, storage, dissemination, and other use of data from third-party sources must conform to the source’s terms of service, licensing, and other relevant legal and ethical restrictions.

    If you are at all uncertain as to whether you are submitting work that in whole or in part may violate the Code of Academic Honesty, please contact me immediately and before the work is due. The consequences of academic dishonesty are severe. Any student who violates the Code of Academic Honesty will be subject to expulsion from this course with a failing grade, and I will report the student to the Chair of the Department of Humanities, who may take additional disciplinary action, including reporting violations to the relevant offices of Undergraduate or Graduate Academic Affairs.

  8. Special Needs Statement

    Reasonable accommodations will be made for students with documented disabilities. In order to receive accommodations, students must obtain a letter of accommodation from the Center for Disability Resources. The Center for Disability Resources (CDR) is located in IIT Tower, 3424 S. State Street - 1C3-2. Contact the Center by telephone at 312-567-5744 or via email at disabilities@iit.edu

    Students who have any difficulty (either permanent or temporary) that might affect their ability to perform in class should contact me privately, either in person or via email, at the start of the semester or as a documented difficulty arises. Methods, materials, or deadlines will be adapted as necessary to ensure equitable participation for all students.