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

RORO 06/2012 - Bustle & API Taster

RORO 06/2012 - Bustle & API Taster

Fred Wu

June 28, 2012
Tweet

More Decks by Fred Wu

Other Decks in Programming

Transcript

  1. @fredwu

    View Slide

  2. API Taster
    Bustle

    View Slide

  3. Bustle
    https://github.com/fredwu/bustle

    View Slide

  4. Readme Driven Development
    RDD

    View Slide

  5. Activities recording and
    retrieving using a simple
    Pub/Sub* architecture.
    * At least on surface it is, lol.

    View Slide

  6. View Slide

  7. Like Faye, Redis and ZeroMQ, etc
    A "traditional" pub/sub
    usually involves 3rd party
    services

    View Slide

  8. I want...

    View Slide

  9. Really simple, perl devs would hate it
    Don't need to support 100M (imaginary) users
    Works with ActiveRecord
    Can be extended/migrated to use with other
    data stores
    Decoupled from the main app

    View Slide

  10. Bustle Overview
    Publisher Subscriber
    Subscription
    Active
    Record
    Persistence Layer w/
    orm_adapter
    Redis
    Faye

    View Slide

  11. Simple API
    Bustle::Publishers.add
    Bustle::Subscribers.add
    Bustle::Subscriptions.add
    Bustle::Publisher.publish
    Bustle::Subscriber.activities
    and a few others ...

    View Slide

  12. gem 'bustle'

    View Slide

  13. https://github.com/fredwu/api_taster
    API Taster

    View Slide

  14. It's insanely great.

    View Slide

  15. Just kidding.

    View Slide

  16. *For some, I hope.
    But it's useful.*

    View Slide

  17. *Not just on surface!! (╯°□°)╯ ┻━┻
    A quick and easy way* to
    visually test your Rails
    application's API

    View Slide

  18. View Slide

  19. It's a Chrome extension
    Every single API needs to be manually defined
    Inputs (request data) need to be manually
    entered
    Can't share the inputs easily
    Postman is Awesome, But...

    View Slide

  20. I want...

    View Slide

  21. API endpoints are automatically generated from
    your Rails routes definition
    Defining inputs is as easy as defining routes
    Post params can be shared with your test
    factories

    View Slide

  22. View Slide

  23. Isn't it beautiful?

    View Slide

  24. gem 'api_taster'

    View Slide

  25. Demo

    View Slide