Tag: kranthi

How to line wrap text in legend elements, even in IE

Back in 2009 I wrote about a way of Line wrapping text in legend elements. It involved using CSS hacks or conditional comments to target Internet Explorer, which was the most problematic browser in this regard.

Well, it still is. All other browsers cooperate and let the text in legend elements line wrap by default. But Internet Explorer refuses, even the brand new IE10. But there is a fix.

Read full post

Posted in .

Copyright © Roger Johansson


Better Code Quality: Why Coding Style Matters


  

When I was studying computer science in college, I had one extremely tough professor. His name was Dr. Maxey and he taught the more complicated courses like data structures and computer architecture. He was a wonderful teacher with a talent for articulating difficult concepts, but also an extremely tough grader. Not only would he look over your code to make sure that it worked, he would take off points for stylistic issues.

If you were missing appropriate comments, or even if you misspelled a word or two in your comments, he would deduct points. If your code was “messy” (by his standards), he would deduct points. The message was clear: the quality of your code is not just in its execution but also in its appearance. That was my first experience with coding style.

What’s A Style Anyway?

Coding style is how your code looks, plain and simple. And by “your,” I actually mean you, the person who is reading this article. Coding style is extremely personal and everyone has their own preferred style. You can discover your own personal style by looking back over co
de that you’ve written when you didn’t have a style guide to adhere to. Everyone has their own style because of the way they learned to code. If you used an integrated development environment (IDE) like Visual Studio to learn coding, your style probably matches the one enforced by the editor. If you learned using a plain text editor, your style likely evolved from what you thought was more readable.

Style Guide
Not only publishing houses need a style guide. If you want to keep your code readable and easy to maintain even years after you’ve finished a product, a coding style guide is helpful and necessary. (Image source on flickr)

You may even notice that your style changes from language to language. The decisions that you made in JavaScript might not carry over to your CSS. For instance, you might decide JavaScript strings should use double quotes while CSS strings should use single quotes. This isn’t uncommon as we tend to context switch when we switch back and forth between languages. Still, it’s an interesting exercise in self-observation.

Coding style is made up of numerous small decisions based on the language:

  • How and when to use comments,
  • Tabs or spaces for indentation (and how many spaces),
  • Appropriate use of white space,
  • Proper naming of variables and functions,
  • Code grouping an organization,
  • Patterns to be used,
  • Patterns to be avoided.

This is by no means an exhaustive list, as coding style can be extremely fine-grained, such as the Google JavaScript Style Guide, or more general, such as the jQuery Core Style Guidelines.

It’s Personal

The personal nature of coding style is a challenge in a team atmosphere. Oftentimes, seeking to avoid lengthy arguments, teams defer creating style guides under the guise of not wanting to “discourage innovation and expression.” Some see team-defined style guides as a way of forcing all developers to be the same. Some developers rebel when presented with style guides, believing that they can’t properly do their job if someone is telling them how to write their code.

I liken the situation to a group of musicians trying to form a band. Each one comes in believing that their way of doing things is best (their “method” or “process”). The band will struggle so long as everyone is trying to do their own thing. It’s impossible to create good music unless everyone in the band agrees on the tempo, the style and who should take lead during a song. Anyone who has ever heard a high school band perform knows this to be true. Unless everyone is on the same page, you aren’t going to accomplish much.

That’s why I strongly recommend style guides for software development teams. Getting everyone on the same page is difficult, and the style guide is a great place to start. By having everyone write code that looks the same, you can avoid a lot of problems down the road.

Communication Is Key

“Programs are meant to be read by humans and only incidentally for computers to execute.�
— H. Abelson and G. Sussman (in “Structure and Interpretation of Computer Programs”)

The most important thing when working on a team is communication. People need to be able to work together effectively and the only way to do that is by communicating. As developers, we communicate primarily through code. We communicate with other parts of the software through code and we communicate with other developers through code.

While the software your code communicates with doesn’t care how the code looks, the other developers on your team certainly do. The way code looks adds to our understanding of it. How many times have you opened up a piece of code that somebody else wrote, and, before doing anything else, re-indented it the way that you like? That’s your brain not being able to figure out the code because of how it looks. When everyone is writing code that looks different, everyone is constantly trying to visually parse the code before being able to understand it. When everyone is writing code that looks the same, your brain can relax a bit as the understanding comes faster.

BBC GEL
Not only designers can use style guides to ensure consistent visual design and informed design decisions. We could use them on the macrolevel as well: for the little fine details in our code.

When you start thinking of code as communication with other developers, you start to realize that you’re not simply writing code, you’re crafting code. Your code should clearly communicate its purpose to the casual observer. Keep in mind, your code is destined to be maintained by somebody other than you. You are not just communicating with other members of your team in the present, you’re also communicating with members of your team in the future.

I recently received an email from someone who is working on code that I wrote 10 years ago. Apparently, much to my shock and horror, my code is still being used in the product. He felt compelled to email me to say that he enjoyed working with my code. I smiled. My future teammate actually did appreciate the coding style I followed.

Leave Yourself Clues

“If you know your enemies and know yourself, you will not be imperiled in a hundred battles.”
— Sun Tzu (in “The Art of War”)

Knowing yourself is important in life as well as coding. However, you’ll never know yourself well enough to remember exactly what you were thinking when you wrote each line of code. Most developers have experienced looking at a very old piece of code that they wrote and not having any idea why they wrote it. It’s not that your memory is bad, it’s just that you make so many of these little decisions while writing code that it’s impossible to keep track of them all.

Writing code against a style guide outsources that information into the code itself. When you decide when and where to use comments, as well as which patterns should and shouldn’t be used, you are leaving a breadcrumb trail for your future self to find your way back to the meaning of the code. It’s incredibly refreshing to open up an old piece of code and have it look like a new piece of code. You’re able to acclimate quickly, sidestepping the tedious process of relearning what the code does before you can start investigating the real issue.

As Chris Epstein once said during a talk, “be kind to your future self.”

Make Errors Obvious

One of the biggest reasons to have a coherent style guide is to help make errors more obvious. Style guides do this by acclimating developers to certain patterns. Once you’re acclimated, unfamiliar patterns jump out of the code when you look at it. Unfamiliar patterns aren’t always errors, but they definitely require a closer look to make sure that nothing is amiss.

For example, consider the JavaScript switch statement. It’s a very common error to mistakenly allow one case to fall through into another, such as this:

switch(value) {
    case 1:
        doSomething();

    case 2:
        doSomethingElse();
        break;

    default:
        doDefaultThing();
}

The first case falls through into the second case so if value is 1, then both doSomething() and doSomethingElse() are executed. And here’s the question: is there an error here? It’s possible that the developer forgot to include a break in the first case, but it’s also equally possible that the developer intended for the first case to fall through to the second case. There’s no way to tell just from looking at the code.

Now suppose you have a JavaScript style guide that says something like this:

“All switch statement cases must end with break, throw, return, or a comment indicating a fall-through.”

With this style guide, there is definitely a stylistic error, and that means there could be a logic error. If the first case was supposed to fall through to the second case, then it should look like this:

switch(value) {
    case 1:
        doSomething();
        //falls through

    case 2:
        doSomethingElse();
        break;

    default:
        doDefaultThing();
}

If the first case wasn’t supposed to fall through, then it should end with a statement such as break. In either case, the original code is wrong according to the style guide and that means you need to double check the intended functionality. In doing so, you might very well find a bug.

When you have a style guide, code that otherwise seems innocuous immediately raises a flag because the style isn’t followed. This is one of the most overlooked aspects of style guides: by defining what correct code looks like, you are more easily able to identify incorrect code and therefore potential bugs before they happen.

