Tag: kranthi

All About Unicode, UTF8 & Character Sets


  

This is a story that dates back to the earliest days of computers. The story has a plot, well, sort of. It has competition and intrigue, as well as traversing oodles of countries and languages. There is conflict and resolution, and a happyish ending. But the main focus is the characters — 110,116 of them. By the end of the story, they will all find their own unique place in this world.

This story will follow a few of those characters more closely, as they journey from Web server to browser, and back again. Along the way, you’ll find out more about the history of characters, character sets, Unicode and UTF-8, and why question marks and odd accented characters sometimes show up in databases and text files.

Warning: This article contains lots of numbers, including a bit of binary — best approached after your morning cup of coffee.

ASCII

Computers only deal in numbers and not letters, so it’s important that all computers agree on which numbers represent which letters.

Let’s say my computer used the number 1 for A, 2 for B, 3 for C, etc., and yours used 0 for A, 1 for B, etc. If I sent you the message HELLO, then the numbers 8, 5, 12, 12, 15 would whiz across the wires. But for you, 8 means I, so you would receive and decode it as IFMMP. To communicate effectively, we would need to agree on a standard way of encoding the characters.

To this end, in the 1960s the American Standards Association created a 7-bit encoding called the American Standard Code for Information Interchange (ASCII). In this encoding, HELLO is 72, 69, 76, 76, 79 and would be transmitted digitally as 1001000 1000101 1001100 1001100 1001111. Using 7 bits gives 128 possible values from 0000000 to 1111111, so ASCII has enough room for all lower case and upper case Latin letters, along with each numerical digit, common punctuation marks, spaces, tabs and other control characters. In 1968, US President Lyndon Johnson made it official — all computers must use and understand ASCII.

Trying It Yourself

There are plenty of ASCII tables available, displaying or describing the 128 characters. Or you can make one of your own with a little bit of CSS, HTML and Javascript, most of which is to get it to display nicely:

<html>
<body>
<style type="text/css">p {float: left; padding: 0 15px; margin: 0; font-size: 80%;}</style>
<script type="text/javascript">
for (var i=0; i<128; i++) document.writeln ((i%32?'':'<p>') + i + ': ' + String.fromCharCode (i) + '<br>');
</script>
</body>
</html>

This will display a table like this:

Do-It-Yourself Javascript ASCII table viewed in Firefox
Do-It-Yourself Javascript ASCII table viewed in Firefox.

The most important bit of this is the Javascript String.fromCharCode function. It takes a number and turns it into a character. In fact, the following four lines of HTML and Javascript all produce the same result. They all get the browser to display character numbers 72, 69, 76, 76 and 79:

HELLO
&#72;&#69;&#76;&#76;&#79;
<script>document.write ("HELLO");</script>
<script>document.write (String.fromCharCode (72,69,76,76,79));</script>

Also notice how Firefox displays the unprintable characters (like backspace and escape) in the first column. Some browsers show blanks or question marks. Firefox squeezes four hexadecimal digits into a small box.

The Eighth Bit

Teleprinters and stock tickers were quite happy sending 7 bits of information to each other. But the new fangled microprocessors of the 1970s preferred to work with powers of 2. They could process 8 bits at a time and so used 8 bits (aka a byte or octet) to store each character, giving 256 possible values.

An 8 bit character can store a number up to 255, but ASCII only assigns up to 127. The other values from 128 to 255 are spare. Initially, IBM PCs used the spare slots to represent accented letters, various symbols and shapes and a handful of Greek letters. For instance, number 200 was the lower left corner of a box: +, and 224 was the Greek letter alpha in lower case: a. This way of encoding the letters was later given the name code page 437.

However, unlike ASCII, characters 128-255 were never standardized, and various countries started using the spare slots for their own alphabets. Not everybody agreed that 224 should display a, not even the Greeks. This led to the creation of a handful of new code pages. For example, in Russian IBM computers using code page 885, 224 represents the Cyrillic letter ?. And in Greek code page 737, it is lower case omega: ?.

Even then, there was disagreement. From the 1980s Microsoft Windows introduced its own code pages. In the Cyrillic code page Windows-1251, 224 represents the Cyrillic letter a, and ? is at 223.

In the late 1990s, an attempt at standardization was made. Fifteen different 8 bit character sets were created to cover many different alphabets such as Cyrillic, Arabic, Hebrew, Turkish, and Thai. They are called ISO-8859-1 up to ISO-8859-16 (number 12 was abandoned). In the Cyrillic ISO-8859-5, 224 represents the letter ?, and ? is at 207.

So if a Russian friend sends you a document, you really need to know what code page it uses. The document by itself is just a sequence of numbers. Character 224 could be ?, a or ?. Viewed using the wrong code page, it will look like a bunch of scrambled letters and symbols.

(The situation isn’t quite as bad when viewing Web pages — as Web browsers can usually detect a page’s character set based on frequency analysis and other such techniques. But this is a false sense of security — they can and do get it wrong.)

Trying It Yourself

Code pages are also known as character sets. You can explore these character sets yourself, but you have to use PHP or a similar server side language this time (roughly because the character needs to be in the page before it gets to the browser). Save these lines in a PHP file and upload it to your server:

<html>
<head>
<meta charset="ISO-8859-5">
</head>
<body>
<style type="text/css">p {float: left; padding: 0 15px; margin: 0; font-size: 80%;}</style>
<?php  for ($i=0; $i<256; $i++) echo ($i%32?'':'<p>') . $i . ': ' . chr ($i) . '<br>'; ?>
</body>
</html>

This will display a table like this:

Cyrillic character set ISO-8859-5 viewed in Firefox
Cyrillic character set ISO-8859-5 viewed in Firefox.

The PHP function chr does a similar thing to Javascript’s String.fromCharCode. For example, chr(224) embeds the number 224 into the Web page before sending it to the browser. As we’ve seen above, 224 can mean many different things. So, the browser needs to know which character set to use to display the 224. That’s what the first line above is for. It tells the browser to use the Cyrillic character set ISO-8858-5:

<meta charset="ISO-8859-5">

If you exclude the charset line, then it will display using the browser’s default. In countries with Latin-based alphabets (like the UK and US), this is probably ISO-8859-1, in which case 224 is an a with grave accent: à. Try changing this line to ISO-8859-7 or Windows-1251 and refresh the page. You can also override the character set in the browser. In Firefox, go to View > Character Encoding. Swap between a few to see what effect it has. If you try to display more than 256 characters, the sequence will repeat.

Summary Circa 1990

This is the situation in about 1990. Documents can be written, saved and exchanged in many languages, but you need to know which character set they use. There is also no easy way to use two or more non-English alphabets in the same document, and alphabets with more than 256 characters like Chinese and Japanese have to use entirely different systems.

Finally, the Internet is coming! Internationalization and globalization is about to make this a much bigger issue. A new standard is required.

Unicode To The Rescue

