<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Carsonified &#187; Browsers</title>
	<atom:link href="http://carsonified.com/blog/category/dev/browsers/feed/" rel="self" type="application/rss+xml" />
	<link>http://carsonified.com</link>
	<description></description>
	<lastBuildDate>Fri, 12 Mar 2010 18:20:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>You-Centric: The Future of Browsing</title>
		<link>http://carsonified.com/blog/dev/you-centric-the-future-of-browsing/</link>
		<comments>http://carsonified.com/blog/dev/you-centric-the-future-of-browsing/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 16:53:33 +0000</pubDate>
		<dc:creator>Aza Raskin</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[fowa-london-09]]></category>

		<guid isPermaLink="false">http://carsonified.com/?p=3554</guid>
		<description><![CDATA[By <strong>Aza Raskin</strong><br />In this talk at The Future of Web Apps London, Aza Raskin talks about the future of browsers. He discusses &#8230;

YOU-Centric browsing
How browsers will manage your identity
Browsers with native natural language processing
Built-in payments in browsers

By the way, hope you can join us at &#8230;



]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fyou-centric-the-future-of-browsing%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fyou-centric-the-future-of-browsing%2F" height="61" width="51" /></a></div><p>In this talk at <a href="http://events.carsonified.com/fowa/2009/london">The Future of Web Apps London</a>, Aza Raskin talks about the future of browsers. He discusses &#8230;</p>
<ol>
<li>YOU-Centric browsing</li>
<li>How browsers will manage your identity</li>
<li>Browsers with native natural language processing</li>
<li>Built-in payments in browsers</li>
</ol>
<p><em>By the way, hope you can join us at &#8230;</em></p>
<p><a href="http://events.carsonified.com/fowa/2010/miami"><img src="http://carsonified.com/wp-content/uploads/2009/09/470_fowa_miami_2010.png" alt="Banner for FOWA Miami 2010" /></a></p>
<p><span id="more-3554"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="471" height="259" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7021476&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=eb6f00&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="471" height="259" src="http://vimeo.com/moogaloop.swf?clip_id=7021476&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=eb6f00&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=3554&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/dev/you-centric-the-future-of-browsing/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Silverlight for PHP Developers</title>
		<link>http://carsonified.com/blog/carsonified/features/silverlight-for-php-developers/</link>
		<comments>http://carsonified.com/blog/carsonified/features/silverlight-for-php-developers/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 15:00:16 +0000</pubDate>
		<dc:creator>Mark Quirk</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://thinkvitamin.com/?p=974</guid>
		<description><![CDATA[By <strong>Mark Quirk</strong><br />A Microsoft browser plug-in might seem an odd target for the PHP developer, more used to working with open source platforms such as Linux, Apache and the MySQL database server. However there is much about Microsoft Silverlight that makes it a good match to such technologies. For a start, it is a free download and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Ffeatures%2Fsilverlight-for-php-developers%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Ffeatures%2Fsilverlight-for-php-developers%2F" height="61" width="51" /></a></div><p>A Microsoft browser plug-in might seem an odd target for the PHP developer, more used to working with open source platforms such as Linux, Apache and the MySQL database server. However there is much about <a href="http://silverlight.net/">Microsoft Silverlight</a> that makes it a good match to such technologies. For a start, it is a free download and there are versions that run not only on Microsoft Windows XP and Vista but also on Intel-based Apple Macs running OS X 10. It is designed to work not only with Microsoft Internet Explorer but with all major Web browsers, and Microsoft is taking particular care to ensure compatibility with Firefox and Safari. There is even a version for Linux called Moonlight which is being developed as part of the open source Mono Project.</p>
<p>Silverlight is a powerful tool for creating Internet applications that go considerably beyond the capabilities of standard HTML and CSS. It supports a wide range of visual effects and has more than 30 user interface controls built-in, including not only buttons, list boxes and sliders but also a data grid and a calendar. It can display PNG and JPEG image files, and play back WMV, WMA and MP3 media with support for 720p HDTV display modes. Silverlight 1.0 was released in April 2007. The current version is Silverlight 2.0 (originally referred to as Silverlight 1.1) which is fully compatible with the original while offering many enhancements.</p>
<p><strong>Inside a Silverlight application</strong><br />
You define the application that you want Silverlight to present using XAML (eXtensible Application Markup Language). This is based on the XML specification and was designed by Microsoft for initialising structured values and objects. The following XAML document declares a Canvas object containing a TextBlock, which is a lightweight element for displaying text:</p>
<p><img src="http://img.skitch.com/20090316-xse1yrc13d6e36e36y3u9qeei6.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>The visual elements that make up a Silverlight application need to be placed within a container object, and this provides a reference in which they can be positioned. In our example we are using a Canvas object measuring 300 by 100 pixels as the container and we have set its Background property so that it displays in a light blue color. Into this we have placed a single TextBlock object which will display the traditional ‘Hello World!’ text string in a Verdana font 30 pixels in size and 10 pixels below and to the right of the top-left corner of the Canvas object. Note the dot syntax that we have employed to reference properties of the Canvas object.</p>
<p>Actually displaying a Silverlight application within an HTML page need involve little more than a standard Object tag. At its simplest, the following renders our example within a browser:</p>
<p><img src="http://img.skitch.com/20090316-j3piqiwe4gyqjy6dptm64y64k1.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>Here we have defined a space 300 pixels wide and 100 pixels wide in which to place the Silverlight plug-in, as defined by its MIME type. We have also defined a data attribute for the plug-in. In practice this is usually ignored but it can boost performance with some browsers (and note that the trailing comma is necessary as the attribute takes two parameters, the second having a ‘null’ value in this case). Finally, in the event that the client does not have Silverlight 2.0 installed, the anchor element displays a ‘Get Silverlight’ image from the Microsoft Web site which is linked to the page from which the user can download and install the plug-in.</p>
<p>The Silverlight plug-in takes a number of parameters but in this context the most important is ‘source’ which tells the plug-in where to find the application. In this case we are directing it to the file ‘silverlightapp.xml’. If this was to contain the XAML of our earlier example in simple text form, and both these files were uploaded to a directory on your Web server, then opening the HTML page would result in our ‘Hello World!’ application appearing to the top-left of your browser.</p>
<p>The XAML that defines the Silverlight application need not reside in a separate file. It can instead be defined within the page that instantiates the plug-in using a special script block. For example, we could insert the following immediately before the ‘pluginHost’ div block in our HTML page above, which also shows off some of the special effects supported by Silverlight:</p>
<p><img src="http://img.skitch.com/20090316-1d6e137qymm1th7b2d3h234m6n.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>We reference this XAML block by changing the ‘source’ parameter for the Silverlight1 object as follows:</p>
<p><img src="http://img.skitch.com/20090316-btpmx13k73gxmk79g7tfrmsiep.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>The hash character indicates that what follows references a script block on the current page. The other principle difference between this and our earlier XAML example is that we have placed a Rectangle object on the Canvas. This is a Shape element, as is the Line, Ellipse, Polygon and Polyline, and as such supports a wider range of display options. The RadiusX and RadiusY attributes round the corners of the Rectangle, while the Fill property allows us to specify a Brush object. In this case we have used the LinearGradientBrush to shade the Rectangle in a graduated blend of yellow and light blue.</p>
<p>Most of the other parameters supported by the Silverlight plug-in can be ignored at this stage. However ‘minRuntimeVersion’ can be useful if you want to ensure, for example, that version 2.0 is installed rather than version 1.0. This can be accompanied by ‘autoUpgrade’ which means that an attempt should be made to upgrade automatically in the event of too early a version being found. There is also the ‘OnLoad’ parameter which can specify a JavaScript function that should be run once the plug-in is loaded (more on that later).</p>
<p>If you want to know more about the options available when instantiating Silverlight, then the article ‘Instantiating a Silverlight Plug-in’ from Microsoft’s MSDN Library is a good place to start.</p>
<p><strong>Using PHP with Silverlight</strong><br />
For the PHP developer, the important point is that the source for the Silverlight object can be anything that returns XAML, and that includes a PHP script. This opens up many possibilities. For example, the following PHP page uses Silverlight to display data extracted from a MySQL database:</p>
<p><img src="http://img.skitch.com/20090316-cmbi1kr98aatyr7sya9378x2k6.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>Assuming this is part of the page ‘customers.php’ on our PHP server, then calling it with the following URL would cause Silverlight to display the name, city and postcode of the 134th customer in the database:</p>
<p>http://myserver.com/customers.php?ID=134</p>
<p>Having extracted the ID value from the query string, the code opens a connection to the database and then runs a query which gets the data for the customer specified and places it in the object $result. The function mysqli_fetch_array() extracts the data from $result into the array $row, from where it can be read and inserted into the XAML using the echo command.<br />
This is far from production code, with little in the way of error checking, but it does serve to demonstrate how PHP can be used to generate a Silverlight application. For the sake of simplicity our example embeds the XAML within the page that instantiates the Silverlight control, but you could equally specify a PHP page as the source for the Silverlight control itself, as in the following snippet:</p>
<p><img src="http://img.skitch.com/20090316-xmwm5x3pqk67k11mpaty7fibx5.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>All that is required here is that the page clients.php return valid XAML code that can be rendered by Silverlight.</p>
<p><strong>Adding user interaction with JavaScript</strong><br />
The Silverlight plug-in exposes a JavaScript API that allows any XAML element can be manipulated by JavaScript, in much the same way that you would program against the HTML Document Object Model (DOM) exposed by the page. Furthermore, Silverlight boasts a wide range of programmable events which opens up many possibilities for user interaction.</p>
<p>For example, in the following we have added an ‘x:Name’ attribute to the TextBlock element. This allows JavaScript to access and manipulate the element using the findName function. We have also attached an event handler stating that the JavaScript function changeText should be executed if the user depresses the left mouse button while the pointer is over the Canvas element:</p>
<p><img src="http://img.skitch.com/20090316-d4mf3ka6yd56ei2yq41g9rhyub.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>We can now define the changeText function by adding the following to the page that instantiates the Silverlight object:</p>
<p><img src="http://img.skitch.com/20090316-11nsrcpdrh4mdtatje4w2t9964.png" alt="Code example. Click link below to donwload actual text."></p>
<p><a href="http://thinkvitamin.com/wp-content/uploads/2009/01/silverlight-code.zip">Download complete code example</a></p>
<p>This script locates the element we want to manipulate using the findName function, and then sets its Text attribute to change from ‘Hello World!’ to ‘Goodbye!’ when the Canvas is clicked. One important point to note here is that the JavaScript is interpreted by the browser and not by the Silverlight plug-in. The x:Name attribute provides a handle that allows the findName function to reach into Silverlight for objects declared within the XAML code.</p>
<p>You can use these techniques to respond to a wide range of events. The API allows you to respond to simple movements of the mouse, or when the mouse pointer enters or leaves an object. You can respond to the depression of the left mouse button, and when it is released. Most objects respond to key up and key down events as well, and there are facilities for determining the key combination. The TextBox control supports a TextChanged event, while the PasswordBox control supports a PasswordChanged event and the Button control supports a Click event</p>
<p>One of Silverlight’s great strengths is this ability to manipulate anything you declare in your XAML code through a coherent object model. Check out the Silverlight Developer Center in the MSDN Library for a comprehensive reference to the whole API.</p>
<p><strong>Interacting with a PHP Web Service</strong><br />
Most of the techniques discussed so far work with both versions of Silverlight. However Silverlight 2.0 opens up new possibilities for client-side processing as it includes a version of the .NET Framework and the Common Language Runtime (CLR) which allows it to run client-side code written in C#, Visual Basic and many other languages. The code for such programs is compressed into a single ZIP file together with the XAML definition and a manifest (also written in XML). The result is given the file extension XAP and referenced through the plug-in’s source parameter in the same way as we referenced our XAML file in the example above. When the page containing the plug-in is opened by the client, the XAP file is downloaded and unpacked, and then the code is compiled and executed.</p>
<p>This opens up further opportunities for the PHP programmer as such applications can make calls to Web services, and those Web services can be defined in PHP. For such an application to work the service has to be SOAP 1.1 compliant, and you will need to define a clientaccesspolicy.xml file if the service comes from a different domain to the application. This is to prevent cross-site forgery (see the article Making a Service Available Across Domain Boundaries for more on this).</p>
<p>It is also worth noting that Silverlight 2.0 also includes the Dynamic Language Runtime (DLR) which supports IronPython, IronRuby and Managed JScript. These languages are being developed at Microsoft’s open source project hosting site Codeplex. For further details see Silverlight Dynamic Languages SDK.</p>
<p><strong>Choosing the Right Tools</strong><br />
While not a requirement, Microsoft has released a number of tools that would be useful to the PHP developer looking to work with Silverlight. Microsoft Visual Web Developer 2008 Express Edition is a useful Web page designer with full support for CSS, JavaScript and AJAX. It can also be used with Silverlight Tools for Visual Studio 2008 to automate production of much of the infrastructure behind a Silverlight application. Both can be downloaded from the Microsoft Web site free of charge.</p>
<p>Microsoft Expression Blend 2 is a professional graphic design tool that outputs XAML, allowing designers to create attractive user interfaces and to automatically generate the code required by Silverlight for its display. Alternatively increased support from the community means there are a growing number of third party XAML editors out there as well.</p>
<p>Sitting alongside Blend 2 is Microsoft Expression Web 2. Aimed at the professional Web designer, this latest release introducing many features that have been designed specifically for the PHP developer. There are menu options for inserting common PHP snippets, including pre-defined form, URL and session variables, server side includes and other structures. Furthermore, Expression Web 2 will render the page in Design View as though all the code, including server side includes, were in a single file, allowing you to see your code in action without leaving the editor.</p>
<p>Expression Web 2 understands PHP which means it will colour code language constructs intelligently, and there is full support for auto-completion so that you can see what functions and parameters are available to you as you write the code. Expression Web 2 also includes the PHP 5.2.5 runtime which you can use locally as a development server.</p>
<p>So Silverlight has a great deal to offer the PHP developer &#8211; something that Microsoft is clearly recognising with its support for PHP in Expression Web 2. Trial versions of Microsoft’s Expression range are available for download.</p>
<p>[Main image by Pathfinder Linden]</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=974&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/carsonified/features/silverlight-for-php-developers/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>How To Solve A Problem Like The Browser</title>
		<link>http://carsonified.com/blog/dev/how-to-solve-a-problem-like-the-browser/</link>
		<comments>http://carsonified.com/blog/dev/how-to-solve-a-problem-like-the-browser/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 10:13:29 +0000</pubDate>
		<dc:creator>Jeremy Baines</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/webapps/how-to-solve-a-problem-like-the-browser</guid>
		<description><![CDATA[By <strong>Jeremy Baines</strong><br />The internet would never have become the phenomenon it is today without the web browser; the simplicity of the browser concept allowed the Web to grow rapidly. Developers just had to write basic text documents using a simple markup language (HTML) and the browser took care of everything. As websites became web applications developers still [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fhow-to-solve-a-problem-like-the-browser%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fhow-to-solve-a-problem-like-the-browser%2F" height="61" width="51" /></a></div><p>The internet would never have become the phenomenon it is today without the web browser; the simplicity of the browser concept allowed the Web to grow rapidly. Developers just had to write basic text documents using a simple markup language (HTML) and the browser took care of everything. As websites became web applications developers still did not have to deal with the complex task of building client applications in the traditional sense: make it work in a browser and anyone can access it without having to install any new software, no matter what device (or OS) they are using.</p>
<p>While the browser makes life easy in many ways for developers it also throws up certain challenges. Major software companies such as Microsoft, Adobe and Google are now trying to address these challenges, albeit in different ways. This article will focus primarily on the option of building desktop applications, what the key drivers and considerations are, and how this may affect the future of the web browser.</p>
<h3>What are the Challenges?</h3>
<p>The recent launch of Google’s web browser is the latest shakeup in the browser wars that have raged for over a decade. Of course, competition has been good for the evolution of the Web, by bringing us new technologies such as CSS and Ajax and driving adoption of web standards, but there has been some negatives.</p>
<p>The inconsistencies between browsers have always been a major headache for developers. What works in one browser doesn’t always work in another or, worse yet, works differently. Many of the latest web applications now utilise Ajax for a superior user experience, but unfortunately Ajax libraries are so bloated to handle cross-browser quirks that they can cause performance problems. Even with the latest &#8220;standards compliant&#8221; browsers a lot of time has to be invested in making web apps work and look the same across IE, Firefox, Safari, Opera, and so on.</p>
<p>Today’s web apps are complex and, perhaps, pushing the browser to its limit. Other technologies are emerging to try and help developers build the next generation of Rich Internet Applications (RIAs): Flash has been around for many years, but now Adobe offers <a rel="nofollow" target="_blank" href="http://www.adobe.com/products/flex/">Flex</a> and Microsoft have given us <a rel="nofollow" target="_blank" href="http://silverlight.net/">Silverlight</a>. In the context of the web browser these are great options and will certainly challenge the traditional mix of HTML, JavaScript and CSS as the standard way of building web apps.</p>
<p>These new technologies are still running up against one of the age-old challenges: the more browsers do to protect the user from viruses, spyware and the like the more these security barriers limit a web app&#8217;s interaction with the user’s PC. Uploading your latest holiday snaps to Flickr is a painful process, primarily because anything running inside a browser is abstracted from the user&#8217;s desktop.</p>
<p>In addition, a number of social networks and services have run into the other major challenge with browsers: if the user does not have the browser open with the site loaded and are looking at it they have no idea what’s going on in their network. This creates a level of separation between the app and the user which is problematic if part of the application&#8217;s benefit is live data.</p>
<h3>What’s the answer?</h3>
<p>The problem of keeping users up-to-date when the browser is not running (or the app is not loaded in the browser) has seen a raft of third party desktop applications pop-up. For example, just look at the array of desktop applicationss for Twitter (<a rel="nofollow" target="_blank" href="http://www.twhirl.org/">Twhirl</a>, <a rel="nofollow" target="_blank" href="http://iconfactory.com/software/twitterrific">Twitterific</a>, <a rel="nofollow" target="_blank" href="http://getsnitter.com/">Snitter</a>, <a rel="nofollow" target="_blank" href="http://www.tweet-r.com/">Tweetr</a>, <a rel="nofollow" target="_blank" href="http://rareedge.com/twitteroo/">Twitteroo</a>), FriendFeed (<a rel="nofollow" target="_blank" href="http://alertthingy.com/">AlertThingy</a>, <a rel="nofollow" target="_blank" href="http://www.sobees.com/">Sobees</a>, <a rel="nofollow" target="_blank" href="http://www.feedalizr.com/">Feedalizr</a>) or Facebook (<a rel="nofollow" target="_blank" href="http://www.gamaroff.org/">FizzBoost</a>, <a rel="nofollow" target="_blank" href="http://www.new.facebook.com/applications/Facebook_Desktop_Client/2305013715">Facebook Desktop Client</a>). These are just a small selection from the vast number out there.</p>
<p>These have been made possible by, firstly, the growth in web apps providing developers access to their functionality via APIs and, secondly, by the increased ease of building desktop applications. While developers have been focused on the Web (browser) as the main app platform the major vendors have been working on ways to make traditional desktop application development faster and more accessible. The latest and most popular of these is Adobe’s <a rel="nofollow" target="_blank" href="http://www.adobe.com/products/air/">AIR</a> technology which allows developers to use the knowledge and skills acquired from building web apps to develop cross-platform desktop applications. Using HTML, JavaScript, and CSS you can now build a fully-functional desktop application with AIR that runs on PC, Mac and Linux.</p>
<p>Desktop applications have a number of advantages over those that run in the web browser. They provide an “always on” method of communicating with the user. <a rel="nofollow" target="_blank" href="http://alertthingy.com/">AlertThingy</a>, for example, can hide in the system tray, but pops up an alert in the bottom right corner of the screen whenever a new notification comes in. They also have far greater access to the users’ system than anything running within a browser: uploading files suddenly becomes as easy as drag’n’drop; user data can be saved on the user’s machine; and the app can continue to work without an internet connection. These benefits can be put to incredibly powerful use in building feature-rich apps that provide a great user experience.</p>
<p>Providing users with a web-based interface and a desktop version with additional functionality is not a new idea, nor is it the preserve of Web 2.0 start-ups. Microsoft Outlook, with its companion web app version, <a rel="nofollow" target="_blank" href="http://office.microsoft.com/en-us/outlook/HA010860351033.aspx">Outlook Web Access</a>, is a well-known example of this, having been around since 1997. Fortunately, the technology available to developers has come a long way since 1997: a benefit of Adobe Flex is that the exact-same app can be hosted within AIR or the browser; you just have to disable certain features in the browser. That’s both options covered with very little extra work.</p>
<p>The traditional difficulties associated with building desktop applications are done away with with technologies such as AIR. Not only can you use web development skills to build a desktop application, but the runtime also takes care of features like the ability to have the application automatically update to new versions. By building within a runtime, the developer does not have to worry about the awkward plumbing of desktop apps, such as minimizing to the system tray. Plus, Dreamweaver suddenly becomes a desktop development IDE!</p>
<h3>Important considerations</h3>
<p>There are some important questions to answer when deciding to build a desktop application. The first is whether it is really necessary. Many web apps work perfectly well within a browser and would not add any benefit for the user by having a desktop version. Building a desktop application <em>just because you can</em> is not a valid reason.</p>
<p>Next, however easy it is for a user to install an application there is still the question of whether they will. Some are put off by the idea of installing something on their machine and will choose not to. You are adding one more barrier to entry that does not exist with traditional browser-based web apps. Will the user see the benefits and that they outweigh any reservations they may have?</p>
<p>Finally, it is important that as an industry we do not go crazy building desktop apps. The swelling numbers of Twitter, FriendFeed, Jaiku, etc. desktop clients is already creating problems for users who do not want (or have space on their screen for) so many apps. When we released AlertThingy, we received a lot of feedback from users asking us to add certain features just so they could stop using one of their existing desktop apps and use AlertThingy instead. This takes us back to the issue above: will users want to install the app? The more apps they have the more challenging this becomes.</p>
<p>One area in which this can be addressed is that there are different types of desktop app. If your potential app is providing basic information requiring little user interaction or a small amount of screen space then Mac <a rel="nofollow" target="_blank" href="http://www.apple.com/downloads/dashboard/">Dashboard widgets</a> or Vista <a rel="nofollow" target="_blank" href="http://vista.gallery.microsoft.com/vista/SideBar.aspx?mkt=en-us">Sidebar gadgets</a> are a great option. They are easy to develop (again utilising web technologies), lightweight and easy to install.</p>
<h3>Is the browser a dead man walking?</h3>
<p>I mentioned earlier Google’s latest browser, <a rel="nofollow" target="_blank" href="http://www.google.com/chrome">Chrome</a>, which comes bundled with <a rel="nofollow" target="_blank" href="http://gears.google.com/">Gears</a>. It is an attempt by Google to increase the install base of Gears and drive development of Gears-based apps. They are certainly highlighting other features of Chrome but Gears is most likely to be Google’s motivation for investing in their own browser, especially as it will benefit their own applications, such as Google Docs.</p>
<p>This situation is interesting because Gears attempts to overcome the issues discussed above, like Adobe AIR, but using the browser instead. This strategy could mark a new dawn for the web browser, which some believe will lead to it replacing the desktop OS (or at least rendering it redundant) but consider this: the Web is more than the browser, so much more, and with the growth of APIs and web-enabled platforms should we not look beyond the browser as the only client in future?</p>
<p>The first generation iPhone used the Safari browser as its application platform for third-party developers. This had limits and developers were desperate to be able to build native iPhone apps. Apple has now given developers that ability through the iPhone SDK. Many of these iPhone applications will be web apps (communicating with server-based applications) but not browser-based apps. We have seen a much more rapid growth in these types of applications compared to the previous Safari-based ones. And it’s not just the iPhone, surely a Java app on a Nokia phone is more powerful than anything running with the phone’s web browser?</p>
<p>As our TVs, cars and even fridge-freezers become internet-enabled the reach of the web app grows, but many of these devices will never have a browser. I have always found it strange that people think of what they see in the browser as the internet but not their email. As we move forward developers will be focusing on building internet applications, rather than browser-based apps, which can be accessed by a multitude of more powerful native clients on different platforms.</p>
<p>With Chrome joining IE, Firefox, Safari and others the browser war is set to rage on but the glory days of the web browser itself may be past.
</p>
<div class="feedflare">
<a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=qw2KxjiO"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=960" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=F48FKMKh"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?i=F48FKMKh" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=BkOmCCQv"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=52" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=8QX97HEu"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=50" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=IqeuzRQU"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=961" border="0"></img></a>
</div>
<p><img src="http://feedproxy.google.com/~r/vitaminmasterfeed/~4/3meeNlHvrCk" height="1" width="1"/></p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1788&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/dev/how-to-solve-a-problem-like-the-browser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wake Up and Smell the IE7!</title>
		<link>http://carsonified.com/blog/dev/wake-up-and-smell-the-ie7/</link>
		<comments>http://carsonified.com/blog/dev/wake-up-and-smell-the-ie7/#comments</comments>
		<pubDate>Mon, 20 Nov 2006 08:03:01 +0000</pubDate>
		<dc:creator>Simon Griffin</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/design/wake-up-and-smell-the-ie7</guid>
		<description><![CDATA[By <strong>Simon Griffin</strong><br />Before we get into the issues that plagued the sites in our study, let&#8217;s quickly take a look at one that didn&#8217;t. &#8220;Why bother?&#8221; you might say. Well, if your site&#8217;s breaking in IE7, then this is the first problem you should attempt to rule out.
Put simply, if you&#8217;re using JavaScript or server-side logic to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fwake-up-and-smell-the-ie7%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fwake-up-and-smell-the-ie7%2F" height="61" width="51" /></a></div><p>Before we get into the issues that plagued the sites in our <a href="http://www.etre.com/blog/2006/10/ie7_were_they_ready/">study</a>, let&#8217;s quickly take a look at one that didn&#8217;t. &#8220;Why bother?&#8221; you might say. Well, if your site&#8217;s breaking in IE7, then this is the first problem you should attempt to rule out.</p>
<p>Put simply, if you&#8217;re using JavaScript or server-side logic to serve different styles to different browsers, you need to make sure that you&#8217;re not inadvertently excluding IE7.</p>
<p>How might you be excluding IE7? Well, perhaps you&#8217;ve written a script that applies one set of styles when your pages are viewed in IE6 and another set of styles when they&#8217;re viewed in all preceding versions of IE. This would have worked nicely in the past, but now that IE7 has arrived it will cause you problems. Why? Because while you&#8217;ve specified what would happen in IE6 and <em>earlier</em>, you&#8217;ve forgotten to specify what would happen in <em>later</em> versions of IE &#8211; later versions like IE7.</p>
<p>If you find that this is the cause of your IE7 problems, the short-term solution is simply to extend your script to target IE7 with a new set of styles. In the long term however, you might want to take a look at an alternative solution.</p>
<p>Browser detection is notoriously problematic: using JavaScript to sniff the browser will only work when JavaScript is enabled in users&#8217; browsers, while parsing the User-Agent String (via JavaScript or server-side code) can prove to be even more unreliable due to &#8220;<a href="http://en.wikipedia.org/wiki/User_agent">User agent spoofing</a>&#8220;. In short, browser detection is not a very robust solution.</p>
<p>The only reliable method of detecting IE going forwards involves the use of conditional comments. This is the only method that Microsoft guarantees that it will support over the long-term. Conditional comments have been available since IE5 and, despite being proprietary, are valid forms of HTML/XHTML markup &#8211; other browsers simply ignore them since the syntax of these statements is based on regular HTML comments.</p>
<p>The disadvantage of using conditional comments is that they clutter up your HTML files and require you to keep multiple stylesheets (rather than a single centralised resource). Wouldn&#8217;t it have been better to have made conditional comments part of CSS and not HTML, Microsoft?</p>
<h4>Examples </h4>
<pre><code>
<!--[if gt IE 6]>
<link rel="stylesheet" type="text/css" href="ie7andlater.css"/>
<![endif]-->

<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="ie6andearlier.css"/>
<![endif]-->

<![if !IE]>
<link rel="stylesheet" type="text/css" href="otherbrowsers.css"/>
<![endif]>

</code></pre>
<p>MSDN has more information about conditional comments <a href="http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp ">here</a>.</p>
<h3>I have nothing to declare except my XML-ness</h3>
<p>Having sorted out any IE-detection-related issues, the next thing to check is the first line of markup on your problem pages. The first line on both the <a href="http://www.etre.com/blog/2006/10/ie7_were_they_ready/allianceandleicester/">Alliance and Leicester</a> and <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/lastminute/">Lastminute.com</a> homepage &#8211; two of the most badly broken homepages found during our study &#8211; read as follows: </p>
<pre><code>
<?xml version="1.0" encoding="iso-8859-1"?>
	</code></pre>
<p>For the uninitiated, this statement is an XML declaration (not to be confused with an &#8220;XML prolog&#8221; which is the combined total of an XML declaration and a DOCTYPE declaration); its purpose being to tell the browser which version of XML your XHTML pages complies with and (optionally) to specify the type of character encoding you&#8217;re using.</p>
<p>The W3C says the following about XML declarations:</p>
<blockquote><p>
&#8220;An XML declaration is not required in all XML documents; however XHTML document authors are strongly encouraged to use XML declarations in all their documents&#8230;&#8221;</p>
</blockquote>
<p>So you don&#8217;t have to use them, but they&#8217;d like you to. And as a result of this &#8220;strong encouragement&#8221;, many well-meaning would-be standardistas have added them to their pages with the commendable aim of achieving the highest possible levels of compliance.</p>
<p>Unfortunately, several older browsers can&#8217;t handle XML declarations. In fact, they have a nasty effect on them. As Jeffrey Zeldman puts it in Designing With Web Standards, &#8220;after imbibing the XML element, they stagger and stumble and soil themselves, bringing shame to their families and eventually losing their place in society&#8221;. Some crash as a result, others display nothing. IE6 does something a little more subtle: it ignores your DOCTYPE.</p>
<p>As you know, browsers use the DOCTYPE to toggle between rigorous standards-compliance mode (called strict mode in IE) and fault-tolerant, backwards-compatible quirks mode (so called because it mimics the quirks of various old incompliant browsers that most old websites were designed for). In most modern browsers, a valid XHTML DOCTYPE (complete with full URI) results in pages being rendered in standards-compliant mode, treating your XHTML and CSS content in accordance with the relevant W3C specifications. And IE6 is no exception. Unless you stick an XML declaration in front of it.</p>
<p>In IE6 the DOCTYPE must be the first line in your XHTML file. If it isn&#8217;t, your request for standards/strict mode will be ignored and quirks mode will be used instead (Opera 7 does the same). This means that you get IE&#8217;s original (read: erroneous) interpretation of the <a href="http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug">box model</a> and a number of other &#8220;features&#8221; that don&#8217;t align with the W3C specs.</p>
<p>In IE7 however, this bug has been fixed. IE7 therefore doesn&#8217;t care whether your DOCTYPE declaration is preceded by an XML declaration or not &#8211; either way, it gives you strict mode&#8230; and therein lies a problem. If your page starts with an XML declaration you&#8217;ll get <em>quirks</em> mode in IE6 and <em>strict</em> mode in IE7. You can verify this yourself by typing the following line of JavaScript into the URL bar of both browsers after your web page has loaded.</p>
<pre><code>
javascript:alert(document.compatMode);
	</code></pre>
<p>In IE6, you&#8217;ll see a dialog box displaying the word &#8220;BackCompat&#8221;, meaning that it is in quirks mode. While, in IE7, you&#8217;ll see &#8220;CSS1Compat&#8221;, meaning that it&#8217;s in standards-compliant strict mode. This discrepancy explains the inconsistencies you&#8217;re seeing in the two browsers&#8217; displaying of your pages.</p>
<p>How do you fix these inconsistencies? I&#8217;d recommend removing your XML declarations, so that your pages render in strict mode in both IE7 and IE6 &#8211; and then reworking your styles, so that your pages look identical in both browsers.</p>
<p>&#8220;Remove my XML declarations? Is that legit?&#8221; Yes. Firstly, they&#8217;re optional &#8211; see the quote from the W3C above &#8211; so omitting them isn&#8217;t a crime. Secondly, unless you&#8217;re part of a very small minority of developers, you probably aren&#8217;t serving your pages as XML anyway. Check the head of your document &#8211; do you see markup like this?</p>
<pre><code>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	</code></pre>
<p>If you do, guess what, you&#8217;re serving HTML, not XHTML (actually, youâ€™re serving HTML compatible XHTML1.0, but letâ€™s not get picky), regardless of what your DOCTYPE says. </p>
<p>You&#8217;re only serving true XHTML if you see <code>application/xhtml xml</code> in place of <code>text/html</code> in your version of the above. And this isn&#8217;t recommended for most purposes (at least, it isn&#8217;t recommended for now) as <code>application/xhtml xml</code> isn&#8217;t supported by the majority of browsers. (IE, for example, will ask you if you want to <em>save</em> these types of documents, rather than displaying them as web pages).</p>
<p>Furthermore, newer browsers may opt to validate your markup if you include an XML declaration and specify a Content-Type of <code>application/xhtml xml</code>. This could be disastrous if parts of your pages are inserted dynamically from a content management system. As you won&#8217;t have control over the content in the CMS, you won&#8217;t know whether it&#8217;s 100 per cent XML-valid or not. And if it&#8217;s not 100 per cent XML-valid, the newer browsers will likely choose not to display it. (Let&#8217;s face it, in the real world you can bet your life it won&#8217;t be XML-valid &#8211; the combination of CMS and business user doesn&#8217;t often produce solid markup!).</p>
<p>If you&#8217;re serving your XHTML as <code>text/html</code> however, you can at least rely on browsers displaying your content as you intend (although if you&#8217;re going to stick with dishing up <code>text/html</code>, you may be better off slashing the X off XHTML and switching back to plain ol&#8217; HTML &#8211; but that&#8217;s a discussion for another day).</p>
<p>&#8220;But wait!&#8221; I hear you say, &#8220;I can&#8217;t get rid of my XML declarations because I need to specify a character encoding!&#8221; Don&#8217;t panic. You can still get rid of the XML declarations, just update the Content-Type element in the head of your documents instead. For example, if you want to specify an UTF-8 encoding to keep your international user-base happy, simply insert:</p>
<pre><code>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	</code></pre>
<h3>Thinking outside of the (old) box model</h3>
<p>If you&#8217;ve addressed the previous issues, and you&#8217;re sure that your pages are being displayed in strict mode in both IE6 and IE7, your problems might stem from IE7&#8217;s updated handling of the CSS box model.</p>
<p>The update is best explained by example. Imagine that you&#8217;ve created a box with a width and height of 100px. Now imagine that the content you&#8217;ve placed within it is wider and taller than 100px. What should happen? Well, in IE6, the box will automatically stretch to fit around the content (or at least it will as long as the box keeps its default <code>overflow</code> value of visible). This sounds like a good idea, because it looks messy when content bleeds across a box&#8217;s borders. However, this isn&#8217;t the behaviour prescribed by the W3C&#8217;s CSS2.1 specification (and with good reason).</p>
<p>The CSS2.1 spec says that the width and height that you specified for the box should be honoured at all costs if the box&#8217;s <code>overflow</code> property is set to visible (its default setting). If the content within the box is wider and/or taller &#8211; causing &#8220;overspill&#8221; &#8211; well shucks, you should have created a bigger box then, shouldn&#8217;t you?</p>
<p>Why does the spec recommend such behaviour? Well, automatically expanding boxes have a knock-on effect on the other elements placed around them. So if your 100px-wide box suddenly becomes bigger it will displace the elements around it. The result: a fractured page layout.</p>
<p>In ensuring that heights and widths are honoured where specified, developers are given complete control over their page layouts. If you want a box that&#8217;s 100px wide, state that in your stylesheet and you&#8217;ve got it. If you want one that expands and contracts in accordance with the size of its contents, leave its <code>width</code> set to <code>auto</code> and <code>overflow</code> set to <code>visible</code> and it&#8217;s yours. For even more flexibility, you can use <code>min</code> and <code>max</code> settings.</p>
<p>The release of IE7 sees IE&#8217;s box model updated to adhere to the CSS2.1 specification &#8211; thereby creating inconsistency between IE6 and IE7 in strict mode. So, if you&#8217;re finding that your content is bursting out from its containing box, this could be the problem. (It certainly played a part in breaking <a href="http://www.etre.com/blog/2006/10/ie7_were_they_ready/bhpbilliton/">BHP Billiton</a> and <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/teletext/">Teletext Holidays</a>&#8216; homepages in IE7).</p>
<h3>Filtering out the filters</h3>
<p>A number of the hacks and filters used to target IE no longer work in IE7. These workarounds took advantage of various bugs and unimplemented parts of the CSS2.1 specification to either hide styles from IE while having other browsers apply them; or to apply styles in IE while hiding them from other browsers. Here are the ones that are affected:</p>
<h4>The star html filter (aka The Tan hack)</h4>
<p>The star html filter is used to apply CSS rules in IE, while hiding them from other browsers. It is most commonly used to address the aforementioned box model problems in IE5, IE5.5 and IE6 (Mac and Windows versions).</p>
<p>During our study, we found that sites like <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/woolworths">Woolworths</a>, <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/upmystreet">UpMyStreet.com</a> and <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/lastminute">Lastminute.com</a> were using this filter (as part of the Holly hack) to address the Peekaboo bug in IE6. <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/britishenergygroup">British Energy</a>and <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/o2shop">O2</a> also used it to address layout inconsistencies.</p>
<p>The filter works by exploiting a bug in the way that the older versions of IE interpret the &#8220;star&#8221; &#8211; or &#8220;universal selector&#8221; as it&#8217;s officially known. The CSS2.1 spec says that the universal selector should match <em>all</em> descendant elements in the document tree (think of it as a wildcard). Combining the star with <code>html</code> to make <code>* html</code> is the equivalent of saying <code>p html</code>, <code>body html</code> or <code>div html</code> (or indeed <code>[any other html element] html</code>). This is clearly illegal as <code>html</code> is always the root element in a document and as such can never be the child of any other element.</p>
<p>Most browsers recognise <code>* html</code> as illegal syntax and ignore it (along with its accompanying declaration block to boot). IE5, IE5.5 and IE6 however, ignore the star but parse all that follows, therefore considering <code>* html</code> the equivalent of <code>html</code>. </p>
<p>This bug has now been fixed, meaning that IE7 will ignore star html filtering in accordance with the CSS2.1 specification.</p>
<h4>Examples</h4>
<p><em>The following declarations are parsed in older versions of IE, but ignored in IE7.</em></p>
<pre><code>

* html {
	...
}

* html body {
	...
}

* * body {
/*This is also ignored in IE7 because the body element can never be a grandchild of the root element*/

...
}
</code></pre>
<p><em>An example from British Energy</em></p>
<pre><code>
* html #main {
	height: 98%
	}
</code></pre>
<h4>The underscore filter</h4>
<p>Like the star html filter, the underscore filter is also used to apply rules in IE while hiding them from other browsers. Unlike the star html filter, however, it only works in Windows versions of IE (not Mac) making it a little less flexible.</p>
<p>During our study, we found that Lastminute.com made use of this filter to address layout issues, as did <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/opodo">Opodo</a>. </p>
<p>The filter works by exploiting a bug in the way that older versions of IE interpret the underscore character. The CSS2.1 <a href="http://www.w3.org/TR/CSS21/syndata.html#keywords">specification</a> reserves underscores (and dashes) for vendor-specific extensions (aka &#8220;custom properties&#8221;). Thus, rules like<code> _myprop: foo</code> should be ignored by browsers, unless they implement their own proprietary <code>_myprop property</code>. </p>
<p>Most modern browsers follow this guideline. Older versions of IE, however, ignore the underscore but read the text that follows. Thus, they treat statements like <code>_myprop: foo</code> as the equivalent of <code>myprop: foo</code> (no underscore) and try to apply it as a style. As a result, developers could prefix any standard CSS rule &#8211; for example, <code>width: 300px</code> &#8211; with an underscore to make older versions of IE apply it, while keeping it hidden from all other browsers.</p>
<p>This bug has now been fixed, meaning that IE7 treats properties prefixed with an underscore as vendor-specific extensions per the CSS2.1 standard. As a result, the browser no longer attempts to apply statements like <code>_width: 300px</code> as CSS rules. (However, they still appear in the object model and can be queried via scripts.)</p>
<h4>Examples</h4>
<p><em>_height will override the preceding height rule in older versions of IE, but will be ignored in IE7</em</p>
<pre><code>
#promo {
min-height: 300px;
height: auto;
_height: 300px;
...
}
</code></pre>
<p><em>An example from lastminute.com</em></p>
<pre><code>
#homepage_search_category ul li.first {
_top: -2px !important; /*underscore hack fix for IE/Win :( */
}
</code></pre>
<h4>The comment after property filter</h4>
<p>Unlike the star html and underscore filters, this filter is used to <em>hide</em> rules from IE while having other browsers apply them. It only works in strict mode however (not quirks mode).</p>
<p>During our study, we found that Lastminute.com made extensive use of this filter to correct font size and layout issues. Opodo also used this filter to display form elements correctly in IE6.</p>
<p>The filter works by exploiting a bug in the way that older versions of IE interpret CSS comments. When these browsers encounter a comment &#8211; i.e. /**/ &#8211; placed after a rule&#8217;s property name, they choke and skip the value that appears thereafter, proceeding directly to the next line of code.</p>
<p>This bug has now been fixed, so in IE7 these rules are parsed in full and applied.</p>
<h4>Examples</h4>
<p><em>The following height rule is ignored by older versions of IE, but applied in IE7</em></p>
<pre><code>
.myclass {
height/**/: 300px;
...
}
</code></pre>
<p><em>An example from lastminute.com</em></p>
<pre><code>
td, th {
font-size:80% !important;
	font-size/**/:100% !important;
	font-size/**/:80%
	}

td, th {
	font-size:80% !important;
	font-size/**/:100% !important;
	...
	}
</code></pre>
<h4>The child selector filter</h4>
<p>The child selector filter is used to <em>hide</em> rules from IE while having other browsers apply them. During our study, we found that O2 and <a href="http://www.etre.com/blog/2006/10/ie7_were_they_ready/bp">BP</a> made extensive use of this filter to deal with box model inconsistencies.</p>
<p>Child selectors &#8211; e.g. <code>html > body</code> &#8211; are used to apply styles to elements that are direct children of other elements. However, despite being part of the CSS2.1 specification, they aren&#8217;t supported in older versions of IE and are therefore ignored.</p>
<p>Support for child selectors has been added in IE7, so these rules are now parsed and applied per the standard.</p>
<h4>Examples</h4>
<p><em>The following height rule is ignored by older versions of IE, but applied in IE7</em></p>
<pre><code>
html > body {
height: 300px;
...
}
</code></pre>
<p><em>An example from BP</em></p>
<pre><code>
html > body .effLoginContainer{
	padding: 5px 10px 7px 10px;
	background-color: #E7F7E7;
}
</code></pre>
<h4>The adjacent selector filter</h4>
<p>Like the child selector filter, the adjacent selector filter is used to <em>hide</em> rules from IE while having other browsers apply them. During our study, we found that Lastminute.com made use of this filter to align table data.</p>
<p>Adjacent selectors are similar to child selectors. However, while child selectors are used to match the <em>children</em> of an element, adjacent selectors are used to match <em>siblings</em>. Thus, the adjacent selector <code>tr   tr</code> matches any table row that follows another table row and results in styles being applied to every row in a table other than the first. However, despite being part of the CSS2.1 specification, they aren&#8217;t supported in older versions of IE and are therefore ignored.</p>
<p>Support for adjacent selectors has been added in IE7, so these rules are now parsed and applied per the standard.</p>
<h4>Examples</h4>
<p><em>The following height rule is ignored by older versions of IE, but applied in IE7</em></p>
<pre><code>
head   body {
      height: 300px;
   ...
   }
 </code></pre>
<p><em> An example from lastminute.com &#8211; used to align text to the right in all table cells in a row except for the first. </em></p>
<pre><code>
table.priceDestination tbody td   td {
	text-align: right
	}
</code></pre>
<h4>The first child and adjacent selector filter (aka The Owen hack)</h4>
<p>This hack takes the aforementioned adjacent selector filter and gives it a twist, by adding in the <code>:first-child</code> pseudo-class. Like the adjacent selector filter it is used to <em>hide</em> rules from IE while having other browsers apply them.</p>
<p>It usually appears in the form of <code>head:first-child   body</code>, which means &#8220;select the body element if the <code>body</code> and <code>head</code> elements are siblings AND the head element is the first child of its parent element.&#8221; </p>
<p>Since the <code>body</code> and <code>head</code> elements are <em>always</em> siblings, the first part of this statement is true. And since the <code>head</code> element is always the first child of <code>html</code> (its parent element) the second part of the statement is also true.</p>
<p>Despite being part of the CSS2.1 specification, older versions of IE don&#8217;t support the first-child pseudo-class or adjacent selectors and ignore them wherever they are found.</p>
<p>Support for both the first-child pseudo-class and adjacent selectors has been added in IE7 however, so these rules are now parsed and applied per the standard.</p>
<h4>Examples</h4>
<p><em>The following rule used to hide the height property from Internet Explorer. In IE7 this declaration will be applied.</em></p>
<pre><code>
head:first-child   body {
height: 300px;
...
}
</code></pre>
<p><em>Note: we found no examples of the first child and adjacent selector filter during our study.</em></p>
<h3>The solution?</h3>
<p>Purists will recommend that you remove the need to use these types of filters by restricting your designs to only the CSS features that work consistently across all browsers.</p>
<p>This is fine in theory. However, in practice, clients&#8217; demands often mean that we need to use CSS features that <em>don&#8217;t</em> work consistently across all browsers and then fudge them to make them appear as though they do. So when filters like the above stop working, we need to find something to replace them with.</p>
<p>The only reliable replacement for filters that target versions of IE are &#8211; yes, you&#8217;ve guessed it &#8211; Microsoft&#8217;s proprietary conditional comments. We&#8217;ve discussed them before so I won&#8217;t blather on about them again; save to say that here&#8217;s how they can be used to supply IE7 with one set of styles, while supplying older versions of IE with another &#8211; thereby performing the same function as outdated hacks that don&#8217;t work any more.</p>
<pre><code>
<!--[if gt IE 6]>
<link rel="stylesheet" type="text/css" href="ie7andlater.css"/>
<![endif]-->

<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="ie6andearlier.css"/>
<![endif]-->
</code></pre>
<h3>Final thoughts</h3>
<p>The results of our study suggest that around 12.7 million websites are in need of a little TLC because of IE7. Maybe even more. However, this article has hopefully shown that the most common problems are easy to diagnose and not too difficult to fix. As always, we welcome your thoughts on the subject.</p>
<p class="diggit"><img src="http://www.digg.com/img/digg-guy-small.gif" alt="digg.com logo" /> Like this article? <a href="http://digg.com/programming/Wake_up_and_smell_the_IE7">Digg it</a>!</p>
<h4>Notes</h4>
<p><em>Ian Hickson has more on the dangers of <a href="http://hixie.ch/advocacy/xhtml">serving XHTML documents as text/html</a>. Fadtastic has more on <a href="http://fadtastic.net/2006/11/02/the-invisible-design-decision/">HTML vs. XHTML</a></em>.</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1723&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/dev/wake-up-and-smell-the-ie7/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 7: Were You Ready?</title>
		<link>http://carsonified.com/blog/dev/internet-explorer-7-were-you-ready/</link>
		<comments>http://carsonified.com/blog/dev/internet-explorer-7-were-you-ready/#comments</comments>
		<pubDate>Wed, 15 Nov 2006 08:00:23 +0000</pubDate>
		<dc:creator>Simon Griffin</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/design/internet-explorer-7-were-you-ready</guid>
		<description><![CDATA[By <strong>Simon Griffin</strong><br />Unless you&#8217;ve been living under a rock, you&#8217;ll know that Microsoft finally got around to launching Internet Explorer 7.0 last month.
Prior to the new browser&#8217;s release, my company, Etre, had been receiving a steady stream of calls from clients who were becoming increasingly worried that their sites would fall apart under the new world order. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Finternet-explorer-7-were-you-ready%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Finternet-explorer-7-were-you-ready%2F" height="61" width="51" /></a></div><p>Unless you&#8217;ve been living under a rock, you&#8217;ll know that Microsoft finally got around to launching Internet Explorer 7.0 last month.</p>
<p>Prior to the new browser&#8217;s release, my company, Etre, had been receiving a steady stream of calls from clients who were becoming increasingly worried that their sites would fall apart under the new world order. This, in turn, worried us.</p>
<p>We had taken Microsoft seriously when they warned of inconsistencies in page rendering between IE6 and IE7. Even more so when they announced their intention to distribute IE7 as a &#8220;high priority&#8221; automatic update (thereby ensuring that the millions of existing IE6 users would adopt the new browser en mass).We&#8217;d therefore downloaded the various public betas and had thoroughly tested the sites that we&#8217;d built and maintained. Yet we hadn&#8217;t unearthed any major problems. At least, nothing that couldn&#8217;t be fixed with a few tweaks.</p>
<p>&#8220;Maybe we&#8217;ve missed something,&#8221; we thought. So we spoke to our clients again, finding that many had been approached by design agencies prophesising doom and recommending costly redesign programmes to ensure that their sites would be &#8220;IE7-ready&trade;&#8221;. At about this time, reports from certain quarters of the media began to surface making similar claims of impending disaster. These articles often likened the automatic update process to Microsoft flicking a switch and bringing down the whole ruddy interweb in one fell swoop.</p>
<p>While our experience suggested that things wouldn&#8217;t be quite this dramatic, we were keen to gain a better understanding of the problem (Firefox of course had a new release around the same period, but IE still has massive market share &#8211; although it&#8217;s always recommended to test on a range of browsers). So on Friday 20th October â€“ two days after IE7 was released, and two weeks before the automatic update process began â€“ we kicked off a quick and dirty study. We fired up two machines and compared the homepages of all 100 companies on the <a href="http://uk.finance.yahoo.com/q/cp?s=%5EFTSE">FTSE 100 Index</a> (the UK equivalent of the Dow Jones Index) in both IE6 and IE7. Were these companies ready for IE7? Were their sites bent badly out of shape? Had this all been a big fuss over nothing? We intended to find out.</p>
<h3>12.7 Million Sites In Need Of A Little TLC?</h3>
<p>The results were insightful. The worst affected homepage was that of the <a href="http://www.alliance-leicester.co.uk">Alliance and Leicester</a> bank, which despite looking neat and tidy in IE6, looked like it had gone ten rounds with Mike Tyson in IE7. Its contents burst out of its right-hand margin and spilled across its footer; while important information dropped a font size or two and became disconnected from the rest of the page.</p>
<p>Yet the Alliance and Leicester&#8217;s homepage was the exception, not the rule. Most other homepages fared pretty well in IE7, and those that did break suffered only minor presentation problems.</p>
<p>In total, we found that thirteen of the FTSE 100 homepages were broken in IE7. A finding that if extrapolated to the internet as a whole (which we admit requires a bit of a leap of faith), suggests that there are around 12.7 million websites in need of a little TLC. That&#8217;s 12.7 million websites that aren&#8217;t ready for IE7.</p>
<p>Since posting the results of our study online, we&#8217;re starting to think that this figure is a conservative estimate. Over the last week or so, we&#8217;ve turned our attention away from corporate sites and extended our analysis to online retailers. In this area, it seems like every second site has an IE7-related glitch or two (we&#8217;ve posted screenshots of some of them on our <a href="http://www.etre.com/blog/2006/11/ie7_were_they_ready_redux/">blog</a> that you can take a look at). We&#8217;ve also been inundated with reports of companies warning their IE6-using customers not to install IE7 or telling them to expect some &#8220;weirdness&#8221; for a while (companies like Reuters, PeopleSoft and even 37signals).</p>
<p>For most us, telling our users not to install IE7 or to expect some strange behaviour just isn&#8217;t an option. And with Microsoft&#8217;s automatic roll-out process well underway, these types of issues need to be fixed fast. To help you do this, we thought that we would summarise the most common problems we&#8217;ve found during our studies and demonstrate how they can be fixed.</p>
<h3>The Standards Issue</h3>
<p>&#8220;You&#8217;re wasting your time,&#8221; I hear you say; &#8220;my sites are built to adhere to W3C specifications, so a newer, more-standards-compliant browser should have no problem displaying them as I intended.&#8221; Hmmm â€“ you might be surprised. One of the most interesting â€“ and controversial â€“ findings we&#8217;ve uncovered so far has been that the worst-affected sites are often those that have tried to implement a standards-compliant design. By contrast, those that haven&#8217;t bothered to adhere to web standards are usually fairly well insulated from IE7-related issues.</p>
<p>When we published this finding on our blog, some people took it to mean that we weren&#8217;t advocating standards-compliance. This is, respectfully, a load of old codswallop. The point we were trying to make (no doubt inarticulately) was that many of the sites we&#8217;ve studied make only the most basic use of CSS. They largely restrict themselves to styles from the CSS1.0 portfolio, and often use out-dated markup like font tags and antiquated design techniques like nested tables for layout. The net result of this is that they throw IE7 into quirks mode and, as IE7&#8217;s quirks mode is largely identical to IE6&#8217;s quirks mode, they see little difference in the way that the two browsers present their pages.</p>
<p>By contrast, those sites that have gone some way towards implementing web standards â€“ like the Alliance and Leicester, for example â€“ are usually in need of a little attention. These sites usually employ (relatively) clean markup, make extensive use of the CSS2 spec and implement certain hacks and filters to support different browsers. They also typically feature a well-formed DOCTYPE. These attempts at standards-compliance throw IE7 into strict mode â€“ a mode that has seen significant upgrades in order to meet W3C specs and is therefore quite different to IE6&#8217;s equivalent. As a result, the presentation of these site in the two browsers can be quite different. In part two next week we&#8217;ll be looking at the reasons why.</p>
<p class="diggit"><img src="http://www.digg.com/img/digg-guy-small.gif" alt="digg.com logo" /> Like this article? <a href="http://digg.com/design/IE7_were_you_ready">Digg it</a>!</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1722&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/dev/internet-explorer-7-were-you-ready/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Chris Wilson</title>
		<link>http://carsonified.com/blog/dev/chris-wilson/</link>
		<comments>http://carsonified.com/blog/dev/chris-wilson/#comments</comments>
		<pubDate>Mon, 24 Jul 2006 12:15:04 +0000</pubDate>
		<dc:creator>Ryan Carson</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/interviews/webapps/chris-wilson/</guid>
		<description><![CDATA[By <strong>Ryan Carson</strong><br />Download the MP3 (2.6 MB)

In the interview, we discuss everything from Web Standards support in IE7, to whether or not IE6 will auto-update to IE7. Enjoy!
Full transcription of the interview

 RC:	Hi, my name is Ryan and we are here with Chris Wilson from Microsoft and we&#8217;re just gonna ask him a couple of quick questions, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fchris-wilson%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fchris-wilson%2F" height="61" width="51" /></a></div><h3><a rel="nofollow" target="_blank" href="http://media.libsyn.com/media/carsonsystems/Vitamin_Interview_-_Chris_Wilson_1.mp3">Download the MP3</a> (2.6 MB)</h3>
</p>
<p>In the interview, we discuss everything from Web Standards support in IE7, to whether or not IE6 will auto-update to IE7. Enjoy!</p>
<h3>Full transcription of the interview</h3>
</p>
<p> <strong>RC:	Hi, my name is Ryan and we are here with Chris Wilson from Microsoft and we&#8217;re just gonna ask him a couple of quick questions, and so over to you, Chris.</strong></p>
<p>CW:	Thanks, Ryan. So, I&#8217;m Chris Wilson and I&#8217;m the Group Program Manager for the Internet Explorer team, on the platform and Security side of the Internet Explorer Team.</p>
<p><strong>RC: Okay, so the first question I have for you is, &#8220;What new feature are you most excited about in IE7?&#8221;</strong></p>
<p>CW: That&#8217;s a really hard question for me to answer, obviously, because I&#8217;m really close to it and there are a lot of features that I absolutely love. I think that as a user, probably the feature I&#8217;m most excited about is our support for RSS and our integrated feed subscriptions, feed reading, the integrated platform that does the sync engine and everything, that gets me really excited. I think as a developer, the best thing really is all the work we&#8217;ve done on standards support, all the fixes were done but as a user certainly the RSS platform is pretty exciting.</p>
<p><strong>RC:	A quick question about that RSS support, is that going to be similar to what people are used to in Firefox, when you subscribe to a feed in Firefox? Could you tell us just a little bit about what that&#8217;s actually going to be like.</strong></p>
<p>CW:	Sure. The user experience is actually somewhat similar for feed discovery, y&#8217;know, you&#8217;re browsing a web page and it has an RSS feed then a little RSS icon lights up, in fact it&#8217;s currently the same icon even that Firefox uses. The feed reading experience is kind of similar, the really exciting thing that we&#8217;ve done though is that we&#8217;ve built a platform not just for Internet Explorer, with RSS feeds, we&#8217;ve actually exposed APIs in both Win32 and the .NET frameworks platforms so you can actually write applications that use all of these feeds and they all share this common feed list, common store, common synchronisation engine. Like, I have a screensaver installed on my machine that automatically picks up all of the photos that are in my RSS feeds and uses them as a screensaver, so my contacts post new photos to Flickr, and I automatically get them on my screensaver. It&#8217;s pretty cool.</p>
<p><strong>RC:	That is so exciting! I mean it&#8217;s going to just break it wide open. Wow, cool. The next question I have for you is, tell me a little about your involvement with the Web Standards Project, I know that we at Vitamin are really supportive of what you&#8217;re doing and excited about it so I&#8217;ll just give you a chance to defend yourself.</strong></p>
<p>CW:	The Web Standards project, y&#8217;know, I&#8217;ve actually worked with them, peripherally at least, for a really long time, I mean, almost since their inception. I&#8217;ve talked to Zeldman a lot back in the day and I think lately, for the last year / year and a half, it&#8217;s been really exciting because we&#8217;ve really managed to build a relationship where the Web Standards Project helps advise us on what web developers and web designers really want and need, and help to prioritise that, and it&#8217;s not really necessarily that we don&#8217;t care about standards or anything like that, it&#8217;s really that we need help in prioritising what&#8217;s most important. We had a lot of requests and a lot of them are really very grand requests in both senses of the word. They&#8217;re good requests, but they&#8217;re huge, and we really need some help to figure out what&#8217;s the most important to make people&#8217;s lives easier in the web development community, so I think that our relationship with the Web Standards Project has been great to help figure that out, help us to prioritise and help get the message out too that we really do care and we&#8217;re trying to do better.</p>
<p><strong>RC:	The last question that I have for you is, &#8220;Is IE going to auto-update to IE7 and how do you feel about that?&#8221;</strong></p>
<p>CW:	Is IE going to auto-update to IE7? I think that the first thing really is that we can&#8217;t really force it on users. That&#8217;s not our goal. We really do like to offer users choice. It is a different user interface, some people will be really jarred by that. I think that we certainly want to encourage everyone out there to, um, I do believe that we will offer it through Windows Update, but it won&#8217;t be an automatic silent update, certainly it won&#8217;t be like you come in one day and suddenly your computer&#8217;s running IE7 rather than IE6. Certainly we have to ask the user if they really want it. As nice as it would be to blast it onto everyone&#8217;s system I don&#8217;t think that can happen, so.</p>
<p><strong>RC:	Alright, well that&#8217;s it, so thank you for joining us, I appreciate it.</strong></p>
<p>CW: Great, thank you, Ryan. </p>
<p><em>Transcribed by Scott Morris</em></p>
<div class="feedflare">
<a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=STxFzxL0"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=960" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=ABjKZEIw"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?i=ABjKZEIw" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=SHkQgDWy"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=52" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=aR5oKvKT"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=50" border="0"></img></a> <a href="http://feedproxy.google.com/~f/vitaminmasterfeed?a=XysesLmR"><img src="http://feedproxy.google.com/~f/vitaminmasterfeed?d=961" border="0"></img></a>
</div>
<p><img src="http://feedproxy.google.com/~r/vitaminmasterfeed/~4/z8pmV8lVv1Q" height="1" width="1"/></p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1700&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/dev/chris-wilson/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://media.libsyn.com/media/carsonsystems/Vitamin_Interview_-_Chris_Wilson_1.mp3" length="2725977" type="audio/mpeg" />
		</item>
	</channel>
</rss>
