<?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>Designoplasty Web Design and Development Blog</title>
	<atom:link href="http://designoplasty.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://designoplasty.com</link>
	<description>HTML, Javascript, PHP, and Me</description>
	<lastBuildDate>Mon, 15 Feb 2010 17:42:06 +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>WordPress Themes: Object Oriented PHP Code is Very Important</title>
		<link>http://designoplasty.com/2010/02/15/wordpress-themes-php-code-is-very-important/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-themes-php-code-is-very-important</link>
		<comments>http://designoplasty.com/2010/02/15/wordpress-themes-php-code-is-very-important/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 17:41:46 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Object Oriented]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1180</guid>
		<description><![CDATA[I&#8217;m doing a heavy rewrite of my main WordPress theme that all of my other themes are based on. As someone who has spent a lot of time writing code, one of the things that has been bugging me about WordPress themes is all the duplication of HTML.

For instance, if all your pages have a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing a heavy rewrite of my main WordPress theme that all of my other themes are based on. As someone who has spent a lot of time writing code, one of the things that has been bugging me about WordPress themes is all the duplication of HTML.</p>

<p>For instance, if all your pages have a format involving a header element, a body element, and a footer element, then you have to duplicate that HTML in single.php, page.php, 404.php, etc. Then if you ever change it you have to edit every one of those files just to make the same changes over and over again. You&#8217;re probably going to forget to do it in some files and you&#8217;re going to do it wrong in others.</p>

<p>Wouldn&#8217;t it be great if you could just call a function that would establish this pattern for you in all files? Then if you needed to change it, you would only have to change it in one place and all your site&#8217;s pages would be effected. But what if you need to tweak the template slightly for different pages? This is exactly why object oriented design is important.</p>

<p>So you have a base class that draws the usual page structure and then provide override-able and abstract methods so that a new class can be created if you need to customize. It works perfectly because it gives you maximum code reuse and there&#8217;s no duplication.</p>

<p>However, it does make the theme very code heavy. There&#8217;s not a ton of code, but enough that would intimidate most people. Plus, if you don&#8217;t have a lot of experience with object oriented design getting the extensibility right is going to be a bit difficult.</p>

<p>But that&#8217;s kind of my point for this post. It&#8217;s not necessarily that you need to do this, because obviously themes can be made without it. But it&#8217;s the fact that object oriented design is important to web applications and even blogs too. If you do a lot of PHP coding but aren&#8217;t yet familiar with the concepts behind object oriented programming, then learning more about that will really be a benefit to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2010/02/15/wordpress-themes-php-code-is-very-important/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Always Comment overflow: hidden; CSS Rules</title>
		<link>http://designoplasty.com/2010/02/09/tip-always-comment-overflow-hidden-css-rules/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=tip-always-comment-overflow-hidden-css-rules</link>
		<comments>http://designoplasty.com/2010/02/09/tip-always-comment-overflow-hidden-css-rules/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 08:05:45 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Floating Elements]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1169</guid>
		<description><![CDATA[CSS comments aren&#8217;t always helpful, they tend to muddle the code and once you get good at naming classes and ids your CSS should tell a pretty clear story. But one thing that should always be clearly commented is the use of overflow: hidden;

This rule is used mostly for a couple of reasons, and almost [...]]]></description>
			<content:encoded><![CDATA[<p>CSS comments aren&#8217;t always helpful, they tend to muddle the code and once you get good at naming classes and ids your CSS should tell a pretty clear story. But one thing that should always be clearly commented is the use of <code>overflow: hidden;</code></p>

<p>This rule is used mostly for a couple of reasons, and almost never to actually hide overflowing content. The first is to make sure that and element containing floating elements will clear itself. The other is to make sure that an element next to a float doesn&#8217;t wrap under that float.</p>

<p>If in your CSS file you clearly comment every time you use overflow: hidden you will be able to read your CSS much faster when you come back to it later. You will also almost certainly find all the unnecessary <code>overflow: hidden;</code> rules you have and it will help you get a much better overall understanding of your layout philosophy.</p>
]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2010/02/09/tip-always-comment-overflow-hidden-css-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the WordPress apply_filters Function for Dynamic Content</title>
		<link>http://designoplasty.com/2010/01/26/using-the-wordpress-apply_filters-function-for-dynamic-content/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-the-wordpress-apply_filters-function-for-dynamic-content</link>
		<comments>http://designoplasty.com/2010/01/26/using-the-wordpress-apply_filters-function-for-dynamic-content/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 04:52:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1159</guid>
		<description><![CDATA[In a WordPress plugin you can filter many values including the title and content of a post using:

add_filter('the_content', 'MyPluginClass::FilterTheContent');

This is pretty handy, but sometimes when you&#8217;re writing a WordPress theme you want to allow plugins to add content, not just filter the usual content. Using apply_filters makes this pretty easy because you can call apply [...]]]></description>
			<content:encoded><![CDATA[<p>In a WordPress plugin you can filter many values including the title and content of a post using:</p>

<pre><code>add_filter('the_content', 'MyPluginClass::FilterTheContent');</code></pre>

<p>This is pretty handy, but sometimes when you&#8217;re writing a WordPress theme you want to allow plugins to add content, not just filter the usual content. Using <code>apply_filters</code> makes this pretty easy because you can call apply filters with custom &#8220;tags&#8221; and it will just work. For instance in your theme you can put:</p>

<pre><code>&lt;?php

    $theMessage = apply_filters('CustomThemeMessage', '' /* default value: empty string */);

    if (!empty($theMessage))
    {
        echo '&lt;div class="Message"&gt;', $theMessage, '&lt;/div&gt;';
    }

?&gt;</code></pre>

<p>If nobody ever filters on the tag &#8216;CustomThemeMessage&#8217; it&#8217;s fine, your theme won&#8217;t break or anything. But plugins that know this tag is available can use it:</p>

<pre><code>add_filter('CustomThemeMessage', 'MyPluginClass::FilterTheContent');</code></pre>

<p>When you&#8217;re developing themes and plugins in tandem, this is incredibly useful and robust. It&#8217;s also not as risky as filtering a tag like &#8216;the_content&#8217; where a mistake can really mess up your site. It will also be more performant when you only need the custom content on one or a few of the pages on your site.</p>]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2010/01/26/using-the-wordpress-apply_filters-function-for-dynamic-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Real Development Life Cycle</title>
		<link>http://designoplasty.com/2010/01/19/the-real-development-life-cycle/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=the-real-development-life-cycle</link>
		<comments>http://designoplasty.com/2010/01/19/the-real-development-life-cycle/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 05:14:01 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Clients]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Quality]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1152</guid>
		<description><![CDATA[

One reason I really wanted to run my own business was to be able to do business and live my life honestly. I have a very honest way of working with my customers, they know I can only give so much time and it may take some time to get what they want. But it [...]]]></description>
			<content:encoded><![CDATA[<img src="http://photos.smugmug.com/photos/768943885_8ivaJ-O.png" class="floatright" style="width: 280px; height: 280px;" alt="Product Development Life Cycle, Web Design" />

<p>One reason I really wanted to run my own business was to be able to do business and live my life honestly. I have a very honest way of working with my customers, they know I can only give so much time and it may take some time to get what they want. But it works out, because they are happy with the results.</p>

<p>While working on a project there are various phases in the development cycle, but one that has never been written in books is the phase I like to call, &#8220;relaxation and reflection&#8221;. I go through periods where I work very hard and kind of exhaust myself. Then I need to stop work for at least a few days and just think about what I&#8217;ve done. Make sure things are fitting together correctly and heading in the right direction.</p>

<p>Just to fly right in the face of traditional development cycles, I find this &#8220;relaxation and reflection&#8221; phase needs to happen, among other times, right before the code is placed into production? Yes, that&#8217;s right. Right when the customer wants it, right when the tension&#8217;s the highest, it&#8217;s time to take a break. How can that be?</p>

<p>Well, if you want the code to work, and you want to enjoy the maintenance cycle, and you want to enjoy your life, and you want your customers to be happy, then you need to make sure you&#8217;ve done the right thing before you throw it out into the wild.</p>

<p>This is just plain true, but I don&#8217;t expect IT departments or software development companies to understand it any time soon. This is because they are run by managers, and managers never really understand anything, so it doesn&#8217;t even make a bit of sense to take the time to understand things. Understanding things is not what they do. There&#8217;s nothing for them to understand, it&#8217;s all about deadlines to them. As long as something crappy that mostly works is put out on time, they get their bonus.</p>

<p>This is how small consulting companies can come into the game and thrive, by hitting large companies in their soft spot: quality.</p>

<p>It&#8217;s to the point now where people don&#8217;t expect to ever get quality, so if you can provide it, especially at a reasonable price, that&#8217;s really going to work for your business. It sounds obvious, which makes it even more strange that it doesn&#8217;t happen that often.</p>
]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2010/01/19/the-real-development-life-cycle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress and PHP have Poor Support for Dates and Time Zones</title>
		<link>http://designoplasty.com/2010/01/16/wordpress-and-php-have-poor-support-for-dates-and-time-zones/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-and-php-have-poor-support-for-dates-and-time-zones</link>
		<comments>http://designoplasty.com/2010/01/16/wordpress-and-php-have-poor-support-for-dates-and-time-zones/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 09:00:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Object Oriented]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1140</guid>
		<description><![CDATA[Today I spent way too much time figuring out how to convert dates and times to different time zones. PHP can barely do it, and WordPress really doesn&#8217;t do anything to make it easier. I would love it if someone would just create a simple function like this:

$string = format_gmt_time_for_time_zone(
    'l, F [...]]]></description>
			<content:encoded><![CDATA[<p>Today I spent way too much time figuring out how to convert dates and times to different time zones. PHP can barely do it, and WordPress really doesn&#8217;t do anything to make it easier. I would love it if someone would just create a simple function like this:</p>

<pre><code>$string = format_gmt_time_for_time_zone(
    'l, F jS g:ia', 
    $myGMTTimestamp,
    'America/Los Angeles');</code></pre>

<p>or even better, using and object oriented approach:</p>

<pre><code>$string = $date->Format(
    'l, F jS g:ia', 
    'America/Los Angeles');</code></pre>

<p>It&#8217;s important because it&#8217;s kind of a &#8220;best practice&#8221; to store dates in the database in GMT (or really UTC) format and then translate them as necessary. Then I want someone in New York to see times in their time zone and also someone in Seattle. It would also help if WordPress had a per user time zone.</p>

<p>I know that PHP 6 is doing some enhanced date stuff, so hopefully that will include this simple functionality. But right now, both WordPress and PHP don&#8217;t seem to imaging a case where someone wants to print out a time for a timezone they&#8217;re not in.</p>

<p>What I ended up doing was this:</p>

<pre><code>$oldTimeZone = date_default_timezone_get();

date_default_timezone_set($requestedTimeZone));
        
$convertedString = date($formatString, $gmtTimestamp);
        
date_default_timezone_set($oldTimeZone);
        
return $convertedString;</code></pre>

<p>It works, but it&#8217;s fairly clunky. From my experience at Microsoft I know sometimes when there&#8217;s a whole category of things that needs improving, it can be hard to find someone to take that on. What has to happen is a person needs to say, &#8220;I&#8217;m going to take on times and dates and make the API better.&#8221; But either people aren&#8217;t interesting or people are too afraid to suggest such a drastic move. Furthermore, the people who wrote the original code will often be offended that someone would suggest it could be better. They will point to something like my code above an say that&#8217;s good enough. It isn&#8217;t.</p>

<p>I&#8217;m actually considering getting involved with WordPress on this, however, I am honestly scared that they will not be into it. I&#8217;d also like to add the per user time zone, but I sense something like that would be controversial.</p>]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2010/01/16/wordpress-and-php-have-poor-support-for-dates-and-time-zones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Swift Mailer: Awesome PHP Mailer</title>
		<link>http://designoplasty.com/2010/01/02/swift-mailer-awesome-php-mailer/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=swift-mailer-awesome-php-mailer</link>
		<comments>http://designoplasty.com/2010/01/02/swift-mailer-awesome-php-mailer/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 06:44:57 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1133</guid>
		<description><![CDATA[

Tonight was the first time that I needed to write some code for a business that would send email to customers, or at least email that needed to be reliable and feature rich. I looked at the documentation for the PHP mail function and after a lot of reading realized it was not going to [...]]]></description>
			<content:encoded><![CDATA[<img src="http://photos.smugmug.com/photos/756037510_FDz8e-O.png" class="floatright" style="width: 181px; height: 68px;" alt="Swift Mailer PHP emailer" />

<p>Tonight was the first time that I needed to write some code for a business that would send email to customers, or at least email that needed to be reliable and feature rich. I looked at the documentation for the PHP mail function and after a lot of reading realized it was not going to work. If I wanted to use HTML, that involved a lot of uncertainty, if I wanted to use UTF-8, that involved a lot of uncertainty. There were a lot of unknowns but one thing that was quickly becoming a known was that I was not going to fix this problem.</p>

<p>I knew I could send simple text emails with a URL to details if I had to, but before I did that, I wondered if someone else had solved my problem since what I wanted was reasonable and obvious. To my great surprise a few people had. It came down to two tools, <a href="http://swiftmailer.org/">Swift Mailer</a> and <a href="http://phpmailer.worxware.com/">PHP Mailer</a>.</p>

<p>After doing some Google searches and research, it became clear that <a href="http://swiftmailer.org/">Swift Mailer</a> was probably going to be better for me. And the reasons why are big lessons for PHP Mailer. <a href="http://swiftmailer.org/">Swift Mailer</a> had a nice simple website, they had one product, and they had a download link on the front page. Right off the bat, it was looking simple. On the other hand PHP Mailer has four products which I would have to investigate to find out which one was right for me. Their home page is a mess that for some reason seems to focus on ads for other people&#8217;s products along with tons of text about who knows what. It would take me hours just to parse the homepage.</p>

<p>But, what took it over the edge was that <a href="http://swiftmailer.org/">Swift Mailer</a> has a beautiful object oriented design to their API and they talk about that being a goal, they have full easy to understand documentation, installation is a breeze, as it should be, all while offering an incredibly feature rich product. Swift Mailer wins by a mile.</p>

<p>Was it as easy as it looked? Well, in about an hour I had built a WordPress plugin that would include <a href="http://swiftmailer.org/">Swift Mailer</a>&#8217;s functionality in my blog on demand. I had added code to another plugin to enable Swift Mailer at the right time and send an email from one Gmail account to another using Gmail&#8217;s smtp server with a secure connection over SSL.</p>

<p>One hour.</p>

<p>I literally copied the code over and changed the important bits. I had one issue where Gmail didn&#8217;t like the port the Swift Mailer docs used for SSL, but the Gmail docs listed the alternative port and things worked perfectly.</p>

<p>Furthermore, there are tons of features of <a href="http://swiftmailer.org/">Swift Mailer</a> that will actually inspire me to do more with email.</p>

<p>Kudos to the <a href="http://swiftmailer.org/">Swift Mailer</a> team, you&#8217;ve really created a great product and you are a poster project for open source. Thank you!</p>
]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2010/01/02/swift-mailer-awesome-php-mailer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTAccess RewriteRule, When it Changes the URL in the Address Bar</title>
		<link>http://designoplasty.com/2009/12/24/htaccess-rewriterule-when-it-changes-the-url-in-the-address-bar/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=htaccess-rewriterule-when-it-changes-the-url-in-the-address-bar</link>
		<comments>http://designoplasty.com/2009/12/24/htaccess-rewriterule-when-it-changes-the-url-in-the-address-bar/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 02:04:57 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[HTAccess]]></category>
		<category><![CDATA[RewriteRule]]></category>
		<category><![CDATA[Web Servers]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1118</guid>
		<description><![CDATA[I have been trying to figure this out for ages. When will RewriteRule change the URL in the browser address bar? Today I read thought the whole Apache mod_rewrite documentation page and I still didn&#8217;t know the answer. But after a ton of searching I finally figured it out, and hope to explain it to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to figure this out for ages. When will RewriteRule change the URL in the browser address bar? Today I read thought the whole <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">Apache mod_rewrite documentation page</a> and I still didn&#8217;t know the answer. But after a ton of searching I finally figured it out, and hope to explain it to you the way I wish someone would have explained it to me from the beginning. </p>

<p>To start off, I think part of the reason this isn&#8217;t explained in a more upfront manner is because the writers of the documentation don&#8217;t really think it&#8217;s a valid question. Yes, if you&#8217;re where I was this morning that sounds ridiculous, and it is, but now I can understand their point of view.</p>

<p>The first rule of RewriteRule is:</p>

<blockquote>RewriteRule never &#8220;changes&#8221; the URL in the user&#8217;s browser window.</blockquote>

<p>Right now you&#8217;re probably saying no way, you&#8217;ve seen it happen, so you know it must be happening somehow. The end result is happening, you are correct, but it&#8217;s not happening the way you might think. RewriteRule does not say to the browser, &#8220;Please change the URL in the address bar to this.&#8221; Instead, sometimes RewriteRule says, &#8220;Oh, the page you&#8217;re looking for doesn&#8217;t exist, try this one instead.&#8221; This is called a redirection.</p>

<h3>Rewrite versus Redirection</h3>

<p>This is a very important distinction to most of us, but it is sort of glossed over in the Apache documentation because its writers forgot how revolutionarily important it is.</p>

<p>A rewrite is when Apache says, &#8220;OK, I am going to handle your request, and internally I am going to change the URL to this other URL. You are never going to see that other URL, but that is the URL that is going to be processed. You will continue to see whatever it is you typed in your browser&#8217;s address bar.&#8221;</p>

<p>A redirection is when Apache says, &#8220;Oh, I recognize that I can&#8217;t help you with this request, I suggest you ask for this URL instead.&#8221; After it says this, it&#8217;s done with you, the request is completely finished, and it has forgotten you ever existed. Your browser, however, receives this information and says, &#8220;Well if they suggest a different URL, I guess I&#8217;ll do my user a favor and request that URL next. Oh, and so my user knows what&#8217;s going on I&#8217;ll change the URL in the address bar.&#8221; Next your browser makes a whole separate request with the new URL. The brand new request is received by the web server and processed. The web server has no knowledge that these two requests are in any way related, and the web server certainly isn&#8217;t the one who changed the URL in the address bar of your browser.</p>

<p>This is a big deal! It&#8217;s totally lost on the writers of the Apache documentation. Because now you know you can effectively do the two things you want to do: change the URL internally or change the URL externally (or both, but in two steps.)</p>

<h3>The Code</h3>

<p>So what&#8217;s the difference between a rewrite and a redirect? One letter: R.</p>

<h4>Rewrite</h4>

<pre><code>RewriteRule ^/cars/acura /cars/honda</code></pre>

<p>Users who request the URL /cars/acura will still see /cars/acura in their address bar but they&#8217;ll see the content as if they had requested /cars/honda. (This is just an example and would lead to duplicate content warnings in Google because two different pages would have the same content.)</p>

<p>A better example:</p>

<pre><code>RewriteRule ^/cars/(.*) /cars.php?make=$1 [QSA]</code></pre>

<p>This will internally rewrite requests to /cars/acura to /cars.php?make=acura so you can pretty up your URL structure. It will handle those requests at the same time. The QSA stands for &#8220;Query String Append&#8221; and means that if the URL came in with additional query string info that will also be appended, not lost.</p>

<h4>Redirect</h4>

<pre><code>RewriteRule ^/cars/acura /cars/honda [R]</code></pre>

<p>This is the exact same example as the first example above except for the [R]. The R says, do a redirect which means once Apache is done processing the RewriteRule directives, it will stop processing the request and send the redirect message back to the browser as we discussed at the beginning of this post. This means the browser will most likely change the URL in the address bar and make a new request. There will be two web server requests, which are totally unrelated as far as the web server is concerned.</p>

<p>I should say, for the record, that normally the above code would be written as:</p>

<pre><code>RewriteRule ^/cars/acura /cars/honda [R=301,L]</code></pre>

<p>By default R returns code 302, meaning &#8220;moved temporarily&#8221; which isn&#8217;t often what people like you and me want. We want 301, meaning &#8220;moved permanentaly&#8221; which will also direct search engines to update their URL. The L means if a URL has matched this directive, do the redirect immediately and don&#8217;t process any more directives. Most of the time we don&#8217;t have complex sets of directives that all need to be processed, so just get out early to improve performance.</p>

<h3>More on Redirects</h3>

<p>I won&#8217;t go into detail here, but there are more things than just [R] that will force a redirect, for instance if you&#8217;ve given a substitution URL on another domain. Read the docs for more of those types of situations.</p>

<h3>Conclusion</h3>

<p>Hopefully this has been as helpful to you as finally figuring this out has been to me. It feels so good to finally have a good grasp on this topic.</p>


]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/12/24/htaccess-rewriterule-when-it-changes-the-url-in-the-address-bar/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Making the body Element Take Up At Least 100 Percent of the html Height</title>
		<link>http://designoplasty.com/2009/12/24/making-the-body-element-take-up-at-least-100-percent-of-the-html-height/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=making-the-body-element-take-up-at-least-100-percent-of-the-html-height</link>
		<comments>http://designoplasty.com/2009/12/24/making-the-body-element-take-up-at-least-100-percent-of-the-html-height/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 09:27:32 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1107</guid>
		<description><![CDATA[Here was my problem, I had some divs absolutely positioned at the top and bottom of the body element and I needed the div at the bottom to be at the bottom of the window even if the body wasn&#8217;t tall enough to reach the bottom of the window. Here&#8217;s the solution:

*
{
    [...]]]></description>
			<content:encoded><![CDATA[<p>Here was my problem, I had some divs absolutely positioned at the top and bottom of the <code>body</code> element and I needed the div at the bottom to be at the bottom of the window even if the body wasn&#8217;t tall enough to reach the bottom of the window. Here&#8217;s the solution:</p>

<pre><code>*
{
    margin: 0px;    /* I include this just because I always do it and for this */
    padding: 0px;   /* example it will ensure the bottom is truly the bottom. */
}

html
{
    height: 100%;
}

body
{
    min-height: 100%;
}</code></pre>

<p>I&#8217;m not entirely sure why the <code>html</code> element has to have a height of 100%, but it does. What&#8217;s interesting is if you apply a background to the html element it will fill the whole viewport, maybe the extra space is considered padding or something.</p>

<p>Some other examples on the web for other things will show the <code>body</code> having a height of 100% instead of min-height. This will put any absolutely position elements on the bottom at the bottom of the viewport instead of the bottom of the <code>body</code>.</p>]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/12/24/making-the-body-element-take-up-at-least-100-percent-of-the-html-height/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I Love The Web Standards Acid Tests</title>
		<link>http://designoplasty.com/2009/12/20/why-i-love-the-why-i-love-the-web-standards-acid-tests-acid-tests/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=why-i-love-the-why-i-love-the-web-standards-acid-tests-acid-tests</link>
		<comments>http://designoplasty.com/2009/12/20/why-i-love-the-why-i-love-the-web-standards-acid-tests-acid-tests/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 01:17:54 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Acid Tests]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web Browsers]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1087</guid>
		<description><![CDATA[I generally design only for the latest browsers. If my code works on the most recent version of Safari, Opera, Firefox, and IE then I&#8217;m happy. However, Internet Explorer is such a piece of crap that sometimes atrocious errors on IE7 give me great pause. (As of this writing IE8 was the current browser.)

I&#8217;ve said [...]]]></description>
			<content:encoded><![CDATA[<p>I generally design only for the latest browsers. If my code works on the most recent version of Safari, Opera, Firefox, and IE then I&#8217;m happy. However, Internet Explorer is such a piece of crap that sometimes atrocious errors on IE7 give me great pause. (As of this writing IE8 was the current browser.)</p>

<p>I&#8217;ve said before that I used to work on Internet Explorer. But when I worked on it IE really was effectively the only browser out there. We actually took compatibility with Netscape very seriously, but then we went way ahead and implemented more features from the standards. The problem is, we made mistakes in those implementations and since there were no other browsers, our mistakes actually became a sort of standard.</p>

<p>But those days are long long gone. Now it&#8217;s far more often the case that my code works &#8220;the first time&#8221; on every browser out there except for Internet Explorer. The other browsers are all more standards compliant by far. They also score better on the Acid Tests, and that&#8217;s why I love the Acid Tests.</p>

<p>When asked, Microsoft will say that the Acid Tests are random, that they aren&#8217;t developed with real world scenarios in mind. There is a great Microspeak term invented at Microsoft: the Acid Tests are a <a href="http://blogs.msdn.com/oldnewthing/archive/2007/05/23/2802893.aspx">forcing function</a>.</p>

<p>A forcing function is a situation or constraint that forces you to make a decision you would not make otherwise. For instance, in my end days at Microsoft, while working on the Windows Presentation Framework, one of the high level managers told me to come up with a plan to implement a feature that I was very outspoken about not implementing. I was given a week (I think) before presenting this plan to a group of all the highest level managers in our group. They were very sneaky saying that they didn&#8217;t necessarily want to implement it but if we did, how would we do it? The idea was to get me to do the work under false pretenses, then they would force me to put it in the product since it was already done. While talking about this later, the term <cite>forcing function</cite> came up, I hadn&#8217;t heard it before that. That situation was one of the nails on the coffin of my relationship with Microsoft.</p>

<p>Now that I&#8217;ve finished with my Microsoft story, I&#8217;ll say that learning the term was the best part of the experience because it describes that kind of situation very concisely.</p>

<blockquote>
  <p>The snakes were the forcing function that made me decide to mow my lawn on a regular basis.</p>
  <p>If you decide to go live on the 10th, that&#8217;s going to be a forcing function for about five other required sub-projects and your bill is going to be a little higher than usual.</p>
</blockquote>

<p>So Microsoft, it&#8217;s time to take your own medicine. We don&#8217;t care if you don&#8217;t think the Acid Tests represent real world scenarios. The truth is, fixing these bugs to pass these tests will actually and truthfully make your browser better. All the other browsers have proven it&#8217;s quite possible. You&#8217;re not protesting, as I was, out of a belief that the forcing function will make you do the wrong thing. You&#8217;re protesting because you&#8217;re incapable of actually fixing your browser.</p>

<p>Microsoft, please get out of the browser business and make everyone&#8217;s life easier. I&#8217;m tired of waiting for you to figure out how to write software.</p>

]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/12/20/why-i-love-the-why-i-love-the-web-standards-acid-tests-acid-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crazy Commenters</title>
		<link>http://designoplasty.com/2009/12/11/crazy-commenters/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=crazy-commenters</link>
		<comments>http://designoplasty.com/2009/12/11/crazy-commenters/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 08:39:29 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Comments]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1083</guid>
		<description><![CDATA[After a few days of the comments trickling into my other blog on the post that I talked about recently, I am sure they are all coming from one person. How crazy is that to invent 20 different personas. The thing is, the comments are all the same. The more that come in, the more [...]]]></description>
			<content:encoded><![CDATA[<p>After a few days of the comments trickling into my other blog on the post that I talked about recently, I am sure they are all coming from one person. How crazy is that to invent 20 different personas. The thing is, the comments are all the same. The more that come in, the more I can see it&#8217;s one person.</p>

<p>The person that I think it is has previously been exposed on another related blog, by me, and quite accidentally, as having two online personas. But the way they responded made me think she probably has multi-personality disorder. I mean that seriously and it&#8217;s kind of sad. Now that she (I&#8217;m pretty sure the core person is a woman) has shown herself to have so many personalities, it&#8217;s really kind of tragic.</p>

<p>Of course, it&#8217;s possible she&#8217;s just obsessive, or something else entirely. Luckily, her comments are pretty transparent. Even one comment I have been able to see through, although I think I may have missed one way in the past. I&#8217;ve noticed that the other blog has also stopped taking comments from her and her known personas, so they must be able to see through her too.</p>

<p>It&#8217;s something to think about when blogging, that people who are a little scary blog too, and come to your sites. It&#8217;s best to be on the lookout, and I think it&#8217;s best to have a no tolerance policy, that is, to not acknowledge them at all and not publish their comments for your own safety and comfort.</p>
]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/12/11/crazy-commenters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activist Commenters</title>
		<link>http://designoplasty.com/2009/12/08/activist-commenters/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=activist-commenters</link>
		<comments>http://designoplasty.com/2009/12/08/activist-commenters/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 03:06:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Comments]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1076</guid>
		<description><![CDATA[On one of my other blogs, I have received (so far) six comments on an old controversial post that doesn&#8217;t receive any comments anymore. It would appear that someone has sent a link to all their friends via email, because all the incoming paths are direct, often from internet mail URLs.

I have a comment stalker [...]]]></description>
			<content:encoded><![CDATA[<p>On one of my other blogs, I have received (so far) six comments on an old controversial post that doesn&#8217;t receive any comments anymore. It would appear that someone has sent a link to all their friends via email, because all the incoming paths are direct, often from internet mail URLs.</p>

<p>I have a comment stalker who is probably behind this, but I have know way of knowing for sure. The thing is, all of the comments say basically the same thing in different ways, and they all have a common aggressive tone. Having learned in the past to spot this tone, I am not approving any of them. I actually like true dissenting comments, but I know from experience approving comments with this tone doesn&#8217;t lead anywhere good.</p>

<p>All the commenters clearly want to rip my head off, but they&#8217;re trying their best to appear even tempered and rational. But one of the things that gives them away is their one-sidedness. They don&#8217;t address anything in my actual post. Some of them succumb to their urges by getting openly aggressive at the end, which is kind of funny. They&#8217;re like longer versions of this sentence:</p>

<blockquote>Oh we&#8217;re all friends and love each other and it&#8217;s ok that you don&#8217;t like cookies&#8230; there are two sides to everything&#8230; but&#8230; WHY DON&#8217;T YOU LIKE COOKIES! TELL ME! YOU&#8217;RE A MORON! I HATE YOU!</blockquote>

<p>For the record the post has nothing to do with cookies, which I actually love.</p>

<p>My comment stalker has this same tone, so either she has found people like her, or she is in fact posting all these comments. It&#8217;s kind of like they sent out an outline for people to follow and then they all followed the outline while purposely making the comments as diverse as possible. Anyway, it&#8217;s weird, and I think it&#8217;s kind of fascinating.</p>
]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/12/08/activist-commenters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP Class Methods as WordPress Action Hook Callbacks</title>
		<link>http://designoplasty.com/2009/11/20/using-php-class-methods-as-wordpress-action-hook-callbacks/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-php-class-methods-as-wordpress-action-hook-callbacks</link>
		<comments>http://designoplasty.com/2009/11/20/using-php-class-methods-as-wordpress-action-hook-callbacks/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 08:46:04 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1058</guid>
		<description><![CDATA[Using object oriented code is a must for me. Object oriented code is more than just organization of the code, it&#8217;s organization of one&#8217;s thinking. I wanted to talk about using static class methods as handlers for WordPress actions. This is important to me because often my plugins are implemented as a class.

add_action('init', 'MyPlugin::Init');

class MyPlugin
{
 [...]]]></description>
			<content:encoded><![CDATA[<p>Using object oriented code is a must for me. Object oriented code is more than just organization of the code, it&#8217;s organization of one&#8217;s thinking. I wanted to talk about using static class methods as handlers for WordPress actions. This is important to me because often my plugins are implemented as a class.</p>

<pre><code>add_action('init', 'MyPlugin::Init');

class MyPlugin
{
    public static function Init()
    {
        // Put Some Code Here
    }
}</code></pre>

<p>Pretty easy. What I really like about this is that the class name acts as a namespace, so I can use the simple function name <code>Init</code> instead of naming my function something annoying like <code>myplugin_init</code>.</p>

<p>I use this pattern all the time to initialize an instance of the class so that it can be used elsewhere, such as in a theme:</p>

<pre><code>add_action('init', 'MyPlugin::Init');

class MyPlugin
{
    private $userName = null;

    public static function Init()
    {
        global $myPlugin;

        $myPlugin = new MyPlugin();

        // The following line would probably go into a 
        // constructor method and get the real current
        // user name.

        $myPlugin->userName = 'bob';
    }

    pubic function GetUserName()
    {
        return $this->userName;
    }
}</code></pre>

<p>Then any other non-plugin code, like a theme for instance, can detect the presence of the plugin and use it.</p>

<pre><code>global $myPlugin;

if (isset($myPlugin))
{
    echo 'MyPlugin is installed, ', $myPlugin->GetUserName();
}</code></pre>

<p>Happy Coding!</p>]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/11/20/using-php-class-methods-as-wordpress-action-hook-callbacks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP, Classes, Camel Case, and Underlines</title>
		<link>http://designoplasty.com/2009/11/18/php-classes-camel-case-and-underlines/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-classes-camel-case-and-underlines</link>
		<comments>http://designoplasty.com/2009/11/18/php-classes-camel-case-and-underlines/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 23:40:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Camel Case]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming Languanges]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1051</guid>
		<description><![CDATA[When I first started PHP programming, I wrote code like the PHP inventors wrote code, using lowercase characters and underlines, like:

$my_favorite_variable = 5;

function add_numbers($first_number, $second_number)
{
    return $first_number + $second_number;
}

$answer = add_numbers($my_favorite_variable, 1);

But this became tiresome. The thing is, the underscore character is harder to type and using all lowercase really makes the [...]]]></description>
			<content:encoded><![CDATA[<p>When I first started PHP programming, I wrote code like the PHP inventors wrote code, using lowercase characters and underlines, like:</p>

<pre><code>$my_favorite_variable = 5;

function add_numbers($first_number, $second_number)
{
    return $first_number + $second_number;
}

$answer = add_numbers($my_favorite_variable, 1);</code></pre>

<p>But this became tiresome. The thing is, the underscore character is harder to type and using all lowercase really makes the code blur together at a glance. Also, it&#8217;s harder to tell the difference between variables and function names. After writing code at Microsoft for many years, I know that camel case is the way to go. Even Apple uses camel case. Modern C programming uses camel case. The PHP inventors made a mistake when using all those underscores.<p>

<p>Using camel case and adding in classes, the code becomes so much cleaner:</p>

<pre><code>$myFavoriteVariable = 5;

class Calculator
{
    public static function Add($firstNumber, $secondNumber)
    {
        return $firstNumber + $secondNumber;
    }
}

$answer = Calculator::Add($myFavoriteVariable, 1);</code></pre>

<p>Doesn&#8217;t that look better? We&#8217;re at this point in history where we&#8217;ve pretty much figured out that for all languages camel case it the easiest to read. Start variables with lowercase, classes and methods with uppercase and it looks so nice.</p>

<p>Having said that, every time I start to work on something I haven&#8217;t touched in a while there&#8217;s a flurry of code refactoring, but it feels so good to get that done. And it&#8217;s so much easier to read.</p>
]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/11/18/php-classes-camel-case-and-underlines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When it Comes to Accounts, Google is Messed Up</title>
		<link>http://designoplasty.com/2009/11/09/when-it-comes-to-accounts-google-is-messed-up/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=when-it-comes-to-accounts-google-is-messed-up</link>
		<comments>http://designoplasty.com/2009/11/09/when-it-comes-to-accounts-google-is-messed-up/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 01:38:41 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Google Docs]]></category>
		<category><![CDATA[Google Reader]]></category>
		<category><![CDATA[Google Voice]]></category>
		<category><![CDATA[Google Webmaster Tools]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1045</guid>
		<description><![CDATA[Oh Google. I love you in so many ways, and in some ways I&#8217;m just amazed you can even get out of bed and get yourself dressed in the morning.

I&#8217;m a big fan of Google hosted email. You get that great Gmail experience, but with your own domain. It also incorporates Google Docs and Calendar [...]]]></description>
			<content:encoded><![CDATA[<p>Oh Google. I love you in so many ways, and in some ways I&#8217;m just amazed you can even get out of bed and get yourself dressed in the morning.</p>

<p>I&#8217;m a big fan of Google hosted email. You get that great Gmail experience, but with your own domain. It also incorporates Google Docs and Calendar right into the mix so companies can easily share documents and meetings. This is great.</p>

<p>But what happens if your company wants to use AdSense? Well, you have to &#8220;sign up&#8221; for a Google Account using your email. Then it will create an account for you. But wait, didn&#8217;t you already have an account? Yes. So now you have two accounts with the same email, and they are both google accounts, but they are not the same. The AdSense account will also hook you up with Google Docs, but its a whole different Docs than the other account. Confusing, huh?</p>

<p>Now add Google Analytics, Google Webmaster Tools, Google Voice, and Google Reader. They can only use one of the accounts as well.</p>

<p>Furthermore, lets say you had a thriving business and were actually making good money by participating in AdSense? Let&#8217;s say this account was under some Gmail address. Well, now you have this wonderful domain address, and you don&#8217;t really need that Gmail address. You want to transfer everything over. Well, too bad. You can&#8217;t. You just can&#8217;t. It&#8217;s not like you have to know the right people or something. Google just gets fixated on the email associated with these services and has no concept of ever changing that. They actually &#8220;recommend&#8221; you shut down the old AdSense account completely and start a new one. Oh, and by the way, the policy clearly states that you can&#8217;t have two AdSense accounts at the same time, so that should be a fun (and expensive) transition for you if you choose to make it.</p>

<p>This might seem odd to you. You might even try to search (using Google) for an explanation. But there isn&#8217;t one. Google is bizarrely silent on the issue. Well, you can imagine that one day they will have it sorted out, but for now, it&#8217;s just a big, and often expensive, mystery.</p>

<hr/>

<p><em>Update</em>: I recently found that Google will allow you to change your email address as long as it is not an @gmail.com address. So the moral of the story is never ever sign up for AdSense with an @gmail.com address.</p>]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/11/09/when-it-comes-to-accounts-google-is-messed-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally, CSS Font Ligatures</title>
		<link>http://designoplasty.com/2009/11/08/finally-css-font-ligatures/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=finally-css-font-ligatures</link>
		<comments>http://designoplasty.com/2009/11/08/finally-css-font-ligatures/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 21:11:59 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://designoplasty.com/?p=1037</guid>
		<description><![CDATA["Using @font-face allows web designers a wide palette of font choices and with commercial font vendors supporting the WOFF font format, the set of font choices should improve even more. So the next step is clearly to try and make better use of features available in these fonts."]]></description>
			<content:encoded><![CDATA[<img src="http://photos.smugmug.com/photos/707032603_S6Nqt-O.png" class="floatright" style="width: 395px; height: 593px;" alt="Firefox ligatures, typography, MEgalopolis Extra" />

<div class="caption" style="width: 395px;">This text was actually rendered in a development version of Firefox using the typeface MEgalopolis Extra and it&#8217;s wonderful ligatures.</div>

<h5>Quick Facts</h5>

<dl class="facts">
  <dt class="story">Featured Story</dt>
  <dd>
    <p><a href="http://hacks.mozilla.org/2009/10/font-control-for-designers/">after Firefox 3.6 – new font control features for designers</a></p>
  </dd>
  <dt class="what">What</dt>
  <dd>
    <p>Video and article showing advanced typography features coming to CSS</p>
  </dd>
  <dt class="who">Who</dt>
  <dd>
    <p>Jonathan Kew, John Daggett</p>
  </dd>
</dl>

<h5>Excerpt</h5>

<blockquote>
<p>Using @font-face allows web designers a wide palette of font choices and with commercial font vendors supporting the WOFF font format, the set of font choices should improve even more. So the next step is clearly to try and make better use of features available in these fonts.</p>

<p>For many years, “smart” font formats such as OpenType and AAT have provided font designers ways of including a rich set of variations in their fonts, from ligatures and swashes to small caps and tabular figures. The OpenType specification describes these features, identifying each with a unique feature tag. But these have typically only been available to those using professional publishing applications such as Adobe InDesign. Firefox currently renders using font defaults; it would be much more interesting to provide web authors with a way of controlling these font features via CSS.</p>

<p>Håkon Wium Lie of Opera, based on discussions with Tal Leming and Adam Twardoch, proposed extending the CSS ‘font-variant’ property to include values for font features. Mozilla is actively working on a new proposal along these lines. This is a fairly big addition to CSS, so it will most likely involve some complex discussions about how best to support these features.</p>
</blockquote>

<h5>Comment</h5>
<p>I&#8217;m so glad someone is working on this. The type community has embraced ligatures as far back as printing began. But the Microsoft powered browser team would never be able to appreciate or in some cases, even understand these features, and they certainly wouldn&#8217;t be the first to implement them. </p>

<p>When I worked there, there were people who appreciated type to some extent. The people who design all those fonts Microsoft keeps unleashing onto the world. Like everyone at Microsoft, though, can they really appreciate type very much to work in such a non-creative environment?</p>

<p>There still isn&#8217;t broad OS level support for ligatures, and Word has some very limited Office only implementation. That&#8217;s the funny thing about Microsoft, I keep expecting someone to say, &#8220;We have the most used word processor in the world and we don&#8217;t support this obvious feature.&#8221; But they never do. I worked on WPF, and that has support for a bunch of typography features, (tested using Zapfino) but I would highly recommend against using that. Microsoft won&#8217;t even use it.</p>

]]></content:encoded>
			<wfw:commentRss>http://designoplasty.com/2009/11/08/finally-css-font-ligatures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