Starting in the late 1980s, a new standard was proposed – one that would assign a unique number (officially known as a code point) to every letter in every language, one that would have way more than 256 slots. It was called Unicode. It is now in version 6.1 and consists of over 110,000 code points. If you have a few hours to spare you can watch them all whiz past.

The first 128 Unicode code points are the same as ASCII. The range 128-255 contains currency symbols and other common signs and accented characters (aka characters with diacritical marks), and much of it is borrowed ISO-8859-1. After 256 there are many more accented characters. After 880 it gets into Greek letters, then Cyrillic, Hebrew, Arabic, Indic scripts, and Thai. Chinese, Japanese and Korean start from 11904 with many others in between.

This is great – no more ambiguity – each letter is represented by its own unique number. Cyrillic ? is always 1071 and Greek a is always 945. 224 is always à, and H is still 72. Note that these Unicode code points are officially written in hexadecimal preceded by U+. So the Unicode code point H is usually written as U+0048 rather than 72 (to convert from hexadecimal to decimal: 4*16+8=72).

The major problem is that there are more than 256 of them. The characters will no longer fit into 8 bits. However Unicode is not a character set or code page. So officially that is not the Unicode Consortium’s problem. They just came up with the idea and left someone else to sort out the implementation. That will be discussed in the next two sections.

Unicode Inside The Browser

Unicode does not fit into 8 bits, not even into 16. Although only 110,116 code points are in use, it has the capability to define up to 1,114,112 of them, which would require 21 bits.

However, computers have advanced since the 1970s. An 8 bit microprocessor is a bit out of date. New computers now have 64 bit processors, so why can’t we move beyond an 8 bit character and into a 32 bit or 64 bit character?

The first answer is: we can!

A lot of software is written in C or C++, which supports a “wide character”. This is a 32 bit character called wchar_t. It is an extension of C’s 8 bit char type. Internally, modern Web browsers use these wide characters (or something similar) and can theoretically quite happily deal with over 4 billion distinct characters. This is plenty for Unicode. So – internally, modern Web browers use Unicode.

Trying It Yourself

The Javascript code below is similar to the ASCII code above, except it goes up to a much higher number. For each number, it tells the browser to display the corresponding Unicode code point:

<html>
<body>
<style type="text/css">p {float: left; padding: 0 15px; margin: 0; font-size: 80%;}</style>
<script type="text/javascript">
for (var i=0; i<2096; i++)
  document.writeln ((i%256?'':'<p>') + i + ': ' + String.fromCharCode (i) + '<br>');
</script>
</body>
</html>

It will output a table like this:

A selection of Unicode code points viewed in Firefox
A selection of Unicode code points viewed in Firefox

The screenshot above only shows a subset of the first few thousand code points output by the Javascript. The selection includes some Cyrillic and Arabic characters, displayed right-to-left.

The important point here is that Javascript runs completely in the Web browser where 32 bit characters are perfectly acceptable. The Javascript function String.fromCharCode(1071) outputs the Unicode code point 1071 which is the letter ?.

Similarly if you put the HTML entity &#1071; into an HTML page, a modern Web browser would display ?. Numerical HTML entities also refer to Unicode.

On the other hand, the PHP function chr(1071) would output a forward slash / because the chr function only deals with 8 bit numbers up to 256 and repeats itself after that, and 1071%256=47 which has been a / since the 1960s.

UTF-8 To The Rescue

So if browsers can deal with Unicode in 32 bit characters, where is the problem? The problem is in the sending and receiving, and reading and writing of characters.

The problem remains because:

  1. A lot of existing software and protocols send/receive and read/write 8 bit characters
  2. Using 32 bits to send/store English text would quadruple the amount of bandwidth/space required

Although browsers can deal with Unicode internally, you still have to get the data from the Web server to the Web browser and back again, and you need to save it in a file or database somewhere. So you still need a way to make 110,000 Unicode code points fit into just 8 bits.

There have been several attempts to solve this problem such as UCS2 and UTF-16. But the winner in recent years is UTF-8, which stands for Universal Character Set Transformation Format 8 bit.

UTF-8 is a clever. It works a bit like the Shift key on your keyboard. Normally when you press the H on your keyboard a lower case “h” appears on the screen. But if you press Shift first, a capital H will appear.

UTF-8 treats numbers 0-127 as ASCII, 192-247 as Shift keys, and 128-192 as the key to be shifted. For instance, characters 208 and 209 shift you into the Cyrillic range. 208 followed by 175 is character 1071, the Cyrillic ?. The exact calculation is (208%32)*64 + (175%64) = 1071. Characters 224-239 are like a double shift. 226 followed by 190 and then 128 is character 12160: ?. 240 and over is a triple shift.

UTF-8 is therefore a multi-byte variable-width encoding. Multi-byte because a single character like ? takes more than one byte to specify it. Variable-width because some characters like H take only 1 byte and some up to 4.

Best of all it is backward compatible with ASCII. Unlike some of the other proposed solutions, any document written only in ASCII, using only characters 0-127, is perfectly valid UTF-8 as well – which saves bandwidth and hassle.

Trying It Yourself

This is a different experiment. PHP embeds the 6 numbers mentioned above into an HTML page: 72, 208, 175, 226, 190, 128. The browser interprets those numbers as UTF-8, and internally converts them into Unicode code points. Then Javascript outputs the Unicode values. Try changing the character set from UTF-8 to ISO-8859-1 and see what happens:

<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<p>Characters embedded in the page:<br>
<span id="chars"><?php echo chr(72).chr(208).chr(175).chr(226).chr(190).chr(128); ?></span>
<p>Character values according to Javascript:<br>
<script type="text/javascript">
function ShowCharacters (s) {var r=''; for (var i=0; i<s.length; i++)
  r += s.charCodeAt (i) + ': ' + s.substr (i, 1) + '<br>'; return r;}
document.writeln (ShowCharacters (document.getElementById('chars').innerHTML));
</script>
</body>
</html>

If you are in a hurry, this is what it will look like:

A sequence of numbers shown using the UTF-8 character set
The sequence of numbers above shown using the UTF-8 character set

Same sequence of numbers shown using the ISO-8859-1 character set
Same sequence of numbers shown using the ISO-8859-1 character set

If you display the page  using the UTF-8 character set, you will see only 3 characters: H??. If you display it using the character set ISO-8859-1, you will see six separate characters: H�¯â¾€ . This is what is happening:

  1. On your Web server, PHP is embedding the numbers 72, 208, 175, 226, 190 and 128 into a Web page
  2. The Web page whizzes across the Internet from the Web server to your Web browser
  3. The browser receives those numbers and interprets them according to the character set
  4. The browser internally represents the characters using their Unicode values
  5. Javascript outputs the corresponding Unicode values

Notice that when viewed as ISO-8859-1 the first 5 numbers are the same (72, 208, 175, 226, 190) as their Unicode code points. This is because Unicode borrowed heavily from ISO-8859-1 in that range. The last number however, the euro symbol €, is different. It is at position 128 in ISO-8859-1 and has the Unicode value 8364.

