![]() |
Web Dev
Nearly half a year ago, we introduced our eBook subscription model, also known as the Smashing Library. We knew we were onto something good, realizing that the Smashing Library was the next step in offering quality content â at a price youâll still be able to afford all of the coffee you need to stay up long enough to read the entire library and, of course, the free eBooks.

A subscription to the Smashing Library is only $99 a year.
A subscription to the Smashing Library grants you unlimited access to all of the previously published Smashing eBooks, as well as a guaranteed 24 new eBooks throughout the year. This includes all digital versions of the Smashing Book series, including the The Mobile Book and the upcoming Smashing Book #4.
And our library is getting even more smashing. We didnât want to limit the library to just our own content, so we are now including a growing number of industry-related eBooks. These books are by authors who arenât necessarily affiliated with Smashing Magazine but who produce great content. In addition to saving more than half off the regular bundle prices, as a subscriber to the Smashing Library, you will get the opportunity to vote on what we publish next and what new eBook downloads will be automatically available in your Smashing Shop dashboard.

Download the âSmashing Library Catalogâ (PDF, 2.8 MB) and get started today!
To give you a taste of what to expect from the eBooks in the Smashing Library, we are happy to present you with The Smashing Editorâs Choice: A Smashing Library Treat â a free eBook that contains a wide range of topics, including new coding techniques, user experience strategies, responsive design and mobile solutions by some incredibly prolific and knowledgeable authors. Well-known names such as Lea Verou, Christian Heilmann and Dmitry Fadeyev have contributed fascinating chapters on various subjects.

Sign up below to receive your free copy of The Smashing Editorâs Choice.
The Smashing Editorâs Choice eBook is only a sample of the kind of quality Smashing eBooks that are available in the library. We select only the best articles, wrap them in a user-friendly layout, and make them available in the three most common formats, PDF, EPUB and Kindle. And because we donât want to impede your use of the eBooks, theyâre all DRM-free.
If you like this eBook, then youâll love the Smashing Library. Just fill in your email address below, and you will receive access to a download link to your free eBook copy of The Smashing Editorâs Choice, as well as our bi-weekly Smashing Newsletter, which is full of useful tricks, techniques and tweaks.
Coming up with the subscription library model took meticulous planning and careful editorial work. Adding eBooks on a monthly basis and keeping up with industry trends take passion. Luckily, we have a lot of that. From the beginning, we had a feeling that the library would be popular, and with the surprisingly positive launch, you proved us right:
“A perfect resource for a full-service Web-dev company. I own and operate a Web development company. This provides a vast store of wisdom for daily operations across the board.”
â Taylor Black
“Unbelievable bargain! This is indeed a great offer if you’re thinking about purchasing several books and if you want to keep up with current developments. Very curious about whatâs yet to come this year!”
â Joachim
“The best magazine is up with the best books. I recently received âThe Mobile Book.â That was awesome, and I hope this will be 38X awesome. Worth reading!”
â Erik Royall
“Great books, nice offer! I already own Smashing Book #3 and was thinking about buying the mobile/coding bundle when I stumbled upon this offer. Been reading (almost) nonstop ever since, loving it so far! Thanks, Smashing!”
â Bernd
We try to make the Smashing Library worthwhile by adding new content regularly and by giving you, the subscriber, the choice of what we publish next. All downloads, eBook polls and news are accessible through your personal Smashing Shop dashboard. Have a look at what the library looks like when youâre logged in:

A preview of the Smashing Shop dashboard.
Thank you all for your support over the years, everyone! You’ve been truly smashing!
(al) (il)
© The Smashing Editorial for Smashing Magazine, 2013.
This article is about design consultancy. It’s about wrangling that client who uses empty sentences like, âWe want a snappy, simple experience,â or, âIt should be on brand and should really pop.â Itâs about commanding the room and setting a vision before moving on to wireframes and pixels.
While Iâll talk in terms of consultation, these ideas can be applied to the design phase of any new project.
I start every consultation with this list on the whiteboard:
These words are banned. If anyone in the room says any of these words, it means weâve lost our focus or forgotten that weâre in the room to solve problems. We stop, reframe the conversation, then move on.

Any whiteboard is a weapon if you hold it right.
Here are three steps I take to ensure that the words above are never uttered in the first place.
The design process can get derailed right at the start by focusing on questions like, âWhatâs the best thing about our product?â or, âWhat differentiates our service from the competition?â
Instead, let your audience define the project by explaining their needs to a friend, remembering that your brand is not what you say it is. Your brand is what people tell their friends it is.
“As a ____, I need to ____, so that I can ____.”
Letâs assume weâre selling ACME Dragon-Slayer Swords. Our audience might say:
“As a white knight, I need to slay the dragon, so that I can save the princess.”

Your brand is not what you say it is, but what your audience says it is.
This is useful because it describes our audienceâs impetus and why itâs important to them. However, our user is not yet textured, nor specific enough. We can do better.
Letâs start with some experiential texture:
“As an inexperienced knight, I need to slay my first dragon so that I can prove my worth to the father of the princess.”
Better. Weâve textured our knight, with corresponding depth to his reasoning. Experiment with different textures — such as technical nouns, age, income and geography.
Itâs easy to get lost in our idea and forget how it applies to the larger stage, so letâs delve further in time, before and after our idea:
“As an inexperienced knight on my first quest, I need to impress the king, so that I might marry his daughter and live happily ever after.”
In doing this, weâre taking our user from his real-world impetus, through our brand and back into real life again. Weâve realized that the dragon-slaying itself wouldnât actually help a real knight achieve their goals. Might we consider selling ACME Dragon-Slayer Swords by how impressive they are to kings?
Describe the brand from multiple viewpoints. For example, our princess may find dragon-slaying presumptuous. If we discover that sheâs a more interesting audience, then put her center stage instead.

Dragon-slaying princesses are DIY champions.
Once a scope is defined, remaining within its constraints is important. Thinking back to our banned words, letâs look at the scope-destroyers:
The sentence, âIt would be nice if some users could Xâ is almost as dangerous as, âMost of the time our users will Y.â This kind of thinking frays the edges of a good idea until itâs unrecognizable.
That way madness lies. Remove all but undebatable assumptions:
For example, earlier we defined our knight as inexperienced.
If anyone starts talking about experienced knights, weâd ask them to rephrase in terms of our defined audience. If we get sidetracked by knights who donât want to impress kings, weâd jot that down on a ânice to haveâ list and forget about it entirely.
Here are some practical examples from real-world projects that Iâve led:
While weâre thinking âreal world,â letâs look at the consultation session itself.
When performing, stage magicians use props and well-practiced patter to better engage the audience. As a consultant, the magic lies in your command of design, while some nuanced expression can transform a banal experience into an engaging one.

