Upgrade to Pro — share decks privately, control downloads, hide ads and more …

StarRez on Rails

Dan Reedy
May 24, 2012

StarRez on Rails

Presented at the StarRez User Conference hosted by Memphis in 2011. Covers the basics of the StarRez API plus introduced a Ruby wrapper.

Dan Reedy

May 24, 2012


  1. StarRez o Ra Using REST Web Services, Reporting API, &

    Ruby on Rails Da e Ree T tter:@ree ree @ ou g. u.e u
  2. 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
  3. Sout er I o U er t Carbo a e

    Just a Few Hundred Miles Up River
  4. SIUC U er t Hou g ❖ 4606 Residence Hall

    Spaces ❖ 868 Apartment Spaces ❖ 3 Commons Buildings
  5. 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
  6. 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…
  7. Ro e our O Emergency Contact Update Room Maintenance Reports

    for Custodial Staff Room Selection Early Arrival Lists
  8. Prob e No control of the database design Lack of

    sanity checks Code maintenance
  9. 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
  10. 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)
  11. 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
  12. 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
  13. Exa e: Ma te a ce Re ort <IncompleteMaintRequestsByBuilding> <Record>

    <ID>98090</ID> <Room_Space>BTMS0206</Room_Space> <Room_Type>Asst  Hall  Director</Room_Type> <Item>Air  Conditioning</Item> <Description>TEST  -­‐-­‐  THIS  IS  A  TEST  REQUEST.</description> <Completed/> <Room_Location_Section_ID>185</Room_Location_Section_ID> <Complete_Date/> <Occupant_Entry_Name/> <Date_Reported>6/14/2011  15:29</Date_Reported> <Category>Air  Conditioning</Category> <Room_Space_ID>6593</Room_Space_ID> <Job_Status>Job  Submitted</Job_Status> </Record> </IncompleteMaintRequestsByBuilding> https://{server}/services/getreportbyname/IncompleteMaintRequestsByBuilding.xml/? RoomLocationSectionID=185&_top=500
  14. StarRez & Rub o Ra Ruby on Rails: Open Source

    Project Object-Oriented Web Framework Convention over Configuration Metaprogramming Features REST is completely integrated
  15. 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
  16. 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”
  17. Furt er I tegrat o Resident Assistant Portal Non-Contract Applications

    Enhance Object Relationships Desktop scripting