Summary Circa 2003

UTF-8 is becoming the most popular international character set on the Internet, superseding the older single-byte character sets like ISO-8859-5. When you view or send a non-English document, you still need to know what character set it uses. For widest interoperability, website administrators need to make sure all their web pages use the UTF-8 character sets.

Perhaps the Ã� looks familiar – it will sometimes show up if you try to view Russian UTF-8 documents. The next section describes how character sets get confused and end up storing things wrongly in a database.

Lots Of Problems

As long as everybody is speaking UTF-8, this should all work swimmingly. If they aren’t, then characters can get mangled. To explain way, imagine a typical interaction a website, such as a user making a comment on a blog post:

  1. A Web page displays a comment form
  2. The user types a comment and submits.
  3. The comment is sent back to the server and saved in a database.
  4. The comment is later retrieved from the database and displayed on a Web page

This simple process can go wrong in lots of ways and produce the following types of problems:

HTML Entities

Pretend for a moment that you don’t know anything about character sets – erase the last 30 minutes from your memory. The form on your blog will probably display itself using the character set ISO-8859-1. This character set doesn’t know any Russian or Thai or Chinese, and only a little bit of Greek. If you attempt to copy and paste any into the form and press Submit, a modern browser will try to convert it into HTML numerical entities like &#1071; for ?.

That’s what will get saved in your database, and that’s what will be output when the comment is displayed – which means it will display fine on a Web page, but cause problems when you try to output it to a PDF or email, or run text searches for it in a database.

Confused Characters

How about if you operate a Russian website, and you have not specified a character set in your Web page? Imagine a Russian user whose default character set is ISO-8859-5. To say “hi”, they might type ??????. When the user presses Submit, the characters are encoded according to the character set of the sending page. In this case, ?????? is encoded as the numbers 191, 224, 216, 210, 213 and 226. Those numbers will get sent across the Internet to the server, and saved like that into a database.

If somebody later views that comment using ISO-8859-5, they will see the correct text. But if they view using a different Russian character set like Windows-1251, they will see ??????. It’s still Russian, but makes no sense.

Accented Characters with Lots of Vowels

If someone views the same comment using ISO-8859-1, they will see ¿àØÒÕâ instead of ??????. A longer phrase like ? ???? ???? ??? ?????? (“nice to see you” in a formal way to a female), submitted as ISO-8859-5, will show up in ISO-8859-1 as Ã� âÞÖÕ àÃ�ÔÃ�. It looks like that because the 128-255 range of ISO-8859-1 contains lots of vowels with accents.

So if you see this sort of pattern, it’s probably because text has been entered in a single byte character set (one of the ISO-8859s or Windows ones) and is being displayed as ISO-8859-1. To fix the text, you’ll need to figure out which character set it was entered as, and resubmit it as UTF-8 instead.

Alternating Accented Characters

What if the user submitted the comment in UTF-8? In that case the Cyrillic characters which make up the word ?????? would each get sent as 2 numbers each: 208/159, 209/128, 208/184, 208/178, 208/181 and 209/130. If you viewed that in ISO-8859-1 it would look like: �ŸÑ€�¸�²�µÑ‚.

Notice that every other character is a � or Ñ. Those characters are numbers 208 and 209, and they tell UTF-8 to switch to the Cyrillic range. So if you see a lot of � and Ñ, you can assume that you are looking at Russian text entered in UTF-8, viewed as ISO-8859-1. Similarly, Greek will have lots of Î and �, 206 and 207. And Hebrew has alternating ×, number 215.

Vowels Before a Pound and Copyright Sign

A very common issue in the UK is the currency symbol £ getting converted into £. This is exactly the same issue as above with a coincidence thrown in to add confusion. The £ symbol has the Unicode and ISO-8859-1 value of 163. Recall that in UTF-8 any character over 127 is represented by a sequence of two or more numbers. In this case, the UTF-8 sequence is 194/163. Mathematically, this is because (194%32)*64 + (163%64) = 163.

Visually it means that the if you view the UTF-8 sequence using ISO-8859-1, it appears to gain a  which is character 194 in ISO-8859-1. The same thing happens for all Unicode code points 161-191, which includes © and ® and ¥.

So if your £ or © suddenly inherit a Â, it is because they were entered as UTF-8.

Black Diamond Question Marks

How about the other way around? If you enter ?????? as ISO-8859-5, it will get saved as the numbers shown above: 191, 224, etc. If you then try to view this as UTF-8, you may well see lots of question marks inside black diamonds: ?. The browser displays these when it can’t make sense of the numbers it is reading.

UTF-8 is self-synchronzising. Unlike other multi-byte character encodings, you always know where you are with UTF-8. If you see a number 192-247, you know you are at the beginning of a multi-byte sequence. If you see 128-191 you know you are in the middle of one. There’s no danger of missing the first number and garbling the rest of the text.

This means that in UTF-8, the sequence 191 followed by 224 will never occur naturally, so the browser doesn’t know what to do with it and displays ?? instead.

This can also cause £ and © related problems. £50 in ISO-8859-1 is the numbers 163, 53 and 48. The 53 and 48 cause no issues, but in UTF-8, 163 can never occur by itself, so this will show up as ?50. Similarly if you see ?2012, it is probably because ©2012 was input as ISO-8859-1 but is being displayed as UTF-8.

Blanks, Question Marks and Boxes

Even if they are fully up-to-speed with UTF-8 and Unicode, a browser still may not know how to display a character. The first few ASCII characters 1-31 are mostly control sequences for teleprinters (things like Acknowledge and Stop). If you try to display them, a browser might show a ? or a blank or a box with tiny numbers inside it.

Also, Unicode defines over 110,000 characters. Your browser may not have the correct font to display all of them. Some of the more obscure characters may also get shown as ? or blank or a small box. In older browsers, even fairly common non-English characters may show as boxes.

Older browsers may also behave differently for some of the issues above, showing ? and blank boxes more often.

Databases

The discussion above has avoided the middle step in the process – saving data to a database. Databases like MySQL can also specify a character set for a database, table or column. But it is less important that the Web pages’ character set.

When saving and retrieving data, MySQL deals just with numbers. If you tell it to save number 163, it will. If you give it 208/159 it will save those two numbers. And when you retrieve the data, you’ll get the same two numbers back.

The character set becomes more important when you use database functions to compare, convert and measure the data. For example, the LENGTH  of a field may depend on its character set, as do string comparisons using LIKE and =. The method used to compare strings is called a collation.

Character sets and collations in MySQL are an in-depth subject. It’s not simply a case of changing the character set of a table to UTF-8. There are further SQL commands to take into account to make sure the data goes in and out in the right format as well. This blog is a good starting point.

Trying It Yourself

The following PHP and Javascript code allows you to experiment with all these issues. You can specify which character set is used to input and output text, and you can see what the browser thinks about it too.

