Week 4

Data storage: Reading and writing to the file system, bronchi physician JSON

Getting data from a file or a database requires a solid understanding of arrays and loops. If you’re still unclear about arrays and loops, now is the time to review! Watch Chapter 4, “Working with Multiple Values in Arrays and Loops” in PHP for Web Designers on Lynda.com.

Some places to find data
NYC Open Data
World Health Organization (WHO)
Any spreadsheet exported as a .csv file

See the Community Gardens example on github. Review the notes and videos from Week 3 if needed.


Reading & Writing
Art and the API, Jer Thorpe.
Check out some of the projects on Google’s DevArt that use APIs.

Write a brief response and brainstorm interesting, wacky, innovative ideas for projects using APIs — not something you’d make in this class (necessarily) but big ideas. For more info about APIs, see the “Tech prep” section below.

Create an application that stores data in the file system in JSON or CSV format and retrieves that data for display on the front end. You may continue with your application from the past weeks or move forward with a new idea.

Due next week (2/25). Blog write-ups due 8pm Feb 24.

Tech prep for next week


PHP Object-Oriented Programming
PHP has an entire system of Object-Oriented programming, using classes and objects, similar to what you’ve seen in Processing. We’re not going to go deep into OOP in PHP in this class, but in order to parse JSON, which will be doing with APIs, you’ll need to be familiar at least with what an object looks like in PHP. For an overview of objects in PHP see this tutorial. Read at least through the section “Defining Class Methods”.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>