Devil In The Details

In working with clients to develop their code style guides, I frequently get asked if the minutia is really that important. A common question is, “aren’t these just little details that don’t really matter?” The answer is yes and no. Yes, code style doesn’t really matter to the computer that’s running it; no, the little details matter a lot to the developers who have to maintain the code. Think of it this way: a single typo in a book doesn’t disrupt your understanding or enjoyment of the story. However, if there are a lot of typos, the reading experience quickly becomes annoying as you try to decipher the author’s meaning despite the words being used.

Coding style is a lot like that. You are defining the equivalent of spelling and grammar rules for everyone to follow. Your style guide can get quite long and detailed, depending on which aspects of the language you want to focus on. In my experience, once teams get started on coding style guides, they tend to go into more and more detail because it helps them organize and understand the code they already have.

Order In Your Code
In art, numbers are usually chaotic and serve a visual purpose. But you need order in your code. (Image source on flickr)

I’ve never seen a coding style guide with too much detail, but I have seen them with too little detail. That’s why it’s important for the team to develop a style guide together. Getting everyone in the same room to discuss what’s really important to the team will result in a good baseline for the style guide. And keep in mind, the style guide should be a living document. It should continue to grow as the team gets more familiar with each other and the software on which they are working.

Tools To Help

Don’t be afraid of using tools to help enforce coding style. Web developers have an unprecedented number of tools at their fingertips today, and many of them can help ensure that a coding style guide is being followed. These range from command line tools that are run as part of the build, to plugins that work with text editors. Here are a few tools that can help keep your team on track:

  • Eclipse Code Formatter
    The Eclipse IDE has built-in support for code formatting. You can decide how specific languages should be formatted and Eclipse can apply the formatting either automatically or on demand.
  • JSHint
    A JavaScript code quality tool that also checks for stylistic issues.
  • CSS Lint
    A CSS code quality tool by Nicole Sullivan and me that also checks for stylistic issues.
  • Checkstyle
    A tool for checking style guidelines in Java code, which can also be used for other languages.

These are just a small sampling of the tools that are currently available to help you work with code style guides. You may find it useful for your team to share settings files for various tools so that everyone’s job is made easier. Of course, building the tools into your continuous integration system is also a good idea.

Conclusion

Coding style guides are an important part of writing code as a professional. Whether you’re writing JavaScript or CSS or any other language, deciding how your code should look is an important part of overall code quality. If you don’t already have a style guide for your team or project, it’s worth the time to start one. There are a bunch of style guides available online to get you started. Here are just a few:

It’s important that everybody on the team participates in creating the style guide so there are no misunderstandings. Everyone has to buy in for it to be effective, and that starts by letting everyone contribute to its creation.

(cp)


© Nicholas C. Zakas for Smashing Magazine, 2012.


Conferences Round-Up: Upcoming Web Design Events In Late 2012 – Early 2013


  

With the intense workload throughout the year, we tend to miss out on the opportunites for networking with like-minded designers and developers. This makes it difficult for us to catch up and stay up to date with what’s going on in our industry. For this reason, we’ve put together a list of upcoming Web design and development conferences that will present to you only the best techniques, tools and modern design approaches that are in strong demand worldwide.

This post covers events taking place in about a five-month timeframe up to late February 2013. These conferences take us pretty much through the end of the year, so keep a lookout for our next issue as 2013 gets underway.

There is no way for us to include every possible event, so you are more than welcome to help us out and provide a comment to an upcoming event that you feel would be of interest to Smashing Magazine’s readers. The list is quite lengthy, so let’s dive in.

October 2012

Content Strategy Forum Cape Town 2012
“The third annual Content Strategy Forum. There will be presentations and workshops by international authorities on content strategy, UX, design and more, as well as plenty of music and merriment under the African night-sky.”

  • When: Oct. 24-26, 2012
  • Where: Cape Town, South Africa

Wired 2012
“WIRED 2012 is a two-day event designed to bring alive the talent, creativity and ambition you find in WIRED magazine every month.”

  • When: Oct. 25-26, 2012
  • Where: London (The Brewery)

CocoaConf | iOS/OS X Developer Conference
“CocoaConf is coming to Portland this October 25th to 27th. We’ll have a full day of hands-on workshops, followed by two days packed with technical sessions, exciting keynotes, and engaging panels.”

  • When: Oct. 25-27, 2012
  • Where: Portland

CocoaConf | iOS/OS X Developer Conference

Test the Web Forward
“Test the Web Forward is an event where you will learn to better understand the specs you use every day to design your sites. You will also discover how you can shape the future of the Web.”

  • When: Oct. 26-27, 2012
  • Where: Paris, France

JS.everywhere(2012) – Wakanday
“Join us in the heart of Silicon Valley for a full day of inspiring and informative talks focused on JavaScript by the industry’s most passionate experts, followed by a bonus day of in-depth Wakanday workshops (compliments of 4D), focused on the development platform for Web and mobile applications for enterprise.”

  • When: Oct. 26-27, 2012
  • Where: San Jose, CA

JS.everywhere(2012) - Wakanday

Pittsburgh Web Design Day
“Web Design Day is a one-day conference designed to bring the best of modern Web Design to Pittsburgh.”

  • When: Oct. 26, 2012
  • Where: Pittsburgh, PA

Pittsburgh Web Design Day

DrupalHagen
“This Camp Will Focus On Drupal 7 Deployment, Drupal 8 Development With Updates From D8 Initiatives, And Give You An Opportunity To Get To Know Your Fellow Drupalgeeks.”

  • When: Oct. 26-28, 2012
  • Where: Copenhagen, Denmark

In Front Maceio
“Following the success of other events, the Front in Maceió is the first event focused on frontend development in northeastern Brazil.”

  • When: Oct. 27, 2012
  • Where: Maceio, Brazil

CPOSC | Central PA Open Source Conference
“The Central PA Open Source Conference (CPOSC) is an annual, one-day conference about all things Open Source.”

  • When: Oct. 27, 2012
  • Where: Harrisburg, PA

CPOSC | Central PA Open Source Conference

Drupalcamp Atlanta
“On Saturday, October 27, we’ll hold our all-day Drupalcamp with keynote speaker “mobile-guru” Josh Clark, breakout sessions and Birds of Feather.”

  • When: Oct. 27, 2012
  • Where: Atlanta

Drupalcamp Atlanta

UXconference
“The latest trends in the field of User Experience, business and digital design through the words of the leading experts.”

  • When: Oct. 27th, 2012
  • Where: Aula Magna USI, Lugano

Re:Design Conferences – Creative Directors
“What happens when you put a bunch of creative directors in a room, throw in a few sangrias, and tell them to talk to each other? Magic, baby, pure magic. For RE:DESIGN/Creative Directors, we feature sessions by leading creative directors. We focus on small-scale peer-based conversations, so we limit the number of attendees to 125. The result is two days of interacting with a stellar group of fellow creative directors.”

  • When: Oct. 29-30, 2012
  • Where: Portland, Oregon (Kennedy School)

Games DevCon
“The Games DevCon brings together key players in the German games industry over two days, the industry provides an outlook on trends and perspectives and presents business opportunities.”

  • When: Oct. 29-30, 2012
  • Where: Mayence, Germany

Pioneers Festival
“STARTeurope goes beyond expectations to celebrate entrepreneurship and innovative technology. 60 world-class, international speakers will split up on two tracks and Europe’s top 50 start-ups will battle in the Startup Challenge.”

  • When: Oct. 29-31, 2012
  • Where: Vienna, Austria (Hofburg Imperial Palace)

