Skip to content
Lance Pollard edited this page Sep 26, 2012 · 1 revision

Ruby

class Tower.Service extends Ember.Object

Tower.Service.get('collections') # the different database tables, directories, volumes, zones, etc.
class Tower.TwitterService extends Tower.Service

Tower.TwitterService.get('collections') # api methods

service = Tower.TwitterService.create()
# raw api methods
service.request
# model methods
service.find('users')
service.create('tweets', text: 'asdf')
service.get('tweets').create()

Web Sockets

With web sockets:

  • don't have to parse the headers for each request (only if new headers are added)
  • don't have to parse domain, host, protocol (since they won't change)
  • do have to parse the url and query params every time still
  • don't have to parse the session or cookies for each request
  • don't have to re-authenticate the currentUser every request
  • don't have to instantiate a controller for every request (beyond just the first one)
Clone this wiki locally