<?php
$charset = $_POST['charset']; if (!$charset) $charset = 'ISO-8859-1';
$string = $_POST['string'];
if ($string) {
        echo '<p>This is what PHP thinks you entered:<br>';
        for ($i=0; $i<strlen($string); $i++) {$c=substr ($string,$i,1); echo ord ($c).': '.$c.' <br/>';}
}       
?>      
<html>
<head>
<meta charset="<?=$charset?>">
</head>
<body>
<form method="post">
<input name="lastcharset" type="hidden" value="<?php echo $charset?>"/>
Form was submitted as: <?php echo $_POST['lastcharset']?><br/>
Text is displayed as: <?php echo $charset?><br/>
Text will be submitted as: <?php echo $charset?><br/>
Copy and paste or type here:
<input name="string" type="text" size="20" value="<?php echo $string?>"/><br/>
Next page will display as:
<select name="charset"><option>ISO-8859-1<option>ISO-8859-5
<option>Windows-1251<option>ISO-8859-7<option>UTF-8</select><br/>
<input type="submit" value="Submit" onclick="ShowCharacters (this.form.string.value); return 1;"/>
</form>
<script type="text/javascript">
function ShowCharacters (s) {
  var r='You entered:';
  for (var i=0; i<s.length; i++) r += '\n' + s.charCodeAt (i) + ': ' + s.substr (i, 1);
  alert (r);
}
</script>
</body>
</html>

This is an example of the code in action. The numbers at the top are the numerical values of each of the characters and their representation (when viewed individually) in the current character set:

Example of inputting and output in different character sets
Example of inputting and output in different character sets. This shows a £ sign turning into a ? in Google Chrome.

The page above shows the previous, current and future character sets. You can use this code to quickly see how text can get really mangled. For example, if you pressed Submit again above, the ? has Unicode code point 65533 which is 239/191/189 in UTF-8 and will be displayed as �50  in ISO-8859-1. So if you ever get £ symbols turning into �, that is probably the route they took.

Note that the select box at the bottom will change back to ISO-8859-1 each time.

One Solution

All the encoding problems above are caused by text being submitted in one character set and viewed in another. The solution is to make sure that every page on your website uses UTF-8. You can do this with one of these lines immediately after the <head> tag:

<meta charset="UTF-8">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">

It has to be one of the first things in your Web page, as it will cause the browser to look again at the page in a whole new light. For speed and efficiency, it should do this as soon as possible.

You can also specify UTF-8 in your MySQL tables, though to fully use this feature, you’ll need to delve deeper.

Note that users can still override the character set in their browsers. This is rare, but does mean that this solution is not guaranteed to work. For extra safety, you could implement a back-end check to ensure data is arriving in the correct format.

Existing Websites

If your website has already been collecting text in a variety of languages, then you will also need to convert your existing data into UTF-8. If there is not much of it, you can use a PHP page like the one above to figure out the original character set, and use the browser to convert the data into UTF-8.

If you have lots of data in various character sets, you’ll need to first detect the character set and then convert it. In PHP you can use mb_detect_encoding to detect and iconv to convert. Reading the comments for  mb_detect_encoding, it looks like quite a fussy function, so be sure to experiment to make sure you are using it properly and getting the right results.

A potentially misleading function is utf8_decode. It turns UTF-8 into ISO-8859-1. Any characters not available in ISO-8859-1 (like Cyrillic, Greek, Thai, etc) are turned into question marks. It’s misleading because you might have expected more from it, but it does the best it can.

Summary

This article has relied heavily on numbers and has tried to leave no stone unturned. Hopefully it has provided an exhaustive understanding of character sets, Unicode, UTF-8 and the various problems that can arise. The morals of the story are:

  • You need to know the character set in order to make sense of non-Latin text
  • Internally, browsers use Unicode to represent characters
  • Make sure all your Web pages specify the UTF-8 character set

For a slightly different approach to this subject, this 2003 character set article is excellent. Thank you for sticking with this epic journey.

(il)

Image credits (front page): nevsred.


© Paul Tero for Smashing Magazine, 2012.


Why Subtle Typographic Choices Make All The Difference


  

A strong understanding of how designers control meaning is essential for anyone interested in graphic design or typography. In a previous article, we discussed how sophisticated and complex visual and verbal language can get, examining instances that show how type can be used to effectively take control of meaning.

In this article, we’ll look at the reasons why subtle typographic changes can create considerable effect. We’ll refer to one or two linguistic and semiotic examples, as well as design case studies, to get to grips with why subtle changes can make all the difference.

Let’s consider a couple of simple sentences: “The boy walks a dog� and “The boy walks the dog.� The meanings are significantly different simply by the change of one small word. “A dog� is any old dog, while “the dog� is one we know and recognize. Similarly, small changes in typography can fundamentally alter impact and interpretation. For example, type size can be increased, the weight or font can be changed, and positioning within a frame altered; with each alteration, the meaning also changes. An authoritative, urgent, big, bold “STOP� suddenly becomes more lighthearted and less weighty and might even come across as teasing when rendered as “Oh, stop, stop it! I like it!�

An urgent, big, bold STOP

A quiet, playful (oh please) stop
Two visualizations of the same word but with typographic treatments that have entirely different emphases and meaning. (Credit: Bright Pink Communication Design)

The last couple of examples stem from the ideas of one of the fathers of 20th-century linguistics, Ferdinand de Saussure, who felt that each word (or “sign�) had one specific meaning (signification). Applying this concept to typography, de Saussure’s principles imply that each typeface and design choice carries a predetermined meaning. Just as in the two sentences about “the� and “a� dog and the two visuals showing different takes on “Stop,� each has a significantly different meaning. (To read about de Saussure’s ideas in depth, see Course in General Linguistics.)

However, meaning comes not simply from comparing one visual interpretation to another. As de Saussure suggests, meaning is also established by the context in which visuals are set. This idea, from 20th-century French philosopher Roland Barthes, is known as “secondary signification.� Barthes notes that a visual interpretation (sign) does not have just one meaning, as might be deduced from de Saussure’s work, but that a second socially and culturally specific meaning can be gleaned from the context in which the visual treatment appears. In Western society, you can find an example of this in the typographic styling of fashion brand Juicy Couture.

Juicy Couture logo
The name style of an iconic fashion brand.

The gothic letterforms are seen by the brand’s target audience as being the height of fashion and desirability. To some, however, the same typeface in a different context would imply tradition, heritage, reputation and possibly even political persuasion. A more traditional use of this style of font can be found in the masthead of the UK newspaper The Telegraph.

The Telegraph Masthead
The online masthead of one of the UK’s premier newspapers.

Type undoubtedly plays a role in the creation of meaning, but connotation does, too. For example, the distinct stylings of handwritten text can be deliberately used to bring a range of meanings to a message. On the page from Ben and Jerry’s website shown below, we can discern economy, personal concern and friendliness, but look at how the casual font gets you to drop your guard for just a moment. This allows Ben and Jerry’s to talk about something as serious as citizenship, when you expect it to be talking about imaginative ice-cream flavors!