2012 HOW Interactive
“At the HOW Interactive Design Conference, experts like Jose Caballer, Christopher Butler and David Sherwin will help you transfer your print design skills to the Web.”

  • When: Oct. 29-31, 2012
  • Where: San Francisco

2012 HOW Interactive

Fall 2012 Dev Connections
“Dive into an extensive variety of sessions that will help you effectively utilize the latest ASP.NET and HTML5 technologies during the Fall 2012 ASP.NET & HTML5 Connections conference.”

  • When: Oct. 29 – Nov. 1, 2012
  • Where: Las Vegas, NV (Bellagio)

Fall 2012 Dev Connections

November 2012

Build 2012
“At Build, we’ll dive deep to cover all the areas you care about. How to design and build beautiful Windows 8 apps. How to sell your apps in the Windows 8 Store and make money. And much more.”

  • When:Oct. 30 – Nov. 2, 2012
  • Where:Redmond, WA

Build 2012

HD Live 2012
“Now in our third year, HDLive is back for 2012 showcasing some of the world’s leading experts in technology, business, branding, education, mobile and the Web.”

  • When: Nov. 1st, 2012
  • Where: Hull, UK

BADCamp 2012
“BADCamp is a gathering of like-minded people to discuss and learn about Drupal, an open-source content management system that is powering more of the Web every year.”

  • When: Nov. 1-4, 2012
  • Where: U.C. Berkley, CA

BADCamp 2012

API Strategy and Practice Conference
“API Strategy and Practice is a vendor neutral and community supported API industry conference.”

  • When: Nov. 1-2, 2012
  • Where: New York, NY (Westin Grand Central)

API Strategy and Practice Conference

Topconf Tallin
“Topconf Tallinn offers ideal opportunities for learning, networking and tracking innovation occurring in the Java, Mobile, .Net, OpenSource, Lean/Agile, Architecture New Languages & Process communities.”

  • When: Nov. 1-2, 2012
  • Where: Tallinn, Estonia

RubyConf 2012
“A conference that is all about Ruby!”

  • When: Nov. 1-3, 2012
  • Where: Denver, CO

RubyConf 2012

UX Brighton 2012
“A mix of practical and theoretical, commercial and academic – the point of this year’s theme is that knowledge of the past informs us to create better products for the future.”

  • When: Nov. 2, 2012
  • Where: Brighton, UK (The Corn Exchange)

Frontend Masters Workshop Series 2
“6 Intense Days. 6 Incredible Speakers. Become a Guru by Learning from the Masters.”

  • When: Nov. 2 through Dec. 14, 2012 (Fridays)
  • Where: Burnsville, MN (South of Minneapolis, MN)

Frontend Masters Workshop Series 2

FrontInSampa
“The FrontInSampa is an opportunity for the Front-end development community in Paulista to meet and improve. Sharing experiences for the common good.”

  • When: Nov. 3, 2012
  • Where: Sao Paulo, Brazil

SQL in the City Seattle 2012
“We’ve invited along some of the top SQL Server MVPs to provide insights about key topics for SQL Server.”

  • When: Nov. 5, 2012
  • Where: Seattle

SQL in the City Seattle 2012

UI17: User Interface 17, The UX
“Up your UX game with daylong workshops on advanced design processes, flexible team–based techniques, and multi–device solutions. 3 days you can’t miss.”

  • When: Nov. 5-7, 2012
  • Where: Boston, US

UI17: User Interface 17, The UX

QCon San Francisco 2012 Conference
“The program includes two tutorial days led by over 80 industry experts and authors and three conference days with 18 tracks and over 80 speakers covering a wide variety of relevant and exciting topics in software development today.”

  • When: Tutorials – Nov. 5-6 | Conference Nov. 7-9, 2012
  • Where: San Francisco

QCon San Francisco 2012 Conference

CodeKen 2012 – Software Developer Conference
“CodeKen 2012 is a one day online social conference for developers with a passion for their profession.”

  • When: Nov. 6,2012
  • Where: Online

How To Web 2012
“Follow practical case-studies, discover how tech innovation changes the world, meet your peer tech entrepreneurs and professionals from all around Central and Eastern Europe.”

  • When: Nov. 7-8, 2012
  • Where: Bucharest, Romania

CodeConnexx
“CodeConnexx is a two-day, one track conference that aims to bring together men and women of all ages, races, backgrounds, and skillsets interested in talking about code.”

  • When: Nov. 8-9, 2012
  • Where: Indianapolis

CodeConnexx - November 8-9 2012

CascadiaJS 2012
A conference that is geared towards those interested and immersed in JavaScript.

  • When: Nov. 8-9, 2012
  • Where: Seattle, WA

CascadiaJS 2012

FITC // Web Unleashed 2012
“This year builds upon five years of learning and collaborating over two days; one of which is a day committed to hands on workshops, the second features a day filled with informative sessions.”

  • When: Nov. 8-9, 2012
  • Where: Waltham, MA

FITC // Web Unleashed 2012

Visualized
“Join us for an inspiring two-day gathering with the brightest minds and social innovators from around the world who are changing how we understand and interact with data; and gain insight into designing data-driven narratives that connect with audiences and visualize the human experience.”

  • When: Nov. 8-9, 2012
  • Where: New York, NY

User Friendly 2012
“Build a Harmonious User eXperience Ecosystem”

  • When: Nov. 8-11, 2012
  • Where: Beijing, China

Compute Midwest 2012
“Compute Midwest is a 2 day convergence of tech: new people, new ideas and innovation in Kansas City.”

  • When: Nov. 8-11, 2012
  • Where: Kansas City, MO

Compute Midwest 2012

Full Frontal 2012
“Full Frontal 2012 is a one day JavaScript Conference”

  • When: Nov. 9, 2012
  • Where: Brighton, UK (Duke of York’s Picturehouse)

UCD 2012 Conference
“UCD2012 explores how User Centred Design is applied in a variety of disciplines.”

  • When: Nov. 9-10, 2012
  • Where: London, UK

UX Camp 2012
“An ad hoc conference on effective usability and good-fit solutions that are built around the “user experience”.”

  • When: Nov. 9-10, 2012
  • Where: Vienna, Austria

Mozilla Festival 2012
“The Mozilla Festival is a magnet for people interested in learning about – and playing with – the future of the Web.”

  • When: Nov. 9-11, 2012
  • Where: London, UK

Webfontday 2012
“Webfontday 2012 is dedicated to courageous and extraordinary solutions in Web design. It will teach hands-on tricks for everyday tasks and display brilliant and inspiring examples.”

  • When: Nov. 10, 2012
  • Where: Munchen, Deutschland

Form, Function & Class 2012
“This Form, Function & Class Conference is the flagship event of the Philippine Web Designers Organization (PWDO) aiming to gather the brightest minds in the Philippine Web design scene. The upcoming event is open to all people who are determined to learn more of the basics of HTML, CSS and JavaScript.”

  • When: Nov. 10-11, 2012
  • Where: Manila, Philippines

WebConf Riga 2012
“WebConf Riga 2012, the international professional Web developers conference. It will gather all kind of Web development professionals mainly from Baltics, Europe and CIS countries.”

  • When: Nov. 10-11, 2012
  • Where: Riga, Latvia

ISWC2012 | The 11th International Semantic Web Conference
“ISWC 2012 is the premier international forum, for the Semantic Web / Linked Data Community. Here, scientists, industry specialists, and practitioners meet to discuss the future of practical, scalable, user-friendly, and game changing solutions.”

  • When: Nov. 11-15, 2012
  • Where: Boston

