<?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>Shirepress</title>
	<atom:link href="http://benvalentine.info/feed" rel="self" type="application/rss+xml" />
	<link>http://benvalentine.info</link>
	<description>the resumé, blog &#38; work of ben valentine</description>
	<lastBuildDate>Wed, 30 Nov 2011 22:33:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Best Practices: Front End</title>
		<link>http://benvalentine.info/web-development/best-practices-front-end</link>
		<comments>http://benvalentine.info/web-development/best-practices-front-end#comments</comments>
		<pubDate>Wed, 30 Nov 2011 22:20:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://benvalentine.info/?p=171</guid>
		<description><![CDATA[This is part 1 of my series on best practices. In future posts, I&#8217;ll cover best practices with back-end development and best practices with HTML forms. In the meantime, here are sometime guidelines to follow for your HTML pages: Reset&#160;&#160;&#160;<a href="http://benvalentine.info/web-development/best-practices-front-end">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is part 1 of my series on best practices. In future posts, I&#8217;ll cover best practices with back-end development and best practices with HTML forms. In the meantime, here are sometime guidelines to follow for your HTML pages:</p>
<ol>
<li>
<h3>Reset your CSS.</h3>
<p><strong>Why?</strong>: Unfortunately, the base CSS rules in browsers are not consistent so they need to be reset if you want your site to look how its supposed to look with as few surprises as possible. This is a step in that direction.</p>
<p>A good CSS reset: <a href="http://meyerweb.com/eric/tools/css/reset/">http://meyerweb.com/eric/tools/css/reset/</a></p>
<p>Or if you&#8217;re using HTML5: http://html5reset.org/
</li>
<li>
<h3>Minify your CSS and JavaScript.</h3>
<p><strong>Why?</strong>: Always store your CSS and JavaScript in files and be sure to minify it. Minifying your JavaScript removes comments or whitespace from your stylesheets and scripts speeding up your load time. This also reduces the chance of your page getting hacked.</p>
<p>Tools for this: <a href="http://minifyjavascript.com">http://minifyjavascript.com</a>, <a href="http://minifycss.com">http://minifycss.com.</a>
</li>
<li>
<h3>Always use CSS sprites instead of JavaScript for image replacement.</h3>
<p><strong>Why?</strong>: Images slow down page loads more than anything so using as few images as possible<br />
makes things faster. Using sprites (a composite image of the hover and non-hover states stacked<br />
vertically or horizontally), for rollovers significantly cuts down on the number of images the<br />
page has to load.</p>
<p>Tools for this: <a href="http://csssprites.com/">http://csssprites.com/</a></p>
<p>This will keep you from having to reload your page.
</li>
<li>
<h3>Ensure legibility for screen readers.</h3>
<p><strong>Why?</strong>: Some users will only be able to access your website using screen readers, so you must ensure<br />
content appears in a logical order. </p>
<p>Here is good resource for this: <a href="http://csszengarden.com/">http://csszengarden.com</a>
</li>
<li>
<h3>Let Google host JS libraries for you.</h3>
<p><strong>Why?</strong>: Speeds up your site because you save your users from downloading these libraries.</p>
<p>Google hosts a number of popular JavaScript libraries including jQuery, Dojo, MooTools and Prototype.<br />
A full list can be found here: <a href="http://code.google.com/apis/libraries/">http://code.google.com/apis/libraries/</a></p>
<p>Example:</p>
<p><code>&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" &gt;&lt;/script&gt;</code></p>
</li>
<li>
<h3>Load JavaScripts at the bottom of page.</h3>
<p><strong>Why?</strong>: The browser loads the head before the body. So if your JavaScript is in the head your user sees white while the page loads. If you put your JavaScript at the bottom, your content will load first.</p>
<p>Of course, there are exceptions to this rule, such as when you really need a JavaScript to run before the body of the page is loaded. In most circumstances, you&#8217;ll be able to get away with loading them at the bottom of the page.</p>
</li>
<li>
<h3>Use multiple stylesheets</h3>
<p><strong>Why?</strong>: Separation of concerns. If another developer assumes your project, he won&#8217;t want to kill you.</p>
<p>I usually use one for resets, one for elements and utility classes, one for page layout, at least one for the content, one for forms, one for mobile, one for print and at least one for IE.</p>
</li>
</ol>
<p>More to come&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-development/best-practices-front-end/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frameworks</title>
		<link>http://benvalentine.info/web-development/frameworks</link>
		<comments>http://benvalentine.info/web-development/frameworks#comments</comments>
		<pubDate>Wed, 19 Oct 2011 20:37:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://benvalentine.info/?p=156</guid>
		<description><![CDATA[These days it is almost unthinkable to develop a software project without a development framework of some kind. Most development frameworks that I&#8217;ve run across invoke the MVC programming paradigm or something similar. The advantage to using a framework is&#160;&#160;&#160;<a href="http://benvalentine.info/web-development/frameworks">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>These days it is almost unthinkable to develop a software project without a development framework of some kind. Most development frameworks that I&#8217;ve run across invoke the MVC programming paradigm or something similar. The advantage to using a framework is threefold:</p>
<ul>
<li>It divides the code by its functionality (aka &#8220;the separation of concerns&#8221;). This provides a guideline for where developers should include their logic which is useful when working with a team of developers. The model (in some cases the DAO) communicates with the database, the view focuses on presentation, and the controller on logic. It&#8217;s straight-forward.</li>
<li>It saves the developer time, by not having to reinvent the wheel and write code that provides the base functionality for the application like a bootstrapper, a dependency injection container, a base DAO (database access object), a base model, controller, view and so forth.</li>
<li>Most frameworks have API&#8217;s that provide shortcut methods and sometimes common objects that can reduce the volume of code considerably. This is especially useful for websites which have a list of common components (i.e. forms, authentication, web services, clean urls, ajax requests, email tokens, captcha, security hashes, feed aggregation, shopping carts, etc., etc., etc.) that are cumbersome to program again and again. Even if you re-use your code as boilerplate, oftentimes clients request you customize it and this is where the libraries come in handy.</li>
</ul>
<p>Now, I must say that if you&#8217;re a developing something simple like a website with a blog (like this one) you may want a content management system. In most cases, web application development is beyond the scope of a CMS. There are usually a multitude of frameworks for every programming language with a reasonable following. In my opinion, frameworks can divided into those that include an ORM (object relational mapper) and those that don&#8217;t.</p>
<p>Many web developers sing the praises of ORM frameworks, such as Django, Ruby On Rails, CakePHP and Symfony because of the added speed and efficiency it gives them. This is good if you&#8217;re a freelance web developer trying to create a small-scale specialized web application in as little time as possible. However, this doesn&#8217;t make or break the framework. With ORM&#8217;s there is an inherent lack of scalability and in many cases, it is not desireable to have your database schema follow your object model completely. </p>
<p>ORM&#8217;s can also make code refactoring a pain because the schema is created as you create your code, so any code changes after you have initially run the ORM, result in an extra step that can become tedious. Migrating your database with an ORM can also be a pain, especially if your switching database systems (i.e. from MySQL to Postgres).</p>
<p>Rather than evaluating what frameworks are superior to others I will highlight each of their strengths. As you&#8217;ll notice most of these are PHP or Python frameworks because these are the ones I know the best:</p>
<p>Zend &#8211;  Extremely thorough library of fully scalable, object-oriented components.  If you don&#8217;t want to use the MVC framework, you can simply use the components independently. Support for a multitude of database systems. Supports integration with Doctrine ORM. Best suited for professional and enterprise-level projects written in PHP.</p>
<p>CodeIgniter &#8211; Similar to Zend, but lighter weight, so sites run faster. It has simpler API that caters to less experienced programmers. Excellent and easy to read documentation. Supports MySQL and Postgres database systems. Best suited for PHP freelancers.</p>
<p>Ruby On Rails &#8211; This innovative framework is perhaps the number one reason to learn Ruby. Includes an optional and flexible ORM and an all-encompassing API, partly because it&#8217;s the only major Ruby web development option. Ships with a JavaScript library, originally Prototype, now jQuery. Best suited to Ruby web shops and freelancers.</p>
<p>CakePHP &#8211; Ruby On Rails with PHP. Often considered the fastest PHP framework, development-wise, due to its code automation feature. Library of object-oriented components MIT licensing so you can do whatever you want with it. Best suited to PHP web shops that take on small-scale web app projects.</p>
<p>Django &#8211; Features a built-in admin section, a plugin system for components which already very thorough, and an ORM meaning its built for speed rather than customization. Remarkably simple and extensible templating language that allows for the ability to create custom tags. Best suited for Python web shops and those looking integrate with Google App-Engine.</p>
<p>TurboGears &#8211; Self-described &#8220;megaframework&#8221;. Built on top of other popular Python projects including CherryPy, Pylons and SQLAlchemy, an extremely flexible ORM. Ships with tools for AJAX integration.  Best suited to complex, enterprise-level Python applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-development/frameworks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming languages</title>
		<link>http://benvalentine.info/technology/thinking-about-the-future</link>
		<comments>http://benvalentine.info/technology/thinking-about-the-future#comments</comments>
		<pubDate>Mon, 04 Apr 2011 18:47:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://benvalentine.info/?p=136</guid>
		<description><![CDATA[I don&#8217;t have a favorite programming language. I know several programming languages including PHP, Python, C/C++, Java and JavaScript. I know a little Perl, Ruby, Visual Basic and C++ but not enough where I could feel comfortable making judgements about&#160;&#160;&#160;<a href="http://benvalentine.info/technology/thinking-about-the-future">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t have a favorite programming language. I know several programming languages including PHP, Python, C/C++,  Java and JavaScript. I know a little Perl, Ruby, Visual Basic and C++ but not enough where I could feel comfortable making judgements about those languages. I would love to learn Smalltalk.</p>
<p>I learned object-oriented using Java which is a great language. It&#8217;s easy to learn, has garbage collection, a simple interpreter, has clean, consistent dot syntax and intuitively-named native functions. In addition, there&#8217;s loads of support for it. You don&#8217;t have to look far if you don&#8217;t understand something. I don&#8217;t like about it is that it&#8217;s purely object-oriented. I cannot write a script with Java (unless I&#8217;m using Groovy of course, which for all intensive purposes is considered a different language) and that is a bit of a downer. Everything must be done using objects and that&#8217;s great if you developing professional software but not so if I just want to write a little game for my son. I also don&#8217;t like the old school clunky array syntax. Really, you must use Vectors with Java and you&#8217;ll need the Iterator() object to loop through it, because there is no foreach loop.</p>
<p>I work with PHP and JavaScript everyday and so I should talk about them second. PHP is great language. Its easy to learn, most of its native library is crammed full of C functions so if you already know C you&#8217;ll feel right at home. Alternately, if you&#8217;re intent on learning C, PHP could serve as a good place to start. Its syntax is similar to Perl and C (almost as if it were a cross between those two languages). At first, I didn&#8217;t like the &#8216;$&#8217; marking for variables, but I&#8217;d have to say it has grown on me. After all, its very easy to tell what&#8217;s a variable! Unfortunately, the downside is that the code is ugly as sin. Nested function can lead to long lines of code that can be hard to read. There are plenty of frameworks to choose from and believe me you&#8217;ll want one unless you want to be up all night coding. Zend is my choice but I&#8217;ll leave that for another article.</p>
<p>JavaScript is the other web language I work with and it sucks. Well, that&#8217;s a bit harsh. Most of the bare-bones language sucks which is surprising since it borrows so heavily from two good languages: Java and C. There are parts of JavaScript which are very good. But most of it stinks and here&#8217;s why: you need far too many lines of code to write simple things that websites need. The DOM tree can be quite tedious to navigate through and to top that off, there&#8217;s Internet Destroyer and all of its re-interpretations. Thankfully, to make this language more manageable, there are plenty of JavaScript libraries; jQuery, Ext, Prototype, Dojo and Mootools are some of the best in my opinion.</p>
<p>Python is my leisure language of choice for the desktop and it ain&#8217;t bad for the web either. Django and TurboGears are both solid frameworks that make developing a website a breeze and a blast. Mind you, website deployment is usually a bitch given the lack of hosting support. I like almost everything about Python: the syntax, the function library, the interpreter, the philosophy of the language: &#8220;there is one obvious way to do it&#8221;. The one thing I don&#8217;t like, and I&#8217;ll admit that its kind of nit-picky, is its lack of traditional operands. I&#8217;m so used to using &#038;&#038;, ++ and such that I can&#8217;t get into AND, OR or +1. Other than that, Python makes programming a pleasure and an ease and it supports classes, of course.</p>
<p>C and C++, while not as modern and streamlined as Python, deserve their props. There is a learning curve, but there is tremendous power with mastering them. C/C++ served as a blueprint for almost all programming languages after it. I&#8217;m in the midst of learning C and later C++ and while its a little more difficult than the other programming languages, the rewards justify it.</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/technology/thinking-about-the-future/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is to be done about IE6?</title>
		<link>http://benvalentine.info/web-standards/what-is-to-be-done-about-ie6</link>
		<comments>http://benvalentine.info/web-standards/what-is-to-be-done-about-ie6#comments</comments>
		<pubDate>Wed, 30 Mar 2011 18:22:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://benvalentine.info/?p=108</guid>
		<description><![CDATA[Developers are divided on what to do about the IE6 problem. Microsoft recently that they will support IE6 until April 8, 2014 effectively crushing the dreams of web developers everywhere. The problems with IE6 are as follows: It uses an&#160;&#160;&#160;<a href="http://benvalentine.info/web-standards/what-is-to-be-done-about-ie6">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Developers are divided on what to do about the IE6 problem. Microsoft recently that they will support IE6 until <a href="http://blogs.sitepoint.com/microsoft-support-ie6-2014/" target="_blank">April 8, 2014</a> effectively crushing the dreams of web developers everywhere. The problems with IE6 are as follows:</p>
<ol>
<li>It uses an out-of-date box model where borders and padding are added to the width.</li>
<li>It can&#8217;t absolutely position elements correctly.</li>
<li>It can&#8217;t relatively position elements correctly.</li>
<li>Pseudo-classes only work on anchor elements. Nothing else.</li>
<li>Floated &lt;div&rt; elements will inexplicably double their margins if they are not displayed as inline elements.</li>
<li>It doesn&#8217;t clear floats properly.</li>
<li>It doesn&#8217;t understand what overflow:hidden means</li>
<li>It doesn&#8217;t know what min and max height and width mean. Instead, it uses hasLayout.</li>
<li>It automatically expands containers based on content overflow (called &#8220;float drops&#8221;).</li>
<li>In a complete reversal of logic, it will truncate content too long for its container.</li>
<li>There&#8217;s no PNG support.</li>
<li>Flickering background images.</li>
</ol>
<p>There are other bugs as well. I just figured I would list the most glaring and significant ones.</p>
<p>As of this writing, the <a href="http://www.neowin.net/news/ie6-market-share-drops-6-ie8-still-in-top-spot">market share for IE6 is 4.5%</a>. About half of these are <a href="http://blog.mozilla.com/ligong/2010/01/22/china%E2%80%99s-strange-fixation-on-ie6/">Chinese</a>. Unfortunately, China is still an authoritarian country and users may have no choice in the matter (all the more reason Microsoft should drop support). My educated speculation is that the rest of IE6 fit into two categories:</p>
<ul>
<li>People who are on public computers at work or in a library (though these numbers are in decline).</li>
<li>South Koreans</li>
<li>Old people.</li>
</ul>
<p>My solution to deal with the IE6 problem is simple: require IE6 users to upgrade before they enter your site. You can do this with a simple jQuery script like so:</p>
<p><code><br />
if($.browser.msie &#038;&#038; $.browser.version.substr(0,1) < 7){<br />
     location.href="http://www.mozilla.com/en-US/firefox/";<br />
}<br />
</code></p>
<p>Obviously, you don't have to redirect them to Mozilla. This is simply an example. You can redirect them anywhere you like. The best option would be to redirect them to a page with links to Firefox, Chrome, Safari, Opera and IE9 download pages and have them decide for themselves. Include a message like, "Sorry, but this site's content doesn't support browsers released over 10 years ago.". Feel free to soften the blow if you'd like but, doesn't that seem reasonable?</p>
<p>Arguments against this method:</p>
<ol>
<li>Why do you have such a problem supporting IE6?! It seems lazy to me.</li>
<li>Shouldn't a site support anyone who visits it?</li>
<li>You're sacrificing page visits.</li>
</ol>
<p> To which I have the following rebuttal:</p>
<ol>
<li>It's time-consuming to support out-of-date browsers. When you develop a website, time is money.</li>
<li>In a perfect world. Most sites no longer support Mosaic, Netscape Navigator or OmniWeb. Perhaps there's someone out there who uses these but they don't support Cascading Stylesheets so they don't support half of the websites on the web. This is why developers must pay attention to how their site looks in a screen reader. Google and YouTube no longer fully support IE<7.</li>
<li>The third argument assumes that after people upgrade they won't return to your website. I also stress that IE6 has only 4.5% of the market share, and of those 4.5%, half of them live in China and 40% live in South Korea. Unless, you plan on getting a lot of Chinese or South Korean visitors to your site. I wouldn't worry about it.</li>
<p>The goal of this approach is to get people/companies to upgrade so the web can move forward and everyone else's UX can improve. If your client absolutely insists on supporting IE6 after hearing all these arguments, there are certain steps that I will cover in order to improve the IE6 discrepencies but I will cover those in a later article.</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-standards/what-is-to-be-done-about-ie6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Page Layout: The Header</title>
		<link>http://benvalentine.info/web-development/page-layout-the-header</link>
		<comments>http://benvalentine.info/web-development/page-layout-the-header#comments</comments>
		<pubDate>Wed, 16 Mar 2011 22:10:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://benvalentine.info/?p=84</guid>
		<description><![CDATA[With a company blog layout, I&#8217;ve found that the header normally contains the following sections: The logo or nameplate and site title. A skip-to nav that can only be seen by screen readers. Utility, &#8220;tools&#8221; or &#8220;highlight&#8221; navigation where important&#160;&#160;&#160;<a href="http://benvalentine.info/web-development/page-layout-the-header">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With a company blog layout, I&#8217;ve found that the header normally contains the following sections:</p>
<ol>
<li>The logo or nameplate and site title.</li>
<li>A skip-to nav that can only be seen by screen readers.</li>
<li>Utility, &#8220;tools&#8221; or &#8220;highlight&#8221; navigation where important pages that aren&#8217;t part of the main nav structure can be highlighted.</li>
<li>Searchbar.</li>
</ol>
<p>The logo or nameplate and the site title should appear together in a single semantic section called &#8220;branding&#8221;. The site title should be wrapped in &lt;h1&gt; because in semantic context it is the most important headline on the page and link to the homepage.</p>
<p><code><br />
&lt;section id="branding"&gt;<br />
&lt;h1&gt;&lt;a href="index.html"&gt;&lt;span&gt;My Site Title&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;<br />
&lt;/section&rt;<br />
</code></p>
<p>By wrapping &lt;span&amp;rt; tags around the Site Title, we can ensure that it can only be seen by screen readers in our CSS:</p>
<p><code><br />
#branding a span{<br />
visibility: hidden;<br />
}<br />
</code></p>
<p>If your site has a tagline you can add it within the &#8220;branding&#8221; section. I usually use a &lt;p&amp;rt; tag with a &#8220;tagline&#8221; id.</p>
<p>Moving on, we&#8217;ll add our &#8220;skip-to-nav&#8221; next.</p>
<p><code><br />
&lt;hr class="visuallyhidden" /&gt;<br />
&lt;nav id="skip-to-nav"&gt;<br />
&lt;ul&gt;<br />
	&lt;li&gt;&lt;a title="Skip to Navigation" href="#"&gt;Skip to Navigation&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a title="Skip to Content" href="#content"&gt;Skip to Content&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a title="Skip to Footer" href="#document-footer"&gt;Skip to Footer&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;nav&gt;<br />
</code></p>
<p>One thing to notice is how we add the &lt;hr&amp;rt; tag with the class &#8220;visuallyhidden&#8221;. This is a class that we&#8217;ll add to the stylesheet so we can hide any element from normal browsers but not from screen readers. The &lt;hr&amp;rt; serves to divide up the branding section from the &#8220;skip-to-nav&#8221; for screen readers. The next piece is the searchbar:</p>
<p><code><br />
&lt;div id="envelope"&gt;<br />
&lt;section id="search" class="search-box"&gt;<br />
&lt;form id="search-submit" method="post"&gt;<br />
&lt;fieldset&gt;<br />
&lt;label for="search"&gt;Search:&lt;/label&gt;<br />
&lt;input class="search" name="search" type="search" value="Search" /&gt; &lt;input class="submit" name="submit" type="submit" value="Submit" /&gt;<br />
&lt;/fieldset&gt;<br />
&lt;/form&gt;<br />
&lt;/section&gt;<br />
&lt;header id="document-header" role="banner"&gt;<br />
</code></p>
<p>Retarded browsers such as IE6, that won&#8217;t go away, don&#8217;t recognize input[type="search"] etc., so we have to code around them assigning them the classes &#8220;.search&#8221; and &#8220;.submit&#8221; which is annoying, but I digress. We&#8217;ll put the searchbar outside the header for now so that it appears at the top of the page for screen readers and then we can absolutely position it wherever we want for everybody else. The fieldset will provide its own box around the searchbox so we need not add another &lt;hr&amp;rt; tag. The final piece to add is our &#8220;toolbar&#8221; navigation:</p>
<p><code><br />
&lt;div id="envelope"&gt;<br />
&lt;section id="search" class="search-box"&gt;&lt;form id="search-submit" method="post"&gt;<br />
&lt;fieldset&gt;&lt;label for="search"&gt;Search:&lt;/label&gt;<br />
&lt;input name="search" type="text" value="Search" /&gt; &lt;input class="submit" name="submit" type="submit" value="Submit" /&gt;&lt;/fieldset&gt;<br />
&lt;/form&gt;<br />
&lt;/section&gt;<br />
&lt;!--end #search --&gt;<br />
&lt;section id="logo"&gt;<br />
&lt;h1&gt;&lt;a href="index.html"&gt;&lt;span&gt;Company Name&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;<br />
&lt;/section&gt;<br />
&lt;!--end #logo --&gt;<br />
&lt;hr class="visuallyhidden" /&gt;<br />
&lt;nav id="skip-to-nav"&gt;<br />
&lt;ul&gt;<br />
	&lt;li&gt;&lt;a title="Skip to Navigation" href="#"&gt;Skip to Navigation&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a title="Skip to Content" href="#content"&gt;Skip to Content&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a title="Skip to Footer" href="#document-footer"&gt;Skip to Footer&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/nav&gt;<br />
&lt;!--end #skip-to --&gt;<br />
&lt;hr class="visuallyhidden" /&gt;<br />
&lt;nav id="tools"&gt;<br />
&lt;ul&gt;<br />
	&lt;li&gt;&lt;a class="current" title="Home"&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a title="Tools Link 1" href="#"&gt;Tools Link 1&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a title="Tools Link 2" href="#"&gt;Tools Link 2&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/nav&gt;<br />
&lt;!--end #tools --&gt;<br />
&lt;hr class="visuallyhidden" /&gt;<br />
&lt;/header&gt;<br />
&lt;!--end #document-header --&gt;<br />
</code></p>
<p>I prefer to specifically list them as Tools Link 1, Tools Link 2, etc. so I can tell which link part of which menu when I&#8217;m styling. On to the content area.</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-development/page-layout-the-header/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo Losing Its Relevance</title>
		<link>http://benvalentine.info/world-wide-web/yahoo-losing-its-relevance</link>
		<comments>http://benvalentine.info/world-wide-web/yahoo-losing-its-relevance#comments</comments>
		<pubDate>Tue, 22 Dec 2009 23:16:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[World Wide Web]]></category>

		<guid isPermaLink="false">http://benvalentine.info/blog/?p=56</guid>
		<description><![CDATA[I have a hunch that it may be a couple of years before Yahoo! will be going the way AOL, MSN and the countless search engines and web portals before it. Recently Facebook eclipsed Yahoo! in terms of worldwide traffic&#160;&#160;&#160;<a href="http://benvalentine.info/world-wide-web/yahoo-losing-its-relevance">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have a hunch that it may be a couple of years before Yahoo! will be going the way AOL, MSN and the countless search engines and web portals before it. Recently Facebook eclipsed Yahoo! in terms of worldwide traffic according to Alexa, a significant loss in the past 10 months. Of course, number 3 worldwide isn&#8217;t a bad place to be and neither is 41st, the spot AOL currently occupies.  However, the bar is extremely high for search engines and web portals. They are the set pieces of the World Wide Web. According to CNN, Yahoo! has seen its market share decrease 1.4 points in the last 6 months and in my own humble opinion this trend will continue until Yahoo! radically reinvents themselves.</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/world-wide-web/yahoo-losing-its-relevance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Libraries vs. Flash for Animations</title>
		<link>http://benvalentine.info/web-development/javascript-vs-flash-for-animations</link>
		<comments>http://benvalentine.info/web-development/javascript-vs-flash-for-animations#comments</comments>
		<pubDate>Wed, 25 Nov 2009 17:37:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://localhost:8888/benvalentine/blog/?p=3</guid>
		<description><![CDATA[It used to be that if you wanted to have a dynamic webpage, one that really snapped, wowing and impressing users with its fluid, movie-like animation, the choice was clear: Flash. However, if users don&#8217;t have the plugin installed for&#160;&#160;&#160;<a href="http://benvalentine.info/web-development/javascript-vs-flash-for-animations">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It used to be that if you wanted to have a dynamic webpage, one that really snapped, wowing and impressing users with its fluid, movie-like animation, the choice was clear: Flash. However, if users don&#8217;t have the plugin installed for whatever reason, they get an annoying prompt to navigate away from the page, install the latest version of Shockwave, restart their browser and navigate back to the page. If you have Flash on your homepage, this will drive your visitors crazy and they won&#8217;t want to see the rest of your site.</p>
<p>A few years back, in 2005, the Prototype framework emerged, followed by the extensions, Script.aculo.us and jQuery. These libraries created an easy, cross-browser compatible way to include animations on the bare web page without the possible obstruction of Flash. With the vast array of effects at his or her disposal, a good JavaScript programmer can create a Flash-like page without all the fuss.</p>
<p>At this point, in the web&#8217;s evolution, I&#8217;d recommend creating basic web animations with JavaScript rather than Flash. Don&#8217;t get me wrong, Flash is still a great format for movies and other presentations, but for web page animations, I gotta go with a good JavaScript library like jQuery.</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-development/javascript-vs-flash-for-animations/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Page Layout: The Skeleton</title>
		<link>http://benvalentine.info/web-development/html-5</link>
		<comments>http://benvalentine.info/web-development/html-5#comments</comments>
		<pubDate>Tue, 03 Nov 2009 21:09:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://localhost:8888/benvalentine/blog/?p=33</guid>
		<description><![CDATA[Everyone has different opinions on the best way to markup HTML pages, from element positioning to what naming conventions to use and there are certainly best practices to consider as well.  If you&#8217;re like myself and write markup for a&#160;&#160;&#160;<a href="http://benvalentine.info/web-development/html-5">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Everyone has different opinions on the best way to markup HTML pages, from element positioning to what naming conventions to use and there are certainly best practices to consider as well.  If you&#8217;re like myself and write markup for a lot of websites, you don&#8217;t have time to re-invent the wheel every time, you&#8217;re going to want to create a website template. Perhaps more than one. I have a separate template for Drupal because it likes to force its own naming conventions on you but, I&#8217;ll address this in another post.</p>
<p>The first thing you&#8217;ll want to do is look at the similarities between the websites you have done markup for already. Also, notice that each site will need the following layout demands:</p>
<ul>
<li>A landing (or welcome) layout: index.html</li>
<li>A layout representing a sub-level page or single post: page.html</li>
<li>A layout where multiple post decks are displayed : archive.html</li>
<li>A layout representing media display such as a photo or video gallery: media.html</li>
<li>A page for 404 errors: 404.html</li>
<li>A page for the sitemap: sitemap.html</li>
</ul>
<p>It may look like a lot of work to write markup for all those pages but, keep in mind, the index page usually the only page with a significant difference in layout. Most of my index pages resemble this structure:</p>
<p><code><br />
&lt;div id="envelope"&gt;<br />
&lt;header id="document-header" role="banner"&gt;<br />
&lt;/header&gt;<br />
&lt;nav id="primary-navigation" role="navigation"&gt;<br />
&lt;ul&gt;<br />
&lt;/ul&gt;<br />
&lt;/nav&gt;<br />
&lt;section id="content"&gt;<br />
&lt;section id="intro" role="main"&gt;<br />
&lt;/section&gt;<br />
&lt;section id="feature-deck"&gt;<br />
&lt;/section&gt;<br />
&lt;/section&gt;<br />
<!--end #content--><br />
&lt;footer id="document-footer"&gt;<br />
&lt;/footer&gt;<br />
&lt;section id="hero"&gt;<br />
&lt;/section&gt;<br />
&lt;/div&gt;<br />
</code></p>
<caption>index.html</caption>
<p>In the index.html example, you&#8217;ll notice that I put the hero section below the footer. For those of you unfamiliar with the term the &#8220;hero&#8221; it refers to the main artwork or photo on the index page that is intended to grab the readers attention. The hero appears below the footer in the markup so that we may preserve the same structure of the page for people accessing the site with screen readers, in case the hero contains a jQuery carousel, a tabbed panel or a flash movie. Per the CSS Zen Garden approach, I use absolute positioning to put the hero in the correct space. The other sections should be self-explanatory. &#8220;Intro&#8221; contains an introduction to the site&#8217;s content and &#8220;feature-deck&#8221; will contain a list of recent posts or tweets. The &#8220;feature-deck&#8221; could be considered an &amp;lt;aside&amp;rt;, but I think that you&#8217;re better off making that decision on a site-by-site basis.</p>
<p>All other pages will share this structure:</p>
<p><code><br />
&lt;div id="envelope"&gt;<br />
&lt;header id="document-header" role="banner"&gt;<br />
&lt;/header&gt;<br />
&lt;nav id="primary-navigation" role="navigation"&gt;<br />
&lt;ul&gt;<br />
&lt;/ul&gt;<br />
&lt;/nav&gt;<br />
&lt;section id="content"&gt;<br />
&lt;aside id="sidebar"&gt;<br />
&lt;/aside&gt;<br />
&lt;section id="posting-area" role="main"&gt;<br />
&lt;/section&gt;<br />
&lt;/section&gt;<br />
&lt;footer id="document-footer"&gt;<br />
&lt;/footer&gt;<br />
&lt;/div&gt;<br />
</code></p>
<caption>page.html</caption>
<p>I&#8217;ve named the major sections with semantic web-friendly conventions. You&#8217;ll also notice I use dashes instead of underscores or camelCasing. Reason being, external sources recognize dashed ids as seperate words enhancing its semantic meaning. For instance &#8220;posting-area&#8221; is interpreted as &#8220;posting area&#8221; (two English words) while &#8220;postingArea&#8221; is interpreted as &#8220;postingarea&#8221; (meaningless).</p>
<p>Obviously, we haven&#8217;t covered some of the nested elements and structures just created the basic skeletons for our two most important layouts. I&#8217;ll cover those region-by-region in later posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-development/html-5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recommended Applications for Mac Web Developers</title>
		<link>http://benvalentine.info/web-development/recommended-applications-for-mac-web-developers</link>
		<comments>http://benvalentine.info/web-development/recommended-applications-for-mac-web-developers#comments</comments>
		<pubDate>Mon, 02 Nov 2009 16:26:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://localhost:8888/benvalentine/blog/?p=5</guid>
		<description><![CDATA[Okay, so if you’re going to be a web developer, for starters, you’ll need a solid HTML Text Editor. I recommend three options: 1. BBEdit: The best I’ve used for basic (X)HTML/CSS is BBEdit. And from a functionality standpoint you&#160;&#160;&#160;<a href="http://benvalentine.info/web-development/recommended-applications-for-mac-web-developers">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay, so if you’re going to be a web developer, for starters, you’ll need a solid HTML Text Editor.  I recommend three options:</p>
<p>1. <strong>BBEdit</strong>: The best I’ve used for basic (X)HTML/CSS is BBEdit. And from a functionality standpoint you can’t go wrong. It’s $125 a pop (if you can afford that) but it is the best. Take a pass on the freeware version, BBEdit Lite. There’s far more functionality in other text editors such as…</p>
<p><strong>2. Text Wrangler</strong>: From a freeware standpoint you can’t get much better than Text Wrangler also published by Bare Bones. The only downside is its only available for Intel Macs and not the Power Macs…</p>
<p>3. <strong>Text Mate</strong>: The third option here <em>is</em> available for Power Macs. Text Mate costs 2/5’s as much as BBEdit and its better at coding your back-end languages such as PHP, RoR, Perl, Python, VB, etc. Plus there are 30+ bundles perfect for cutting corners.</p>
<p>Next you’ll need design tools. I recommend the Adobe Suite (its pretty much a no brainer) <strong>Illustrator</strong> &amp; <strong>Photoshop</strong>. Here is an area where you don’t want to skimp, but if you absolutely must, get Gimp (a rhyme was not originally intended in that sentence). Gimp and Inkscape (vector graphics app) are available at <a title="Open Source Mac" name="Open Source Mac" href="http://opensourcemac.org/">Open Source Mac</a>.</p>
<p>Third you’ll need a good browser to debug your (X)HTML, CSS, and JavaScript in. I highly recommend <strong>Firefox</strong>. At <a title="Firefox Add-ons" name="Firefox Add-ons" href="http://addons.mozilla.org/en-US/firefox/">addons.firefox.org</a>, you can add <strong>Web Developer</strong> and <strong>Firebug</strong> (these two addons will save you a ridiculous amount of time).</p>
<p>When you finally finish your site and wish to upload you’ll need a good ftp client. This will save you a lot of time especially when compared to binary uploads at Network Solutions or GoDaddy and dealing with their harum-scarum interfaces. I recommend <strong>Transmit</strong> because its a good app and because its logo is a dump-truck and you can dump stuff on it and ship it through the series of tubes <img src="http://benvalentine.info/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" />.  Again, if you don’t want to shell out the $$ because you spent your whole fortune on the Adobe software, <strong>FireFTP</strong> is a suitable alternative.</p>
<p>Now you’ll need to solve the IE problem. Microsoft does not make Explorer for Mac anymore, which is both good and bad. Good because let’s face it, IE stinks, and the fewer people who use it, the better; bad because now we have to design web pages for a browser that we don’t have access to (not to mention, all the annoying little quirks). So how do you preview your site in IE. Three options: 1. Aside from shelling out for BootCamp or Fusion, at <a title="Mike's Massive Mess" name="Mike's Massive Mess" href="http://mike.kronenberg.org/">Mike’s Massive Mess</a> you can download ie4osX with Darwine for Intel macs. If you don’t have an Intel mac things get a bit more difficult. You can either try downloading Q at<a title="Open Source Mac" name="Open Source Mac" href="http://opensourcemac.org/"> opensourcemac.org</a> or use the <a title="IE Net Renderer" name="IE Net Renderer" href="http://ipinfo.info/netrenderer/">IE Net Renderer</a>. This is an awesome site because you can render your pages in multiple versions of IE.</p>
<p>Well that’s all for now. Anyone that can add to my list is welcome to post..</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-development/recommended-applications-for-mac-web-developers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding a WordPress Blog into a Pre-existing Site</title>
		<link>http://benvalentine.info/web-development/embedding-a-blog-into-a-pre-existing-site</link>
		<comments>http://benvalentine.info/web-development/embedding-a-blog-into-a-pre-existing-site#comments</comments>
		<pubDate>Fri, 18 Sep 2009 19:23:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://localhost:8888/benvalentine/blog/?p=8</guid>
		<description><![CDATA[In this entry, I&#8217;ll demonstrate some useful tips on how to embed a blog into pre-existing website. Before, we begin I&#8217;ll assume two things: that you know at least a little bit of PHP and that have already installed WordPress&#160;&#160;&#160;<a href="http://benvalentine.info/web-development/embedding-a-blog-into-a-pre-existing-site">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In this entry, I&#8217;ll demonstrate some useful tips on how to embed a blog into pre-existing website. Before, we begin I&#8217;ll assume two things: that you know at least a little bit of PHP and that have already installed WordPress in your website.</p>
<p>The first you&#8217;ll want to do is choose one of the themes that WordPress comes packaged with. There are two, Classic and Default (or Kubrick). I usually choose Classic because it makes things a lot simpler and also for the sake of this tutorial, quicker. Once you have chosen the theme you want to use, copy it and rename it something like &#8220;sitetheme&#8221;. This is an optional step, however, it will save you some aggravation if you decide to change layouts in the future. Open &#8220;style.css&#8221; and change the theme name to : &#8220;sitetheme&#8221; on the first line. You may want to change a few other details as well. Login to the admin panel and select &#8220;sitetheme&#8221; as your theme (in the panel under Appearance &gt; Themes)  and your ready to begin.</p>
<p>What I usually do first is open &#8220;header.php&#8221; at the top of the page I create a constant called &#8216;BASE_HREF&#8217; that contains a link pointing back to the main site. If you are working on a local machine before you move to the server, you may want to include some flow control. For instance:</p>
<p><code>$server = $_SERVER['SERVER_NAME'];<br />
$base = (strstr($server, "localhost")) ? "http://localhost:8888/mysite/" : "http://mysite.com/";<br />
define("BASE_HREF", $base);</code></p>
<p>Next thing you&#8217;ll wanna do is create a base tag. The base tag should be placed in the header and is going to make sure that your menu links point back to the pages on your website. Our constant variable, &#8220;BASE_HREF&#8221; makes it easy for us:</p>
<p><code>&lt;base href="&lt;?php BASE_HREF; ?&gt;"&gt;</code></p>
<p>Now onto styling. What I usually do is create a new file called blog.php in the css file in my main website and another file called blog.css. I copy all the styles from style.css and paste them into blog.css, making sure to leave the commented text  at the top. Then in &#8220;blog.php&#8221;, I&#8217;ll require all the stylesheets that I need to make the blog layout work.</p>
<p><code>&lt;?php<br />
header("Content-type: text/css; charset: UTF-8");<br />
require_once('layout.css');<br />
require_once('typography.css');<br />
require_once('nav.css');<br />
require_once('blog.css');<br />
?&gt;</code></p>
<p>If we go back to &#8220;header.php&#8221;, we can create an absolute link to the stylesheet with our constant, it will link to our site layout plus add the styles from the &#8216;classic template&#8217;. But, if you view the blog, things will probably still look pretty cockeyed. Reason being, we haven&#8217;t changed the HTML yet. Copy the HTML below the body tag from your site&#8217;s &#8220;header.php&#8221; file and paste it into the template&#8217;s &#8220;header.php&#8221;. Do the same with the footer.:</p>
<p>It will probably take some tweaking in &#8216;blog.css&#8217; to get eveything to line up properly.  But there&#8217;s a simple way to do this. I start by commenting out the entire file, so you can see what everything looks like without the theme&#8217;s stylesheet added in. Then gradually start commenting things in as you tweak the design.</p>
<p>Hope this was a helpful tutorial and saved you a bit of time in the long run!</p>
]]></content:encoded>
			<wfw:commentRss>http://benvalentine.info/web-development/embedding-a-blog-into-a-pre-existing-site/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

