November 1, 2011
Posted by dnfisher
Prototyping in Code: notes from UX Bootcamp
Having neglected the blog for several months now, I was long overdue a blog post, but thankfully I finally have something worth blogging about. This time, the subject is prototyping, a topic which often leads to lively debates amongst those who design and build stuff for web/desktop/mobile.
Before I delve in, a bit of background.
My interest in prototyping is based on two realisations that have dawned on me (and many others) over the past few years.
- Building a functional prototype, without being bound by technology or medium is hard. Whether you use basic or complex prototyping tools, the results are *never* quite as good as they could be.
- The results you get when using prototypes as communication tools with clients, stakeholders and users are often very favourable. Yet prototypes are still quite rare, often forsaken for flat wireframes which are ambiguous and ill conceived.
Prototypes are simply better at conveying the dynamic and interactive nature of the products and services designed and developed in the field of Interaction Design. Annoyingly, quite a lot of interaction design is still delivered in rigid and flat documents that fail to inspire. This is detrimental not only to the people who pay our salaries, but to the profession as a whole.
There’s got to be a better way?
Last Friday and Saturday I was fortunate enough to attend UX Bootcamp (organised by Leisa Reichelt) on the topic of Prototyping in Code. The Bootcamp aimed to provide a guidance into how to best approach prototyping using HTML, CSS and JQuery, which are pretty much the lingua franca of the web.
The Bootcamp itself was very informal and provided the ideal environment in which to get stuck in and tinker, with expert guidance provided by Peter Gasston and Anna Debenham (as well as copious amounts of tea and coffee). I would recommend attending this Bootcamp if you’re looking to learn how to begin prototyping in code.
I have taken some time to summarise my experiences along with some links – as provided on the day - and hope that this will help anyone thinking about prototyping in code to give it a go.
Getting started
CSS is your friend! Frameworks/Boilerplates are an easy way to start prototyping quickly. Below is choice selection of some popular ones:
- Skeleton boilerplate
- 320 and up for mobile first
- Blueprint CSS provides a flexible grid, basic typography and styling.
Frameworks allow you to get up and running fast. It’s up to you to find ones that suit what you are trying to do, and become familiar with how they work.
Tips & Tricks
- Frameworks can help you define layout using grids & columns (we used Blueprint CSS).
- Consider using columns layouts when you get started. A 24 column layout for example is very flexible, because it can be divided by 2, 4, 6 and 12, therefore accommodating UI elements of various sizes.
- Identifying all the different UI elements of your design will guide how you choose to build your prototype, and guide how you will write your markup.
This is particularly important. Think of it as an architect’s blueprint. It will help you write your HTML in a clear and logical manner.
- The <div> element is your BFF. It is the most useful for creating layouts.
- Nested divs can be used to define sub layouts for things like headers, sidebars, footers.
- Semantic HMTL elements such as <form> allow you to quickly mock up functional prototypes using stock components with basic styling. Further styling can be added by simply adjusting CSS attributes for the <form> class.
Getting layout right first time is nigh on impossible, so it is very much a case of trial and error. There are some links below which can make this process easier (Espresso is particularly excellent).
- JQuery can then be used to add interactions very simply using JQuery library interactions.
- CSS3 can then be used to style your prototype to the degree of fidelity you desire. CSS is fully fledged, allowing visual effects ranging from drop shadows to animations.
JQuery can be a bit tricky at first. The syntax in which it is written in is not particularly user friendly, but once you get the hang of it, it is very powerful, and makes your prototypes come alive.
Tools to help you on your way
- Use tools like Espresso (paid) or JSFiddle (free) to code & preview your work as you go.
- Use tools like Hipster Ipsum or Lorempixel to populate dummy content on your prototype.
- Use debugging consoles such as Mozilla’s Firebug add-on or Chrome’s built in Inspector (right click “Inspect element”)
- Comment your code, and indent properly. Trust me, it helps LOADS.
It goes without saying, that once you become more adept at writing your own markup and code, you needn’t use boilerplates, but go freestyle and knock up whatever works best for you.
Takeaway lessons
- Boilerplates can help speed up the process by allowing the user to get stuck in without needing to define any CSS before starting. The need for boilerplates decreases as your technical skill improves.
- Learning to prototype in markup and code not only provides all the insight that prototyping in general provides, but helps give an initial technical insight into how developers can tackle challenges before commencing build. One caveat however, is that prototype code should probably not be re-used, unless you’re some kind of savant.
- Prototyping in markup and code allows many different ways to solve a problem.
- HTML, CSS and Javascript are the lingua franca of the web, as well as being open and accessible. Prototypes will work natively on mobile, tablets , desktop machines and TVs. No need for porting, using proprietary technology or hacky workarounds.
- CSS style guides can be stored centrally and any updates will cascade to any instance in which it is referenced. CSS can be crafted and updated by multiple team members, and overridden locally for localised styles.
That’s about it for this post, I hope it’s been helpful. If you have any questions or comments, feel free to hit up the comments below.












