Code Camp Day 1
The Silicon Valley Code Camp conference is being held this weekend at Foothill College. This conference is free to attend and has over 200 sessions over two days with all kinds of topics from technology to business models.
The first session I went to was with Les Hazelwood on Beautiful REST + JSON APIs. He gave tips on what an API should support. It is important to include the media type in request and response headers so that each party understands the payload being sent.
To camel case names instead of using the underscore.
To use the ISO-8601 date standard using UTC time.
To use GET when retrieving data, POST when changing data. And to return the new data after a POST request that modifies it. That saves an additional request to retrieve the updated data.
To include a static link referencing each object in the system. The API shouldn’t require the client to build the reference URL as that isn’t part of the REST protocol.
Version 2 adds a meta element that doesn’t disrupt the data, but adds additional information like the URL and type of resource at the address.
He talked about returning partial data of objects, reducing bandwidth and resources that are wasted.
To support relationships and offer a method to get the edges (connections) between two entities.
He explained the difference between 401 and 403 response codes.
To use existing authentication schemas in the HTTP protocol and not to reinvent the wheel.
APIs should include an etag to help clients with caching and reducing the frequency of requesting all the data.
After lunch, Roy Yu talked about Hands-on with Backbone.js and RequireJS.
The next session was with Sidney Maestre, who talked about Building apps with Backbone.js and Require.js.
Ending the day, I went to Siamak Ashrafi’s session on wearable devices being the next big thing.