Skip to content

Instantly share code, notes, and snippets.

@chadellison
Created July 21, 2016 19:38
Show Gist options
  • Save chadellison/74f150165f9fe22622b9f383058557e2 to your computer and use it in GitHub Desktop.
Save chadellison/74f150165f9fe22622b9f383058557e2 to your computer and use it in GitHub Desktop.
Outline
Texas Holdem using Rails 5 action Cable
Intro
* Excited about Rails five's new feature action cable
* What it does
Action cable allows you to integrate websockets into your rails app for real time updates
Most examples are of chat applications. Wouldn't it be cool to have a poker app that updates in realtime
when other players take actions?
* Some of the challenges
Some of the challenges to Rails five action cable is that it is difficult to find support for troubleshooting.
Becuase it is such a new technology, there are not a lot of stack overflows or instructions on how to dig deeper than a chat app.
When I would google issues I ran into, I would keep getting the same top ten links, which were essentially action cable tutorial's of chat apps.
Coffee script also presented a bit of a challenge since I had never used it before this, but it is similar enought to JavaScript
that if one knows JavaScript, one shouldn't have too much trouble with CoffeeScript.
The main challenge I've had, however, is feature testing. I still have not figured out how to feature test with the web sockets
which is like flying blind. I have to test a lot of the features simply by opening the browser and clicking
around whenever I make a change.
Concluding thoughts
* Action Cable is an awesome technology that is much easier to work with (in my experience) than building websockets in node.
* Action Cable has the benefit of keeping the server side and client side together in one application; thereby, minimizing the
overhead of maintaining two separate applications the interact.
* ActionCable is currently my first choice for building websockets in future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment