SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
15.
• maps to your controller actions
• calls helper functions when needed
• trigger services
• modify the DOM as needed
Presenters
Monday, June 10, 13
20.
class CommentsPresenter extends Transponder.Presenter
presenterName: 'comments'
modelName: 'comment'
index: ->
if @params.page
CH.infiniteLoader.loadNext
element: @element
response: @response
modelName: @modelName
putAt: 'prepend'
update: ->
$(@element).replaceWith(@response)
...
Monday, June 10, 13
21.
Presenters Provide
• Better code reusability (Dryer)
• Cleaner
• Provides Structure
• Use what you already know!
• Logicless View in Rails
Monday, June 10, 13
28.
What Services Do
• Write once use everywhere (again Dryer code)
• Better Maintainability
• Makes sure it doesn’t run on a node that has that service
already running
• Makes it easier to manage all your code via manifest
Monday, June 10, 13
29.
How do they all Work
Together?
Monday, June 10, 13
32.
$(document).ready
triggers uploader service
User
uploads uploader service runs
Runs Update action in
Presenter
Triggers poller
service
renders processed image to
browser
through presenter
1
2
3
4
5
6
Monday, June 10, 13
33.
Transponder works with
Everything
Monday, June 10, 13
34.
Not Saying don’t use
Backbone
Monday, June 10, 13
35.
Use the right tools for
the job.
Monday, June 10, 13
36.
Codemy uses Turbolinks with
Transponder and Backbone when
appropriate
Monday, June 10, 13
37.
Transponder is out!
http://www.github.com/zacksiri/transponder
Monday, June 10, 13
38.
# TODO:
• Clean up some APIs
• Add Documentation
• Video Screencasts
• More Generators
• Example Rails Project
Monday, June 10, 13
39.
Thank You!
@codemy_net
Questions?
@zacksiri
Monday, June 10, 13