Adventurous Merb

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

6 comments

Comments 1 - 6 of 6 previous next Post a comment

  • + maraby Matt Todd 2 years ago
    Hey, they’re working on the videos now and will be available on http://merbcamp.org/ soon.
  • + swamy_g swamy g 2 years ago
    Great presentation.. Please post a link to the video if you have one..
  • + maraby Matt Todd 2 years ago
    So this part here is totally not necessary, apparently... check the new slides I added after this one.
  • + maraby Matt Todd 2 years ago
    Yep, this is a huge blotter sheet of LSD.
  • + maraby Matt Todd 2 years ago
    Fixed! Added some slides to clarify that the content negotiation with case content_type wasn’t even necessary and that the display method handles it!
  • + maraby Matt Todd 2 years ago
    HEY, LISTEN UP...

    I fucked up a few slides’ technical content so I’ll be fixing that soon. Just so you know.
Post a comment
Embed Video
Edit your comment Cancel

4 Favorites

Adventurous Merb - Presentation Transcript

  1. hi
  2. Expanding Our Vision With MERB
  3. Advanced MERB
  4. Advanced MERB
  5. Adventurous MERB
  6. INTRODUCTION
  7. Matt Todd
  8. mtodd http://github.com/mtodd/ Halcyon Highgroove Studios Developer & OSS Architect http://highgroove.com
  9. SWEET NECTAR OF THE GODS
  10. EXPECTATIONS
  11. I AM NOT AN EXPERT
  12. WARNING code for: PROBLEMS & examples
  13. lack of imagination
  14. The Foreground
  15. “forefront, prominent or important position”
  16. meh
  17. not as interesting as the background
  18. :o
  19. The Background
  20. DBs Caches Background Processes Web Services Embedded Components Distributed Grid/Mesh Apps AJAX Rack
  21. DBs x Caches x Background Processes √ Web Services √ Embedded Components √ Distributed Grid/Mesh Apps √ AJAX x Rack √
  22. Background Processes
  23. rake tasks
  24. namespace(:nodes) do desc \"Purge inactive nodes.\" task :purge => [:merb_env] do Node.inactive.purge end desc \"Scan for nodes\" task :scan => [:merb_env] do Node.detach_and_scan(Node.first) end end
  25. render_then_call run_later
  26. render_then_call do Node.inactive.purge end ### OR run_later do Node.scan(Node.first) end render
  27. we’ll talk later
  28. Web Services
  29. “software system designed to support interoperable machine-to-machine interaction over a network”
  30. a service over the web just for apps
  31. JSON is REALLY Awesome
  32. JSON is FUCKING Awesome
  33. {“foo”:“bar”}
  34. RESTful
  35. GET /objects.json index PUT /objects.json create GET /objects/1.json show DELETE /objects/1.json delete POST /objects/1.json update
  36. Merb’s Way
  37. provides render display
  38. provides
  39. class Posts < Application 1. provides :json def show @post = Post.get(params[:id]) display @post end end
  40. NO BITCH! GIMME XML!
  41. GET /posts/1.xml 406 Not Acceptable
  42. display
  43. class Posts < Application 1. provides :json def show @post = Post.get(params[:id]) 2. display @post end end
  44. respond_to do |format| format.html { render } format.json { @post.to_json } end Rails vs case content_type Merb when :html render when :json display @post end
  45. even better:
  46. renders XML, JSON, and HTML provides :json, :xml @post = Post.get(params[:id]) display @post AUTOMATICALLY fuck yeah!
  47. Embedded Components
  48. <script type=“text/javascript” src=“/comments.js”></script>
  49. document.write( ‘<div id=“comments”></div>’ ); $(function(){ <% @comments.each do |c| c = $(“<p><%=c.body%></p>”); c.attr(‘id’,“comment-<%=c.id%>”); c.appendTo(‘#comments’); <% end %> });
  50. github.com/ mtodd/aceldama
  51. glorified JS & AJAX
  52. Distributed Grid/Mesh Apps
  53. Centralized S S S M S S
  54. Distributed N N N N N
  55. { S M slave master N node
  56. Foreground ` /sites N [{id:1, [{id:1, url:“http://github.com/”, rating:1, created_at:...},...] created_at:...},...] /sites.json /sites/n/reports.json Background
  57. github.com/ mtodd/conley
  58. Rack
  59. AWESOME
  60. Framework’s Framework
  61. Request Merb Middleware Rack Response Mongrel
  62. mongrel thin ebb webrick etc
  63. class YourApp def call(env) [ 200, {‘Content-Type’=>‘text/plain’}, “OK” ] end end
  64. Middleware
  65. mini apps modifies env avoid passing through
  66. class RackMiddlewareExample def initialize(app) @app = app end def call(env) # voodoo @app.call(env) end end
  67. gist.github.com/ 16369
  68. Fin.
  69. HAHA

+ Matt ToddMatt Todd, 2 years ago

custom

1883 views, 4 favs, 1 embeds more stats

My talk at MerbCamp in San Diego. I'll apologize up more

More info about this document

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Go to text version

  • Total Views 1883
    • 1882 on SlideShare
    • 1 from embeds
  • Comments 6
  • Favorites 4
  • Downloads 46
Most viewed embeds
  • 1 views on http://192.168.10.100

more

All embeds
  • 1 views on http://192.168.10.100

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories