Coding demo about data APIs, JavaScript, Python, web servers, web techonologies and an ask-me-anything session with David Beitey (@davidjb).
Delivered as part of an industry/educator partnership formed in the ICT Gateway to Industry Schools Program (GISP) initiative.
Visit https://github.com/davidjb/gisp-data-api to either view, download or take a git clone of the code from GitHub or scan the above QR code.
- HTML + JavaScript Koala Locations
- HTML + JavaScript Koala Locations Mashup with Wikipedia
- Python + HTML + JavaScript Koala Locations Web Server
-
Intro — outline, ask questions, introduction
-
Background — who I am, my experience
-
APIs (Application Programming Interfaces):
-
Demo and walkthrough of examples
-
API = Bistro: walk in, line up, there is a defined menu of offerings
- You ask for what you want, they make it and deliver it.
- You don't mind/can't see or control how they make your spaghetti, just that you get it
- Some places may offer flexibility (V, GF, etc) but you have to ask for it
- Not every restaurant is the same
-
General outline: what they are and aren't, how they work
-
REST (
Representational State Transfer
) — software style involving textual representation of resources that allow reading/modification using a defined set of operations. In short, it's about using HTTP methods (GET/POST/PUT/DELETE etc) to access/change data on a remote server in a defined way.- REST ⋍ Roads: except all rules are "should"/"might", signs may be wrong/missing, traffic lights (may be wrong!), congestion, potholes, toll bridges, gated communities, roads may just end
-
-
Data formats + view examples:
-
Tools & documentation vary wildly between APIs
- Wikipedia API sandbox
- Koala WildNet data
- ...or little/no documentation at all
- ...or not an API at all (BOM Cyclone Forecast example)
-
Considerations
- All APIs are different
- Programming language / environment being using (Python, JavaScript, PHP, etc)
- Versoning: APIs will often have v1, v2, etc in their URLs indicating structure
- CORS: Cross-origin resource sharing - ability to load data across domains in browser
- Rate Limiting: limits on allowed requests, by user/computer/network
- Access Control: some APIs require keys or paid access (e.g. Google Maps API)
- Error Handling: code should expect & handle errors (network failure, API offline, invalid data, etc)
- Caching: hitting same API repeatedly is wasteful, leverage browser or other cache
-
-
Work Experience:
- JCU Research Portfolio — redesigned UI [Python, web design, SQL, databases]
- IoT — Classroom on the Reef and live sensor data
- Home Assistant for automation
- Security & consulting: software analysis, vulnerability reporting to companies, reviewing their APIs
-
Q&A Session: ask me anything; around the syllabus or anything else
-
Shameless plugs:
- DevNQ - community run, all-invlusive group for IT developers (events, hackathon on Townsville Show weekend in July, socials)
- Young ICT Explorers - yearly competition that students/schools can enter and win prizes
- TCC Big Ideas Youth Challenge - 22 April 2021, one day event around innovation, entrepreneurship and change. Also a PD session held on the day prior for teachers.