$30 off During Our Annual Pro Sale. View Details »

StarRez on Rails

Dan Reedy
May 24, 2012
420

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
Tweet

Transcript

  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

    View Slide

  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

    View Slide

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

    View Slide

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

    View Slide

  5. Hou g Locat o
    Nine Locations Across Campus

    View Slide

  6. 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

    View Slide

  7. W D e P c
    StarRez?

    View Slide

  8. Po er to t e Stu e t

    View Slide

  9. 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…

    View Slide

  10. W at D We Do?

    View Slide

  11. Ro e our O

    View Slide

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

    View Slide

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

    View Slide

  14. I T ere a Better Wa ?

    View Slide

  15. StarRez API

    View Slide

  16. 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

    View Slide

  17. 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)

    View Slide

  18. Exa e: E erge c Co tact

    View Slide

  19. Exa e: E erge c Co tact

    View Slide

  20. 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

    View Slide

  21. Exa e: Ma te a ce Re ort

    View Slide

  22. Exa e: Ma te a ce Re ort

    View Slide

  23. 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

    View Slide

  24. Exa e: Ma te a ce Re ort

    View Slide

  25. 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

    View Slide

  26. I T ere a Better Wa ?

    View Slide

  27. StarRez & Rub o Ra

    View Slide

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

    View Slide

  29. 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

    View Slide

  30. 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”

    View Slide

  31. L e De o trat o

    View Slide

  32. W at’ Next?

    View Slide

  33. Furt er I tegrat o

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide