<?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>Code Couch &#187; Web Development</title>
	<atom:link href="http://www.codecouch.com/tag/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codecouch.com</link>
	<description>The ramblings of two code monkeys</description>
	<lastBuildDate>Mon, 09 Jan 2012 21:11:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How do I choose a Doctype?</title>
		<link>http://www.codecouch.com/2005/12/how-do-i-choose-a-doctype/</link>
		<comments>http://www.codecouch.com/2005/12/how-do-i-choose-a-doctype/#comments</comments>
		<pubDate>Tue, 20 Dec 2005 06:55:51 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Doctype]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=120</guid>
		<description><![CDATA[When should you choose a transitional doctype over a strict one? What is the correct usage of the frameset doctype? This post gives you all the details you need to choose the right doctype for your web site.]]></description>
			<content:encoded><![CDATA[<p>As the <a title="Click to visit the World Wide Web Consortium website" href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a> reminds us, there are many types of <acronym title="HyperText Markup Language">HTML</acronym> in use on the internet. To ensure these documents are displayed correctly, the various programs (browsers, mobile phones, <acronym title="Personal Digital Assistant">PDA</acronym>s etc) that view these documents need to know what kind of document structure they contain. These programs look to the Document Type Definition (referred to as a <acronym title="Document Type Definition">DTD</acronym> and commonly called a <acronym title="Document Type Definition">doctype</acronym>).</p>
<p>The <acronym title="Document Type Definition">doctype</acronym> appears as the very first thing on the page that is delivered to the user, allowing the browser agent to make decisions about how to display the page. Whilst a document can still display within a web browser in the absence of a <acronym title="Document Type Definition">doctype</acronym>, defining one implies the document is “well formed” and allows a browser to make assumptions that assist it in rendering correctly. It also prevents the browser from making the wrong assumptions and displaying the document in an unexpected “quirks” mode.</p>
<p>So how do you decide what <acronym title="Document Type Definition">doctype</acronym> to use? Again, the <acronym title="World Wide Web Consortium">W3C</acronym> have provided <a title="Click to view a list of recommended DTDs from the World Wide Web Consortium website" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html#DTD">a list of recommended <acronym title="Document Type Definition">DTD</acronym>s for your document</a> but they don’t offer a lot of guidance to the developer in choosing one. In my opinion it comes down to a question of whether you are creating an <acronym title="HyperText Markup Language">HTML</acronym> or an <acronym title="Extensible HyperText Markup Language">XHTML</acronym> document.</p>
		<div  class="headingPod headingLevel2 headingLevel2Yellow">
			<div class="img">
				<div class="verticalCentreOuter">
					<div class="verticalCentreMiddle">
						<div class="verticalCentreInner">
							<h2>Choosing between <acronym title="HyperText Markup Language">HTML</acronym> and <acronym title="Extensible HyperText Markup Language">XHTML</acronym></h2>
						</div>
					</div>
				</div>
			</div>
		</div>
<p>Unless you are going to be serving your documents as “text/xml” and loading them into an XML parser to allow your XML tools to manipulate the page, then there is no reason to develop your documents as <acronym title="Extensible HyperText Markup Language">XHTML</acronym>. A majority of web pages on the internet are <acronym title="HyperText Markup Language">HTML</acronym> &#8211; and this should be the default choice for developing your documents &#8211; especially if your web host is serving your pages as “text/html”.</p>
		<div  class="headingPod headingLevel2 headingLevel2Pink">
			<div class="img">
				<div class="verticalCentreOuter">
					<div class="verticalCentreMiddle">
						<div class="verticalCentreInner">
							<h2>Frameset, Transitional or Strict?</h2>
						</div>
					</div>
				</div>
			</div>
		</div>
<p>If you are developing frameset documents, then the choice is already made for you &#8211; you will use a Frameset <acronym title="Document Type Definition">doctype</acronym>. The rest of the time you should consider using a Strict <acronym title="Document Type Definition">doctype</acronym> which is almost the same as the Transitional <acronym title="Document Type Definition">doctype</acronym>, but with the presentation specific elements removed (deprecated).</p>
<p>The big difference between Transitional and Strict <acronym title="Document Type Definition">doctype</acronym>s is the seperation of the presentation and content layers within the document. The idea is that you use <acronym title="Cascading Style Sheet">CSS</acronym> to define the layout of your document, and rely on well formed <acronym title="HyperText Markup Language">HTML</acronym> to define the content of the document. This ensures that the different programs that may be used to view your document are able to read the content consistently, and apply the appropriate presentation layer (via <acronym title="Cascading Style Sheet">CSS</acronym>).</p>
		<div  class="headingPod headingLevel2 headingLevel2Green">
			<div class="img">
				<div class="verticalCentreOuter">
					<div class="verticalCentreMiddle">
						<div class="verticalCentreInner">
							<h2>When should you use a Transitional <acronym title="Document Type Definition">doctype</acronym>?</h2>
						</div>
					</div>
				</div>
			</div>
		</div>
<p>The Transitional <acronym title="Document Type Definition">doctype</acronym> is appropriate if you are working on an existing <acronym title="HyperText Markup Language">HTML</acronym> document that contains presentational elements (like the <code>&lt;center&gt;</code>, and <code>&lt;font&gt;</code> tags). These tags were totally acceptable for the older <acronym title="HyperText Markup Language">HTML</acronym> 3.2 definition (where the presentation and content layers were freely combined) and many sites still contain documents that have not been “upgraded” to use the most current standards.</p>
<p>If you are starting a new site, then you should be using a Strict <acronym title="Document Type Definition">doctype</acronym> rather than a Transitional one.</p>
		<div  class="headingPod headingLevel2 headingLevel2Orange">
			<div class="img">
				<div class="verticalCentreOuter">
					<div class="verticalCentreMiddle">
						<div class="verticalCentreInner">
							<h2>So tell me what to do!</h2>
						</div>
					</div>
				</div>
			</div>
		</div>
<p>To summarise, I would suggest that you use the following <acronym title="Document Type Definition">doctype</acronym> for each of the following “common” development scenarios:</p>
<ul>
<li><a title="View the Frameset HTML 4.01 Document Type Definition" href="http://www.w3.org/TR/html401/frameset.dtd">Frameset HTML 4.01</a> &#8211; when maintaining or updating a frameset <acronym title="HyperText Markup Language">HTML</acronym> document</li>
<li><a title="View the Transitional HTML 4.01 Document Type Definition" href="http://www.w3.org/TR/html401/transitional.dtd">Transitional HTML 4.01</a> &#8211; when maintaining or updating an old <acronym title="HyperText Markup Language">HTML</acronym> document that contains deprecated tags</li>
<li><a title="View the Strict HTML 4.01 Document Type Definition" href="http://www.w3.org/TR/html401/strict.dtd">Strict HTML 4.01</a> &#8211; when building a new site which seperates the presentation and content layers</li>
<li><a title="View the Frameset XHTML 1.0 Document Type Definition" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">Frameset XHTML 1.0</a> &#8211; when maintaining or updating an <acronym title="HyperText Markup Language">HTML</acronym> frameset <acronym title="Extensible HyperText Markup Language">XHTML</acronym> document</li>
<li><a title="View the Transitional XHTML 1.0 Document Type Definition" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Transitional XHTML 1.0</a> &#8211; when building or updating a site that needs to support <acronym title="HyperText Markup Language">HTML</acronym> presentation layer tags</li>
<li>Strict XHTML &#8211; when building a new site that will be manipulated by an XML parser and served as “text/xml”</li>
</ul>
<p>The decision of whether to use Strict <acronym title="Extensible HyperText Markup Language">XHTML</acronym> 1.0 or <acronym title="Extensible HyperText Markup Language">XHTML</acronym> 1.1 is left to the reader. If you are developing Strict <acronym title="Extensible HyperText Markup Language">XHTML</acronym> documents and serving them to a wide audience, you should have already made this decision based on the audience and the technology being used to serve (and read/parse) the documents.</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+do+I+choose+a+Doctype%3F+http%3A%2F%2Fis.gd%2FUkkKer" title="Post to Twitter"><img class="nothumb" src="http://www.codecouch.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2005/12/how-do-i-choose-a-doctype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Javascript?</title>
		<link>http://www.codecouch.com/2005/11/what-is-javascript/</link>
		<comments>http://www.codecouch.com/2005/11/what-is-javascript/#comments</comments>
		<pubDate>Sun, 06 Nov 2005 22:16:22 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=128</guid>
		<description><![CDATA[JavaScript is an object-based scripting programming language based on the concept of prototypes. The language is best known for its use in websites, but is also used to enable scripting access to objects embedded in other applications.]]></description>
			<content:encoded><![CDATA[<p>Partially sourced from <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">http://en.wikipedia.org/wiki/JavaScript</a></p>
<p>JavaScript is an object-based scripting programming language based on the concept of prototypes. The language is best known for its use in websites, but is also used to enable scripting access to objects embedded in other applications.</p>
<p>It was originally developed by Brendan Eich of Netscape Communications Corporation under the name Mocha, then LiveScript, and finally renamed to JavaScript.</p>
<p>JavaScript has a C-like syntax.</p>
<p>Here is a short list of some things that Javascript is <b>not</b>:</p>
<ul<li>Javascript is not Java</li>
<li>Javascript is not C</li>
<li>Javascript is not HTML, XHTML or XML</li>
</ul>
<p>Typically we use Javascript as a <b>client-side</b> scripting programming language to perform HTML form validation, navigation &#8220;roll-overs&#8221; and to enhance usability. All these tasks are performed on the web browser &#8211; after the page has been processed by a web server and delivered to the (remote) web browser.</p>
<p>It is possible to change ASP (Active Server Pages &#8211; part of Microsoft IIS) to use Javascript server-side (rather than VBScript), and in this context the Javascript is run server-side before the page is delivered to the (remote) web browser.</p>
<p>Regardless of the server-side technology you are using, the page is processed server-side first, and then it is passed to the client (where it can be affected by Javascript running client-side). This is a one-way action (the web server cannot continue to process server-side once the contents of the page have been delivered to the browser).</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=What+is+Javascript%3F+http%3A%2F%2Fis.gd%2FuNQcpZ" title="Post to Twitter"><img class="nothumb" src="http://www.codecouch.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2005/11/what-is-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