Ben and Jerry's Foundation
A page from the website of Ben and Jerry’s charitable foundation.

In a 2010 UK Volkswagen ad campaign designed by DDB UK, what appears to be slightly innocent, carefully hand-lettered text reinforces the message that the operating costs of a Volkswagen Golf car are 18% cheaper than the (unspecified) competition. This typographic approach also communicates the secondary yet equally important message that Volkswagen cars are affordable to purchase and that the company doesn’t produce extravagant, expensive ads — all to keep prices low for customers.

VW Cost Effective Ad
Ad for the Volkswagen Golf

Typography That Reinforces Meaning And Context

In their book Reading Images: The Grammar of Visual Design, Gunther Kress and Theo van Leeuwen confirm the role of the visual aspect of typography.

The visual component of text is an independently organized and structured message, connected with the verbal text, but in no way dependent on it and similarly the other way round.

Amazingly, we are conditioned to relate certain typographic styles, colors, shapes and patterns to certain products and situations. For example, you are not likely willing to clean your teeth with paste that comes out of a pack covered in brown, lightweight serif type. When aligned with our expectations, visual language can make a stronger impact than verbal meaning. Returning to our first example, the word “STOP� could now say “LOVE� and still be seen as an authoritative, urgent, big, bold warning sign.

A powerful bold Love
A typographic treatment that asserts “LOVE� as a powerful, consuming emotion. (Credit: Bright Pink Communication Design)

The impact that can be achieved by designers being involved in the writing or editing of copy is dramatic. If we combine the eloquence of the copywriter with the knowledge and skill of the designer or typographer, we are able to achieve surprising yet totally cohesive solutions to design problems. Words carefully selected not only for their literal meaning but also for their sound, length and shape can help to “sculpt� a particular message, thus enhancing its value.

An example of this level of collaboration can be found in the promotional brochure for UK homebuilders Wimpey. As with most consumables, all new homes could be said to share many similar characteristics, and most homebuilders could be said to employ similar promotions, language and terminology. So, vendors need to be distinctive in order to create that must-have feeling.

A delicate play between copy and typography
The synergy of type and language in this UK home-buying brochure builds atmosphere and maximizes desirability. (Image: Bright Pink Communication Design)

This double-page spread features an extract from the poem “Spring� by Christina Rossetti. Its descriptive tone not only conveys the development site’s proximity to the countryside and nature, but is also used as a pleasing metaphor for putting down roots and starting a new life.

The typographic treatment of the Rossetti poem emphasizes certain words both for their meaning and for their sound and shape. The highlighted words function as a group on their own, in addition to being integral to the poem as a whole. The poem allows the designer to be deliberate with the line lengths, with the words sitting comfortably together as a staggered group, complementing the other compositional elements on the page.

The result of collaboration between writer and designer is demonstrated in many of the promotional products of Ben and Jerry’s. Ice cream flavors are given humorous names and descriptions, accompanied by energetic design and typographic exuberance. This careful approach reinforces the message that Ben and Jerry’s is a speciality product — even handmade — produced with high-quality ingredients by caring individuals with a sense of humor and eye to all things fun.

Ben and Jerry's cherry advertisement uses purposefully written copy to fill the space perfectly

Ben and Jerry's Nuts advertisement pushes passive words behind an aggressive illustration in this playful ad
There is a full range of Ben and Jerry’s highly memorable ads in its online gallery (currently unavailable).

The ads, which are done tongue in cheek, focus on the ingredients in the ice cream and suggest that competing products might not have the same quantity and quality of ingredients that consumers expect. The illustrations capture the hand-drawn style mentioned earlier and also heighten the customer’s anticipation — the cherries are drawn extra large and juicy; the nuts are varied and plentiful. The typography has been carefully selected to drive home these characteristics and get your taste buds moving and convince you that Ben and Jerry’s is the only ice cream worth eating.

Of course, endless examples can be found of how subtle typographic choices make all the difference. Whether designers and writers work together or independently, fine-tuning their words and designs can lead to clever and effective results. And yet there is no doubt that understanding the implications of typographic details and the use of verbal language enables us to maximize communication. Effective design begets effective communication, and while major design decisions are obviously important, the little things often make all the difference.

(al) (il)

Note: A big thank you to our typography editor, Alexander Charchar, for preparing this article.


© Carolyn Knight, Jessica Glaser for Smashing Magazine, 2012.


Social Media Is A Part Of The User Experience


  

The term “social media guru� has almost become a dirty word within the Web community. In fact, despite most of us being early adopters of social networks such as Facebook or Twitter, we consider social media the purview of marketeers.

It certainly isn’t our responsibility—we build websites, we don’t run marketing campaigns. But are we justified in this point of view? Is social media really somebody else’s responsibility?

In my opinion, social media is very much our concern. That is because social media is firmly a part of the user’s experience, and we are user experience designers. The user experience does not occur within a single channel (such as a website or Facebook page). Users move between multiple channels and so all of these channels need to be designed as one consistent user experience.

At the moment, we largely fail to integrate the various channels through which we communicate with our users. Although most social media channels are great at driving traffic to our websites, few websites return the favor to anything at that same level.

There is a reason why marketeers are increasingly including the Web address to their Facebook Page in ads rather than the website itself—it is because if they drive traffic to the website, it rarely makes it any further. This is because as Web designers our thinking about social media rarely moves beyond slapping a “share thisâ€� button on the bottom of each page.

Going Beyond “Share This�

I recently booked some travel insurance for an upcoming trip. While filling in the online form I came across a “share this page” link at the bottom. Why would anybody share a travel insurance form? Even if they did, would any of their friends look at it? Of course not!

Would anybody really share a travel insurance form?
Would anybody really share a travel insurance form?

The problem here was that the “share this� option had been applied indiscriminately across the whole website. No thought had been put into its application. Admittedly, this was probably due to technical constraints. However, just because something is easier technically is no excuse for compromising the users experience.

Compare that to an environmental website I visited. While reading a blog post on their website I came across the following shocking fact:

“Only 1% of the 560 million city residents living in China are breathing air that would be considered safe according to EU guidelines.”

This was a piece of information worth sharing and the author knew it. Instead of the quote being buried in the copy, it was displayed in a magazine style pull-out. Directly under the quote was the option to share it with my friends on Facebook. This website got it right:

  • It was specific. Instead of a blanket “share this page,â€� it identified specific content worth sharing.
  • It made sharing easy. Inline with Steve Krug’s mantra of “Don’t make me thinkâ€�, this website told the user what to share and made the process of sharing as easy as clicking a single button.

This is the level of thought we should all be putting into our “share this� links. However, it is not just these links that require attention, but also our “follow us� buttons.

Why Should I Follow You?

Otherwise well-designed websites seem to abandon the principles of user interface design when it comes to their “follow us� buttons.

Take for example an ecommerce website I visited. I was looking to buy a new DSLR camera, but upon arriving at the website, one of the first things I saw was a “follow us on Facebook� button. Because this button was styled with Facebook branding rather than that of the website, it stood out like a sore thumb.

Sometimes follow us icons can be a distraction from the user's primary task
Sometimes follow us icons can be a distraction from the user’s primary task.

From my perspective this was a distraction. I had come to the website to buy a camera, not to follow the retailer on Facebook. This “call to action� was distracting me from my task and also from fulfilling the website’s business objective of taking my money.

I completed my purchase and ended up on the “thank you� page where I was presented with the inevitable option to “continue shopping�. Who clicks on this link anyway? Why would I continue shopping? I had just finished shopping, why would I start again?

Instead of this redundant link, now was the time to ask people to follow. I had completed my goal and fulfilled the website’s primary business objective. Therefore, now was the perfect time to go for a secondary call to action.

The “ask” would have been even more powerful if they gave me a reason to follow them. With so many brands, celebrities and others asking me to follow them, why should I follow this ecommerce website? What was in it for me?

If instead of asking me to simply “follow them� they added some copy, such as:

“Follow us on Facebook for useful advice on how to get the most from your new camera.”

I may have been more inclined to follow them.

There are no shortage of ways we can closely integrate our websites with social media beyond “follow us� and “share� options. Facebook, Twitter and LinkedIn all offer powerful APIs, but they also offer some easy-to-implement widgets too.

Going Beyond Share And Follow

Making greater use of social media on our websites doesn’t need to be technically challenging or expensive. All the major social networks are bending over backwards to make it easy.

For example, Twitter offers an @anywhere service that brings a range of functionality to your website with almost no technical ability required. Options include the ability to:

  • Turn twitter usernames on your website into links automatically.
  • Show hovercards that display users information on rollover.
  • Tweet directly from your website.
  • Embed tweets into your website the same you would embed a youtube video.

Twitter offers a range of ways to closely integrate with your website. One of my favourites is the Twitter Hovercard.
Twitter offers a range of ways to closely integrate with your website. One of my favorites is the Twitter Hovercard.

Facebook offers even more easy-to-implement social plugins. These include:

  • An entire commenting system driven by Facebook.
  • An activity feed that allows users to see what their friends have been doing on your website.
  • A recommendation plugin that gives users personalized suggestions for pages on your website that they might like.
  • A live stream that lets users share comments in real-time during a live event on your website.
  • A registration plugin that allows users to easily signup to your website using their Facebook account.

Tools such as Disqus commenting integrates not just with one social network, but with many.
Tools such as Disqus commenting integrates not just with one social network, but with many.

With so many tools available to add social functionality, we have no reason not to. However, adding these basic tools to our websites is just the start. I believe that the real power of social media is only just beginning to be tapped.

Social By Design

At Facebook they have a phrase: “Social by design.� This refers to their commitment to put social at the heart of everything they do. For them, their network is not just about the content generated by users, but about the interaction between those users.

I believe that this principle extends beyond social networking and can be applied to many other websites as well. We are social animals. So much of our behavior and decision making is dictated by others. This is well understood in marketing and something we need to take seriously in Web design.

Whether we are considering what car to buy, where to eat out or what school to send our kids to, we like to ask our friends.

Online too, we are social creatures. When purchasing from Amazon, we tend to value the reviews more highly than the products official description. Equally we are more likely to complete a call to action when we see many others have done so before.

When it comes to purchasing we put more weight on consumer reviews than marketing material.
When it comes to purchasing, we put more weight on consumer reviews than marketing material.

The possibilities for harnessing this social component of our personalities are only just beginning to be explored. For example, although it is great that Amazon lets you read the reviews of other purchasers, it would be even better if the reviews of trusted friends (say, your Facebook friends) were floated to the top. A review from a stranger is one thing, but a review from a friend is quite something else.

Remember the environmental website I mentioned earlier? Allowing me to share that specific quote with my friends was great. However, I would be even more likely to share the link if below the share button it had told me that some of my friends had already shared that quote with their networks. I trust my judgement of my friends, so if they had shared that quote, then it must be worth sharing.

If I can see one of my friends has tweeted something, I am more likely to do the same myself.
If I can see one of my friends has tweeted something, I am more likely to do the same myself.

Some websites are already beginning to harness our friendship networks. One example is Etsy, a company that sells handmade goods. You can login to Facebook via their website and it will suggest appropriate products for your friends based on their interests. Although the suggestions are not perfect, they are a lot more powerful than generic suggestions of “gifts for him� or “gifts for her�.

Etsy uses Facebook to suggest gifts for your friends.
Etsy uses Facebook to suggest gifts for your friends.

Imagine for a moment if Etsy didn’t stop there. Imagine if they used that Facebook data to identify gaps in what they sold. This knowledge could be used not just to improve user experience, but suggest future products. Social by design has the potential to alter the direction of an entire business.

This doesn’t need to be limited to ecommerce websites. A website like Smashing Magazine could use tweets and comments on an article as an indication of popular topics that could be covered in more depth. You could even go so far as to asking users to directly suggest ideas for posts, product ideas or new services they wanted. Traditionally this kind of audience research and product development has been an expensive business. Social media offers the ability to get this kind of feedback for free.

As you can begin to see, social by design is not just about allowing us to draw on our friendship networks, but has the power to do much more. However, to achieve this we need to integrate social into the very fabric of our website rather than bolt it on as an afterthought.

The Problem With Bolt-On Social Media

Too many of our websites are social by happenstance rather than social by design. A new piece of social technology comes along and we bolt it onto our website without considering the bigger picture.

Take my own website. Like many, this website has evolved over a number of years and I’ve added more social functionality to it overtime. Because my community is so important, there are lots of ways to contribute, dependent on preference for social network. You can:

  • Comment on a blog post.
  • Contribute to a forum thread.
  • Join the Facebook page.
  • Talk to my via Twitter.
  • Even comment on audio posts I release.

With so many options, nobody could accuse me of not having a social website. The problem is that the conversation is fragmented—those postings on Twitter will not see the contribution from those who post on Facebook. Equally, commenters on my blog will miss the in-depth discussion found in the forum.

This is because I have bolted on the technology, rather than integrating it to create a more complete community. Imagine instead that my website had been designed with social in mind from the start. When I release a new blog post this could create a thread on the forum. Comments posted to the blog post would appear on the forum and vice versa.

Equally, when the post is released it could also be posted to Twitter and Facebook. If somebody replied on either of those social networks the reply would be captured and folded into the comments on the website. Although not perfect (for example Twitter users still wouldn’t see comments made by Facebook users without visiting the website), it is a step forward. It makes the website the hub for your community, rather than having separate siloed discussions.

The Role Of The Website

That is the main point I want to leave you with. Your website should be the hub of social interaction, not sitting on the sidelines. It has the potential to draw together conversation across multiple networks and allow users to interact with friends, whether buying a camera or sharing an inspirational quote.