One tablet makes you bigger, one tablet makes you smaller.

Always remember to keep your audience’s impetus in mind.
Iâve straddled the shoulders of two giants in writing this.
You neednât score a top-dollar client to learn how to deliver solid consultation services. We use these same techniques at work for all of our internal projects.
Try starting your next design sans-Photoshop. Instead, run a two-hour consultation with a coworker. Try again later with a really annoying person who hates your designs. Mixed experiences will help you find your own method in the madness.
Charm is a learned skill.
This style of consultation isnât so great for fixing large broken systems. Itâs better for new projects, with a small audience. It also works for small, distinct portions of a larger problem.
Extending the vision should happen after launch and testing, once youâve won everyoneâs heart.
Or:
“As the design lead of a new project, I need some consultative tricks to keep my clients in line and to craft a concise vision.”
(al) (ea)
© Will Dayble for Smashing Magazine, 2013.

Soccer teams, just like teams in any other sport, share a lot of difficulties and joys with UX teams. Think about how each player needs to have his or her role in the tactic scheme. Isnât that the same as each creative having his or her own place on the UX team based on specific skills and abilities?
Egos, collaboration, controversy, fast decisions, and especially the unpredictable moves are the beauty of being part of the game or the design project. Success in both cases is also closely related to teamwork, individual talents, and leadership.
Everything is a result of hard work, sweat, and dedication. The UX team might eat lots of pizza and then sleep in, while the athletes resist indulging to be ready for exercise the next day, but compromise and the desire to do the best job possible need to be part of the winning mindset.
Success in both cases requires: coaching and training, learning new...read more
By David Sachs
ï»ż[Editor's note: The following is a guest post from Igor Faletski, CEO of Mobify, which provides tools for adapting web sites for smartphones and tablets.]
You’ve probably heard people say we’re living in a “post-PC world.” What does that mean for web developers? It means that 30% to 50% of your websiteâs traffic now comes from mobile devices. It means that soon, desktop and laptop users will be in a minority on the web.
How do we deal with this tectonic shift in user behavior? Weâve moved beyond the era of m-dot or t-dot hacks, into one where responsive and adaptive design techniques rule the day — what the W3C calls a One Web approach. The key part of the W3C’s recommendation is that “One Web means making, as far as is reasonable, the same information and services available to users irrespective of the device they are using.”
For developers that means that taking a One Web approach ensures that not only does your site work on the smartphones and tablets of today, but it can be future-proofed for the unimagined screens of tomorrow.
There are currently three popular approaches to developing a One Web site: using a responsive design; client-side adaptive designs; and server-side adaptive designs.
One is not better or worse than the other; each has its own strengths and weaknesses and the wise web developer will consider the benefits and drawbacks of each before picking the one that works for their next project.
Responsive web design is the most common One Web approach. The approach uses CSS media queries to modify the presentation of a website based on the size of the device display. The number of responsive sites is rapidly increasing, from the Boston Globe to Disney to Indochino.
A key advantage of this approach is that designers can use a single template for all devices, and just use CSS to determine how content is rendered on different screen sizes. Plus, those designers can still work in HTML and CSS, technologies theyâre already familiar with. Additionally, thereâs a growing number of responsive-friendly, open-source toolkits like Bootstrap or Foundation which help simplify the process of building responsive sites.
On the other hand, there are few shortcuts to a sound responsive design. To go responsive, organizations often have to undertake a complete site rebuild.
The design and testing phase can be quite fussy, as it can be difficult to customize the user experience for every possible device or context. We’ve all seen responsive site layouts that look like a bunch of puzzle pieces that don’t quite fit together. Responsive web design works best in combination with a mobile-first approach, where the mobile use case is prioritized during development. Progressive enhancement is then used to address tablet and desktop use cases.
Performance can also be a bugbear for responsive sites. At Mobify, we recently completed an analysis of 15 popular responsive e-commerce sites. Among these sites, the home pages loaded an average of 87 resources and 1.9 MB of data. Some responsive pages were as big as 15MB.
The numbers are that high because a responsive approach covers all devices. Your user is only using one device, but they have to wait for all of the page elements and resources to load before they can use it. Put simply, performance affects your bottom line. On smartphones, the conversion rate drops by an extra 3.5 percent when users have to wait just one second. By the three second mark, 57 percent of users will have left your site completely.
While responsive design is fast becoming the de facto standard, it also creates new challenges for online businesses, including how to handle images, how to optimize mobile performance and often means sites need to be rebuilt from the ground up with a mobile first approach.
Adaptive design builds on the principles of responsive design to deliver user experiences that are targeted at specific devices and contexts. It uses JavaScript to enrich websites with advanced functionality and customization. For example, adaptive websites deliver Retina-quality images only to Retina displays (such as the new iPad) while standard-definition displays receive lower-quality images.
There are two approaches to adaptive design — one where the adaptations occur on the client side, in the userâs browser, and another where the web server does the heavy lifting of detecting various devices and loading the correct template. Examples of client-side adaptive sites include Threadless and ideeli. One of the strengths of the adaptive templating approach is the ability to reuse one set of HTML and JavaScript across devices, simplifying change management and testing.
A client-side adaptive approach means you don’t have to rebuild your site from the ground up. Instead you can build on existing content while still delivering a mobile-responsive layout. For expert developers, this approach also enables you to specifically target particular devices or screen resolutions. For example, for many of Mobifyâs online fashion retail clients, 95% of their mobile traffic comes from iPhones. Client-side adaptive means they can optimize specifically for Apple smartphones.
Unlike responsive design, adaptive templates ensure that only the required resources are loaded by the clientâs device. Because device and feature detection is shifted to the mobile device itself, CDN networks like Akamai and Edgecast can use most of their caching functionality without disrupting the user experience.
The client-side adaptive approach has a higher barrier to entry than responsive design. Developers need to have a solid grasp of JavaScript to use this technique. It also depends on a siteâs existing templates as the foundation. Finally, because the client-side adaptations are a kind of layer on top of your existing code base, you need to maintain them as your site as a whole evolves.
We can achieve the server-side adaptive approach in a variety of ways, through server-side plugins and custom user agent detection. Sites that use server-side adaptive include Etsy, One Kings Lane and OnlineShoes.com.
Why choose server-side adaptive? It typically offers distinct templates for each devices, enabling more customization, and it keeps device-detection logic on the server, enabling smaller mobile pages that load faster. Additionally, there are numerous server-side plugins available for common CMSs and eCommerce systems such as Magneto.
This approach isn’t for the faint of heart–it typically requires significant changes to your back-end systems, which can result in a lengthy (and costly) implementation. The requirement to manage multiple templates raises ongoing maintenance costs. Finally, this approach can encounter performance issues when servers are under heavy load. When mobile user agent detection is performed on the server, a lot of common caching mechanisms deployed by CDNs like Akamai need to be turned off. This can result in a slower user experience for mobile and desktop visitors.
Of course, many companies are still wrestling with the basics of responsive, and theyâre not ready to confront the more sophisticated flavors of adaptive. Increasingly competition and mobile traffic, however, will drive more and more organizations to kick the tires on all three approaches, and pick the one that works best for their users.

The patron enters the library with a VHS tape he has not viewed in thirty years. He's reserved the Digital Media Lab, a digitization space, to convert his tape to DVD. I, a librarian, push the tape into the VCR and demonstrate the conversion process. Then we both turn to the monitor as the tape begins to play.
The video shows the scene of a wedding with guests arriving in cars that are rare on today's streets. The patron names each person and relates a bit of his or her relationship to the happy couple. Then a car stops and a frothy river of white lace and tulle spills out onto the street. He says, "She's so beautifulâI need to sit down." As I leave, he is leaning forward, eyes intent on the screen, watching his bride laugh just outside the church as he waits for her inside.
This person's experience with a library's resources is not unusual. Across the country, libraries are providing services and crafting experiences that make patrons' visits meaningful and...read more
By Amanda L. Goodman
“If you wanna meet with me… come to the garden… with your shovel… so we can plant some shit.” -Ron Finley
We’re working on a entirely new product, and I’m looking to meet some potential customers. We can meet in person, over the phone, or via Skype, etc.
The tool is for the small business owner who runs a company of between 25 and 75 people. You used to be smaller, but now you’re bigger. And you experienced some personal growing pains along the way.
When you were smaller, you used to know everyone a bit better. When you were smaller you used to be in the loop a bit more. When you were smaller you used to have a better feel for what everyone was thinking and feeling. When you were smaller you used to know what everyone liked – and didn’t like – about the direction of the company.
But now you’re bigger. And now you’re struggling to stay on top of it all. Or maybe you didn’t really care that much before because things took care of themselves. But now, you have to pay closer attention since you’re responsible for a lot more people. You care deeply about your team, and your company culture, but sometimes you feel like you don’t know enough to act decisively.
This is my story. And I have a hunch there are a lot of small business owners out there just like me. This tool can help you individually, and together we can all help each other.
We’re using this tool as we’re building it, and in the past few weeks I’ve learned a lot about my own company. We’ve already implemented some of the company-wide changes that bubbled up from what I’ve learned. These insights wouldn’t have materialized without this tool.
We’re only looking for 25 perfect customers right now. I want to get to know every single one personally. And I want to do everything I can to make this product outstanding for those 25 people. I want to help each customer to make incredible progress using this tool. I want it to change their company for the better.
So if you’re a hands-on business owner running a company with anywhere from 25-75 people, and you kept saying “yes, I totally know what you mean” when you read the story above, I’d love to hear from you. Please email me at jason@37signals.com and tell me your story. If I feel like you’d be a great fit for this product, I’ll tell you more.
Thanks.
Arguing for âseparation of content from presentationâ implies a neat division between the two. The reality, of course, is that content and form, structure and style, can never be fully separated. Anyone whoâs ever written a document and played around to see the impact of different fonts, heading weights, and whitespace on the way the writing flows knows this is true. Anyone whoâs ever squinted at HTML code, trying to parse text from tags, knows it too.
On one hand, the division of labor between writing and presentation can be seen at every point in our history. Ancient scribes chiseling stone tablets, medieval monks copying illuminated manuscripts, printers placing movable typeâweâve never assumed that the person who produces the document and the person who comes up with the ideas must be one and the same.
And yet, we know that medium and message are intertwined so tightly, they canât be easily split apart. Graphic designers rail against the notion that âlook and feelâ can be painted on at the end of the process, because design influences meaning. The more skilled we are as communicators, the more we realize that the separation of content from presentation is an industrial-age feint, an attempt to standardize and segment tasks that are deeply connected.
Today, we try to enforce the separation of content and form because itâs good for the web. Itâs what makes web standards possible. It enables social sharing and flexible reuse of content. It supports accessibility. Itâs what will keep us sane as we try to get content onto hundreds of new devices and form factors.
When talking about how best to separate content from presentation, designers and developers tend to focus on front-end codeâwhich makes sense, because thatâs what we have the most control over. But, as with so many challenges we have with content on the web, the real issue lies in the tools we give content creators to help them structure, manage, and publish their content. The form that content takes depends as much on CMS as it does on CSS.
How should content management tools guide content creators to focus on meaning and structure? Whatâs the right amount of control over presentation and styling in the CMS? And how should these tools evolve as we break out of the web page metaphor and publish content flexibly to multiple platforms? Letâs look at three tools that sit at the intersection of content and form.
Even the most die-hard structured content editors still like seeing what their work is going to look like. Writers print out documents for editing to give them a different view from what they see on the screen. Bloggers instinctively hit the preview button to look at their work the way a user will see it.
Whoops. Decades of work refining the emulators between desktop publishing programs and laser printers means that writers can feel confident that their document will look virtually identical, regardless of where itâs printed. Weâve carried that assumption over to the web, where itâs categorically untrue. Different browsers render content in their own vexingly special way. Users can change the font sizeâeven add their own custom style sheet. Today, the same document will render differently on desktops, tablets, and mobile devices. The preview button is a lie.
Yet we canât just throw the baby out with the bathwater. In fact, seeing content in context becomes even more important as our content now lives across devices and platforms. Instead of throwing up our hands and saying âpreview is broken,â itâs time to invent a better preview button.
One publishing company I know of has built its own custom preview rendering interface, which shows content producers an example of how each story will appear on the desktop web, the mobile web, and an app. Is it perfect? Far from it. Content will appear in many more contexts than just those three. Is it better than nothing? Absolutely.
The desktop publishing revolution ushered in by the Macintosh allowed the user to see a document on screen in a form that closely mirrored the printed version. The toolbar at the top of the screen enabled the user to add formattingâchange the font, insert an image, add typographic effects like headings and bullets, and much more.
In an effort to carry over this ease of use to the web, we allow content creators to embed layout and styling information directly into their content. Unfortunately, the code added by content creators can be at odds with the style sheet, and itâs difficult for developers to parse whatâs style and whatâs substance. When it comes time to put that content on other platforms, we wind up with a muddled mess.
What is the right amount of formatting control to give content creators? Thatâs a difficult question to answer, because it pierces right to the heart of whatâs stylistic and whatâs semantic. Even something as simple as adding bold and italic text forces us to ask if weâre really just styling the text, or adding semantic meaning (say, a book title or a warning message.)
Better content modeling can solve some of these problems, encouraging content creators to appropriately âchunkâ their text. By banishing blobs of text with formatting embedded and replacing them with chunks of clean, presentation-independent content, weâre building in the distinction between content and form right from the start.
But imagining that each âchunkâ of content is a field in the database (with its own input field) rapidly devolves into the absurd. That way lies madness. The real solution isnât necessarily to âbanish blobs,â but to replace the WYSIWYG toolbar with semantic markup. Rather than entering all text into discrete fields, content authors wrap text that describes what it is. Our book title doesnât need to be a separate field if we can wrap it in the proper tags.
Defining what goes in a field and what goes in a tag requires a tighter collaboration between content authors, CMS architects, and front-end developers. Itâs time we started having these conversations.
Weâre evolving. Not satisfied to rely just on tools that are vestiges of the desktop publishing era, weâre developing new and innovative ways to mix up content and formatting that are unique to the way the web works. Thereâs no better example of this than inline editing.
Inline editing allows content creators to directly manipulate content in the interface, with no separation between the editing screen and the display. Medium offers an editing interface thatâs identical to the desktop display and in-place editing is being added to Drupal 8 core.
One of the questions I get asked most frequently is âhow can I get my content creators to understand why itâs so important to add structure and metadata to their content?â This, I believe, is one of the fundamental challenges weâre facing on the web, particularly as we adapt to a multi-channel future. Inline editing encourages content creators to focus on the visual presentation of the desktop interface. Just at the moment when we need content creators to think about the underlying structure, weâre investing in tools that obscure the âconnective tissue.â
Jeff Eaton sums up this problem nicely in a post called Inline Editing and the Cost of Leaky Abstractions:
The editing interfaces we offer to users send them important messages, whether we intend it or not. They are affordances, like knobs on doors and buttons on telephones. If the primary editing interface we present is also the visual design seen by site visitors, we are saying: âThis page is what you manage! The things you see on it are the true form of your content.â
The best solution isnât to build tools that hide that complexity from the user, that make them think that the styling theyâre adding to the desktop site is the ârealâ version of the content. Instead, our goal should be to communicate the appropriate complexity of the interface, and help guide users to add the right structure and styling.
The era of âdesktop publishingâ is over. Same goes for the era where we privilege the desktop web interface above all others. The tools we create to manage our content are vestiges of the desktop publishing revolution, where we tried to enable as much direct manipulation of content as possible. In a world where we have infinite possible outputs for our content, itâs time to move beyond tools that rely on visual styling to convey semantic meaning. If we want true separation of content from form, it has to start in the CMS.

Searching on LinkedIn for titles such as VP User Experience Design or VP Global Design turns up very few people with those titles and roles. There are plenty of Head of ____ and Director of ____ roles, but few vice presidents.
One reason might be the confusion over what a user experience is and where user experience starts and customer/brand experience ends. Another reason might be in understanding what UX people do and the value it provides in terms of a return on investment.
Itâs astounding how much debate and disagreement there is over what user experience means, the disciplines involved, and the approaches people take who call themselves UX designers. The irony is that even for people who create clarity out of chaos and complexity, the term user experience is confusing and fails to serve the field or the people that...read more
By Wayne Neale
Microsoft’s Internet Explorer 10 saw a meteoric rise in market share last month, jumping from 2.93 percent in March to 6.22 percent in April, according to NetMarketShare.
Some of IE 10′s growth might be attributable to more Windows 8 machines coming online, but it also comes close on the heels of the release of Internet Explorer 10 for Windows 7.
As we noted in our review, IE 10 is a huge step forward for Microsoftâs oft-maligned browser, bringing much better web standards support and considerable speed improvements over IE 9. And there’s plenty to like even on Windows 7 where Microsoft claims users should see a 20 percent increase in performance over IE 9, as well as better battery life on Windows 7 laptops.
While web developers should be happy to see IE 10 gaining some ground given its vastly superior web standards support and speed compared to previous releases, looking at the bigger browser share picture is still disheartening. While IE 10 use may have doubled last month, it still trails IE 6 use worldwide.
The most widely used version of IE on the web remains IE 8, which, while much better than IE 6, still has next to no support for modern web development tools like HTML5 and CSS 3.
As always, progressive enhancement and feature-detection tools like Modernizr are your friends when it comes to older versions of IE.

Collaborating with Codassium Image: codassium.com.
WebRTC is a proposed standard — currently being refined by the W3C — with the goal of providing a web-based set of tools that any device can use to share audio, video and data in real time. It’s still in the early stages, but WebRTC has the potential to supplant Skype, Flash and many native apps with web-based alternatives that work on any device.
Codassium uses WebRTC to bring together WebRTC-based video chat and Mozilla’s Ace code editor. The result is what Wreally Studios, creators of Codassium, call “a better way to conduct remote interviews.” Of course Codassium could be used for more than just interviews — think code reviews, remote pair programming or even just discussing code with remote employees.
To use Codassium you’ll need to be using a web browser that supports WebRTC — recent versions of Firefox and Chrome will both work. Head on over to Codassium, click the Start button and allow the site to access your camera and microphone. Once the video chat and Ace editor load, just click the Invite button and send the resulting link to the person you’d like to work with.

I have a three-year-old daughter going through a struggle at the moment. Itâs time for her to give up the teddy bear that follows her wherever she goes. But weâll hear a little more about her later, including what she can teach us about providing a richer user experience.
There is something comforting about knowing how to escape from a situation; knowing how to start again and knowing how to return home. Recall the famous in-flight safety demonstration you get each time you board a plane. Whatâs the most memorable line? âIn case of emergency, your exits are here, here, and here.â As much as we mock the repetitive instruction, deep down we appreciate that if anything goes wrong at least we know how to get out alive.
Bringing it back to UX, a key to giving the user confidence in navigation is to help them know how to get back to the homepage. Itâs similar to the back button but with...read more
By Paul Brooks
Quick and dirty is a skill. Use it or lose it. My latest article for Inc. Magazine.
Chris Coyier explains Magic Numbers:
Magic numbers in CSS refer to values which âworkâ under some circumstances but are frail and prone to break when those circumstances change. They are usually always related to fonts.
Many good examples in that post, and in the comments, but the one that stood out for me was Chris’ attempt to flank a heading with horizontal lines:
In a recent post Line-On-Sides Headers, I used a line-height value that was a magic number. Letâs say you used the technique around text with a fancy @font-face font. Letâs say that font doesnât load or the user overrides it or the page is being viewed in a browser that donât support @font-face. The fallback font will load, and that fallback font might have drastically different sizing than the custom font. The lines on the outside of the fallback font are now awkwardly placed, not centered like we wanted.
Of course, I don’t need to tell Chris (he was only trying to illustrate a technique and its shortcomings), but it bears mentioning whenever I get the chance: progressive enhancement is part of typography now. First, style text in a generic way (like, without flanking horizontal lines). Then, if the fonts you intend are active, use WebFont Loader (or Typekit font events) to follow up with rules that depend on the presence (and the dimensions) of those fonts.
The Internet Archive’s Wayback Machine is deceptively simple — plug in a website and you can see copies of it over time.
What you don’t see is the massive amount of effort, data and storage necessary to capture and maintain those archives. Filmmaker Jonathan Minard’s documentary Internet Archive takes a behind the scenes look at how (and why) the Internet Archive’s efforts are preserving the web as we know it.
The interview with Brewster Kahle, founder of the Internet Archive, especially offers a look at not just the idea behind the archive, but the actual servers that hold the 10 petabytes of archived websites, books, movies, music, and television broadcasts that the Internet Archive currently stores.
For more on the documentary, head over to Vimeo. You can learn more about the Internet Archive on the group’s website.

Robert Cailliau’s original WWW logo. Image: CERN.
Twenty years ago today CERN published a statement that made the World Wide Web freely available to everyone. To celebrate that moment in history, CERN is bringing the very first website back to life at its original URL.
If you’d like to see the very first webpage Tim Berners-Lee and the WWW team ever put online, point your browser to http://info.cern.ch/hypertext/WWW/TheProject.html.
For years now that URL has simply redirected to the root info.cern.ch site. But, because we all know cool URIs don’t change, CERN has brought it back to life. Well, sort of anyway. The site has been reconstructed from an archive hosted on the W3C site, so what you’re seeing is a 1992 copy of the first website. Sadly this is, thus far, the earliest copy anyone can find, though the team at CERN is hoping to turn up an older copy.
Be sure to view the source of the first webpage. You’ll find quite a few things about early HTML that have long since changed — like the use of <HEADER> instead of <HEAD> or the complete absence of a root <HTML> tag. There’s also a trace of Berners-Lee’s famous NeXT machine in the <NEXTID N="55"> tag.
CERN has big plans for the original website, starting with bringing the rest of the pages back online. “Then we will look at the first web servers at CERN and see what assets from them we can preserve and share,” writes CERN’s Dan Noyes. “We will also sift through documentation and try to restore machine names and IP addresses to their original state.”
In the mean time, have a look at the web’s original todo list and read more about the project to restore the first website over on Mark Boulton’s blog.
In my first article, âEven Better In-Browser Mockups with Node.js,â I explained why Node.js makes designing applications easier and more efficient, and how to get started. Now itâs time to see your new design process in action.
Rather than figuring out all your requirements and API schemas just to design your comps with mockup content hard-coded and server interactions fakedâonly to throw it all away when you go back and implement things âfor realââyou can use Node.js to skip the hard-coding and produce client-side code thatâs ready for beta at the end of the design stage.
The process looks a lot like good olâ designing in the browser, but with more JavaScript and an additional layer:
Sound daunting? Donât worry. The first step takes approximately a zillion times longer than any of the others. So if youâve already mastered the design, youâll find the rest of these steps more than manageable.
In this walkthrough, weâll build a feature for a mock art store. If you want to follow along at home, you can clone my GitHub repository. (If you need help installing, see the README, or just take a peek at the live demoâIâll cover all the steps and code below.)
Once you have a solid design and the markup to accompany it, converting it to a template you can use for all examples is more efficient than creating duplicate markup for each one. The hard partâs over; you already thought about where data points would be used in the design when you created it. With those choices fresh in your mind, go back and mark up your HTML with data in whatever template language you prefer.
For my example, Iâm using a store selling art prints. Hereâs a snippet of my initial markup:
<h2>Two Acrobats with a Dog</h2>
<h3>Pablo Picasso</h3>
<img src="img/102.jpg" alt="Two Acrobats with a Dog" class="active" />
<ul class="info">
<li>8" x 11"</li>
<li>acid-free paper</li>
<li>suitable for matting</li>
</ul>
<span class="price">$49.99</span>
Think of your templates as places to define your requirements for both data and its formatting on the client side. If you can also reuse it for client-side rendering, thatâs awesomeâbut that may not be relevant to your application. As long as you have good data, converting from one template language to another is trivial, so donât agonize over which template engine to use.
You do need a template engine that will work in both the browser and Node.js, however. If youâre unsure, search for your template engine on GitHub and verify that thereâs a guide to installing it via npm in the manual, as well as a minified script for use on the client. I prefer doT.js, so hereâs that snippet again marked up to add data using doT:
<h2>{{=it.title}}</h2>
<h3>{{=it.artist.name}}</h3>
<img src="img/{{=it.id}}.jpg" alt="{{=it.title}}" class="active" />
<ul class="info">
{{~it.info :info_item}}
<li>{{=info_item}}</li>
{{~}}
</ul>
<span class="price">{{=it.price}}</span>
I like to save my templates in their own directory at the same level as my JavaScript directory, so now I store that as tmpl/detail.dot.
Since we want to be able to use our templates in both Node and the browser, they need to be stored outside of the HTML and loaded and compiled when we open the page. To start, save the minified version of your template engine and add a script tag to your page to include it. Once thatâs done, you can fetch the template, compile it, and then continue on with any other initialization work in your main JavaScript file. Iâm using jQuery in my example, so my code looks like this:
var detailTmpl;
$.when(
$.get( "tmpl/detail.dot", function( tmpl ) {
detailTmpl = doT.template( tmpl );
}, "text" )
).then( init );
That mysterious init function? Thatâs where Iâll put any interactivity I want to add to my currently static mockup. For the moment Iâm only creating one interaction, so my init function is pretty simple:
function init() {
$( "div.content" ).on( "click", "div.result", showDetail );
}
This code can be made much more elegant using Require.js with its text plugin. Thatâs beyond the scope of this demo, but I highly encourage it for production.
Weâll handle template rendering in showDetail(), but we have to add a server and data store before writing that function, since right now we lack any data to render.
If I reload my page now and open the browser console, I get a JavaScript error. Thatâs because Iâm trying to load my template via an XMLHttpRequest (XHR) on a page being served from the file system, in violation of the same origin policy. I canât even check that my template works until the page is served properly (i.e., from a server).
To whip up a simple Node server that allows me to run my XHRs, I do a few things:
publicnpm install expressWe could write everything from scratch, of course, but itâs more work than is necessary for a basic server. The Express framework provides a number of abstractions of server and application concepts. For the initial version of the server, the only one weâll need is its ability to serve static resources. We can use it by adding four lines of code to server.js:
var express = require( "express" ),
app = express();
app.use( express.static( __dirname + "/public" ) );
app.listen( 3000 );
Once you start your server by typing node server.js in your open terminal or command line, you can view your page at http://localhost:3000 (adding a filename if necessary), and the error related to loading the template ought to disappear.
While itâs certainly nice to be able to use XHRs, we’re creating the Node server to use it as a representation of the real serverâand real servers store data. Though itâs not hard to create a data store that works with a Node server, itâs even less difficult to create one big object literal. For a mockup, thatâs all we really need. One of the goals here is to define the data objects we need to support in our new design, so the format of this object can be determined by the template we just added. For my example, I need an object structured something like this:
var products = {
"102": {
id: 102,
title: "Two Acrobats with a Dog",
artist: {
name: "Pablo Picasso"
},
price: "$49.99",
info: [
"8\" x 11\"",
"acid-free paper",
"suitable for matting"
]
}
};
Note that products could just as easily be an array, but I want to be able to quickly find my productsâonce I have more than one in my fake data storeâby ID. Aside from that little twist, the data look exactly like the content hard-coded in my original HTML. If I want to add more data, including things that might break the layout in unpredictable ways, I can just copy this structure and make substitutions. Well, almost.
If youâve dealt with other server-side frameworks, creating endpoints for XHRs might seem intimidating, but Express makes it really easy. We donât need any special setup to define a server endpoint as a target for asynchronous requests. All we have to do is define the path on the server where we want to accept requests and a callback. The callback receives a request object (for doing things like getting passed-in data) and a response object (for defining what we return to the client). To return the data in my products object, I add a few lines of code at the bottom of server.js:
app.get( "/detail/:id", function( req, res ) {
res.send( products[ req.params.id ] );
});
app.listen( 3000 );
See? Easy. If I restart my server and go to http://localhost:3000/detail/102, I should see my object data. To break down whatâs going on with the ID in the path, weâve named the data at that position in the path "id" with the :id bit, and it then becomes available as a property of req.params.
The names and positions of parameters are up to us, and if our path were super complex, we could also use regular expressions to split out multiple pieces of data. Express also gives us the option of accepting data from the query string or from a POST. Of all the pieces weâre creating, however, the paths are the most likely to change in production, so itâs to our advantage to keep them as readable as possible.
Besides sending pure data to the client, we also want to be able to send rendered HTML, in case a user is linked directly to a product detail or doesnât have JavaScript available. We might also want HTML for our own consumption via XHR, if we find that client-side rendering is slowing us down. So we add a second endpoint below the one we just created to do that:
app.get( "/product/:id", function( req, res ) {
res.render( "detail", products[ req.params.id ] );
});
For simplicityâs sake, and because the first path served JSON for an overlay while this provides a full page, Iâve used a different pathname, but kept the same pattern. This time, instead of the responseâs send function, I use render(). Express provides some magic to make template rendering work out of the box, but since Iâm using doT instead of Jade (the default template engine of Express), I have to do some additional setup.
First I have to go back to the terminal or command line, stop my Node server, and install my template engine using npm install doT and the consolidate module (which provides Express compatibility for a number of popular template engines) using npm install consolidate. Now Iâve got both of those in my node_modules directory and can use them in server.js.
Since doT (and probably your template engine of choice, as well) is accessed through consolidate, consolidate is the only additional module I need to require at the top of server.js:
var express = require( "express" ),
app = express(),
cons = require( "consolidate" );
I want to continue serving some of my other pages statically, so I add my template configuration stuff below the existing app.use line in my code:
app.use( express.static( _dirname + "/public" ) );
app.engine( "dot", cons.dot );
app.set( "view engine", "dot" );
app.set( "views", _dirname + "/public/tmpl" );
Those three new lines set doT (as exposed by consolidate) as the view engine, register files ending in .dot as templates, and tell Express to look in /public/tmpl for templates to use. So when Node sees res.render( "detail", { ... } ), it knows to expand "detail" to /public/tmpl/detail.dot and render it as a doT template. Now I can restart my server, go to http://localhost:3000/product/102, and see my template rendered statically, without creating a separate server-side file.
Our template now works as a static page, but thereâs still one more step to get our mockup populated with the data from the server. Remember the showDetail function from our main client-side script? Itâs time to flesh that out.
In my simple example, the overlay my template will populate already exists as a hidden div on the main page, and it appears when the user clicks a div containing a summary of the content. This div has a data attribute storing the ID of the product that corresponds to the key and id property in my server-side data object. Once that click event happens and showDetail() is called, I just need to do this:
function showDetail( e ) {
var id = $( this ).data( "id" );
$.get( "detail/" + id, function( info ) {
$( "div.detail" ).html( detailTmpl( info ) );
$( "div.detail" ).show();
}
}
The path above is the same one I defined in server.js. If you chose a different name for yours, use that name here on the client. When I receive the data object from the server, I pass it to detailTmpl(), the compiled version of my template. The result of the detailTmpl function is the HTML to populate my overlay.
So there you have it! A mockup that mimics the interactions it will have with its production server precisely on the client, without the need for hard-coded data or temporary workarounds. Despite the simple exercise, the process Iâve outlined accomplishes a good deal of the setup necessary to create other workflows that require server interactions. For instance, I can fill my fake data store with more products and use that to render the initial page that triggers my overlay without having to revisit my mockup data, and my application will show the correct values in any view I add to it.
If youâd like to explore beyond just serving HTML and JSON, consider adding in Socket.io to allow real-time interaction for multiple clients or Require.js to manage your assets on the client. You could also move your CSS into templates and serve different builds of your site for different browsers or devices. Your mockup can be as sophisticated and reflect as many of its production requirements as you choose. At the end, the lionâs share of your client-side code is done and ready to use.
Designing in the browser has all sorts of benefits, like producing more accurate, comprehensive results and removing the extra step of converting from image file to markup and CSS. But even sites designed in a browser still require pasting in content, faking interactions with the server, and creating placeholder JavaScript that isnât usable on the live site.
Wouldnât it be nice if we could go from just designing layouts and interactions to designing the whole client side of the application during the same process?
This is where Node comes in.
Node.js is a server-side JavaScript platform. It isnât a web server, but it allows you to easily create one. It also lets you create utilities that run on web servers, like setup and minification utilities and general-purpose command line tools.
Node started in 2009 and generated considerable interest, probably because it gave JavaScript developers an opportunity to write server-side code even if they lacked a server-side background. It didnât hurt that Chrome had established a reputation for being solid and fast, and Node used its V8 engine.
Today, itâs possible to run production servers on Node, and many people are doing so successfully. Taking it that far, however, is an investment. The Node project, and all the community-created modules that make it so awesome, is still a moving target. But even if youâre not ready to write and launch entire sites with Node, itâs plenty stable enough to use as a development tool.
Itâs JavaScript, so if you can wire up a jQuery event handler, you can write a web server. Itâs lightweight, so you can run it on your laptop and keep streaming music in the background. Itâs dead simple to download, set up, and build in, so you donât need the esoteric knowledge of an IT support person to get going with it. And the payoff is that instead of mockups and hard-coded data, you can design a set of client-side assets, page templates, and data schemas that are ready to launch to production.
Installing Node locally for the most common environments is a piece of cake. You can download installers that include Node as well as npm, its package manager, from the projectâs site. Installing it on a remote server is not quite that easy, but good documentation is available to help you out. After running through the installation process, you should be able to go to your terminal or command line and test it out.
If you donât tell Node to run a specific file, you get a Read-Eval-Print Loop, or REPL. If you type node in your terminal or command prompt, you can begin to execute arbitrary JavaScript. For example, after starting the REPL, type var a = 9;. The REPL will respond with undefined. Now type a * 3 (or any other number) and it will respond with the correct result. You can make things more interesting by defining a function and then calling it:
> function sayHello( name ) { return âHello, â + name; }
undefined
> sayHello( âA List Apartâ );
âHello, A List Apartâ
To break out of the REPL, or end any other Node execution (like a running web server), press Ctrl+C. In the case of the REPL, youâll need to press it twice to confirm.
While itâs nice to know Node can perform basic arithmetic and string concatenation, its value to us as developers is in running programs. You can see an example of one such program, a basic web server, on the projectâs homepage. They suggest creating a file called example.js with this code:
var http = require(âhttpâ);
http.createServer(function (req, res) {
res.writeHead(200, {âContent-Typeâ: âtext/plainâ});
res.end(âHello World\nâ);
}).listen(1337, â127.0.0.1â);
console.log(âServer running at http://127.0.0.1:1337/â);
This makes use of only one module, the core module http. As you can probably guess, the http module contains all the basic stuff you need to serve a site over HTTP. Node contains a tightly edited collection of core modules that provide things like event handlers, file system access, and abstractions for various network protocols. But just as you probably use a JavaScript library or framework to speed up and bulletproof development on the client side, for Node development beyond a simple "Hello World" you generally add other non-core modules using npm.
The http module does contain a createServer function, though, which is all you need to create a bare-bones web server. In the code above, once the server has been created, it listens to port 1337 on your local machine. When it receives a request, it sends back a text response.
One thing to note is that the work here is done in event handlers, as are most things in Node. The callback in createServer() handles a connection event, which occurs every time a new client contacts the server. To start this server, type node example.js in your terminal, and then open a browser to http://127.0.0.1:1337. This triggers the connection event, and you should see the message in the callback.
To obtain any serious value from a Node serverâeven one not intended to ever go to productionâitâs best to get familiar with the modules in npm. There are thousands available, but those youâd need to create a basic web application are some of the oldest and most stable, so donât feel obligated to research them all before getting started. One that definitely comes in handy for designing an application is Express, an uncomplicated web application framework.
If youâre accustomed to installing open source projects by cloning a GitHub repository or downloading a zip file, youâll probably enjoy npm. To install Express with npm, for example, go to your terminal or command line and type npm install express. As long as youâre online and have permission to write to your machine, this fetches all the code and assets Express needs to run, as well as any modules it has as dependencies. The first time you run npm from your working directory, all these elements will end up in a new node_modules subdirectory. Now the module is ready to be used in Node programs the same way we used http, via the require function.
The ideal use case for designing your application with Node is a single-page application in which the server mostly provides data, but Node is still useful for a more traditional site. Of course, you want to begin development with requirements defined as precisely as possible, but implementation tends to expose requirements you hadnât considered, and some of those can have a considerable impact on your timeline. Even in a server-driven application where it may not be possible to reuse data structures and templates as-is, creating client-only versions helps test your assumptions about the data you need and how youâll use it.
If youâre developing a single-page app, the justification is much easier. Youâll need to think about optimizing your communication with the server to require as few requests as possible, which means knowing how data should be packaged up by each server endpoint and how youâll cache the data on receipt (if at all).
An advantage of having JavaScript on the server is that templates can be rendered by the same template engine on either the client or server side. This allows you to experiment on both sides and optimize for your situation. Itâs also a timesaver to render the templates with JavaScript objects and consider only the way data must eventually be grouped (not how it’s stored in a database). Designing these groupings of data is the bulk of the work we can do with Node toward the end of what we traditionally consider application design.
Piecing together each page from disparate parts from all over the server is messy for an application in any language. Instead, whatever renders a page should have clear dependencies, and the result of each page or data request should combine those dependencies into a cohesive and sensibly organized unit.
If youâve worked in a server-side framework in which a page or view is tied to a single object or model, and where additional data is imported and exposed in a different way, you probably understand how the alternative gets to be a nuisance. Youâre probably also aware that the solution is a good view-model whose data is defined by each view, not the models that feed it. With this exercise, we aim to map out what goes in those view-models.
Thereâs a strong likelihood that your production server does not run JavaScript, so you may end up converting templates you produce in this design phase. You could attempt to mitigate this by choosing a template engine like Mustache with existing parsers for a huge list of languages. Or you might choose one with minimal logic available (I find that the only things I want for a truly flexible template are conditionals, loops, and partials) and the option of changing the delimiters around the template tags to agree with your server template language. Iâd argue that the process of getting all the data correctly placed in your HTML is a lot more difficult than doing a find and replace on the end result, so creating a template in JavaScript that you can use easily is time well spent even if it canât be parsed by your production server.
You could choose to design the UI of your pages using hard-coded mockup data first and add the template tags afterward, or you could start with a template and some mockup data ready to go in your Node server. Even though itâs an extra step, I find the former easier, because the latter tends to require extra shifting of the mockup data. Starting with hard-coded data lets me examine the finished mockup and see what kinds of "objects" are present (e.g., a user, an item for sale, or a status update). That helps me create a flexible object hierarchy in my data more easily. But you may be naturally amazing at creating object hierarchies, so, by all means, do what you feel.
Wherever you begin, hammering out your templates should give you an indication of which parts of each page are dynamic and which data each requires. If subsections of your pages are rendered separately because theyâre reused on different parent pages or because theyâre also rendered by the client, converting your markup to templates also allows you to find the right balance between never repeating code and having absurdly tiny templates.
If youâve created high-fidelity wireframes that run in a browser, you know the annoyance of having only parts of a page be interactive, since every click means having to create a new view (even if you have a series of items that share the same behavior when clicked). You also know about copying and pasting the same data into multiple places, and updating each of them separately if the manner of presenting data should change. Designing your app with a server behind it removes those frustrations.
With the support of a server, itâs not a problem if the same data shows up in different displays all over the workflow youâre designing. Since the data lives on your Node server, you can write it once and reuse it as many ways as you like. You still have to consider how youâll move it from server to client, though. When a user clicks on one of many items in a list, will she be taken to a new page, or will more data appear inline? Is the former the non-JavaScript fallback for the latter? Working that out for your app will tell you which endpoints the server needs, and which parameters need to be sent to it in query strings, form posts, or URLs. Itâll also help define the API for those requests, telling anyone who might work on your production server which keys you expect to correspond to which pieces of data.
Having a server to work with is especially nice if youâre in the business of making asynchronous requests. Obviously, you can get your mockup data, which is excellent, but you can also lazy-load assets like templates or stylesheets to consume that data. Testing the process of getting data and assets to the client validates your assumptions about not only the way youâre packaging them, but how youâre storing and structuring them. And, of course, it means a lot less wasted client-side JavaScript.
The end result of all this should be that youâve moved all the mockup pieces out of your client-side JavaScript and HTML. You have a Node server that might not match your production framework, but does have clear definitions of everything the client side expects to existâpossibly even all viewable in a single file. You have templates and client-side requests that may require substitutions, but also separate your data from everything else and are at minimum easily convertible to whatever format is needed for production.
Could you do the same with any other server under the sun? Absolutely. But if you already know JavaScript and arenât aiming to become a server-side developer, it makes sense to use the skills you already have. Node makes that pretty easy, while also letting you dig as deeply as you want into more complex servers, should your ambitions change. Itâs simple to get going and flexible to extend, making Node an awesome tool for designing applications.
Ready to take your new Node skills for a spin? In “Node at Work: A Walkthrough,” Iâll take you through a live demo, and get specific about how to refine your own mockups.
Google Chrome OS users have long enjoyed the ability to open Microsoft Office documents right in the web browser. Now Google is expanding its MS Office support to include Chrome on Windows and Mac as well.
The new Office Viewer beta is an extension for Google Chrome. You’ll need to be using Chrome 27 or better (currently in the beta channel), but provided you’re willing to use the prerelease version, you can install the new Office Viewer (also a beta release) from the Chrome Store.
The new extension can open most Microsoft Office files including .doc, .docx, .xls, .xlsx, .ppt, .pptx. The interface is very similar to the existing PDF view in Chrome and comes from QuickOffice, which Google acquired last year.
The main downside to the new plugin is that it’s definitely still a beta — very buggy and rough around the edges. In my testing two very simple spreadsheets simply didn’t open and selecting text in .docx Word documents was hit or miss; sometimes it worked, other times it was as if the document had been converted to an image.
On the plus side your MS Office files open in a specialized sandbox which protects you from any malware and viruses lurking in the files.
Still, there are enough rough edges that Chrome’s Office plugin isn’t ready for prime time. While it’s a necessity on Chrome OS, which has no Microsoft Office suite, everywhere else you’re probably better off using Google Drive to view files when you’re online (assuming you want to use Google services, Zoho Docs works well if you don’t), and Microsoft Office or Open/Libre Office when you’re not.
Tools
|
|
|
|
|
|
|
|
|
|
More »
| Home | Create a Website | About Us | Premium | Browse | News | Store | Contact Us | Terms of Service | Privacy Policy | ||
![]() |
© 2006-2013 DynamicDevelop LLC
|
|

