schedule of classes web service technology days 2015 june 4, 2015 spirit/trail greg gómez extended...
TRANSCRIPT
![Page 1: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/1.jpg)
Schedule of Classes Web ServiceTechnology Days 2015June 4, 2015Spirit/Trail
Greg GómezExtended Learning
![Page 2: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/2.jpg)
XML Schedule of Classes
• http://xmlsched.unm.edu
![Page 3: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/3.jpg)
XML Schedule of Classes
• FYI:–We’ll be removing R (Restricted) classes
soon.– It runs at 10:**PM; this is a problem at
the edge of semesters (Mondays)
![Page 4: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/4.jpg)
xml2sql
• Runs every morning.• Extracts all data from the XML
Schedule of Classes• Inserts into MySQL
![Page 5: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/5.jpg)
The Service
• Beta• It’s still being worked on.• It may not always be available.• xml2sql fails on occasion.
![Page 6: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/6.jpg)
The Service
• http://elwebapps.unm.edu• It’s not RESTful– REST: One URN, One Result
• Instead, it uses AJAX-style queries…
![Page 7: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/7.jpg)
…like this…
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo/crn/10001/s/201560/format/json
• Or• http://elwebapps.unm.edu/schedule/
index/basicsectioninfo?crn=10001&s=201560&format=json
![Page 8: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/8.jpg)
…because
• Normal HTTP• Intuitive• Allows for multiple results
![Page 9: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/9.jpg)
A little clearer
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo
• /crn/10001/s/201560/format/json• ?crn=10001&s=201560&format=json
![Page 10: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/10.jpg)
What does it all mean?
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo/crn/10001/s/201560/format/json
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo?crn=10001&s=201560&format=json
• “action”
![Page 11: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/11.jpg)
What does it all mean?
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo/crn/10001/s/201560/format/json
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo?crn=10001&s=201560&format=json
• CRN
![Page 12: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/12.jpg)
What does it all mean?
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo/crn/10001/s/201560/format/json
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo?crn=10001&s=201560&format=json
• CRN
![Page 13: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/13.jpg)
An Important Note
• Semester code + crn = unique identifier
![Page 14: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/14.jpg)
What does it all mean?
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo/crn/10001/s/201560/format/json
• http://elwebapps.unm.edu/schedule/index/basicsectioninfo?crn=10001&s=201560&format=json
• Format (of response)
![Page 15: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/15.jpg)
An Important Note
• Although format isn’t required, it’s a very good idea to include it (for now).
![Page 16: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/16.jpg)
Current Actions
• basicsectioninfo• instructorsections• allsemesters• meetingsnow
![Page 17: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/17.jpg)
Current Actions
• basicsectioninfo– crn– s– format
![Page 18: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/18.jpg)
Current Actions
• instructorsections– n (NetID)– s– format
![Page 19: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/19.jpg)
Current Actions
• meetingsnow– bid (Building Code)– rn (Room Number)– format
![Page 20: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/20.jpg)
Current Actions
• allsemesters– format
![Page 21: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/21.jpg)
CORS
• Cross-origin resource sharing• The web schedule should be ok.
![Page 22: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/22.jpg)
A ‘Bad’ Response
• Badly formed requests…–Missing data (especially s and crn)– Bad data (crn=1000a)– Etc.
• …will result in ah HTTP 400 Bad Request error
![Page 23: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/23.jpg)
A ‘Good’ Response
• HTTP 200 OK• JSON - Now• XML - ADN• HTML - ADN
![Page 24: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/24.jpg)
Let’s take a look…
![Page 25: Schedule of Classes Web Service Technology Days 2015 June 4, 2015 Spirit/Trail Greg Gómez Extended Learning](https://reader035.vdocument.in/reader035/viewer/2022070409/56649e975503460f94b9a768/html5/thumbnails/25.jpg)
Next Steps
• More actions.– Suggestions from the community.
• Kill ‘index’?• Make JSON the default (if not
specified by format)• Sorts (o=crn)