Image credits (front page): Opensourceway.
(jvb) (il)


© Paul Boag for Smashing Magazine, 2012.


Getting To Know The Android Platform: Building, Testing And Distributing Apps


  

When iOS started to gain momentum, soon after the first iPhone launched, many businesses started to pay attention to apps. The number of apps for iOS grew exponentially, and every company, big and small, rushed to create their own app to support their business.

For some time, iOS was the only platform you really had to care about. The audience was there. For a few years now, there has been another player in the market. Android’s marketshare growth has been phenomenal, and it simply cannot be ignored anymore. There are over 200 million Android users in the world—almost double the numer of iOS users. For businesses, reaching the Android crowds is potentially a very lucrative investment.

Android as a platform can appear intimidating to new players. Blogs and media are littered with articles about Android fragmentation and malware. The Android platform can feel complex, although it is very flexible. However, before getting started with an Android project, understanding the platform and ecosystem is imperative. Trying to apply the methods and tools that work on other platforms could lead to disaster.

In this article, we’ll explain parts of the application-building process and ecosystem for Android that could cause problems if misunderstood. We’ll talk about an approach to building a scalable app that looks and feels right at home on Android, and we’ll cover how to test it and your options for distributing it. The following topics would each need a full article to be explained fully, but this article should provide a good overview. After reading this article, you should have a good understanding of what kinds of decisions and challenges you will face when creating an Android app.

Make The App Scalable

Android devices come in many forms and sizes. The last official count is that 600 Android devices are available, and that number is growing every day. Building an app that runs on all of them is more difficult than building for just one or two screen sizes and one set of hardware. Fortunately, Android was built from the ground up with this in mind. The framework provides tools to help developers tackle the problem. But as with all tools, they only work if used correctly.


Large preview.

An iOS app is designed and built by placing pixels at the proper coordinates until the UI looks just right. Not so on Android! Android designers must think about the scalability of each component and the relationships between components. The philosophy is much closer to Web app design than to iOS app design.

A Continuum Instead Of A Separate Tablet UI

About half a year ago, Google rushed out the Android version named Honeycomb (3.0). Honeycomb was aimed at tablets and was never meant for anything else. The source code of Honeycomb was never released, and it never officially appeared on any phones. At the time, Apple had already established a practice by which developers provided two separate versions of their app, one for iPhone and one for iPad. Because of Apple’s model and the separate Android version for tablets, everyone seemed to assume that two separate versions of an app are needed on Android, too. Soon, the Internet was full of blog posts complaining that Android didn’t have enough tablet apps and that there was no way to search for them on the Google Play store.

Now, as Android Ice Cream Sandwich (4.0) is unifying all Android devices to run the same version of the OS, it all makes sense. Android is a continuum, and drawing a clear line between tablets and phones is impossible. In fact, checking whether an app is running on a tablet or phone is technically impossible. Checking the screen size (and many other features) at runtime, however, is possible.

This is where Android design starts to remind us of Web design. New technologies have enabled us to build websites that adapt automatically to the user’s browser size by scaling and moving components around as needed. This approach is called responsive Web design. The very same principles can be used on Android. On Android, however, we are not bound by the limits of the browser. Responsive design can be taken even further.

Responsive Android Design

Android developers can define multiple layouts for every screen of their app, and the OS will pick the best-fitting one at runtime. The OS knows which one fits best by using definitions that developers add to their layout (and other) folders in the app’s project resource tree.


An example of the structure of layout folders, which distinguish between screen sizes and Android versions.

Starting from Android version 3.2 — and, therefore, also on Ice Cream Sandwich — a more fine-grained approach was introduced. Developers may now define layouts based on the screen’s pixel density, independent of size, instead of using only the few categories that were available before.


An example of the new layout specifications based on screen size. It is very similar to CSS’ media queries. Android’s documentation has more details.

Using Fragments to Implement Responsive Design

Fragments are the building blocks of Android UIs. They can be programmed either to be standalone screens or to be displayed with other fragments; but the most powerful ones are both, depending on the device that the app is running on. This enables us not only to rearrange the fragments but to move them deeper into the activity stack. Dan McKenzie has written about issues related to designing for big Android screens.


Each component is itself stretchable and scales to screens with similar sizes.


When a screen’s size is drastically different, the components need to be rearranged. They can be rearranged on the same level or moved deeper into the activity stack.

Make The App Look And Feel Android-Like

Consistency with other apps on the same platform is more important for an app’s look and feel than consistency with the same developer’s apps on other platforms. Having the look and feel of apps from a different platform will make the app feel foreign and make users unhappy.

(Remember to read Google’s Android Design guidelines.)

Tabs

In Android apps, tabs should always be on top. This convention was established and is driven by Google’s design of its apps and by guidelines from advocates of Android development. Putting the tabs on top makes scaling an app to larger screen sizes easier. Putting tabs at the bottom of a tablet-sized UI wouldn’t make sense.


Large preview.

Navigating between top-positioned tabs on a phone with a large screen can be difficult, especially when the person is using only one hand. The solution is to enable the user to swipe between tabs. This interaction model is not new, but in its latest release, Google has made it commonplace in Android apps. All bundled apps now support this interaction on tabbed UIs, and users will expect it to work in your app’s tabbed screens, too.

Android UI Patterns Can Put Users at Ease

Some UI patterns have become popular on Android — so much so that they are starting to define the look of Android apps. The action bar, one of the most popular patterns, is now part of Android’s core libraries and can be used in any app running on Android 3.0 and up.

Good third-party libraries are available to bring the action bar to apps that run on older versions of Android. ActionBarSherlock is very stable and supports multiple versions and even automatically uses the native action bar when it detects a supported version of Android.

Another popular UI pattern is the dashboard. Many apps with a lot of functionality use the dashboard as their landing screen to give users a clear overview of and easy access to the app’s most important functionality.


Large preview.

Google Play (left) and Evernote (right) both put an action bar at the top of their screens to provide quick access to contextually relevant actions. Evernote’s landing screen clearly tells the user what they can do with the app, while providing easy access to those actions every time the app launches.

See Dan McKenzie’s article “Designing for Android� for more on the look and feel of Android apps.

Integrate The App With Other Apps

The Android platform provides a powerful mechanism for apps to extend each other’s functionality. This mechanism is called “intents.� Apps can register to receive and launch intents. When an app registers to receive intents, it must tell the system what kind of intents it can handle. Your app could, for example, tell the system that it can show pictures or open Web page URLs. Now, whenever another app launches an intent to view an image or a Web page, the user has the option to choose your app to complete the action.


Large preview.

Social Network Integration

On other mobile platforms, if an app wants to share something to Twitter, Facebook or another social network, it implements the sharing mechanisms internally in the app. Sharing requires a separate operation for each social network. On Android, this can be achieved more easily using intents. An app may launch an intent telling the system that it wants to share an image or text. Depending on which apps the user has installed, the user will be provided with a list of apps that can handle the operation. If the user chooses a Twitter or Facebook client, the client will open to its sharing screen with the text or image prefilled.