ISWC2012 | The 11th International Semantic Web Conference


“An Event Apart San Francisco features 12 great speakers and sessions. The two-day conference has sold out, but you can still register for an intense full-day workshop on Designing for Mobile & Beyond”

  • When: Nov. 12-14, 2012
  • Where: San Francisco (The Palace Hotel)

CouchConf NYC | Couchbase
“This one-day event is for anyone who wants to take a deeper dive into Couchbase NoSQL technology, learn where it’s headed and build really cool stuff.”

  • When: Nov. 12, 2012
  • Where: New York, NY (The Lighthouse at Chelsea Piers)

CouchConf NYC | Couchbase

Mobile JS Summit
“Environments for Humans brings together some of the Web’s most notable experts in Mobile Javascript for an all-new, one-day only online conference, the Mobile JavaScript Summit!”

  • When: Nov. 12, 2012
  • Where: Online

Build Conference
“Build is a festival for people who design for the Web. For one week in November, a community of smart, talented people come together to share ideas, tell stories, get their hands dirty, and drink a few beers.”

  • When: Nov. 12-16, 2012
  • Where: Belfast, Northern Ireland

SES Chicago 2012 – SES Conference
“Designed for you by industry thought leaders and innovators, our instructional program will meet your needs whatever your experience level.”

  • When: Nov. 12-16, 2012
  • Where: Chicago

SES Chicago 2012

Montreal Digital Festival
“Web-In is a Web event created by, and intended for, Web professionals./The Montreal International Game Summit (MIGS) was initially created in 2004 to meet the needs of the Quebec video game industry./Mobiz, The Quebec Mobile Congress, is an event dedicated to the mobile technologies which features lectures, panel discussions and presentations by local and international personalities in the industry.”

  • When: Nov. 12-15,2012
  • Where: Montreal, Canada

Devoxx 2012
“We Code in Peace” A conference for coders!

  • When: Nov. 12-16, 2012
  • Where: Antwerp, Belgium

Daily Web 2012
“Our events are different from others especially the the quality of the content. That we guarantee!”

  • When: Nov. 14, 2012
  • Where: Bratislava, Slovakia

YUIConf 2012
A conference focused on this free, open source JavaScript and CSS library for building richly interactive Web applications, YUI.

  • When: Nov. 14-15, 2012
  • Where: Santa Clara, CA

JS Conf Downunder
An exciting day of JS experts sharing their passion of JS down under.

  • When: Nov. 15, 2012
  • Where: Sydney, Australia (Town Hall)

MobX Conference 2012
“This conference is for all you creative minds out there who deal with User Experience, interfaces and interactions in mobile contexts.”

  • When: Nov. 16-17, 2012
  • Where: Berlin, Germany

JS.everywhere 2012 Europe
“An event focused on the advancement and promotion of JavaScript in the enterprise.”

  • When: Nov. 16-17, 2012
  • Where: Paris, France

Joomla! World Conference 2012
“Joomla! is one of the most popular Content Management Systems in the world and has grown to power millions of websites over the last several years. This conference is a community meeting, and a great starting point for getting involved in the Joomla! community. You’ll get information about almost every aspect of the Joomla! CMS, the Joomla! Web Application Platform, and about the Joomla! Community, the one and only community driven Open Source project.”

  • When: Nov. 16-18, 2012
  • Where: San Jose, CA, USA

Joomla! World Conference 2012

devmob
“Building or selling mobile apps? Dev? Designer? UX? Marketing? iOS coder? Web designer? Windows 8 entrepreneur? Android expert? You are devmob. Come to the only conference in New Zealand for everyone who is pushing the limits of mobile platforms.”

  • When: Nov. 17-18, 2012
  • Where: Albany, New Zealand

Handheld Conference
“The conference for all things mobile, Web and native. This is what makes us different to all of the other conferences out there, and let’s be honest, there are a lot.”

  • When: Nov 19, 2012
  • Where: Cardiff, UK

Beyond Tellerrand
“We are back with another edition of beyond tellerrand, an affordable 3-day event with intensive workshops and 16 high-quality talks for Web enthusiasts: design, technology, inspiration, and networking. Day one and two cover 16 talks in a single track conference. Day three features up to 4 full-day workshops with Remy Sharp, Ben Bodien and more to come.”

  • When: Nov. 19-21, 2012
  • Where: Dusseldorf, Germany

Untapped – the Event
“An event where never before heard voices speak about UX.”

  • When: Nov. 20, 2012
  • Where: Clerkenwell, London

Slush
“Slush is the largest tech, design & startup conference covering Northern Europe and Russia.”

  • When: Nov. 21-22, 2012
  • Where: Helsinki, Finland

push.conference
“A unique two-part event for the interactive field. push.ux connects designers and developers of outstanding user interfaces, while push.inspiration unites creative coders and designers experimenting with innovative technologies.”

  • When: Nov 23-24, 2012
  • Where: Munich, Germany

Conversion Conference London
“The conference is dedicated to anyone wanting to achieve maximum ROI from their online campaigns as this is the place where internationally renowned experts explain how to improve sales and dramatically increase your site’s conversion rates.”

  • When: Nov. 27-28, 2012
  • Where: London, UK

Future of Web Design Prague 2012
“Future of Web Design (FOWD) is a first-class conference for Web designers and front end developers, bringing you top speakers, the hottest topics and an unbeatable atmosphere. This year, we’re in Prague for the very first time! As if that wasn’t exciting enough, FOWD is also joining forces with Future of Web Apps (FOWA) giving you two conferences for the price of one!”

  • When: Nov. 27-29, 2012
  • Where: Prague, Czech Republic (The Prague Congress Centre)

Future of Web Apps Prague 2012
“Future of Web Apps (FOWA) is a first-class conference for Web and mobile developers and entrepreneurs, bringing together visionaries to discuss the technologies and platforms you should use to build the next generation of successful apps. This year, we’re in Prague for the very first time! As if that wasn’t exciting enough, FOWA is also joining forces with Future of Web Design (FOWD) giving you two conferences for the price of one!”

  • When: Nov. 27-29, 2012
  • Where: Prague, Czech Republic (The Prague Congress Centre)

YOW!2012 Australian Software Developer Conference
“Organized by Developers for Developers no other event provides the technical breadth and depth with 39 invited talks in 3 tracks plus 10 invited full-day workshops.”

  • When: Nov. 27-28 (Workshops) 29-30 (Conference)
  • Where: Melbourne, Australia

The Rich Web Experience 2012
“RWX 2012 will cover the hot areas of interest in the Web space today: HTML5, CSS3, JavaScript, Ajax Libraries, jQuery, Semantic Web, iPhone, Android, Netty, Dojo, CoffeeScript, Solr, Node.js, Security, Semantic Web, NoSQL (Neo4J & MongoDB), and more. RWX 2012 will feature 8 parallel tracks with 40 speakers and 120 technical sessions/workshops.”

  • When: Nov. 27-30, 2012
  • Where: Ft. Lauderdale, FL

Design for Conversion
“A highly interactive conference aiming to collectively (as one big family) deepen our knowledge of Persuasive Technology, Experience Design and Evidence Based Marketing, and how these disciplines can learn from each other.”

  • When: Nov. 28, 2012
  • Where: Amsterdam, The Netherlands

Mobile Future
“Mobile Future is an annual event arranged for the eleventh time by Mobil and its business spin-off Mobil:Business, the leading publications in the mobile space of the Northern Europe.”

  • When: Nov. 28, 2012
  • Where: Stockholm, Sweden

