iPhone Means Never Designing For a Mobile Device Again

If you’re like me and a Mac user, you probably were glued to blow-by-blow accounts of Steve Jobs’ Keynote on Tuesday. I didn’t know Apple was going to announce the phone at this time–I was just wanting to know if they were going to update the Mac Book Pro line as I would like a suped up Mac Book that runs on Intel chips so I can run Windows and Mac OS on one machine. 

Instead of news about the laptop line of products, Apple released the news of it’s forthcoming revolutionary product, the iPhone, this past week. 

If you’ve own a cell phone for longer than six months, you should have realized it’s limitations. Unless you use a smart phone, it’s like we are carrying around, for the most part, hard-to-use calculators that have captured the voices of our friends, families and coworkers. The user interfaces are bad, internet connectivity is painful (if you have it), and good luck trying to keep your contact listings in any semblance of order.

After 2.5 years of development, Apple seems to have an overnight hit on their hands. An amazing user interface for an all-in-one device: an ipod, phone and internet communication tool. No more strapping an iPod mini to the cell phone with a rubberband! True integration.

The main point I want to address is the internet communication device. On the iPhone will come with a modified version of Safari that’s running on modern Mac computers. So, if you have a web site right now that works fine on Safari, it should work just fine on the iPhone. 

The catch is that the browser doesn’t support Flash. Well, at this moment anyway. This could change when the browser ships in June, but I’m not really sure that it will. It could be that the developers for the iPhone have pinned Flash-support as a low level priority. Or they’ve looked into Flash support and it may simply drain an already limited battery life (5 hours) even more.

One reason I believe is that the many multimedia-geared web sites like YouTube use Flash to deliver their content. 

If Apple allowed people to view this content through means other than the iTunes-approved method, why on earth would people buy music and videos to then have on their iPhone? Simple. They wouldn’t. And I know I wouldn’t. I already have a stack of CDs in MP3 format. I’m just waiting to get unbusy in order to put them into a system where I can pull them on a home network accessible by just me anywhere in the world.

Lack of Flash support is just one downside in Web development for mobile devices. 

The upside counters the bad Flash news, IMO, since you no longer will have to design a web site version for a mobile device.

If you never had to design a web site or web application for a mobile device, count yourself lucky. It’s somewhat painful to see a beautiful, working piece of art barely looking like it’s former self. 

The news of Apple’s almost-too-good-to-be-true browser on a cell phone proves that a rich internet surfing experience can be placed on a phone. There’s no need to strip down a browser and then put it on a phone. There’s no more need to strip down a web site to make it somewhat usable on a mobile device. Now that Apple has shown the way, its competition will be revving up their own versions. Just like Microsoft did with its Zune to compete with the iPod. 

In the meantime, we will just have to bide our time till the phone is available for sale.

WebVisions 2006

Last week I had the privilege of speaking at WebVisions in Portland. It was my first time at WebVisions and Oregon as well. What impressed me with the conference was the breadth of expertise that was present for such an intimate two-day conference nestled in the beautiful landscape.

As requested, you can download the slides from presentation. These aren’t the exact same slides I showed. I revised them slightly during one of my worst flights on Delta. 

For those who don’t know, I’m 6′7″. I didn’t get an exit row on a midnight flight back home and the dude in front of me reclined his seats into my knees for the next four hours. Instead of seething hatred at a fellow man, I attempted to put that energy into somewhat practical use. Thank goodness for laptops.

While I wasn’t happy about the trip back, I am happy to report that one of my predications from my talk came true. Less than a week after my presentation the announcement came out: Microsoft to Push IE 7 via Automatic Updates.

Does this mean you need to drop everything you are doing and test your web site right now? Honestly, I wouldn’t. For a couple of reasons. One is that even with the next version coming soon, we are still talking about unreleased software. The other reason? Well, if you were in my presentation, you’d know.

After my presentations, I always like it when people come up and talk to me. Not because I usually remember to brush my teeth, but because I like to help people solve web problems if I can. This recent time, however, I felt bad that I couldn’t solve one particular person’s problem on the spot. 

On the very long flight back, I gave some more thought to the problem and quickly whipped up a solution to How to Keep Content within a Second Column Vertically Center in Relation to the First Column. As proof that I’m not quick on my feet, the solution is an easy one: shackling.

What’s Shackling? It’s a term I use for absolute positioning a block level element within the context of relative positioned parent element. And let’s face it, that’s a mouthful. 

To check out the fix, see the solution. Of the two readers I have on my blog, I hope the person that asked about the problem is one of them.

For those that stayed towards the end of the talk, I put on display a little demo that wasn’t IE7 compatible, but I think is cool nonetheless. Combining pseudo-classes :hover on block level elements and :target, it’s a page that was put together so I could test some of IE7’s capabilities. When the test was created, I was excited by the over hype of IE7 that I actually thought it would handle CSS3 selector. Sadly, IE7 fails :target, but the presentation degrades gracefully so the CSS can be applied without having to worry about IE wonkiness. Try it in Firefox or Safari and then in IE for fun and profit.

Lastly, I want to give my thanks to Brad, the whole crew at Hot Pepper Studios and Nick for putting on a good conference. It’s one of the best.

My PNG Image Replacement Method

Recently, I had to tackle a project that required the use of alpha transparency in PNGs. It’s been a while since I needed to work with PNGs—resorting to using GIF’s one-color transparency for several years as a suitable workaround. I never gave PNGs much thought for several years since the developers for Internet Explorer always seemed fail to support it for numerous years.

So I thought this being the new millennium, I’d re-examine what my options were. With a brash sense of naivety, I assumed browser vendors had this problem solved. Why shouldn’t I? Just look at the browsers that support PNGs natively: 

  • It’s been six years since Internet Explorer for Macintosh came out with native support for alpha transparency. 
  • Netscape Navigator now supports PNG. 
  • Even Opera has been supporting PNG for a while. 
  • From the Preview and Beta Releases of Internet Explorer 7, Microsoft looks to release a browser for the PC with native support for PNGs with alpha transparency. Finally.

PNGs, Natively

What do I mean by natively? I mean that by using the ubiquitous img tag (see example), the browser would render a PNG image just as normally as any GIF or JPEG a web developer might use, except that PNGs can come with stupendous alpha transparency:


<img src="alpha.png" alt="Image with alpha transparency" />

While we are waiting for IE7 to launch, everything is still not perfect. Internet Explorer 6 for Windows still doesn’t support PNGs natively. As I wrote earlier, when IE7 does launch, web developers will still have to support IE6 for about a year after the new browser. 

So a solution is needed to provide PNGs natively to the browsers that support them and a workaround solution to the browsers (Internet Explorer 5.5 through 6 for Windows*).

Pre-existing Solutions

And there have been solutions developed to work around the IE5.5–6’s inability to handle PNGs natively. Although, I’m sure there are more, here are a couple: 

I’m sure there are more. If there’s a solution that’s not here and you think it should be, please leave me a message in the comments section. 

Note: These solutions work on Internet Explorer 5.5 and higher because version 5.5 is when the properitary CSS filter property was introduced.

How These Solutions Work

While they are many solutions, there is really just one way these solutions work. In a rudimentary way, here’s how they work:

  1. When you code the page, be sure to set the width and height of the PNG image in the CSS with the width and height property.
  2. As a page is loaded, a piece of JavaScript is executed. 
  3. The script goes through the HTML markup looking for img elements that point to images with the png extension.
  4. Once it finds such an img code, the script dynamically rewrites the HTML on the fly…
  5. The first part of the revision is to replace the PNG image with a single pixel GIF that is transparent.
  6. Next, the PNG file is set in Internet Explorer’s filter property in order to trigger the alpha transparency in that browser. Since the only way this can be done, the PNG gets set in the background. Thus, the need to set the width and height for the image.
  7. Thus, the PNG is shown in the background behind the transparent GIF.

It’s a bit of clever thinking and a nice bit of coding to compliment it.

The Problem with the Solutions 

Even though the solution works, I couldn’t help but think that the solution is based on JavaScript, which users can easily switch off in their browsers. I know in these Web 2.0 times that JavaScript is an expected minimum requirement for people to use AJAX enabled sites. I don’t want to ruin the AJAX crowd’s party, but isn’t there another solution? What if a developer simply wants to use a PNG image—only one PNG image—and making sure a site isn’t dependant on JavaScript? What we need to do is have a way to use PNGs without mandating that site visitors have JavaScript enabled. 

Besides, isn’t using a transparent single pixel GIF really too Web 1.0?

Alpha PNGs Mean Bloating 

Another item to consider is file size. If you look at the filesizes that PNGs with alpha transparency usually have, you will notice that they are usually larger. A PNG image with alpha transparency by its nature to retain the color information about alpha transparency will be a larger file size (see Table on File Size Comparions). Because of this large file size, more times you will find that to limit your use of alpha transparent PNGS. 

File Size Compation for Images

File Type

File Size

Demo

PNG 24-bit

166kb

cssckbk_cover.png

PNG 8‑bit

64kb

cssckbk_cover_8bit.png

JPG

52kb

cssckbk_cover.jpg

GIF

76kb

cssckbk_cover.gif

So, if you find yourself using a multiple 24-bit PNGs, chances are your web page file size is very bloated. If you find yourself using mulitple PNG images, I would ask:

  • Are you sure you need to use all those PNGs?
  • Are your users on fast enough connections to not mind the bloated file size? 

If the answer is “yes” to both those questions, then a JavaScript solution for the PNG dilemma is probably the best solution for you. 

For other situations, we need to think of another solution. 

We need a solution in the same way as we do with the many image replacement methods that are available. In fact, that’s how my proposed solution works—by piggybacking off an image replacement technique and by delivering the appropriate CSS rules we can work around this problem. 

Schmitt PNG Image Replacement Technique

The first part of the solution is to lay the foundation with HTML: 


<h1> 
 <a href="http://www.christopherschmitt.com/">
  <span>Hello, world!</span>
 </a>
</h1>

The next step is to use an image replacement technique to slide the PNG you want to use:


h1 a {
 display: block;
 width: 400px;
 height: 100px;
 background: url(”hello_world.png”) no-repeat 0 0;
 text-indent: -1000em;
}

I saved this CSS rule along with my other styles in schmitt-png-ir.css.

Now, if you stopped here, your web page would render fine in all browsers except Internet Explorer 5 through 6 for Windows. 

Filter Style Sheet 

In order to accommodate those Internet Explorer 5.5−6 for Windows, we need to set up a separate CSS rule that calls Microsoft’s proprietary filter property in order to activate the alpha transparency:


h1 a {
 text-indent: -1000em;
 background-image: none;
 filter: progid:DXImageTransform.Microsoft.
  AlphaImageLoader(src='hello_world.png'),
  sizingMethod='scale');
}

I saved this style sheet as filter.css.

What About 5?

The problem with this solution is that Internet Explorer 5 for Windows neither handles PNGs navitely nor recognizes the filter property. The workaround is to supply that browser with a specialized GIF image that resembles the PNG image’s alpha transparency. 

Since PNGs have 256 shades of transparency and GIFs only have one color that can be assigned as transparency, it’s a little bit of a stretch to mimic alpha transparency. Yet, it is possible. In Photoshop, select File > Save for Web. Then in the select to export the image to GIF. Then select Diffusion Transparency Dither as shown in the screen capture. 

Screen capture of Diffusion Transparncy option

Sure, it’s a bit of a hack, but your visitors will get the idea. And it’s less annoying, in my opinion, than keeping the content from the visitor than showing a browser upgrade message. 

So with the new image, we need to set up a separate style sheet that will deliver the image to Internet Explorer 5 for Windows: 


h1 a {
text-indent: 0;
background-image: url(”hello_world.gif”) !important;
}

I saved this file as winie5.css.

Associating Styles to the Web Page 

Setting up the style sheets is only part of the solution. The other part is just as important: how to associate the files to the web page. 

First, link to a style sheet file that to blank file: 

This screen.css file is basically a launching pad to other style sheets. In this style sheet, I import three important style sheets:


/* master, standards compliant css */
@import url(”schmitt-png-ir.css”);
/* styles for winie5.0 - .gif */
@media tty {
 i{content:””;/*” “*/}}; @import ‘winie5.css’; {;}/*”;}
}/* */
/* styles for winie5.5 - .png */
@media tty {
 i{content:””;/*” “*/}}@m; @import ‘filter.css’; /*”;}
}/* */

The @import rule simply loads the base style sheet which includes the standards-compliant method for calling up the PNG image as a background image. 

The first @media rule is a hack that lets only Internet Explorer for Windows 5 import the winie5.css file. Developed by Tantek, the IE5/Windows Band Pass Filter works like a charm.

The second @media rule is another, similar hack called IE5.5/Windows Band Pass Filter. This time only Internet Explorer for Windows 5.5 imports the filter.css file which triggers the Microsoft filter property. 

You can go through the code for the final screen.css here.

What About Internet Explorer 6?

Unfortunately, there isn’t a unique High Band Pass Filter just for Internet Explorer for 6. The solution to deliver the appropriate style sheet to that browser is to use conditional comments. Conditional comments is another Microsoft proprietary extension to browsers. It allows developers to target specific Internet Explorer browsers to render HTML code while other browser will ignore the code. 

To use the conditional comments, I go back to where the link tag used to associate the screen.css file tothe web page. Below that HTML code, I use the conditional comments to let only Internet Explorer 6 for Windows pick up the filter.css.


<link rel="stylesheet" type="text/css" href="screen.css" />
<!–[if IE 6]></strong>
<link rel="stylesheet" type="text/css"  href="filter.css" />
<!–[endif]–> 

With that, all modern browsers that can handle a alpha transparency in PNG images will get the PNG image or get a GIF image instead.

The Proof

Does the solution work? Test out the example page on your own with various browsers or take a look for yourself at these screenshots: 

Benefits

Here’s a listing of the benefits in this solution: 

  • Does not require JavaScript in order to work
  • An extension of image replacement techniques, easy to implement and understand 
  • Works in versions of IE that don’t handle PNGs natively (Internet Explorer for Windows 5–6)
  • Works with any PNG capable browser’
  • Does not require a transparent, single pixel GIF 

Cons

Note that the first three items in this list are disadvantages based on Microsoft’s filter property and not the solution itself. 

  • Does not work on inline PNG images
  • Works only on background images
  • PNG images won’t tile
  • Doesn’t work in Internet Explorer 7 Beta 2

What about Internet Explorer 7 for Windows? 

As mentioned earlier, Internet Explorer 7 for Windows handles PNGs natively and therefore can handle the standards based rule without needing to use the CSS “filter” rule. Since there’s no need for WinIE7 to use the filter rule, there’s no need to pass it on. 

However, based on testing for this solution, Internet Explorer 7 Beta 2 for Windows appeared not to accept the PNG IR technique. If someone wants to test the set up and make modifications to the technique, please do and let me know about it. Until it Internet Explorer 7 for Windows launches, I’m not going to bother unless I have a free moment or two to try some things out. 

My overall attitude to browser software in beta has been soured since the Netscape Navigator 3 and 4 betas. As a result. I don’t actively test web sites on browser betas no matter how many times these browser developers tell us their code is “layout complete“. If it’s beta, it means it’s not complete and will always, always have changes until it comes out.

How Long Will We Need a PNG Workaround?

In my article about the adoption rate of Internet Explorer 7, I made the assumption that Internet Explorer for Windows 6 will be around for a while. Based off the launch and staying power of Internet Explorer 5 for Windows, I’m expecting the workarounds for PNGs will have to last for a year after the launch of IE7. 

In Conclusion

Instead of a solution that acts like a hammer in replacing every instance of a PNG, we need a solution that acts like a small screwdriver. By isolating one or a few images that can be PNGs, we have a solution that works best for sites that do not need or want to be dependent on JavaScript. 

The Adoption Rate of Internet Explorer 7

Web developers and designers have been dealing with the shortcomings of Internet Explorer 5+ for Windows for the last few years. Working around problems like the box model, double float margins, and so on have caused too many a designer migraine. 

The promise of the numerous CSS enhancements in Internet Explorer 7 should put to the rest (most of) all hacks and workarounds. 

With the WinIE7, the question arises: “When will Internet Explorer 7 get here?” Sure, we have the conference promoting the browser with the necessary promotional material, but when will others outside our industry start using the IE7? When will this new browser become something web developers will absolutely need to worry about when crafting their site designs? 

Refining the Question

Depending on whom you ask (and when you asked), the release of Internet Explorer 7 will be arriving along with Windows Vista in January 2007. (Well, that’s the last I read about the launch date anyway.) 

So, is January 2007 the date and time web developers need to make sure everything is ready to go for WinIE7?

While web developers will be the first to adopt the browser (if they haven’t already started tweaking with the beta release), a browser doesn’t simply come out of beta on Day 1 and start massaging the pulsating temples of weary web developers. It takes time for market penetration.

So, the questions is, “when will your users start using Internet Explorer 7?”

Finding the Answer

One way of estimating when to care about Microsoft’s new browser is to find more about the adoption rate of the current Internet Explorer over its predecessor. In other words, how long did it take for IE6 to make a difference over IE5? (For the purpose of this article, I’m combining IE5.5 with IE5.) 

According to Wikipedia, Internet Explorer came out in August 27, 2001. Yes, you read that right. It’s been five years between major browser versions, if IE7 launches this year. 

Now knowing the launch date of the browser, I needed some site statistics around the same time that IE6 launched. 

Since I haven’t been running my own site in a consistent fashion–one year it’s a blog, one year it’s a static page, then the next year it’s a static page, now it’s a blog in need of a redesign–I couldn’t use my own site statistics.

I came across a couple of sites that publish an archive of their browser statistics. If you have been a web developer for some time, I’m sure you’ve come across their material as well.

The first site I came across was W3C Schools. They thankfully have set their statics in a nice table making it easy for me to skim for the information I was looking for. 

Their browser stats shows that in 2002, IE6 support went from 30% to over 50% in the span of eleven months. At the same time, IE5 went from over 50% to less than 30% in usage. However, their statistics start after the launch of IE6. So, while interesting to note, the data is not much help to answer the question.

The next site I looked at was Engineering WorkStations from University of Illinois at Urbana-Champaign.

Internet Explorer Browser Statistics from EWS Web Server
Time  WinIE5(%)  WinIE6(%)  WinIE5 %Drop WinIE6 %Rise
Aug-01  90.6

na

Na

Sep-01  85.1 9.5 ‑5.5 9.5
Oct-01  80.4 14.8 ‑4.7 5.3
Nov-01  76  19.4 ‑4.4 4.6
Dec-01  71.3 24.6 ‑4.7 5.2
Jan-02  66.8 29.4 ‑4.5 4.8
Feb-02  62.2 34.6 ‑4.6 5.2
Mar-02  59.2 37.8 ‑3 3.2
Apr-02  55.3 42.1 ‑3.9 4.3
May-02  52.8 44.8 ‑2.5 2.7
Jun-02  49.8 47.9 ‑3 3.1
Jul-02  49.3 48.8 ‑0.5 0.9

Sep-02  43.6 55.1 ‑3.2 3.5
Oct-02  41.2 57.6 ‑2.4 2.5
Nov-02  39.3 59.7 ‑1.9 2.1

Some Analysis (Or, Truly Wild Assumptions)

  • IE6 registered almost 10% share in its second month.
  • The average drop in Internet Explorer 5 was 3.42%.
  • The average rise in Internet Explorer 6 adoption was 3.98%.
  • It took about a year before Internet Explorer 6 overtook version 5 as the main browser.

What’s interesting to me is how fast Internet Explorer 6 became on the radar for EWS. This could be for a lot of reasons we’re not privy to, but if I did have to guess as to the cause of the early adoption rate, I would wager it’s that the researchers at an engineering school are more inclined to update their machines than most of corporate America. 

So, if we are to care about making our sites suitable for IE7, we have one month after the launch of IE7 to get the sites tested and prepared before not doing anything becomes a serious problem. Also, it will mean we will have to support the IE6 for at least a year after IE7’s release.

But even with the strong adoption, it still took a year for Internet Explorer 6 to become the dominant browser. (If you are Microsoft, you didn’t care because you own both IE5 and 6.) 

What’s Your Number?

These statistics give a biased result. Like the W3C Schools, this EWS source probably serves a technical savvy audience. And they work great for EWS. Since they are their statistics, they can make predictions and plans based off them without fear they are off. For the rest of us, that’s not the case.

To get hard date for your own site, you will check the log files to determine what browsers are being used. Make the determination of when you should start preparing for Internet Explorer 7.

So, if you have a site that’s been around since August 2001. Take a look through your own log files and discover the adoption rate of IE6 over IE5. 

  • How long did it take for IE6 to gain 5% browser share? 10%?
  • How long did it take for IE6 to become the dominant browser your visitors use?

Once you find out the answers, please post them in the comments to let myself and other people know too.

The Movie Industry Gets It Half-Right

screencapture of movielink.com

I applaud the developments of the movie industry to allow the downloading of movies through a new venture called Movielink.

The mere existence of this initiative doesn’t help their arguments made during the 2006 Oscars: nothing replaces the magic of going to the movies and that downloading movies therefore is like reading a graphic novel of a classic book.

But at least the movie studios realize that argument isn’t going to work on people paying through the nose for high-speed Internet connection. Also, the masses are going to go after what they want, even if Widescreen is better than Fullscreen. 

Welcome to the future, Movie Industry. Sort of. 

While you are actually acknowledging the desires of your customers by creating this service, you’re not quite there as evidenced by this warning message I received when I tried to use the site (emphasis is mine):

Sorry, but as of May 2, 2005, Movielink no longer supports Windows 98 and ME operating systems. Movielink also does not support Mac or Linux.

In order to enjoy the Movielink service, you must use Windows 2000 or XP, which support certain technologies we utilize for downloading movies.

I’ll grant the movie industry some slack in acknowledging that most people are using a flavor of Microsoft OS including, I don’t know, say, movie studio bosses. However, movie studios are denying so many people by relying on technology that’s OS-specific. Open up the system in order it works with other systems. Why? It means more customers. 

If the only hurdles are the cost of software and servers, think about how much money was spent on Waterworld. Spare your customers another mega-motion picture failure and, instead, recreate your business model. In the end that would truly be great movie magic.

Fart Bucks

People work to get paid. That’s pretty straightforward, right?

People talk about how much money they make in terms of time. It’s mostly in units of years and hours. For years, it’s something like 40k, 20k, 100k, etc. For hourly, there’s $10 an hour or $7.25 an hour.

So, one day I thought, wouldn’t it be interesting to calculate people’s salaries based on seconds not years or hours. Just doing the same thing everyone does, but using a unit of time that people really don’t operate in for the most part. (Sure, you may say, “wait a second” but it’s really longer than a second.)

And that’s when I thought, if I’m stretching the concept of how much you make per a second, I would need some other symbol to help represent that unit of time. It would be okay to create a JavaScript-powered clock that would display how much a second of work time means to you, but who would seriously check that out? It’s a clock.

So, I needed to something that took place in a second of time, but was somewhat universal in nature. Something that everyone did or could easily understand… Bingo! 

That’s when I came across the idea of using farts.

Farts can last a second or even longer. In fact, I would say farting is a great social equalizer. Everyone does it. (Except you. I would never say or think you would ever fart.) 

But then I thought, hey, you know celebrities make an awful lot of money. And so do politicians. Why not showcase how much they make per second by way of fart noises? It would be such an absurd, almost surreal thing to see! 

I threw together some quick Photoshop mockups and tried to learn some Flash to pull it off. Thus Fart Bucks was born. 

screen capture of Fart Bucks

Some time ago I stopped working on Fart Bucks, but I always felt it could have been so much more than what it is. I even made a list.

The following is the list of items I felt could make the project better:

  • Musical score, especially during the introduction. Maybe the addition of some original, ambient-spacey music could be created with GarageBand. 
  • Incorporate non-celebrity people and their jobs. Comparing, say, a waitress’s salary with that of a Kobe Bryant might be an interesting contrast and might people some pause. Or maybe not. 
  • Place yourself or a friend within Fart Bucks. Files this under Web 2.0, but I always thought Fart Bucks would be closer to what I had envisioned if people could upload photos of themselves or friends, loved ones, victims. It would be an instant personal farting machine. Sure, it might be used by mostly by guys (teenage boys, college dudes and guys bored in cubicles), but I’m sure that’s a big demographic, right? I’m looking at you, Trey and Matt, to back me up. After you would load up an image of yourself or someone you would know, you would be able to get a link of the Fart Bucker™ to bookmark and/or email it.

If you feel like you want to add to Fart Bucks, please do. Feel free to download and modify. I’ve placed the contents of Fart Bucks I’ve made under a Creative Commons license.