Slide 1

Slide 1 text

StarRez o Ra Using REST Web Services, Reporting API, & Ruby on Rails Da e Ree T tter:@ree ree @ ou g. u.e u

Slide 2

Slide 2 text

He o… Daniel Reedy Assistant Manager of Information Technology University Housing, Southern Illinois University Carbondale Server Administration Web Development Security Policies & Audits PCI Compliance General Tech Support

Slide 3

Slide 3 text

Sout er I o U er t Carbo a e Just a Few Hundred Miles Up River

Slide 4

Slide 4 text

SIUC U er t Hou g ❖ 4606 Residence Hall Spaces ❖ 868 Apartment Spaces ❖ 3 Commons Buildings

Slide 5

Slide 5 text

Hou g Locat o Nine Locations Across Campus

Slide 6

Slide 6 text

StarRez H tor RFP Process 2003 StarRez Conversion Spring 2010 StarCom Install Fall 2003 Went Live & First Check-out Spring 2004 Maintenance Module Fall 2008 First Move-in with StarRez Fall 2010 Live with StarAppWeb for Contracts Fall 2004

Slide 7

Slide 7 text

W D e P c StarRez?

Slide 8

Slide 8 text

Po er to t e Stu e t

Slide 9

Slide 9 text

Po er to t e Stu e t Elevate the student’s involvement in the process Empower them to directly influence their life on campus Eliminate uncertainty in contracting and room selection (With Luck) Increase their satisfaction with their housing …We found a few shortcomings though…

Slide 10

Slide 10 text

W at D We Do?

Slide 11

Slide 11 text

Ro e our O

Slide 12

Slide 12 text

Ro e our O Emergency Contact Update Room Maintenance Reports for Custodial Staff Room Selection Early Arrival Lists

Slide 13

Slide 13 text

Prob e No control of the database design Lack of sanity checks Code maintenance

Slide 14

Slide 14 text

I T ere a Better Wa ?

Slide 15

Slide 15 text

StarRez API

Slide 16

Slide 16 text

StarRez API REST Web Services and Reporting API Eliminated the need for direct access to the database Provided appropriate sanity checks Exposed relationships between tables Decreased the amount of code maintenance

Slide 17

Slide 17 text

REST Arc tecture REpresentational State Transfer (REST) Establishes a “language” used to communicate with a service Resources are nouns and have a URI Uses HTTP methods as the verbs: GET, POST, PUT, and DELETE Allows us to perform the core database functions (CRUD)

Slide 18

Slide 18 text

Exa e: E erge c Co tact

Slide 19

Slide 19 text

Exa e: E erge c Co tact

Slide 20

Slide 20 text

Exa e: E erge c Co tact StarRez REST Ser ce Ca u F re a I ter et Stu e t La to Web Ser er https://{server}/services/Update/EntryAddress/123? ContactName=John%20Doe

Slide 21

Slide 21 text

Exa e: Ma te a ce Re ort

Slide 22

Slide 22 text

Exa e: Ma te a ce Re ort

Slide 23

Slide 23 text

T ere a Catc … A single screenshot makes it looks easy The StarRez APIs speak code only ATOM or XML formats You still have to process this information

Slide 24

Slide 24 text

Exa e: Ma te a ce Re ort

Slide 25

Slide 25 text

Exa e: Ma te a ce Re ort 98090 BTMS0206 Asst  Hall  Director Air  Conditioning TEST  -­‐-­‐  THIS  IS  A  TEST  REQUEST. 185 6/14/2011  15:29 Air  Conditioning 6593 Job  Submitted https://{server}/services/getreportbyname/IncompleteMaintRequestsByBuilding.xml/? RoomLocationSectionID=185&_top=500

Slide 26

Slide 26 text

I T ere a Better Wa ?

Slide 27

Slide 27 text

StarRez & Rub o Ra

Slide 28

Slide 28 text

StarRez & Rub o Ra Ruby on Rails: Open Source Project Object-Oriented Web Framework Convention over Configuration Metaprogramming Features REST is completely integrated

Slide 29

Slide 29 text

StarRez o Ra API Wra er Wrapping the REST calls in a Ruby object Uses the same conventions that already exist in Rails Allows new developers to dive right in without learning the REST URI structure. One module definition for all the tables

Slide 30

Slide 30 text

StarRez o Ra API Wra er We took this: https://{server}/services/select/Entry.xml/68607 And made it this: entry  =  Entry.find(68607) We can then run simple methods: entry.name_first  #  =>  “John” entry.name_last  #  =>  “Doe” entry.gender_enum  #  =>  “Male”

Slide 31

Slide 31 text

L e De o trat o

Slide 32

Slide 32 text

W at’ Next?

Slide 33

Slide 33 text

Furt er I tegrat o

Slide 34

Slide 34 text

Furt er I tegrat o Resident Assistant Portal Non-Contract Applications Enhance Object Relationships Desktop scripting

Slide 35

Slide 35 text

Lear More Ruby: http://www.ruby-lang.org Rails Framework: http://www.rubyonrails.org StarRez API Wrapper: https://github.com/danreedy/StarRezApi

Slide 36

Slide 36 text

Co tact Me Daniel Reedy Email: [email protected] Twitter: @reedy Voice: 618.453.2301