Easing the path from design to development How designers and developers can learn to get along - Introduction - The process from design to development shouldn't be a battlefield - All too frequently it does turn into one - This is often because developers don't understand enough about the design process - And designers don't always know enough about development - Designers should know some development basics to inform their work - That's what we're spending some time looking at this afternoon - But first, who I am? - Drew McLellan - @drewm on Twitter - edgeofmyseat.com - allinthehead.com - 24ways.org - webstandards.org - But most importantly, I build things. - I've spent the last ten years as a developer working alongside designers - I think I have a good grasp of how the process should work - But enough about me - Who are you? - Who's a designer? - Who does only design? - Who does a bit of building? - Who does all the building? - What we cover today should be useful for all parts of the process - What's your problem? - What are the biggest issues you're facing with your design to development process? - Video - What do YOU do guaranteed? - The developer is responsible for implementing the design - The designer is responsible for the success of the design - Guaranteed! - What we'll be looking at today - Identifying a web developer - Principals for evaluating a design - Layouts - Fonts - Forms - JavaScript & Ajax - Logged in/out states - Identifying a Web Developer - Web developers are a strange breed - All sorts of clichés - We live in the dark - Frequently don't wash - Fairly anti-social - Just as there are all sorts of clichés about turtle-neck wearing, pencil twiddling designers - They're no more accurate - Developers are no different from other office workers really. - A lot of project managers are worse (especially not washing) - Yes, web developers are geeks - We specialise in the art of geekery - Often this results in obsessive attention to detail for the most boring things - Remember: - This is a great asset to your project - Be pleased that your web developers are obsessing over the tiny technical details that add up to make your project successful - Developers harp on a lot about "can't do this, can't do that" - Be aware: - It's for a reason, they're not just being awkward - (well, sometimes they're just being awkward) - Most of the time there are good reasons - The web is a technical environment in a way some other forms of communication aren't - It's like writing software, but sometimes even more difficult - Just because you see something working somewhere else, doesn't mean it's responsible for you to do it - Other people do bad stuff - appreciate it when your developer prevents you from doing bad stuff - Developers aren't usually trying to spoil your fun - Except when they are. - Sometimes they'll initially just respond with 'no' without really thinking - An attribute of a good developer is laziness - It's this that drives them to have efficient, reusable code - The computers should be doing the work, not us, that's what they're for - You need to understand that developers are lazy - Sometimes this means they'll initially respond and say that something can't be done - Really they mean there's no easy way to achieve it - Some of the best examples of forward thinking web design is from when people do what can't be done - A lot of the every day techniques we take for granted were 'impossible' at one time, until someone sat down and tackled it - e.g flight! - Flash Satay - Embedding Flash in XHTML Strict pages caused them to be invalid - There was no solution, so developers who cared about valid pages had a problem if forced to use Flash - I was one who cared about having valid pages, and was required to embed Flash - No body had actually spent the time to figure out how to get it to work within the spec - So I spent around two days going between the XHTML spec and multiple browsers and cracked it - We wrote it up for a alistapart.com article, and the W3C validator error message now recommends using the technique I developed. - Not an easy problem, but by focusing on it and spending time, we found a solution - On occasion, the impossible can be done - But it's a hard problem to solve. - As well as being lazy, developers like hard to solve problems - They also like praise, flattery, glory and beer - You just need to motivate them through the laziness and dangle the carrot of glory - Dangle the Carrot of Glory - Sometimes a solution can be found - Don't let it jeopardise the project - It could take a lot of time to work through - There may be no solution at the end of it - There are a lot of things we cannot do, no matter how hard we try - Sometimes they'll say no because it would result in a less than optimal solution - It's in a developer's nature to push for the very best solution - It's their job to deliver the best solution - To them, if they deliver something other than the best obvious solution, they could be judged as not being competent - Example: images for navigation - Sometimes a design requires an exact font or specific typographical control we can't get with CSS - There are a few options for this (which we'll look at) but one is to use Photoshop to make images of the text - We worked on a project last year where the navigation links we set in Arial in a mid grey - We could happily reproduce this perfectly with CSS - The links could be read by search engines (important!) - The text could be resized by the user - The links could be quickly edited from the CMS - A user style sheet could override the colours if necessary - It was the best solution - The designer came back to us and said that the client wasn't happy - There was no difference between the mockup in Photoshop and what was on our screens - But we were viewing on a Mac - The client was using Windows, which doesn't do a good job of anti-aliasing text - The text looked wiry and ugly, like all the text on Windows - My initial reaction was "well, that's just how text looks on Windows" - Text was the best technical solution - But getting the best over-all solution is a case of weighing up the technical, communication, brand, usability, aesthetics - We chose a less optimal technical solution - text as images - But it benefited the overall solution for Windows users (most users) - It can be hard to get developers to see that the technical solution is only part of the overall solution - Technical is a big part, and a lot of the time it carries the vote - But it's not the only part, and sometimes you have to sacrifice the best technical solution to better serve the end goal. - If the developer says no, it's their responsibility to help the designer find a better solution that works for both of you - Don't be afraid to ask a developer for help - Dangle the Carrot of Glory - Sometimes developers insist on a lot of stuff that seams unnecessary - e.g. non-JavaScript versions of a thing - Making something navigable with the keyboard - This can be frustrating when timescales are short - But remember - developers are lazy! - So why are they doing this? - It's because they're trying to do a good job - Remember that just as a designer fights for whitespace or the correct application of a brand identity, developers are specialist too - Good developers know their stuff, they know the best way to do things - If it was a corner they thought they could cut, then they would. - fray.com - A story telling website from the late 1990s - Full archive is still online and the content is still relevant and powerful today - Each story had a unique presentation - http://www.fray.com/criminal/left/ - It depends on JavaScript - That JavaScript was written to work in the browsers of its day, but no longer works - It's impossible to get past screen 1 of the story - It was built a long time ago, before current best practise was understood - Had it been written with what we now understand to be best practise, even if that JavaScript failed, the story would have been readable. - It would have needed to be designed in two states, which would have taken longer - Development would have taken a bit longer - But it would still be working today. - Everybody gets frustrated when they're preventing from doing their job well - So be aware that when a developer is pushing to do things a certain way - They're just trying to do a good job - Of course, all this only applies to good developers - If you're stuck with a bad developer, you need to design for a bad developer - Ramsay's Kitchen Nightmares - If the chef isn't great, he doesn't insist they get replaced - Not every restaurant can find or support a world class chef - Not every web company can find or support top notch developers - So you work to the strengths of the people you have - With crap chefs, Ramsay implements a simpler menu, but with high quality ingredients - The food is designed to be easy and efficient to prepare, cook and serve, but is still delicious - As a designer, you need to design sites to the abilities of the developer - Use a few simple, high quality ingredients - Be good but not fancy - Avoid complex and cutting edge techniques - Just as designing for 1 colour in print doesn't mean you'll have a bad design - Designing for a less experienced developer just needs to embrace the constraints - If they can't achieve the required results, they may need some training - If they can't respond to training, they may need replacing. (ouch) - Principals - There are a number of principals that we'll keep coming back to and use to evaluate what we're doing along the way - Every element of every design needs to be evaluated against these basic principals - Practicality - Can it be built? - There are somethings that are easy and routine - But there are somethings which we just can't do - Text on 45 degrees - If we do build it, will it be useful/usable? - Does it actually perform a useful function - Will the user be able to understand how it works to make good use of it? - Compatibility - Will it / can it work with all browsers? - Not all browsers are created equal - Most desktop browsers in use today a very capable - There's a bit rise in mobile use, games consoles - Some browsers aren't so great and have limitations - Is it accessible? - Will it cause problems for users of assistive technologies - Does it pass basic text resize and keyboard navigation tests? - Who are we excluding? - Hopefully nobody - How can be build it to exclude no one? - Identify the weakness and address - Cost - Time to build - is it worth it? - What are the alternatives? - Web sites - Layout - A magazine layout or package design has fixed constraints - The web browser does not have the same constraints - it has different ones - These are both a blessing and a curse- you need to know how to deal with them - The browser is not a fixed medium. It has no dimensions and every dimension - In response, there are some different basic ways of layout out a page - The method you choose has a big impact on how you design and build, so it needs to be considered - Point: choose a layout, consider it in every aspect of the design, and communicate it to your developer - Fixed with / Fluid or Liquid / Elastic - Fixed - Designed to fit with a certain screen res - On hires, it'll sit in the middle or to one side - Considerations - The minimum screen res required to use the site - Smaller res visitors get horizontal scroll bar - Main content area shouldn't be too wide - 800*600 isn't 800 wide - more like 760 - Pros - makes working with images easier - e.g. photos or banner ads whose size you don't control - rounded corners don't have to expand in two directions - can be easier to code - more control - Cons - Resized up text can run out of space == short lines - Need to design for the lowest common denominator - On big screens, you site appears very small - less control for the user - Liquid/Fluid - Reflow to use all the available window width - Users on hires screens don't end up with a small central site - Considerations - Which elements expand? - Which are fixed? - Not all content expands (e.g. images) - how to deal? - Pros - Makes good use of available screen space - Doesn't make any assumptions about available space - Cons - Lines of text can become very long - Not all elements reflow comfortably e.g. images - Can take a little longer to get right - Elastic - Dimensions all set in ems - Columns grow and shrink depending on font size - Always the same number of words per line - Considerations - Largely the same as Liquid layouts - You lose the ability to know the exact pixel width of any one column - Pros - Great of typography-heavy designs - Cons - hard to get working well with lots of images - lots of maths! - Which layout to use? - It depends entirely on the site - the best thing is to know the options and the pros and cons of each - Many of the pros and cons relate to text resizing - It's tempting to think that layout zooming makes this a non-issue - Layout zooming is a red herring - It's true that many people solve that one problem of making things bigger - But that tells us nothing about our design - The property of being able to cope with resized text is more important than the size of the text - It tells us our design is robust and can offer some flexibility - Different, unknown browsers may display text differently - User stylesheets - Qe may change the design of our own site in the future - This leads us on to... - Give and take - If any part of the layout is going to be flexible (get wider and narrower as required), consider how any graphics are affected. - Images don’t usually look good if displayed at anything other that their original size, so should they behave? - Provide separate wider/taller versions of any background images - If it’s fluid, which parts expand and which not? - If it’s fixed, should it sit in the middle of the window or to one side? - Content volume 24w - It’s rare theses days to know exactly what content you’re working with when a site is designed - Most sites are designed as a series of templates for some kind of content management system - Designs cannot be tweaked around any specific item of content - Designs must be able to cope with both much greater and much lesser volumes of content that might be thrown in at the lorem ipsum phase - Point: build some flexibility into your design. Know which points can give and take. - Particular things to watch out for - Things like headings (how do they wrap onto multiple lines) - Any user-generated items like user names - You might expect something like a user name to be 8-12 characters - If the systems powering your site allow for 255 characters they’ll always be someone who’ll go there - Expect them to do so - Consider the possibility that the structure might be expanded in the future - Consider how additional items might be added to each level of navigation - The structure needs a little bit of flexibility to change over time - Even though it’s rarely desirable to make significant changes without revisiting the site’s information architecture more thoroughly - Text size - Designs must allow for a little give and take in the text size - It’s a fundamentally important principal of web design that we are suggesting and not dictating how something should look - The same font can display differently in different places and platforms - Something as simple as Times will display wider on a Mac than on Windows - The main impact of text resizing is the change in how much vertical space copy takes up - Particularly important where space is limited by the design - Making text bigger causes many more problems than making text smaller - Each element from headings to box-outs to navigation items and buttons needs to be able to expand at least vertically, if not horizontally as well - This may require some thought about how elements on the page may wrap onto new lines - Making sure to provide extended versions of any graphical elements - Fonts 24w - There are three main causes of war in this world; religions, politics and fonts. - I believe the responsibility for this falls squarely at the feet of Adobe Photoshop. - Photoshop, like a mistress at a brothel, parades a vast array of ropey, yet strangely enticing typefaces past the eyes of weak, lily-livered designers, who can’t help but crumble to their curvy charms. - Yet, on the web, we have to be a little more restrained in our choice of typefaces. - Point: on the web, not every font is available. You need to think about the fonts you use, and how they're going to be displayed. - The purest solution is always to make the best use of the available fonts - Text is rendered at the browser - This means the font needs to be available at the browser - But we never know what's available - There are a few, common, 'web safe' fonts - Arial - Courier New - Georgia - Times New Roman - Verdana - Trebuchet MS - Lucida Sans - There are also generic font families - sans-serif - serif - monospace - cursive - fantasy - Font Matrix - http://24ways.org/2007/increase-your-font-stacks-with-font-matrix - When you can't go with an available font, but must use a specific typeface, you need Image Replacement - Image replacement - It's fundamentally bad to put text into images - Search engines can't read it - Low bandwidth (e.g. mobile) users may not see it - Assistive technologies can't detect it - It can't be selected, copied, pasted - It's a world of pain - But images give us a way to reliably render type the user doesn't have fonts for - So what's a girl to do? - There are a number of 'image replacement' techniques to help mitigate the problem - None of them are perfect, or as good as using available fonts - Most will fail with some combination of images on/off and CSS on/off - But they can be a good compromise - Dave Shea has a break down http://www.mezzoblue.com/tests/revised-image-replacement/ - The principal is something like this -