A little about Vernon...

Hey there everybody, I’m Vernon. I’ve been a full-time freelance web designer since 2002 and can honestly say it’s been a great journey.

If you’re interested, take a look at my services site and let me help you with your project.

You are currently browsing the archives of the Development Tips category.

1

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Context is KingWe’ve all heard the following, “Content is King”.  Content is nice, but thanks to Cameron Moll I think the new saying should be, “Context is King”.

As some of you know, I’ve recently acquired a copy of Cameron Moll’s Mobile Web Design book.  I also have a full project load and am getting ready to sell my home so I haven’t had a ton of time to dig into it.

However, one section completely fascinated me.  Not necessarily because it was something I didn’t know, or because it was an in-depth revelation.  It fascinated me because it is so very true, but we don’t hear much about it.

This understanding has great relevance in mobile web design (let’s face it, what’s the good of content if a user can’t see it) but can extend far beyond to it’s Internet relative.

Remember, the mobile web is not the Internet on your phone.  The mobile web opens up new opportunities and challenges, for developers and users, to make our lives just a little bit easier and more productive.

Your content is of little value to users if it ignores the context in which it is viewed, manipulated, and processed.

Cameron Moll - Mobile Web Design

When you take something “out of context”, you are ignoring the surrounding conditions - whether words or graphics.  Unless you keep your site in context, you are going to ignore the surrounding conditions - namely your users.

Most users who access mobile content are accessing it on the go.  Let’s face it, would you sit at home and browse on your phone rather than your desktop or laptop computer?

This means a couple things… intermittent behavior, small screen viewing, and most likely one-handed use.  Adding links to phone numbers to invoke a phone call, or a link that will add contact details to a visitors address book are just a couple ways to keep your mobile content in context. 

C. Enrique Ortiz has a nice white-paper mobile context that’s a recommended read.

Your big idea will ultimately be of little value if it ignores the context in which users interact with your big idea. … Ask yourself, what is relevant to my users and the tasks, problems, and needs they may encounter while being mobile?

Cameron Moll - Mobile Web Design

Tags: , , ,

0

Google Introduces OpenSocial
November 2nd, 2007

Today, Google introduced OpenSocial, a set of common APIs that make it easy to create and host social applications on the web.  This will allow you to write an application once that will run anywhere that OpenSocial API’s are supported.

This will make it easier for you to focus on making your web apps better and it makes it better for users because they get more apps in more places.  Members of the OpenSocial community include: MySpace, Engage.com, Friendster, hi5, Hyves, imeem, LinkedIn, Ning, Oracle, orkut, Plaxo, Salesforce.com, Six Apart, Tianji, Viadeo, and XING.

OpenSocial is built upon Google Gadget technology, so you can build a great, viral social app with little to no serving costs. With the Google Gadget Editor and a simple key/value API, you can build a complete social app with no server at all. Of course, you can also host your application on your own servers if you prefer. In all cases, Google’s gadget caching technology can ease your bandwidth demands should your app suddenly become a worldwide success.

OpenSocial - Google Code

Tags: , , ,

0

PHP Email Address Encoder
April 4th, 2007

This small PHP function will give you an easy way to encode any email address using Character Entities. Just supply the function call with an email address and get the encoded version returned. Most any browser will properly read and translate your email without a problem and without any further action on your part.

Just make a nice call to the function whenever you want to show your email. Such as...

PHP:
  1. <a href="mailto:<?php encode_email('you@yourdomain.com'); ?>"><?php encode_email('you@yourdomain.com'); ?></a>

Here's the function code:

PHP:
  1. <?php
  2. function encode_email($email) {
  3.     //transform email to lowercase
  4.     $email = strtolower($email);
  5.     //separate characters of email into an array
  6.     // str_split() only available in PHP 5
  7.     $email = str_split($email);
  8.     //loop through string and encode as necessary
  9.     foreach($email as $ekey => $evalue) {
  10.         switch($evalue) {
  11.             case 'a':
  12.                 $encoded_email .= "&#097;";
  13.                 break;
  14.             case 'b':
  15.                 $encoded_email .= "&#098;";
  16.                 break;
  17.             case 'c':
  18.                 $encoded_email .= "&#099;";
  19.                 break;
  20.             case 'd':
  21.                 $encoded_email .= "&#100;";
  22.                 break;
  23.             case 'e':
  24.                 $encoded_email .= "&#101;";
  25.                 break;
  26.             case 'f':
  27.                 $encoded_email .= "&#102;";
  28.                 break;
  29.             case 'g':
  30.                 $encoded_email .= "&#103;";
  31.                 break;
  32.             case 'h':
  33.                 $encoded_email .= "&#104;";
  34.                 break;
  35.             case 'i':
  36.                 $encoded_email .= "&#105;";
  37.                 break;
  38.             case 'j':
  39.                 $encoded_email .= "&#106;";
  40.                 break;
  41.             case 'k':
  42.                 $encoded_email .= "&#107;";
  43.                 break;
  44.             case 'l':
  45.                 $encoded_email .= "&#108;";
  46.                 break;
  47.             case 'm':
  48.                 $encoded_email .= "&#109;";
  49.                 break;
  50.             case 'n':
  51.                 $encoded_email .= "&#110;";
  52.                 break;
  53.             case 'o':
  54.                 $encoded_email .= "&#111;";
  55.                 break;
  56.             case 'p':
  57.                 $encoded_email .= "&#112;";
  58.                 break;
  59.             case 'q':
  60.                 $encoded_email .= "&#113;";
  61.                 break;
  62.             case 'r':
  63.                 $encoded_email .= "&#114;";
  64.                 break;
  65.             case 's':
  66.                 $encoded_email .= "&#115;";
  67.                 break;
  68.             case 't':
  69.                 $encoded_email .= "&#116;";
  70.                 break;
  71.             case 'u':
  72.                 $encoded_email .= "&#117;";
  73.                 break;
  74.             case 'v':
  75.                 $encoded_email .= "&#118;";
  76.                 break;
  77.             case 'w':
  78.                 $encoded_email .= "&#119;";
  79.                 break;
  80.             case 'x':
  81.                 $encoded_email .= "&#120;";
  82.                 break;
  83.             case 'y':
  84.                 $encoded_email .= "&#121;";
  85.                 break;
  86.             case 'z':
  87.                 $encoded_email .= "&#122;";
  88.                 break;
  89.             case '0':
  90.                 $encoded_email .= "&#048;";
  91.                 break;
  92.             case '1':
  93.                 $encoded_email .= "&#049;";
  94.                 break;
  95.             case '2':
  96.                 $encoded_email .= "&#050;";
  97.                 break;
  98.             case '3':
  99.                 $encoded_email .= "&#051;";
  100.                 break;
  101.             case '4':
  102.                 $encoded_email .= "&#052;";
  103.                 break;
  104.             case '5':
  105.                 $encoded_email .= "&#053;";
  106.                 break;
  107.             case '6':
  108.                 $encoded_email .= "&#054;";
  109.                 break;
  110.             case '7':
  111.                 $encoded_email .= "&#055;";
  112.                 break;
  113.             case '8':
  114.                 $encoded_email .= "&#056;";
  115.                 break;
  116.             case '9':
  117.                 $encoded_email .= "&#057;";
  118.                 break;
  119.             case '&':
  120.                 $encoded_email .= "&#038;";
  121.                 break;
  122.             case ' ':
  123.                 $encoded_email .= "&#032;";
  124.                 break;
  125.             case '_':
  126.                 $encoded_email .= "&#095;";
  127.                 break;
  128.             case '-':
  129.                 $encoded_email .= "&#045;";
  130.                 break;
  131.             case '@':
  132.                 $encoded_email .= "&#064;";
  133.                 break;
  134.             case '.':
  135.                 $encoded_email .= "&#046;";
  136.                 break;
  137.         }
  138.     }
  139.     //echo encoded email
  140.     echo $encoded_email;
  141. }
  142. ?>