JSCamp.Asia
“Finally, a JavaScript conference in Asia. With all its awesome!”

  • When: Nov. 29-30, 2012
  • Where: Singapore

UX Cambridge 2012
“A community-driven, practical User Experience conference Connect and learn from your peers and leaders in the industry in a comfortable and exciting space and take away skills you can immediately use in your work”

  • When: Nov. 29-30, 2012
  • Where: Cambridge, UK

dotJS
“The largest JavaScript conference in France”

  • When: Nov. 30, 2012
  • Where: Paris, France

We Actually Build Stuff
“This conference is for and by people who actually build stuff. The talks are about building actual stuff, not theory. The rot of the trenches never smelled so good.”

  • When: Nov. 30, 2012
  • Where: Vilnius, Lithuania

December 2012

Kings of Code Festival 2012
“Explore and discuss the latest trends, developments and best practices in Web and mobile development technologies. We’ve invited leading international speakers & developers to share their knowledge and visions on development and coding.”

  • When: Dec. 1-4, 2012
  • Where: Amsterdam, The Netherlands

In Control 2012
“Spend two content-rich days with some of the most forward-thinking Designers and Developer building today’s Web. Limited enrollment and longer sessions allow for more meaningful interaction with our expert speakers and fellow attendees. Join us to expand your skill set and use updated techniques to refine your Web design craft.”

  • When: Dec. 2-4, 2012
  • Where: Honolulu, Hawaii

LeWeb’12 Paris
“#1 European Industry Event”

  • When: Dec. 4-6, 2012
  • Where: Paris, France

CSS Dev Conference
“Join Dan Cederholm, Paul Irish, Estelle Weyl, Chris Coyier, and many more as we discover the latest in the intersection of CSS and Preprocessors (Sass, Compass, etc.), JavaScript, Responsive Web Design & Mobile at the first annual CSS Dev Conference. Two keynotes, twenty sessions and four tracks make for a fast-paced full-day immersion into modern CSS techniques!”

  • When: Dec. 5, 2012
  • Where: Honolulu, Hawaii

RUPY 2012
“Rupy is a conference focused on strongly dynamic technologies related to Ruby, Python and JavaScript.”

  • When: Dec. 7-9, 2012
  • Where: Sao Paulo, Brazil

UX Camp Brighton
“A one day ‘unconference’ at for anyone involved or interested in user experience design, interaction design, information architecture or usability.”

  • When: Dec. 8, 2012
  • Where: Brighton & Hove City, England

Ready to Inspire Conference
“Ready to Inspire is a brand new conference about the craft of Web design, type and code. It has workshops, live music, meetups and parties, but above all an exciting lineup of today’s craftspeople and mind blowing new faces.”

  • When: Dec 9-12, 2012
  • Where: Leiden, The Netherlands

Hacker Beach
“Nomadic hackers, come work on your projects in a tropical paradise”

  • When: Dec. 30, 2012-Jan. 29, 2013
  • Where: Phu Quoc Island, Vietnam

January 2013

TakeOff Conference 2013
“From server side to pure front end and design, from new languages, Web frameworks to development techniques or typographic tricks, Take Off is your chance to discover how the Web will evolve in the coming year.”

  • When: Jan. 17-18, 2013
  • Where: Lille, France

DLD Conference
“DLD (Digital – Life – Design) is a global conference network on innovation, digital media, science and culture which connects business, creative and social leaders, opinion-formers and investors for crossover conversation and inspiration.”

  • When: Jan. 20-22, 2013
  • Where: Munich, Germany

New Adventures In Web Design Conference
“We work with our speakers to foster an incredible day around several key themes, and we’ll introduce all eight topics later in the year.”

  • When: Jan. 23-25, 2013
  • Where: Nottingham, UK (Albert Hall)

The Design of Understanding 2013
“A one day conference looking at how ideas are designed to be more understandable.”

  • When: Jan. 25, 2013
  • Where: London, UK (St Brides Library)

Mobile + Web DevCon
“Mastering the appropriate development tools, design techniques and latest technologies is the key to keeping pace with a constantly changing industry. Mobile+Web DevCon is dedicated to bringing you the most knowledgeable speakers, the latest research and inspiration for your development career.”

  • When: Jan. 29-31, 2013
  • Where: San Francisco, CA

February 2013 (And Beyond)

Jfokus
“The program includes a long list of international speakers from leading universities and software companies”

  • When: Feb. 4-6, 2013
  • Where: Stockholm, Sweden (Waterfront Conference Centre)

Webstock 2013
“Two intense, action-packed days of aspiration, inspiration and brain stimulation, covering everything from empathy in design, to expertry in HTML5 & CSS, to the future of education and how tech makes us human.”

  • When: Feb. 11-15, 2013
  • Where: Wellington, New Zealand (Wellington Town Hall)

Snow*Mobile – A Mobile Development Conference
A community of people who recognize the explosion of mobile devices and see how they are affecting our interactions. Pulling together locals and some experts from around the country and have that conversation!

  • When: Feb. 15-16, 2013
  • Where: Madison, WI (Union South)

Toca Me 2013
“Next Stop Design!”

  • When: Feb. 16, 2013
  • Where: Munich, Germany

FITC Amsterdam 2013
“The latest and greatest in design, technology and cool shit from all around the world. Join fellow digital creators and renowned speakers at the Felix Meritas this February to learn about HTML5, CSS, virtual machines, design, creativity and much more!”

  • When: Feb. 18-19, 2013
  • Where: Amsterdam, The Netherlands (Felix Meritas)

An Event Apart Atlanta 2013
“An intensely educational learning session for passionate practitioners of standards-based Web design. If you care about code as well as content, usability as well as design, An Event Apart is the conference you’ve been waiting for.”

  • When: Feb. 18-20, 2013
  • Where: Atlanta, GA (InterContinental)

Mobile Trends Conference & Awards 2013
“This conference is dedicated to mobile technologies and techniques. Mobile Trends Conference is two days – various issues – two groups of customers!”

  • When: Feb. 21-22, 2013
  • Where: Krakow, Poland

The Story
“The Story is a one-day conference about stories and story-telling.”

  • When: Feb. 22, 2013
  • Where: London, UK (Conway Hall)

jQuery Europe 2013
“International speakers and Web pioneers show the newest trends and techniques for Web, apps and smart TV development with jQuery. Two days of conference with awesome sessions, one additional day of jQuery training and lots of opportunities to meet and greet with developers from all Europe.”

  • When: Feb. 22-23, 2013
  • Where: Palais Liechtenstein, Vienna

ConFoo Conference
“ConFoo is a non for profit, multi-technology conference. We bring the learning experience to a whole new level.”

  • When: Feb. 25-Mar. 1, 2013
  • Where: Montreal, Canada

SXSW Interactive 2013
“The 2013 SXSW® Interactive Festival will feature five days of compelling presentations from the brightest minds in emerging technology, scores of exciting networking events hosted by industry leaders, the SXSW Trade Show and an unbeatable lineup of special programs showcasing the best new digital works, video games and innovative ideas the international community has to offer.”

  • When: Mar. 8-12, 2013
  • Where: Austin, TX

More Links for Keeping Up

Here are a few links that will also help you keep up with the newly scheduled design and/or development conferences being shared through Lanyard that have been sorted out by category:

Where Are You Going?

How many of these conferences are coming to an area near you? Or for that matter, how many are luring you to the area in which they are happening? If you plan on attending any of these or other Web design and development conferences (or workshops) this fall, or have attended any of them already, please share your thoughts with us in the comments section below! Perhaps you’ll be able to meet the members of the Smashing Team this year? It would be our pleasure!

We sincerely thank Louis Lazaris and Robert Bowen for helping us to collect this overview of upcoming events!


© Smashing Editorial for Smashing Magazine, 2012.


Device-Independent Design Strategy: Looking Beyond Common Media Query Breakpoints


  

With all the talk about responsive Web design, designers and coders are moving even further from the fixed pixel layouts of design’s print-based history. We’re finally thinking in terms of fluid layouts and expandable, interactive content. But when you get down to it, we’re still thinking of the fluidity in terms of desktop, tablet and mobile sizes.

Chances are that your responsive websites have media query breakpoints at precisely the tablet and mobile widths, essentially creating three different versions of a website with the same code.

While this is much more ideal than what we’ve all done until now, it’s not always the best way to approach things. Often, our content breakpoints (the viewport widths where content should be reformatted) are different from common device breakpoints (the viewport widths that reflect physical devices).

When we code for only a general desktop size, a general tablet size and a general mobile size, we are forgetting about the infinite other shapes and sizes that our devices are and will be in the future (especially as TV becomes a more popular medium for Web content). We’re not truly utilizing the full potential of responsive design. We’re not truly coding for any device.


Image Source: opensourceway.

Our goal should be to always present content in order of importance, no matter what size a screen is. There’s nothing wrong with using media query breakpoints at tablet and mobile widths (in fact, that’s a great start), but don’t forget about all the other possible sizes that a screen can and will be, and don’t forget that no matter how a user accesses content, there will always be a need for content hierarchy.

We’ve all read about what kinds of goals users have on each different device, but the fact is that Internet users will access the Web on any number of devices for any number of reasons. We can’t claim to know what the most important content is to them at any given point in time or from any given place, but we can make an educated guess as to what the most important content overall is and make sure that it always shows up before less important content.

Design is based on creating hierarchy and controlling what a viewer sees and when, so designing a website based on content hierarchy makes a lot of sense. It’s essentially what we all do now when we initially design a desktop layout, only instead of worrying about how the design responds in relation to content, a lot of designers make sure that the design responds in relation to aesthetics, letting content arrange itself organically. This is an oversight.

With good design systems (as opposed to just good design), I propose we focus our responsive efforts on the content, and not on the design alone.

One note before we get started here: a content-first approach doesn’t necessarily mean that a designer or coder needs all the real content up front. That’s a huge help, but in real life, that’s just not always possible. We might not know the exact content we’re working with when we start a project, but we always know the nature of that content, and we can usually guess how it ranks amongst all the other content on a page.

The Top-Down Approach

By definition, a user enters a website “at the top� and then scrolls down. In the past, there’s been a whole lot of focus on keeping important content “above the fold� so that users don’t miss anything. Well, I have a news update. In 2012, people know how to scroll. I’m not saying to bury important content below the fold, but just know that almost all Internet users these days know that with a flick of the finger or a scrollball roll, they can adjust their view of the page. Furthermore, a lot of savvy users will quickly scan an entire page before reading any of the content.

This means that we can and should sacrifice the precious “above the fold” space in favor of readability and usability. The most important thing is not that the content is viewable without scrolling, it’s that it’s digestible, clear and easily scanned when it’s on the screen.

Take the website CSS-Tricks as an example. There are several major breakpoints where content shifts around so that readers get the most important content first, based on what fits on the screen. Each different layout re-prioritizes content based on the available screen real estate.

CSS-Tricks does a good job of rearranging content for different viewport sizes.
CSS-Tricks does a good job of rearranging content for different viewport sizes. Large view.

When, Where and Why

We can safely assume that a “top-down� content hierarchy is almost always applicable, and we can plan all of our content to go most to least important, top to bottom. In the case of the desktop screen, we may have three columns of information, each with its own top-to-bottom content hierarchy. Then when the viewport gets too small, we stack the columns themselves from most to least important, top to bottom.

We can achieve this through a commonly-used, collapsible column system where containers are treated as inline elements, left-floated elements or both. Then we adjust these column widths with media queries in the stylesheet.

We use something like this in my company’s platform:




And our styles go something like this:

.column { float:left; display:inline; }
.one-third.column { 
	width: 33.333333333% /* 320px / 960px */; 
}

@media only screen and (max-width: 767px) {
	.one-third.column { 
		width: 100%; 
	}
}

Note: The “only” keyword after @media is optional and only there so that older browsers ignore the media query if they don’t support it.

We can get fancier by adding another class to the first column, which we’ll say has more important content, and then adding a separate “in-between� media query for cases where we want a layout that’s a bit more custom.

As an example, when the viewport is wider than a certain amount of pixels, say 900, we can safely assume that three columns will fit in that area. When our screen real estate is less than 900 pixels wide, three columns would create reading areas that are too small. So we add a media query to break this into a single column on top that has the more important content, with two columns side by side underneath. Then at 300 pixels wide, we go back to three stacked columns that are full width.




.column { float:left; display:inline; }
.one-third.column { 
	width: 33.333333333% /* 320px / 960px */;
}

@media only screen and (max-width: 500px) {
    .one-third.column { 
    	width: 50%; 
    }
    .one-third.column.more-important { 
    	width:100%; 
    }
}

@media only screen and (max-width: 300px) {
    .one-third.column { 
    	width: 100%; 
    }
}

Most responsive Web designers today will stop at my original code example. Their website will respond with media queries, but in a very content-agnostic way. I say we take things a step further like my second code example, and we create better content presentation with more thought and more media queries. Everything should be based around presenting content in a controlled and successful way.

When deciding on columns and column size, keep in mind that columns that are too wide are just as hard to read as columns that are too narrow.

With a nested column system, we can nest columns within each other to create a huge variety of layouts for different screen sizes. And, again, we should think about it in terms of content size, not device size. As it currently stands, most coders will add breakpoints at around 1024 pixels for a tablet and maybe 480 pixels for mobile landscape. (Feeling saucy? Add in 768 pixels to cover tablet portrait.)

I propose we start with those, but we add media query breakpoints wherever it makes our content look best, based on how that content actually looks. In addition to device size, media queries should be based on content, column width and most importantly… real-life testing.

If we do this correctly, our layouts will look great on a mobile phone and great on a tablet, even if we don’t do media queries at their exact widths. Why? Because our layouts will look great everywhere. A common theme that I see in current responsive websites are those little “in-between� glitches where the screen is too large for one media query (say a tablet size), but too small for the next one (a desktop size). With this new way of thinking, we know to adjust the widths in our media queries or add an additional media query to fix the glitch, regardless of the actual pixel value and what device it corresponds to.

A Common Example

A common example of this type of nested layout is the classic “sidebar.� Sidebar content is typically less important than a larger main column, so if the screen is wide enough to show both columns side by side, show them. If not, then the sidebar can get pushed below the main content.

In the end, when and how that content shifts comes down to screen size and readability, not device and device goals.

A Common Mistake

A common mistake that stems from coding for the device is when a designer knows that content should stack for mobile, but they forget to really look at that content at a mobile size.

Microsoft utilizes a responsive layout for their Surface tablet’s website, and so the design stacks to fit small screens, but the content itself doesn’t get enough attention, and therefore the website design falls short on small screens. The rows of content, each with a block of text and an image, stack on top of each other, but instead of stacking in a uniform, content-centric way, every other pairing differs as to whether the image or text comes first, creating a somewhat messy look. This could be solved with an alternating float:left and float:right on the image containers, but instead Microsoft relied on the default column resizing to create a “mobile version.” A little extra thought about the specific content on this page at this screen width would have gone a long way.

Microsoft's Surface website falls short on small screens.
Microsoft’s Surface website falls short on small screens. Large view.