Large preview.

There are many benefits to integrating with social networks using intents rather than implementing sharing directly from your app:

  1. Close to zero effort is required to build the functionality.
  2. Users don’t have to log into a separate application. The social network’s app takes care of logging in.
  3. You don’t have to limit the social networks that users may use to share from your app. All apps installed on the user’s device are available to be used.
  4. If a social network’s sharing protocol changes, you don’t have to worry about it. That service’s app will be updated to reflect the changes.
  5. Users might be using an unofficial app for a social network. Using intents, they may continue using their app of choice with the interface they are familiar with.
  6. The intents mechanism offers only options that the user actually uses (i.e. the apps that they have installed). No need to offer Facebook sharing to someone who doesn’t have a Facebook account.

Think of Other Opportunities

Extending the functionality of other apps via the intents system will benefit your app, too. Perhaps your app wouldn’t get used every day and would get buried under apps that are used more often. But if your app extends the functionality of other apps and keeps popping up as an option every time the user wants to perform an action that your app can handle, then it will be thought of more by users.

Intents have limitless possibilities. You can build your own intents hierarchy to extend certain functionality to other apps, in effect providing an API that is easy to use and maintain. You are essentially recommending to users other apps that complement yours and, in turn, extending your app’s features without having to write or maintain any code. The intents system is one of the most powerful features of the Android platform.

Quality Control

With the massive number of devices, testing an Android app is much more difficult than testing an iOS app. This is where the fragmentation causes the most problems. Testing on one or two devices is not enough; rather, you have to test on a variety of screen sizes, densities and Android versions.

In addition to what you would normally test on any other platform, you should the following:

  • Test your app thoroughly on the lowest Android version that it runs on. Accidentally using an API that isn’t actually available at runtime on some devices is easy.
  • Test that the search button works on all relevant screens.
  • Make sure that the D-pad and trackball navigation work on all screens.
  • Test all supported screen densities, or at least extra-high, high and medium. Low-density devices can be difficult to find.
  • Test on at least one tablet device. But try to test on as many screen sizes as possible.

Testing in the Cloud

New services are popping up to ease the pain of testing on multiple devices. Services such as Testdroid enable developers to test their apps on multiple real devices through a Web interface. Simply upload your app’s package and automated testing script, and the service executes your scripts on dozens of devices. Results can be viewed in a Web browser. Examining screenshots from different devices is even possible, to ensure pixel-perfect UIs.

Testdroid cloud screenshot
Testdroid is a cloud service for testing Android apps on multiple devices. Large preview.

Distribute The App

Once your app is tested and ready, you need to get it to users. You’ll have to choose how to do it. Very few Android devices are restricted to one app store. The overwhelming majority of Android devices ship with Google Play, which is the most important route to reaching users on the platform.

Google Play

The Google Play store doesn’t have a formal process for approving apps. Any application package uploaded to Play will appear in the store’s listings to users. App guidelines do exist, but they are enforced only if there are complaints, and even then pretty randomly. This means that your app will be swamped by hundreds of other apps of varying quality.

So, how to rise above the masses and get the attention of users?

The first 30 days are important! Your app will appear in the listing for new paid or free apps during that time. Ranking relatively high in this listing during this time is much easier than ranking high in the overall top lists. Make sure that your app’s website links to Google Play from the start, and use all social networks to tell people about your app’s launch.

Getting recognized as a trusted brand is difficult. Google Play contains many apps that use registered trademarks without permission. Users have come to learn that a logo is no indication that an app was actually produced by that logo’s company. To increase trust, make sure the “Visit Developer’s Website� link points to the official website, and if possible link back to your app from there.


Top new apps on Google Play. Large preview.

Making an app work on all devices is sometimes impossible. Some devices lack the required hardware or simply run an old version of Android for which the required APIs don’t exist. You can list all of the requirements in the app’s manifest file, telling Google Play which devices the app is meant for and, thus, hiding it from listings that are being viewed on incompatible devices. But sometimes even that isn’t enough. In these cases, Google Play allows developers to prevent certain devices from downloading their app. While this option should be used only as a last resort, it is still better than allowing users to download something that you know does not work on their device.

Alternative App Stores

Google Play is not the only place to distribute your app. Amazon’s Appstore has lately gained attention due to the launch of Amazon’s Android-based Kindle Fire tablet. Amazon’s approach is fairly similar to Apple’s in that it has a formal review process. The Appstore is also accessible to non-Amazon devices, but currently only in the US.

Multiplatform app store GetJar also distributes Android apps. GetJar has a lot of users and is a well-known and trusted source, especially among people with not-so-smart phones.

Barnes & Noble’s app store is a US-only eBook-based app store. Unlike Amazon’s, it is accessible only to B&N’s Android hardware.

Multiple App Stores, Just One, or None?

Many people’s first instinct is to try to get their app into all stores. This decision should not be made lightly, though. Distributing through multiple stores might make the app reach more potential users. However, being spread across multiple app stores could prevent the app from ranking as high as it could in the listings for downloads and ratings. Having a thousand installations across three app stores might sound better than having two thousand installations in one store, but maybe those two thousand would push the app into a more visible spot in the store and help it rocket to tens of thousands of installations later.

An app doesn’t have to be in a store at all in order to be installed on devices. Android apps can be installed directly from websites or by transferring them from computer to phone. While you wouldn’t reach the same audience and wouldn’t benefit from the update mechanisms in app stores, there is definitely a place for direct distribution. Using forums and websites, developers can distribute their apps to alpha and beta communities without having to risk their reputation or low ratings in an app store. Distributing a major update or an unstable build to a limited number of dedicated testers and fans might be worth the extra effort.

Conclusion

Building a scalable and functional Android app is not impossible, but it requires careful planning and an understanding of the target platform. A blind approach or simply borrowing a design from another platform would likely end in failure. Achieving a successful end requires that you use Android’s tools correctly and follow the right design approach. Writing an Android app takes effort, but if done right, the app could reach a massive numbers of users.

Further Resources

Intents:

Supporting multiple screen sizes:

Android design:

Useful libraries:

(al)


© Juhani Lehtimaki for Smashing Magazine, 2012.


Hiding visible content from screen readers with aria-hidden

Sometimes you need to hide parts of a web page, either permanently or temporarily. A common use case is content that becomes visible only after the user has interacted with a control on the page, for instance by clicking a button that reveals more content or activating a tab in a tab system.

Hiding content from all users, including screen reader users, is easy – just use display:none. Add visibility:hidden if you want to be extra sure that it is hidden, since Screen readers sometimes ignore display:none. However in some cases you want to hide something from sighted users without hiding it from screen reader users. In those cases you can use the off-screen and clip techniques. But what if you want screen readers to ignore content that is visible?

Read full post

Posted in .

Copyright © Roger Johansson



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