Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Learn to love the Middleman

Ray Brown
February 24, 2014

Learn to love the Middleman

Or, how I optimize the web 
design integration process using Middleman
(and some other tools).

Ray Brown

February 24, 2014

Transcript

46 slides
  1. Learn to love the Middleman Or, how I optimize the

    web 
 design integration process using Middleman
 (and some other tools). B Y R AY B R O W N
  2. Who am I? • Web designer, front-end developer, and owner


    of Bitmanic. • Pixel wrangler for 12 years,
 professionally since 2007 • Started as a designer but became obsessed with coding
  3. What is Middleman? • Static site generator built on top

    of Rails • Delivers some of the niceties of Ruby on Rails without the bloat • Lightweight local server and preprocessor
  4. How’s it different than X? • Lots of similar tools:

    Grunt, Jekyll, Cactus, Harp, Octopress, Pelican, Assemble, & Wintersmith (to name a few) • Each tool has pros and cons - find one that works best for you
  5. What do I need? • A computer • Ruby on

    Rails • RubyGems package manager
  6. What does “init” do? • Creates a starting point for

    your static website • Includes a default config file • That…that’s about it
  7. Starting the server 1 cd PROJECT_NAME 2 middleman and then

    head on over to http://localhost:4567
  8. Preprocessing • Comes bundled with support for Erb, Haml, Sass,

    Scss & CoffeeScript, with additional support for: Slim Liquid Kramdown Radius WikiCloth Erubis RDiscount Maruku Markaby Yajl Less CSS Redcarpet RedCloth Nokogiri Stylus Builder BlueCloth RDoc Creole
  9. Config options • Dictate asset directories • Configure template language

    options • Enable LiveReload • Adjust layout options • Manipulate the build process
  10. Build config • Minify HTML, CSS, & JS files •

    Optimize image sizes • Toggle relative asset linking • Plus much more
  11. Building the project • A new /build/ folder will be

    created • Contains compiled assets for the project • Incredibly useful for handing off to devs, running static, websites, or creating interactive prototypes
  12. Local data • YAML-formatted data can be stored as 


    /data/MY_DATA.yml • Keeps content separate from 
 structure & presentation • This data is accessible throughout the project • Each page can contain its own YAML or JSON data (available to layouts & partials)
  13. Plays well with Bower • Append the Bower component directory

    to Sprockets’ asset path • Reference third-party assets from within project • Keeps third-party assets out of your project - and out of your repo
  14. Polished deliverables Turn designs into static HTML, CSS, and JS

    that’s ready to be integrated into a dynamic system
  15. Interactive Prototypes Create quick and dirty prototypes of projects that

    can be refactored or tossed away without much expense
  16. Middleman is great, but it’s just a site generator As

    a designer and developer, I need tools that help me bridge the gap between the two disciplines
  17. Composite • iOS design tool for Photoshop • Syncs current

    PSD file to configured iOS devices • Turns Photoshop layer comps into interactive app preview
  18. DevRocket • Photoshop extension • Creates and previews templates for

    mobile development • Uses Photoshop layer naming conventions to export retina- ready images from a PSD
  19. ImageOptim • Utilitarian image optimizer, as the name implies •

    Doesn’t affect appearance of the images it converts • Great to do this before adding images to a repo
  20. Fontastic • Web app for creating 
 custom icon fonts

    • Upload your own SVG files or choose from existing libraries • Customize character mapping and download production- ready icon font packages
  21. Tools I love • Middleman is an easy-to-use tool that

    gets out of your way when it comes to writing front-end code • Composite, DevRocket, ImageOptim, and Fontastic are pretty rad for front-enders • There’s a lot out there that I don’t know about - these are simply the tools that I’ve found and loved
  22. What am I missing? • What tools do you use

    and enjoy? • What sort of new tools do you see emerging? • What sort of tools are missing from your toolbox?

More Decks by Ray Brown

Other Decks in Design