Furthermore, I believe that Microsoft might have missed an opportunity on large screens to fit a couple image/text pairs side by side. On my 27″ iMac, there is arguably too much room around each content pairing, and therefore not enough control in the design.

For Microsoft to improve this website, they’d only need to go a little bit further. The design probably looks best on a laptop screen, where the images and text sit next to each other, one image/text combination per row. But on a larger desktop monitor, the website expands to where it looks too open, and the spaces around content become large and uneven. Another media query can put two image/text combos on each row, evenly separating the screen real estate on screens with enough of it. The font-size and line-height could be increased to accomodate for the available space and make the relation between text and the illustration a bit clearer.

Then, to regain consistency on small screens, the code needs a little adjusting for correct content hierarchy. Each image should be arranged in the layout before its corresponding block of text. It makes sense to code all of the image/text pairs the same way, because they’re most likely to have the same importance in relation to each other. Once they’re coded with the image first, they’ll stack perfectly on a small, mobile screen. For visual interest (repetition with variation) on larger screens, every other image can get a float:right instead of a float:left, and we’ll see the layout we see now with the image/text pairs side by side.

Won’t “Arbitrary Breakpoints” Take Longer to Code?

If you code for content from the beginning and add breakpoint when content dictates it, most screen sizes will just need a little tweaking in the stylesheet to help everything shift around.

In addition, once you have an initial responsive column system, entering the values for column-based percentages is as easy as copying and pasting. I’d argue that the amount of time to add a “special case” media query is the same amount of time that it takes to find a solution that lets content work without an additional media query.

Doesn’t the Importance of Content Change from Device to Device?

No. According to recent studies, 17% of all adult cell phone owners in the US access the Internet mostly on their cell phones. This is due to the economics of buying phones and computers. If someone can’t afford both, the phone makes more sense because it makes calls and browses the Web.

In addition to that, because of the recent increase in mobile-friendly websites, people are more likely to access information right from their phone, wherever they are, even sitting at their desk in front of their desktop! This is especially true if the phone is the most handy device at the time.

This is why we can’t assume use cases or goals based on device anymore. So we need to code so that our content makes sense on a 300 pixel screen, not a mobile phone screen. We also need to make sure that if we only have 300 pixels to work with, the most important content appears first, the second-most important is next and so on.

Only by thinking this way can we truly utilize responsive design to accommodate future devices. And only through this mindset are we truly taking advantage of responsive design.

Have a look at architectural firm Andersson-Wise‘s impressive and intelligent responsive website. The content shifts and reforms not only based on width, as most websites do, but also on height. The golden ratio is everywhere in this design, and if you play with your browser size, it’s clear that their goal was to present content as efficiently and clearly as possible, reacting to browser shape and size in a systematic and programmatic way.

Andersson-Wise always puts content first.
Andersson-Wise always puts content first. Large view.

In my opinion, the main quality that makes Andersson-Wise’s website better compared to the Microsoft Surface website is that there is no screen size or shape where Andersson-Wise’s website looks “undesigned” or out of control. The Surface website, in contrast, seems at times like the content is untamed and not specifically planned. If you imagine it as a static layout, it really only looks well-designed between 1,000 and 1,200 pixels, which is probably the size they started designing with. Other sizes “work,” but they don’t shine, like Andersson-Wise.

One more thing. The user probably doesn’t know anything about code or responsive Web design, and so they won’t be impressed that your website resizes. They do notice if your website doesn’t look good, though, and they know if content is hard to find or hard to read.

Keep in mind that we’re not creating desktop, tablet and mobile websites. We’re creating one responsive website. Look at and think about content at every size you can. Forget about the device, and fix little quirks with custom media queries. Invest in the future of your website and in the future of the Web in general.

Image source of picture on front page.

(cp)


© Andrew Thomas for Smashing Magazine, 2012.


Device-Independent Design Strategy: Looking Beyond Common Media Query Breakpoints


  

With all the talk about responsive Web design, designers and coders are moving even further from the fixed pixel layouts of design’s print-based history. We’re finally thinking in terms of fluid layouts and expandable, interactive content. But when you get down to it, we’re still thinking of the fluidity in terms of desktop, tablet and mobile sizes.

Chances are that your responsive websites have media query breakpoints at precisely the tablet and mobile widths, essentially creating three different versions of a website with the same code.

While this is much more ideal than what we’ve all done until now, it’s not always the best way to approach things. Often, our content breakpoints (the viewport widths where content should be reformatted) are different from common device breakpoints (the viewport widths that reflect physical devices).

When we code for only a general desktop size, a general tablet size and a general mobile size, we are forgetting about the infinite other shapes and sizes that our devices are and will be in the future (especially as TV becomes a more popular medium for Web content). We’re not truly utilizing the full potential of responsive design. We’re not truly coding for any device.


Image Source: opensourceway.

Our goal should be to always present content in order of importance, no matter what size a screen is. There’s nothing wrong with using media query breakpoints at tablet and mobile widths (in fact, that’s a great start), but don’t forget about all the other possible sizes that a screen can and will be, and don’t forget that no matter how a user accesses content, there will always be a need for content hierarchy.

We’ve all read about what kinds of goals users have on each different device, but the fact is that Internet users will access the Web on any number of devices for any number of reasons. We can’t claim to know what the most important content is to them at any given point in time or from any given place, but we can make an educated guess as to what the most important content overall is and make sure that it always shows up before less important content.

Design is based on creating hierarchy and controlling what a viewer sees and when, so designing a website based on content hierarchy makes a lot of sense. It’s essentially what we all do now when we initially design a desktop layout, only instead of worrying about how the design responds in relation to content, a lot of designers make sure that the design responds in relation to aesthetics, letting content arrange itself organically. This is an oversight.

With good design systems (as opposed to just good design), I propose we focus our responsive efforts on the content, and not on the design alone.

One note before we get started here: a content-first approach doesn’t necessarily mean that a designer or coder needs all the real content up front. That’s a huge help, but in real life, that’s just not always possible. We might not know the exact content we’re working with when we start a project, but we always know the nature of that content, and we can usually guess how it ranks amongst all the other content on a page.

The Top-Down Approach

By definition, a user enters a website “at the top� and then scrolls down. In the past, there’s been a whole lot of focus on keeping important content “above the fold� so that users don’t miss anything. Well, I have a news update. In 2012, people know how to scroll. I’m not saying to bury important content below the fold, but just know that almost all Internet users these days know that with a flick of the finger or a scrollball roll, they can adjust their view of the page. Furthermore, a lot of savvy users will quickly scan an entire page before reading any of the content.

This means that we can and should sacrifice the precious “above the fold” space in favor of readability and usability. The most important thing is not that the content is viewable without scrolling, it’s that it’s digestible, clear and easily scanned when it’s on the screen.

Take the website CSS-Tricks as an example. There are several major breakpoints where content shifts around so that readers get the most important content first, based on what fits on the screen. Each different layout re-prioritizes content based on the available screen real estate.

CSS-Tricks does a good job of rearranging content for different viewport sizes.
CSS-Tricks does a good job of rearranging content for different viewport sizes. Large view.

When, Where and Why

We can safely assume that a “top-down� content hierarchy is almost always applicable, and we can plan all of our content to go most to least important, top to bottom. In the case of the desktop screen, we may have three columns of information, each with its own top-to-bottom content hierarchy. Then when the viewport gets too small, we stack the columns themselves from most to least important, top to bottom.

We can achieve this through a commonly-used, collapsible column system where containers are treated as inline elements, left-floated elements or both. Then we adjust these column widths with media queries in the stylesheet.

