Refresh OKC
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Refresh OKC

on

  • 242,632 views

Slides for a talk at Refresh OKC

Slides for a talk at Refresh OKC

http://refreshokc.org/2011/03/21/upcoming-april-meeting

Statistics

Views

Total Views
242,632
Views on SlideShare
236,186
Embed Views
6,446

Actions

Likes
189
Downloads
3,115
Comments
2

73 Embeds 6,446

http://moodle.moamagrammar.nsw.edu.au 2964
http://blog.sven.co.za 912
http://note.chayn1k.ru 722
http://moodle2.moamagrammar.nsw.edu.au 449
http://svenwelzel.com 205
http://www.johansetiawan.com 169
http://www.softworkr.com 159
http://notes.chayn1k.ru 135
http://drupal7.knowd.co.jp 86
http://www.svenwelzel.com 68
http://web.jagansindia.in 62
http://duleygrafix.blogspot.com 60
http://paper.li 56
http://eablog.churchill.fr 48
http://www.grangewebdesign.com 44
http://patrickbickham.wordpress.com 35
http://a0.twimg.com 29
http://www.sven-welzel.de 23
http://old-notes.chayn1k.ru 19
http://us-w1.rockmelt.com 14
http://twitter.com 14
http://trunk.ly 13
http://208.115.207.110 11
http://www.webheadneeded.com 11
https://zeus.proxistep.com 10
https://twitter.com 10
http://192.168.0.164 10
http://posterous.com 10
http://localhost 9
http://202.61.27.198 9
http://www.linkedin.com 8
http://oldmoodle.moamagrammar.nsw.edu.au 7
http://edicolaeuropea.blogspot.com 5
url_unknown 4
http://duleygrafix.blogspot.ru 4
http://www.mongodb.org 4
http://www.slideshare.net 3
http://sven-welzel.de 3
http://softworkr.posterous.com 3
http://www.onlydoo.com 2
http://www.istikbal.gr 2
http://duleygrafix.blogspot.nl 2
http://translate.googleusercontent.com 2
http://www.twylah.com 2
http://blog.svenwelzel.com 1
https://si0.twimg.com 1
http://news.google.com 1
http://www.thaiseoboard.com 1
http://webcache.googleusercontent.com 1
http://hardcode.by 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Refresh OKC Presentation Transcript

  • 1. Refresh Oklahoma City http://refreshokc.org — http://960.gs
  • 2. Nathan Smith = Principal UI Architect @projekt202 we make software make sense™ http://sonspring.com — http://projekt202.com
  • 3. Relax. Please don’t try to take notes feverishly.Email — http://sonspring.com/contactTwitter — http://twitter.com/nathansmithSlides — http://slideshare.net/nathansmith/refresh-okc Feel free to email me later, and download these slides as well. These links are at the end, too.
  • 4. Before we get started, let’s agree: Code is not magic An important discipline when using any framework is striving to understand the underlying language. In other words, use it as a tool – Not a black box.
  • 5. Veteran “ninjas” master a variety of tools – Not just one. FRAMEWORK BY H AND Use a framework as an extension of yourself – Not just as a crutch. http://imdb.com/title/tt1046173
  • 6. Christian Heilmann — developer evangelist at Mozilla “Our craft is becoming a commodity and the people in charge don’t care about the quality of the markup, CSS or how short our JavaScript is. What matters is how fast you can get it to market, how many people it reaches and how cheaply it can be built.” http://thinkvitamin.com/code/web-development-is-moving-on-are-you
  • 7. Matthew Anderson — designer at OneHub.com “Point being, choose your battles wisely. In the time you could argue the relevance of naming conventions like these – I just built a 16-column layout.” http://onehub.com/past/2009/5/13/why-we-chose-960gs-css-framework
  • 8. Allow me to clear up a (potential) misconception...Truth be told, I don’t really care if youuse the 960 Grid System or not.I tell people who get all emotional over“semantics” (ID & classes have none)that it takes less energy to not usesomething than to argue about it.It also takes considerably more energy to doresearch. Being ignorant is blissful and easy!
  • 9. Semantics can reside in microformats’ class names,because parsers are built to look for them specifically http://microformats.org
  • 10. The W3C’s “Semantic Web” doesn’t involve CSS http://www.w3.org/DesignIssues/Semantic.html
  • 11. CSS gets no ♥ at the Semantic Web partyThe term “Semantic Web” refers to W3C’svision of the Web of linked data. SemanticWeb technologies enable people to createdata stores on the Web, build vocabularies,and write rules for handling data. Linkeddata are empowered by technologies suchas RDF, SPARQL, OWL, and SKOS. — World Wide Web Consortium (W3C) http://www.w3.org/standards/semanticweb
  • 12. So let’s get this straight... Semantics live here<tag class="peanut_butter jelly">Yummy content</tag> Not here ... Except in the case of microformats.
  • 13. Jeff Croft’s “Frameworks for Designers” article http://www.alistapart.com/articles/frameworksfordesigners
  • 14. Jeff Croft was never one to mince words... http://jeffcroft.com/blog/2007/nov/17/whats-not-love-about-css-frameworks
  • 15. Don’t be a Luddite (Note: I was with Sass/SCSS)The Luddites were a socialmovement of British textileartisans in the nineteenthcentury who protested –often by destroyingmechanized looms – againstthe changes produced bythe Industrial Revolution,which they felt were leavingthem without work andchanging their way of life. http://en.wikipedia.org/wiki/Luddite
  • 16. Added semantics via role="..." & HTML5 tags <header role="banner"> <nav>...</nav> </header> <div role="main"> <article> <section>...</section> </article> <aside>...</aside> </div> <footer role="contentinfo"> ... </footer>http://adactio.com/journal/4267 — http://dev.w3.org/html5/html4-differences/#new-elements
  • 17. Added semantics via role="..." & HTML5 tags <header role="banner"> <nav>...</nav> </header> <div role="main"> <article> <section>...</section> </article> <aside>...</aside> </div> <footer role="contentinfo"> ... </footer>http://adactio.com/journal/4267 — http://dev.w3.org/html5/html4-differences/#new-elements
  • 18. #anyways #whatevs #whocares #soboredUm, okay, but why grids?“My design skillz are so awesome, I’ve never needed to use grids.”
  • 19. For design that’s really, really, ridiculously good looking Also, to do other things good too. http://en.wikipedia.org/wiki/Zoolander
  • 20. FYI: I don’t especially love CSS.The reason I create and use CSSframeworks is because I hate doingmundane tasks repeatedly (yawn).I’d rather be working in JavaScript.
  • 21. JavaScript books I’ve worked on... Co-author Tech editor Tech editorjQueryEnlightenment.com JavaScriptEnlightenment.com oreilly.com/catalog/9780596159788 All involving Cody Lindley, who has been a JavaScript mentor to me: http://codylindley.com
  • 22. Front-end is the opposite of a mythological hydra There are many “dragons” sharing the same public facade in web development: ColdFusion, Java, .NET, Perl, PHP, Ruby, Python... To render in a browser, it all has to pass through HTML. So, I think that front-end is a good place to be! :) http://en.wikipedia.org/wiki/Lernaean_Hydra
  • 23. #anyways #whatevs #whocares #soboredBut I digress.I’ll forever be known as “the 960 guy.”But I guess that’s not so bad... Right?
  • 24. What’s this whole 960.gs thing all about?The premise of the system is ideally suited to rapidprototyping, but it would work equally well whenintegrated into a production environment. Thereare printable sketch sheets, design templates, andCSS files that have identical measurements.
  • 25. 960 SHIps WITH PrINtABlE *.PDf SKeTCHSHeEts, BeCAUSe sOmEtIMeS THe BeStDEsIGn ToOl IS No ToOl At ALl!WE OfTeN JUMp RIgHT INtO DEsIGn OrCODe SoFtWARe, BUt SKeTCHInG THIngSOUt CAN Be MUCH mOrE eFfICIEnT.WHEn I WOrKED AS AN InFoRmATIoNARCHItECt, SoMe Of mY BeSt WOrK WASDOnE SImPlY USInG PeN AnD PApEr.
  • 26. “Dogfooding” = When you use your own product The 960 Grid System is an effort to streamline web development by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem. If you like, there’s also a 24-column version. NOM, NOM, NOM — I use 960 regularly! :)
  • 27. 12, 16, and 24 columns available by defaultThe 12-column grid is divided into portions thatare 60 pixels wide. The 16-column grid consistsof 40 pixel increments. Each column has 10pixels of margin on the left and right, whichcreate 20 pixel wide gutters between columns.The 24-column grid is also included. It consistsof columns 30 pixels wide, with 10 pixel gutters,and a 5 pixel buffer on each side of the container.
  • 28. #anyways #whatevs #whocares #sobored Show me teh codez!
  • 29. Typical use case for a 12-column grid<div class="container_12"> <div class="grid_4"> I am 1/3 wide. </div> <div class="grid_4"> I am 1/3 wide. </div> <div class="grid_4"> Me too! </div> <div class="clear"></div> <!-- Yuck, I know --> <div class="grid_6"> I am 1/2 wide. </div> <div class="grid_6"> I am 1/2 wide. </div></div>
  • 30. Typical use case for a 12-column grid<div class="container_12"> <div class="grid_4"> I am 1/3 wide. </div> <div class="grid_4"> I am 1/3 wide. </div> <div class="grid_4"> Me too! </div> <div class="clear"></div> <!-- Yuck, I know --> <div class="grid_6"> I am 1/2 wide. </div> <div class="grid_6"> I am 1/2 wide. </div></div>
  • 31. Nested grids & Column rearrangement <div class="container_12"> <div class="grid_6 push_6"> <div class="grid_2 alpha"> First nested grid. </div> <div class="grid_2"> Middle. No special class. </div> <div class="grid_2 omega"> Last nested grid. </div> </div> <div class="grid_6 pull_6"> Last in markup, first visually. </div> </div>
  • 32. Nested grids: alpha = first, omega = last (per row) <div class="container_12"> <div class="grid_6 push_6"> <div class="grid_2 alpha"> First nested grid. </div> <div class="grid_2"> Middle. No special class. </div> <div class="grid_2 omega"> Last nested grid. </div> </div> <div class="grid_6 pull_6"> Last in markup, first visually. </div> </div>
  • 33. Column rearrangement (SEO maybe)<div class="container_12"> <div class="grid_6 push_6"> <div class="grid_2 alpha"> First nested grid. </div> <div class="grid_2"> Middle. No special class. </div> <div class="grid_2 omega"> Last nested grid. </div> </div> <div class="grid_6 pull_6"> Last in markup, first visually. </div></div>
  • 34. http://960.gs/demo.html
  • 35. http://960.gs/demo.html
  • 36. Have fixed-width grids become too pervasive? http://twitter.com/jcroft/status/49880667374354433
  • 37. Have fixed-width grids become too pervasive? http://twitter.com/nathansmith/status/49882179379015680
  • 38. Many more possibilities via grid generators http://grids.heroku.com
  • 39. Templates available for your weapon of choice... Acorn Fireworks Flash InDesign GIMP Inkscape Illustrator OmniGraffle Photoshop Expression QuarkXPress Visio Design
  • 40. Adobe Fireworks 960.gs extension (Photoshop too)
  • 41. Grids can accelerate progress while maintaining order http://www.flickr.com/photos/meckert75/3732780382
  • 42. Michael Phelps following a painted line at the bottomof a pool doesn’t make him a less talented swimmer. http://livinggallery.oneindia.in/main.php?g2_itemId=32903
  • 43. “Our best practices are killing us” – Nicole SullivanThree best practice myths...1. Don’t add any extra elements2. Don’t add classes3. Use descendent selectors exclusively http://www.slideshare.net/stubbornella/our-best-practices-are-killing-us
  • 44. “Our best practices are killing us” – Nicole SullivanThree best practice myths...1. Don’t add any extra elements2. Don’t add classes3. Use descendent selectors exclusively http://www.slideshare.net/stubbornella/our-best-practices-are-killing-us
  • 45. Take all “rules” in development with a grain of saltSensibly revised...1. Add extra elements sparingly2. Add classes thoughtfully3. Avoid descendent selector kludge...
  • 46. How would you style these <a> links?<ul class="menu"> <li> <a href="/">Home</a> </li> <li> <a href="/about">About</a> </li></ul>
  • 47. Use only the selectors that are necessary..menu a { /* Terse = Get ‘er done! */}ul.menu li a { /* Too heavy = Overkill. */}
  • 48. Still true: “Smart CSS ain’t always sexy CSS” http://www.digital-web.com/articles/smart_CSS_aint_always_sexy_CSS
  • 49. Inspiration: Khoi Vinnhttp://www.subtraction.com/2004/12/31/grid-computi
  • 50. Inspiration: Cameron Mollhttp://www.cameronmoll.com/archives/2006/12/gridding_the_960
  • 51. Inspiration: Cameron Mollhttp://www.cameronmoll.com/archives/2006/12/gridding_the_960
  • 52. Inspiration: Olav Bjørkøyhttp://bjorkoy.com/2007/08/launch-blueprint-a-css-framework
  • 53. Inspiration: Brandon Schauer http://www.adaptivepath.com/ideas/e000863
  • 54. http://www.adaptivepath.com/ideas/e000863
  • 55. Inspiration: Mark Boultonhttp://www.markboulton.co.uk/journal/comments/five-simple-steps-to-designing-grid-systems-part-1
  • 56. Frameworks are kind of like sheet music. They areorganized, and can keep teams on the same page. http://www.flickr.com/photos/avlxyz/3280803912
  • 57. Like jazz, responsive design is contextual.No two approaches are exactly the same.
  • 58. Responsive Web Design - using @media queries http://www.alistapart.com/articles/responsive-web-design
  • 59. Hicksdesign.co.uk = Beautiful responsive web design http://hicksdesign.co.uk
  • 60. Media queries for mobile aren’t a magic bullet http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold
  • 61. LifeChurch.tv - Separate site for mobile & desktop http://m.lifechurch.tv — http://www.lifechurch.tv
  • 62. Percentage-based grid, screenshot in Firefox 4.0http://host.sonspring.com/yui3_grid 310px 150px
  • 63. Percentage-based grid, screenshot in Chrome 10.0http://host.sonspring.com/yui3_grid 309px 149px
  • 64. 960’s 24 column grid = Exact multiples of 10 http://960.gs/demo_24_col.html
  • 65. Whither: Grid framework or Responsive design? VSDoing a fixed-width design using a grid framework isrelatively easy. Whereas, doing a responsive designthat looks solid at every resolution is multivariate andthere is not (yet) an automated, foolproof solution.
  • 66. Pet peeve: “Use tomorrow’s technology, today!”The mere fact we’re even able to use ittoday makes it today’s technology.As designers and developers, it’s easy toget so caught up in wanting to use thelatest and greatest (to a fault) that weforget to try and tackle present-dayproblems with proven technologies.
  • 67. Where media queries fall short, JavaScript shines http://twitter.com/igorskee/status/52152273178079232
  • 68. Smart JS hackers = Context-aware image sizinghttp://filamentgroup.com/lab/responsive_images_experimenting_with_context_aware_image_sizing
  • 69. Symphony + Jazz = Crazy ~ Like playing jazz flute http://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy
  • 70. Adapt.js - Serve 960’s (or any) CSS dynamically http://adapt.960.gs
  • 71. Note: Not an endorsement, just a Twitter link... http://twitter.com/zeldman/status/59432011693166592
  • 72. For what it’s worth, a lot of people linked to it...
  • 73. How to use Adapt.js = A human-readable config <script> // Edit to suit your needs. var ADAPT_CONFIG = { // Where is your CSS? path: assets/css/, // false = Only run once, when page first loads. // true = Change on window resize and page tilt. dynamic: true, // Optional callback... myCallback(i, width) callback: myCallback, // First range entry is the minimum. // Last range entry is the maximum. // Separate ranges by "to" keyword. range: [ 0px to 760px = mobile.css, 760px to 980px = 720.css, 980px to 1280px = 960.css, 1280px to 1600px = 1200.css, 1600px to 1920px = 1560.css, 1920px = fluid.css ] }; </script>
  • 74. How to use Adapt.js = A human-readable config <script> // Edit to suit your needs. var ADAPT_CONFIG = { // Where is your CSS? path: assets/css/, // false = Only run once, when page first loads. // true = Change on window resize and page tilt. dynamic: true, // Optional callback... myCallback(i, width) callback: myCallback, // First range entry is the minimum. // Last range entry is the maximum. // Separate ranges by "to" keyword. range: [ 0px to 760px = mobile.css, 760px to 980px = 720.css, 980px to 1280px = 960.css, 1280px to 1600px = 1200.css, 1600px to 1920px = 1560.css, 1920px = fluid.css ] }; </script>
  • 75. What about adding JavaScript page-weight? 845 bytesMinified, Adapt.js is less than 1 KB.(Allow me to put into perspective)
  • 76. 60 × 40 pixel JPG @ 70% quality = 908 bytes 908 bytesMy son, figuring out that the wind can spin pinwheels http://www.flickr.com/photos/nathansmith/5625332824
  • 77. Or, as my dad used to tell me as a kid...“Don’t worry about problemssmaller than a gnat’s backside.”Note: If the extra HTTP request for JS is aconcern, the file size is small enough to justinclude inline in the document’s <head>.
  • 78. Not to go all “Ron Burgundy” on you, but... “Kind of a [small] deal” I didn’t set out to write a terse snippet of JavaScript. That’s just how easy the problem was to solve. Seriously though, consider what will be best for your project. Nothing is a magic bullet. Code is just code. http://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy
  • 79. To reiterate: I don’t care if you use 960.gs or Adapt.js In fact, here’s a slew of alternatives you might like better. You should explore every option, and choose one that makes sense to you. Or, if nothing seems like a good fit, I’d encourage you to create one!
  • 80. Sencha Touchhttp://sencha.com/touch
  • 81. Dojo Mobilehttp://dojotoolkit.org/features/mobile
  • 82. jQuery Mobilehttp://jquerymobile.com
  • 83. http://jeromeetienne.github.com/jquery-mobile-960
  • 84. Blueprint CSS Framework http://blueprintcss.org
  • 85. HTML5 Boilerplate - Mobile http://html5boilerplate.com/mobile
  • 86. Less Framework 4 http://lessframework.com
  • 87. 1140 CSS Grid http://cssgrid.net
  • 88. The Square Grid http://thesquaregrid.com
  • 89. Respond.js - Parses CSS3 @media queries https://github.com/scottjehl/Respond
  • 90. And the list goes on...But you get the point. There are plenty of options out there to choose from. (I just want to mention two more things)
  • 91. Forms = Quite possibly, the worst part of web design To prevent developers from wasting countless hours on styling dumb form elements Note: I wasted countless hours styling dumb form elements, so you don’t have to!
  • 92. It’s been awhile in the making...“Future plans include a tutorial on howto use jQuery to add styling hooks toform elements, since I know fromexperience that is no cup of tea.”— Source = Me when announcing 960.gs in 2008!— Excuse = New HTML5 elements set me back :) http://sonspring.com/journal/960-grid-system
  • 93. I finally distilled my approach to forms http://formalize.me
  • 94. I prefer using Sass to expedite writing CSSI didn’t think I would like Sass, but I do. Oh, andif you’re going to use Sass, use Sass, not SCSS. http://sass-lang.com
  • 95. Questions? Comments? Hate mail? :)Email — http://sonspring.com/contactTwitter — http://twitter.com/nathansmithSlides — http://slideshare.net/nathansmith/refresh-okc Thanks for attending my presentation! Feel free to email or say “hi” on Twitter.