Hacking the Mid-End (Great Lakes Ruby Bash Edition)

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.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Hacking the Mid-End (Great Lakes Ruby Bash Edition) - Presentation Transcript

    1. Hacking the Mid-End Advanced Rails UI Techniques Michael Bleigh
    2. @mbleigh
    3. Overview •Define “Mid-End” • Solving Mid-End Problems • Real Live Coding!
    4. What is the Mid-End?
    5. MVC
    6. Back-End MVC
    7. Front-End MVC
    8. MVC+I (I is for Interaction)
    9. BS ALERT!!!
    10. But Not Really...
    11. Mid-End MVC+I
    12. The Mid-End is all about abstraction.
    13. Front-End Smart Partials XHTML/CSS Mid-End Smart Helpers App Structure Back-End
    14. Why? Focus on strengths.
    15. Four goals of the mid-end: • Fast • Accessible • Intuitive • Responsive
    16. Fast
    17. NO LOADING WHATSOEVER
    18. Accessible
    19. UJS is an automatic best practice.
    20. Rails isn’t perfect here.
    21. RESTful Confusion <%= link_to \"Delete\", user, :method => :delete, :confirm => \"Are you sure?\" %> <a onclick=\"if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);f.submit(); };return false;\" href=\"/users/bob\">Delete</a>
    22. One workaround: “confirm_delete” http://railscasts.com/episodes/ 77-destroy-without-javascript
    23. Intuitive
    24. Am I building a web application? OR Am I building a desktop application on the web?
    25. No Wrong Choice (but web apps are right)
    26. Responsive
    27. Great Job, FRIEND!
    28. Solving Mid-End Problems
    29. The Toolset • Helpers • Partials • jQuery (Prototype works too) • LowPro
    30. The Approach • Build it without Javascript • Abstract UI into helpers and partials • Add in UJS layer
    31. Example 1: TPS Reports
    32. The Problem My online TPS Reports take forever to generate.
    33. The Approach • Provide a helpful message to users • Move generation to a new page • For JS users • Replace message with spinner • Fetch page in background • Display results
    34. Example 2: Dynamic Tabs
    35. The Problem I want a tabbed information interface that is still fast for those without Javascript.
    36. The Approach • Create a helper for back-end developers • Create a template for front-end developers • Add in Javascript interaction.
    37. Example 3: Relative Times
    38. The Problem I use relative times on a page that is partially updated by AJAX calls.
    39. The Approach • time_ago_in_words for JS • Add the actual time as a title • Parse and update times on the client side
    40. Wrap Up
    41. Ruby, Rails, and UJS give you powerful tools for abstraction.
    42. Make everyone’s life easier, including yours.
    43. Thanks! http://intridea.com/blog

    + mbleighmbleigh, 2 years ago

    custom

    932 views, 0 favs, 5 embeds more stats

    The slides for my talk "Hacking the Mid-End: Advanc more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 932
      • 806 on SlideShare
      • 126 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 12
    Most viewed embeds
    • 94 views on http://www.intridea.com
    • 28 views on http://intridea.com
    • 2 views on http://mbleigh.com
    • 1 views on http://static.slideshare.net
    • 1 views on http://mbleigh.github.com

    more

    All embeds
    • 94 views on http://www.intridea.com
    • 28 views on http://intridea.com
    • 2 views on http://mbleigh.com
    • 1 views on http://static.slideshare.net
    • 1 views on http://mbleigh.github.com

    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