We use something like this in my company’s platform:




And our styles go something like this:

.column { float:left; display:inline; }
.one-third.column { 
	width: 33.333333333% /* 320px / 960px */; 
}

@media only screen and (max-width: 767px) {
	.one-third.column { 
		width: 100%; 
	}
}

Note: The “only” keyword after @media is optional and only there so that older browsers ignore the media query if they don’t support it.

We can get fancier by adding another class to the first column, which we’ll say has more important content, and then adding a separate “in-between� media query for cases where we want a layout that’s a bit more custom.

As an example, when the viewport is wider than a certain amount of pixels, say 900, we can safely assume that three columns will fit in that area. When our screen real estate is less than 900 pixels wide, three columns would create reading areas that are too small. So we add a media query to break this into a single column on top that has the more important content, with two columns side by side underneath. Then at 300 pixels wide, we go back to three stacked columns that are full width.




.column { float:left; display:inline; }
.one-third.column { 
	width: 33.333333333% /* 320px / 960px */;
}

@media only screen and (max-width: 500px) {
    .one-third.column { 
    	width: 50%; 
    }
    .one-third.column.more-important { 
    	width:100%; 
    }
}

@media only screen and (max-width: 300px) {
    .one-third.column { 
    	width: 100%; 
    }
}

Most responsive Web designers today will stop at my original code example. Their website will respond with media queries, but in a very content-agnostic way. I say we take things a step further like my second code example, and we create better content presentation with more thought and more media queries. Everything should be based around presenting content in a controlled and successful way.

When deciding on columns and column size, keep in mind that columns that are too wide are just as hard to read as columns that are too narrow.

With a nested column system, we can nest columns within each other to create a huge variety of layouts for different screen sizes. And, again, we should think about it in terms of content size, not device size. As it currently stands, most coders will add breakpoints at around 1024 pixels for a tablet and maybe 480 pixels for mobile landscape. (Feeling saucy? Add in 768 pixels to cover tablet portrait.)

I propose we start with those, but we add media query breakpoints wherever it makes our content look best, based on how that content actually looks. In addition to device size, media queries should be based on content, column width and most importantly… real-life testing.

If we do this correctly, our layouts will look great on a mobile phone and great on a tablet, even if we don’t do media queries at their exact widths. Why? Because our layouts will look great everywhere. A common theme that I see in current responsive websites are those little “in-between� glitches where the screen is too large for one media query (say a tablet size), but too small for the next one (a desktop size). With this new way of thinking, we know to adjust the widths in our media queries or add an additional media query to fix the glitch, regardless of the actual pixel value and what device it corresponds to.

A Common Example

A common example of this type of nested layout is the classic “sidebar.� Sidebar content is typically less important than a larger main column, so if the screen is wide enough to show both columns side by side, show them. If not, then the sidebar can get pushed below the main content.

In the end, when and how that content shifts comes down to screen size and readability, not device and device goals.

A Common Mistake

A common mistake that stems from coding for the device is when a designer knows that content should stack for mobile, but they forget to really look at that content at a mobile size.

Microsoft utilizes a responsive layout for their Surface tablet’s website, and so the design stacks to fit small screens, but the content itself doesn’t get enough attention, and therefore the website design falls short on small screens. The rows of content, each with a block of text and an image, stack on top of each other, but instead of stacking in a uniform, content-centric way, every other pairing differs as to whether the image or text comes first, creating a somewhat messy look. This could be solved with an alternating float:left and float:right on the image containers, but instead Microsoft relied on the default column resizing to create a “mobile version.” A little extra thought about the specific content on this page at this screen width would have gone a long way.

Microsoft's Surface website falls short on small screens.
Microsoft’s Surface website falls short on small screens. Large view.

Furthermore, I believe that Microsoft might have missed an opportunity on large screens to fit a couple image/text pairs side by side. On my 27″ iMac, there is arguably too much room around each content pairing, and therefore not enough control in the design.

For Microsoft to improve this website, they’d only need to go a little bit further. The design probably looks best on a laptop screen, where the images and text sit next to each other, one image/text combination per row. But on a larger desktop monitor, the website expands to where it looks too open, and the spaces around content become large and uneven. Another media query can put two image/text combos on each row, evenly separating the screen real estate on screens with enough of it. The font-size and line-height could be increased to accomodate for the available space and make the relation between text and the illustration a bit clearer.

Then, to regain consistency on small screens, the code needs a little adjusting for correct content hierarchy. Each image should be arranged in the layout before its corresponding block of text. It makes sense to code all of the image/text pairs the same way, because they’re most likely to have the same importance in relation to each other. Once they’re coded with the image first, they’ll stack perfectly on a small, mobile screen. For visual interest (repetition with variation) on larger screens, every other image can get a float:right instead of a float:left, and we’ll see the layout we see now with the image/text pairs side by side.

Won’t “Arbitrary Breakpoints” Take Longer to Code?

If you code for content from the beginning and add breakpoint when content dictates it, most screen sizes will just need a little tweaking in the stylesheet to help everything shift around.

In addition, once you have an initial responsive column system, entering the values for column-based percentages is as easy as copying and pasting. I’d argue that the amount of time to add a “special case” media query is the same amount of time that it takes to find a solution that lets content work without an additional media query.

Doesn’t the Importance of Content Change from Device to Device?

No. According to recent studies, 17% of all adult cell phone owners in the US access the Internet mostly on their cell phones. This is due to the economics of buying phones and computers. If someone can’t afford both, the phone makes more sense because it makes calls and browses the Web.

In addition to that, because of the recent increase in mobile-friendly websites, people are more likely to access information right from their phone, wherever they are, even sitting at their desk in front of their desktop! This is especially true if the phone is the most handy device at the time.

This is why we can’t assume use cases or goals based on device anymore. So we need to code so that our content makes sense on a 300 pixel screen, not a mobile phone screen. We also need to make sure that if we only have 300 pixels to work with, the most important content appears first, the second-most important is next and so on.

Only by thinking this way can we truly utilize responsive design to accommodate future devices. And only through this mindset are we truly taking advantage of responsive design.

Have a look at architectural firm Andersson-Wise‘s impressive and intelligent responsive website. The content shifts and reforms not only based on width, as most websites do, but also on height. The golden ratio is everywhere in this design, and if you play with your browser size, it’s clear that their goal was to present content as efficiently and clearly as possible, reacting to browser shape and size in a systematic and programmatic way.

Andersson-Wise always puts content first.
Andersson-Wise always puts content first. Large view.

In my opinion, the main quality that makes Andersson-Wise’s website better compared to the Microsoft Surface website is that there is no screen size or shape where Andersson-Wise’s website looks “undesigned” or out of control. The Surface website, in contrast, seems at times like the content is untamed and not specifically planned. If you imagine it as a static layout, it really only looks well-designed between 1,000 and 1,200 pixels, which is probably the size they started designing with. Other sizes “work,” but they don’t shine, like Andersson-Wise.

One more thing. The user probably doesn’t know anything about code or responsive Web design, and so they won’t be impressed that your website resizes. They do notice if your website doesn’t look good, though, and they know if content is hard to find or hard to read.

Keep in mind that we’re not creating desktop, tablet and mobile websites. We’re creating one responsive website. Look at and think about content at every size you can. Forget about the device, and fix little quirks with custom media queries. Invest in the future of your website and in the future of the Web in general.

Image source of picture on front page.

(cp)


© Andrew Thomas for Smashing Magazine, 2012.


  •   
  • Copyright © 1996-2010 BlogmyQuery - BMQ. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress