<?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>TutToaster</title>
	<atom:link href="http://www.tuttoaster.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tuttoaster.com</link>
	<description>Freshly Toasted for You!</description>
	<lastBuildDate>Thu, 09 Sep 2010 07:17:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ruby for PHP Developers</title>
		<link>http://www.tuttoaster.com/ruby-for-php-developers/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ruby-for-php-developers</link>
		<comments>http://www.tuttoaster.com/ruby-for-php-developers/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 07:08:17 +0000</pubDate>
		<dc:creator>Jose</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=6899</guid>
		<description><![CDATA[With our knowledge of PHP we can learn a lot about Ruby. Use of variables, loops, arrays, functions and classes, everything starting from PHP. In the end, there is an example to see all together where we&#8217;ll combine what we have learnt to see something really useful in action. Brief Introduction We could say PHP [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/20-tips-to-make-your-php-code-better/' rel='bookmark' title='Permanent Link: 21 Tips to Make Your PHP Code Better'>21 Tips to Make Your PHP Code Better</a></li>
<li><a href='http://www.tuttoaster.com/getting-started-with-pdf-generation-in-php/' rel='bookmark' title='Permanent Link: Getting Started With PDF Generation in PHP'>Getting Started With PDF Generation in PHP</a></li>
<li><a href='http://www.tuttoaster.com/some-good-and-advanced-jquery-techniques/' rel='bookmark' title='Permanent Link: jQuery Functions and Techniques to Keep in Mind'>jQuery Functions and Techniques to Keep in Mind</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>With our knowledge of PHP we can learn a lot about Ruby. Use of variables, loops, arrays, functions and classes, everything starting from PHP. In the end, there is an example to see all together where we&#8217;ll combine what we have learnt to see something really useful in action.</p>
<h2>Brief Introduction</h2>
<p>We could say PHP and Ruby (plus a framework) are the most used language in the Internet. There are many reasons, but the best one for our purpose is they are very similar in some points. So we are going to learn Ruby using those points as a support, and, trust me, if you know a little bit more about PHP than echo, it&#8217;s going to be pretty easy to learn the basis of Ruby.</p>
<p>These are the steps you need to follow to install Ruby in your operating system.</p>
<ul>
<li>Windows: Download the package from the official web: <a href="http://www.ruby-lang.org/en/downloads/">Ruby Downloads</a>.</li>
<li>Mac OS X: Preinstalled.</li>
<li>Linux: Just type: &#8220;sudo apt-get install ruby-full&#8221;.</li>
<li>Other Operating Systems: Go to the official page <a href="http://www.ruby-lang.org/en/downloads/">Ruby Downloads</a>.</li>
</ul>
<h2>Variables</h2>
<p>Ruby is a dynamic language, just like PHP, so we don&#8217;t need to define a variable. The difference here is the types, Ruby is a strongly typed language, so if we want to convert an integer into a string we need to call the proper function. Take a look at this couple of examples using variables in PHP and Ruby.</p>
<pre class="brush: php;">
&lt;?php
	$number = 3;
	echo &quot;The number is &quot; . $number;
?&gt;
</pre>
<pre class="brush: ruby;">
number = 3
puts &quot;The number is &quot; + number.to_s
</pre>
<p>These scripts have the same objective, concatenate a number to a string, and display the result. We can observe the first differences with PHP:</p>
<ul>
<li>The echo function of PHP is &#8220;puts&#8221; in Ruby. We use puts to show the result of a function or just for debugging purposes.</li>
<li>There is no end of line with semicolon, so the line finishes when a new one starts.</li>
<li>The concatenation in Ruby is made with the plus sign, not with point.</li>
<li>As we have said before, in Ruby we need to convert the type integer into string to show it. (In the PHP example we just use it, and the programming language takes care of its conversion).</li>
<li>As you might guess, there is a function for every type conversion, so we have &#8220;to_i&#8221; to integer, &#8220;to_f&#8221; to float and &#8220;to_s&#8221; to string.</li>
</ul>
<h2>Arrays and other structured variables</h2>
<p>The use of arrays is as simple as in PHP, basically we can do most of the things we do in PHP with the tools Ruby offers us. Let&#8217;s see the first step to use arrays, its creation and the access to them. By default the index of an array starts in 0.</p>
<pre class="brush: ruby;">
# Simple array with 3 elements
animals = ['dogs', 'cats', 'spiders']
puts animals[2] # third element

# Another way to create an array
cars = Array.new
cars &amp;lt;&amp;lt; 'BMW'
cars &amp;lt;&amp;lt; 'Toyota'
cars &amp;lt;&amp;lt; 'Ford'
puts cars[0]

# Hash (or array with not integer keys)
h = Hash[&amp;quot;this_is_a_key&amp;quot;, 100, &amp;quot;other_key&amp;quot;, 200]
puts h['other_key']
</pre>
<p>The output is:</p>
<p><img alt="Simple Array" width="600" height="249" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/1.jpg" /></p>
<p>Pretty simple, right? Well, besides of those methods we have some more for working with arrays, in PHP you have similar ways to get the same data, but in Ruby is even easier.</p>
<pre class="brush: ruby;">
animals = ['dogs', 'cats', 'spiders']

puts animals.first # Output: dogs
puts animals.last  # Output: spiders
puts animals.length  # Output: 3
</pre>
<p>In the last three lines there is an important point to be noticed. We called animals.first instead of first(animals). That&#8217;s because arrays are objects. But arrays are not the only ones, strings, numbers, hashes are also objects. As we have seen in the last example, <strong>we&#8217;ll usually call to a function with something like &#8220;x.function&#8221; instead of &#8220;function(x)&#8221;.</strong></p>
<h2>Conditionals, loops and functions</h2>
<h3>Conditionals</h3>
<p>We have seen the basics of Ruby, but we need more to do something useful. Ruby has the same classic conditionals that PHP: if, else, elsif (not elseif!). All the conditionals structures finishes with &#8220;end&#8221;, and we don&#8217;t have to put parenthesis like in PHP, it&#8217;s optional in Ruby.</p>
<pre class="brush: ruby;">
number = 70

if number &gt; 90
	puts 'This number is near to 100'
elsif number &gt; 50
	puts 'This number is greater than 50'
else
	puts 'This number is less than 50'
end

# The output will be: 'This number is greater than 50'
</pre>
<h3>Loops and functions</h3>
<p>In PHP the loops and functions are as simple as in Ruby. In Ruby we have basically similar loops to the ones we have in PHP, but the syntax is a little bit different, let&#8217;s kill two birds with one stone and see the functions and loops in the same example, trust me, it&#8217;s going to be easy.</p>
<pre class="brush: ruby;">
# Function definition
def show_elements(array)
	array.each_with_index do |element,index|  # Similar to foreach in PHP
		puts &quot;#{element} is in the array at #{index} position.&quot;
	end
end

animals = ['dogs', 'cats', 'spiders']
# We call the function
show_elements(animals) # We can also call it with &quot;show_elements animals&quot;
</pre>
<p>Its output is going to be:</p>
<p><img alt="Each in Ruby" width="600" height="267" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/2.jpg" /></p>
<p>Let&#8217;s see the others loops. Here we have a typical while where we increment a counter, very similar to the while in PHP, right?</p>
<pre class="brush: ruby;">
times = 4

now = 1
while now &lt;= times
    puts &quot;Iteration number #{now} of #{times}&quot;
    now += 1
end
</pre>
<p>There is one kind of loop we have in Ruby and not in PHP, the &#8220;until&#8221;, its use is very simple, so in the next example we&#8217;ll see it with the for loop.</p>
<pre class="brush: ruby;">
times = 4
now = 1
until now &gt; times
    puts &quot;until #{now} of #{times} times&quot;
    now += 1
end

for i in 1..4
   puts &quot;Looping around 4 times (#{i})&quot;
end
</pre>
<p>Take a look at the output, and check if it makes sense for you.</p>
<p><img alt="Loops Ruby" width="600" height="307" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/3.jpg" /></p>
<p>Both iterate the same amount of times. The for in Ruby is just like in PHP, but the syntax it&#8217;s a little bit cleaner. We don&#8217;t have to put the parenthesis in any of them, but we could, like in PHP. The only way we have to tell Ruby the loop ends, is the &#8220;end&#8221; reserve word</p>
<blockquote>
<p>&#8220;All the conditional and loops finishes with the end reserve word&#8221;</p>
</blockquote>
<p>Other loop, actually a Ruby style loop, is &#8220;times&#8221;. Yes, we say the number of times we want to repeat something, just like this:</p>
<pre class="brush: ruby;">
5.times do
   puts 'Impossible to be cleaner' # This will puts the string 5 times
end
</pre>
<p>We don&#8217;t have this loop in PHP, but it&#8217;s very useful if we know before the execution the exactly number of iterations we need.</p>
<h2>Class Definition</h2>
<p>Like PHP, Ruby is an object oriented language, which means we are going to have classes, methods and attributes. Take a look at this class in Ruby</p>
<pre class="brush: ruby;">
# define the class company
class Company
  def initialize(name, owner)
    # attributes of Company's class
    @name = name
    @owner = owner
  end  

  # method new_product
  def new_product
    puts 'The new product is coming out!'
  end  

  # method describe
  def describe
    puts &quot;Hi, I'm #{@owner} and my company is #{@name}&quot;
  end
end
</pre>
<p>The first difference we can notice here is the attributes definition. In Ruby we usually define them into the constructor or just with the sets and gets (we&#8217;ll see them later). And those attributes are defined by the @ just before its name, like @name. The definition of methods is also very simple, just with the &#8220;def&#8221; and &#8220;end&#8221; reserve words.</p>
<p>But like PHP, the class definition does nothing itself, so let&#8217;s use it (this code must be right after the class definition).</p>
<pre class="brush: ruby;">
# class company definition
# ...
comp = Company.new('Free Cars', 'Ray')
comp.describe #Output: Hi, I'm Ray and my company is Free Cars 

# Error in 3, 2, 1...
puts comp.owner #Output: NoMethodError: undefined method ‘owner’
</pre>
<p>The output will be:</p>
<p><img alt="Error in class" width="600" height="286" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/4.jpg" /></p>
<p>We have to notice two things in the example. First of all, we can&#8217;t access to an attribute without its getter. The other important thing is that the error is displayed after we run the program and see the result of calling &#8220;describe&#8221; (yes, like in PHP, most things happen when the script is running, so <strong>the execution goes on until there is an error or the script ends</strong>).</p>
<p>If we try to access to &#8220;owner&#8221; we&#8217;ve got an error. So we need something (hint: it will be a method) to get the content of the attribute.</p>
<h2>Gets and Sets in Classes</h2>
<p>The gets and sets (also known as getters and setters) are the methods to access and modify the private attributes of a class. As you might know is a very good practice to use them (just like in PHP). The difference here is that is almost obligatory, and we have a little help from the language.</p>
<pre class="brush: ruby;">
class Company
 attr_accessor :name # Set and Get in a line
 def initialize(name, owner)
    # attributes of Company's class
    @name = name
    @owner = owner
  end
end

comp = Company.new('Free Cars', 'Ray')
puts comp.name
comp.name = 'Old Cars'
puts comp.name
</pre>
<p>The output, now without errors:</p>
<p><img alt="Class without errors" width="600" height="236" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/5.jpg" /></p>
<p>With the attr_accessor we &#8220;declare&#8221; the set and the get method for the attribute. Actually, we usually declare the set and the method just for setting and getting the attribute. Despite this, there is a way to do more things in the set or the get method, but we won&#8217;t really need it. The point is we can access now to &#8220;name&#8221;!</p>
<blockquote>
<p>&#8220;With attr_accessor we have the get and the set method at the same time&#8221;</p>
</blockquote>
<h2>Let&#8217;s put it all together!</h2>
<p>In this last section, we are going to build a class with methods and use them, but we&#8217;ll use everything we&#8217;ve just learned. The good news here are we know PHP, so let&#8217;s use it to remember the Ruby&#8217;s syntax!</p>
<p>The class is going to model a factory and remember, take a look at the way we program it, and the differences with PHP, more than the use of the class.</p>
<pre class="brush: ruby;">
class Factory
	#sets and gets for all the attributes
	attr_accessor :name, :creation_year, :use_of_floors

	# The class constructor
	def initialize(name,creation_year,use_of_floors)
    	@name = name
    	@creation_year = creation_year
    	@use_of_floors = use_of_floors
   	end

	def description
	   puts &quot;This factory is #{@name} and was created in #{@creation_year}&quot;
	end

	def report_of_floors
		@use_of_floors.each_with_index do |element,index|
			puts &quot;The floor number #{index} is used for #{element}&quot;
		end
	end
end

a = Factory.new('Apple',1976,['Reception','Production','Offices'])

a.description
a.report_of_floors
</pre>
<p>And the output for this final script is:</p>
<p><img alt="Final Example" width="600" height="274" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/6.jpg" /></p>
<hr />
<h2>Conclusion</h2>
<p>This language, as many others, has many things we have to learn before we can call ourselves developers, but this tutorial covers the first steps using the knowledge of PHP to build actual programs. You can continue with more details in the official documentation.</p>
<p>I hope you liked it. Thank you for reading!</p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/20-tips-to-make-your-php-code-better/' rel='bookmark' title='Permanent Link: 21 Tips to Make Your PHP Code Better'>21 Tips to Make Your PHP Code Better</a></li>
<li><a href='http://www.tuttoaster.com/getting-started-with-pdf-generation-in-php/' rel='bookmark' title='Permanent Link: Getting Started With PDF Generation in PHP'>Getting Started With PDF Generation in PHP</a></li>
<li><a href='http://www.tuttoaster.com/some-good-and-advanced-jquery-techniques/' rel='bookmark' title='Permanent Link: jQuery Functions and Techniques to Keep in Mind'>jQuery Functions and Techniques to Keep in Mind</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/ruby-for-php-developers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>20 Travel Related websites for your inspiration</title>
		<link>http://www.tuttoaster.com/20-travel-related-websites-for-your-inspiration/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=20-travel-related-websites-for-your-inspiration</link>
		<comments>http://www.tuttoaster.com/20-travel-related-websites-for-your-inspiration/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 12:44:09 +0000</pubDate>
		<dc:creator>Matthew Leak</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[flying]]></category>
		<category><![CDATA[showcase]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=6544</guid>
		<description><![CDATA[I don&#8217;t know about others, but when I go travelling I judge the place I&#8217;m going to on the quality of the website as well as the pictures and information. Why? Well, I feel that if a certain place has taken the time and money to invest in a decent website to attract tourists, then [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/50-amazing-and-gorgeous-apple-related-websites/' rel='bookmark' title='Permanent Link: 50 Amazing and Gorgeous Apple Related Websites'>50 Amazing and Gorgeous Apple Related Websites</a></li>
<li><a href='http://www.tuttoaster.com/49-fascinating-e-commerce-websites-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fascinating E-Commerce Websites for your Inspiration'>49 Fascinating E-Commerce Websites for your Inspiration</a></li>
<li><a href='http://www.tuttoaster.com/49-fantastic-iphone-inspired-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fantastic Iphone Inspired Sites for Your Inspiration'>49 Fantastic Iphone Inspired Sites for Your Inspiration</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about others, but when I go travelling I judge the place I&#8217;m going to on the quality of the website as well as the pictures and information. Why? Well, I feel that if a certain place has taken the time and money to invest in a decent website to attract tourists, then they&#8217;re serious about that destination/attraction. <em>(this is just one of many weird theories I have <img src='http://www.tuttoaster.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )</em></p>
<p>I have been looking at loads of travel related websites recently while I plan my next adventure and these are a few of the nifty bookmarked websites that caught my attention.</p>
<h3>Airportbags Plus</h3>
<p><a href="http://www.airportbags.com/"><img class="alignnone size-full wp-image-6547" title="Airportbags Plus" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Airportbags-Plus.png" alt="" width="600" height="386" /></a></p>
<h3>Australia Day</h3>
<p><a href="http://www.australiaday.com.au/"><img class="alignnone size-full wp-image-6548" title="Australia Day" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Australia-Day.png" alt="" width="600" height="398" /></a></p>
<h3>Brookside Resort</h3>
<p><a href="http://www.brooksideresort.com/"><img class="alignnone size-full wp-image-6549" title="Brookside Resort" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Brookside-Resort.png" alt="" width="600" height="377" /></a></p>
<h3>Clover Cottage</h3>
<p><a href="http://www.clover-cottage.com.au/"><img class="alignnone size-full wp-image-6550" title="Clover Cottage" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Clover-Cottage-A-Country-Retreat-–-Accommodation-Manjimup-Western-Australia.png" alt="" width="600" height="388" /></a></p>
<h3>Cool and the Guide</h3>
<p><a href="http://www.coolandtheguide.com/"><img class="alignnone size-full wp-image-6551" title="Cool and the Guide" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Cool-and-the-guide-Reportage.png" alt="" width="595" height="378" /></a></p>
<h3>Definitely Dubai</h3>
<p><a href="http://www.definitelydubai.com/"><img class="alignnone size-full wp-image-6552" title="Definitely Dubai" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Definitely-Dubai.png" alt="" width="600" height="332" /></a></p>
<h3>Discover Tennessee</h3>
<p><a href="http://tntrailsandbyways.com/"><img class="alignnone size-full wp-image-6553" title="Discover Tennessee" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Discover-Tennessee-Trails-Byways.png" alt="" width="600" height="322" /></a></p>
<h3>Experience Washington</h3>
<p><a href="http://www.experiencewa.com/"><img class="alignnone size-full wp-image-6554" title="Experience Washington" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Experience-Washington-Official-Website-of-Washington-State-Tourism.png" alt="" width="600" height="413" /></a></p>
<h3>Hotel Reviews</h3>
<p><a href="http://www.tripeohotelreviews.com/"><img class="alignnone size-full wp-image-6555" title="Hotel Reviews" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Hotel-Reviews-Reviews-of-hotels-resorts-and-accommodations-Tripeo.png" alt="" width="600" height="279" /></a></p>
<h3>Inspired by Iceland</h3>
<p><a href="http://www.inspiredbyiceland.com/"><img class="alignnone size-full wp-image-6556" title="Inspired by Iceland" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Inspired-By-Iceland.png" alt="" width="600" height="271" /></a></p>
<h3>Philadelphia &amp; the Countryside</h3>
<p><a href="http://www.visitphilly.com/"><img class="alignnone size-full wp-image-6557" title="Philadelphia " src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Philadelphia-Official-Visitor-Site-visitphillycom.png" alt="" width="600" height="322" /></a></p>
<h3>Places We Go</h3>
<p><a href="http://www.placeswego.com/"><img class="alignnone size-full wp-image-6558" title="Places We Go" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Places-We-Go.png" alt="" width="597" height="400" /></a></p>
<h3>Story Hotel</h3>
<p><a href="http://www.storyhotels.com/"><img class="alignnone size-full wp-image-6559" title="Story Hotel" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/STORY-HOTEL-Bohemian-Chic-off-Stureplan-Stockholm-Sweden.png" alt="" width="600" height="406" /></a></p>
<h3>TriOutNC</h3>
<p><a href="http://trioutnc.com/"><img class="alignnone size-full wp-image-6560" title="TriOut" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/TriOut-Places-to-Go-People-to-Meet-and-Things-To-Do-in-the-Triangle.png" alt="" width="600" height="367" /></a></p>
<h3>Utah Travel</h3>
<p><a href="http://www.utah.travel/"><img class="alignnone size-full wp-image-6561" title="Utah Travel" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Utahtravel.png" alt="" width="600" height="388" /></a></p>
<h3>Vacation in Supetarska Draga</h3>
<p><a href="http://www.ljetovanjerab.com/en/"><img class="alignnone size-full wp-image-6562" title="Vacation in Supetarska" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Vacation-in-Supetarska-Draga-on-island-of-Rab.png" alt="" width="600" height="333" /></a></p>
<h3>Visit Manchester <img src='http://www.tuttoaster.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </h3>
<p><a href="http://www.visitmanchester.com/"><img class="alignnone size-full wp-image-6563" title="Visit Manchester ;)" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Visit-Manchester-The-official-tourism-website-for-Greater-Manchester.png" alt="" width="600" height="412" /></a></p>
<h3>Wasabi</h3>
<p><a href="http://www.wasabitravel.com/"><img class="alignnone size-full wp-image-6564" title="Wasabi" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/wasabi-unique-powder-adventures-worldwide.png" alt="" width="592" height="387" /></a></p>
<h3>Windrock Lodge</h3>
<p><a href="http://www.windrocklodge.com/"><img class="alignnone size-full wp-image-6565" title="Windrock ATV Lodge" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Windrock-ATV-Lodge-Oliver-Springs-Knoxville-About-Windrock-Lodge.png" alt="" width="600" height="398" /></a></p>
<h3>Winter in Tennessee</h3>
<p><a href="http://www.winter.tnvacation.com/"><img class="alignnone size-full wp-image-6566" title="Winter in Tennessee" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/Winter-in-Tennessee-Elvis-75th-Anniversary-TNVacationcom.png" alt="" width="600" height="327" /></a></p>
<h2>Conclusion</h2>
<p>I think there&#8217;s a nice collection here, which is your favourite? I&#8217;ve gotta admit that I am a fan of the &#8216;Discover Tennesse&#8217; website &#8211; which site listed is your favourite?</p>
<p>Also, if you want to recommend me your favourite destinations for my next big adventure then please do!</p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/50-amazing-and-gorgeous-apple-related-websites/' rel='bookmark' title='Permanent Link: 50 Amazing and Gorgeous Apple Related Websites'>50 Amazing and Gorgeous Apple Related Websites</a></li>
<li><a href='http://www.tuttoaster.com/49-fascinating-e-commerce-websites-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fascinating E-Commerce Websites for your Inspiration'>49 Fascinating E-Commerce Websites for your Inspiration</a></li>
<li><a href='http://www.tuttoaster.com/49-fantastic-iphone-inspired-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fantastic Iphone Inspired Sites for Your Inspiration'>49 Fantastic Iphone Inspired Sites for Your Inspiration</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/20-travel-related-websites-for-your-inspiration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a Upload/Download System Using PHP Classes</title>
		<link>http://www.tuttoaster.com/creating-a-uploaddownload-system-using-php-classes/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=creating-a-uploaddownload-system-using-php-classes</link>
		<comments>http://www.tuttoaster.com/creating-a-uploaddownload-system-using-php-classes/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 00:43:54 +0000</pubDate>
		<dc:creator>Cody Robertson</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=4590</guid>
		<description><![CDATA[Making a PHP upload script can be a very challenging task when you are just starting out, heck; it’s still hard to some extent when you are an experienced developer. So today, I’m going to show you how to make one using PHP5 Classes and a simple form. In the script we will be able [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/photoshop-vcard-html-template-free-download/' rel='bookmark' title='Permanent Link: Photoshop vCard HTML Template Free Download'>Photoshop vCard HTML Template Free Download</a></li>
<li><a href='http://www.tuttoaster.com/creating-a-clock-animation-without-css3/' rel='bookmark' title='Permanent Link: Monday Fun: Creating a Clock Animation Without CSS3'>Monday Fun: Creating a Clock Animation Without CSS3</a></li>
<li><a href='http://www.tuttoaster.com/creating-bar-graphs-using-jquery-ui/' rel='bookmark' title='Permanent Link: Creating Bar Graphs using jQuery UI'>Creating Bar Graphs using jQuery UI</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Making a PHP upload script can be a very challenging task when you are just starting out, heck; it’s still hard to some extent when you are an experienced developer. So today, I’m going to show you how to make one using PHP5 Classes and a simple form. In the script we will be able to upload files with certain file extensions and set a limit to the size of the file we want to upload. This will all go along with a sharing link and a force download script.</p>
<h3>The Basic Upload Form</h3>
<p>First we are going to start out just by making our upload form where we will be able to select a file and then press the upload button to upload the file into our certain directory we will define. It is quite basic so you can just copy and paste it.</p>
<pre class="brush: php;">&lt;form action=&quot;&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;
&lt;input name=&quot;file&quot; type=&quot;file&quot; /&gt;
&lt;input type=&quot;submit&quot; value=&quot;Upload&quot; /&gt; &lt;/form&gt;
</pre>
<h3>Developing the Upload Class</h3>
<h4>The Class and Variables</h4>
<p>Now we need to start on the server side part of our project. We need to start by defining a simple class with the name of “Upload”. Inside of that we are going to want to have 3 protected variables; $path, $max_file_length, and $extensions. Our $path variable is going to be the relative path to the upload directory. Our $max_file_size variable will be our maximum allowed file size in megabytes and our $extensions variable with be an array with our allowed file extensions.</p>
<h4>The Functions</h4>
<p>In our class we will have 3 different functions; upload_file(), download_file() and show_notification(). The name of each function should tell you what it does, so we are going to move on and first set up our show_notification function.</p>
<h4>Show Notification Function</h4>
<p>In our function we are going to pass through 2 different parameters; one for the message or messages and one for the type of noticfiation. (eg: error, notice, success). We will then open a unordered list and echo out each message in a list element inside the list.</p>
<pre class="brush: php;">public function show_notification($items, $type) {
echo &quot;
&lt;ul class=&quot;$type&quot;&gt; \n&quot;;
if(count($items) &gt; 1) {
foreach($items as $item) {
echo &quot;
	&lt;li&gt;$item&lt;/li&gt;
\n&quot;;
}
}
else {
echo &quot;
	&lt;li&gt;$items&lt;/li&gt;
\n&quot;;
}
echo &quot;&lt;/ul&gt;
\n&quot;;
}</pre>
<h4>The Upload Function</h4>
<p>Our upload function is next, we want to create a function that takes the uploaded file and move it to our uploads directory so it can be shared and downloaded by other users. We will start by opening up the function and see if the was a post request for upload a file.</p>
<pre class="brush: php;">public function upload_file() {
//Check for upload request:
if(isset($_FILES['file'])) {
//What to do with the file
}
}</pre>
<p>Now we are going to make an array to store the file information in so we can access it easily. There are 5 different items we are going to store in the array; name, type, size, tmp_name and error (if any).</p>
<pre class="brush: php;">//Set File Information:
$file = array(
'name' =&gt; $_FILES['file']['name'],
'type' =&gt; $_FILES['file']['type'],
'size' =&gt; $_FILES['file']['size'],
'temp' =&gt; $_FILES['file']['tmp_name'],
'error' =&gt; $_FILES['file']['error']
);</pre>
<p>Next, we will check if there is no errors, and if there is not we will file through the file extension to see if that certain file type is allowed. We will use a variable $filetype_ok to check later if the file is in fact an acceptable file to this point. We will use our protected array of $extensions to reference the allowed file types.</p>
<pre class="brush: php;">
 //Check for file error:
if($file['error'] == 0) { foreach($this-&gt;extensions as $extension) { if($extension == $file['type']) { //Filetype ok! $filetype_ok = true; } }  //No match but no error: if(!isset($filetype_ok)) { $filetype_ok = false; } } else { //Filetype/error okay?: $filetype_ok = false; }
</pre>
<p>Then, we need to check if we ended up with $filetype_ok being true or false, and if it is true we will check if our file is a acceptable range size-wise for upload to our server. If it is not a allowed type or is too big for are server we will show a notification using our function.</p>
<pre class="brush: php;"> //Is Filetype ok?
if($filetype_ok) {
//Check if it is under the max size limit
if($file['size'] &gt; ($this-&gt;;max_file_size * 1048576)) {
//File ok!, Move file:
else {
$this-&gt;show_notification('Your file is too big to upload to our server.', 'error');
}
}
else {
$this-&gt;show_notification('File type not allowed.', 'error');
}
</pre>
<p>Finally, we now have create a unique filename for our file and move it to our upload directory. We will make a unique name by using the mt_rand function and creating a random number 0-5000 then assigning that number to the beginning of our file following an underscore. Then we will use the move_uploaded_file function to move our file. If the file moves successfully we will echo our a sharing link!</p>
<pre class="brush: php;">
//Filename:
$filename = mt_rand(0, 5000) . '_' . $file['name'];

//Now lets more the file:
$move_file = move_uploaded_file($file['temp'], $this-&gt;path . $filename . '.');

if($move_file) {
//File uploaded:
$this-&gt;show_notification('File successfully uploaded. Look below for status and link.', 'success');
echo '
Download Link:';
echo '
&lt;input id=&quot;download&quot; type=&quot;text&quot; value=&quot;http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?file=' . $filename . '&quot; /&gt;';
}
</pre>
<p>Our final code for the upload function should look like this.</p>
<pre class="brush: php;">
public function upload_file() {
//Check for upload request:
if(isset($_FILES['file'])) {
//Set File Information:
$file = array(
'name' =&gt; $_FILES['file']['name'],
'type' =&gt;; $_FILES['file']['type'],
'size' =&gt; $_FILES['file']['size'],
'temp' =&gt; $_FILES['file']['tmp_name'],
'error' =&gt; $_FILES['file']['error']
);

//Check for file error:
if($file['error'] == 0) {
foreach($this-&amp;gt;extensions as $extension) {
if($extension == $file['type']) {
//Filetype ok!
$filetype_ok = true;
}
}

//No match but no error:
if(!isset($filetype_ok)) {
$filetype_ok = false;
}
}
else {
//Filetype/error okay?:
$filetype_ok = false;
}

//Is Filetype ok?
if($filetype_ok) {
//Check if it is under the max size limit
if($file['size'] &lt; ($this-&gt;max_file_size * 1048576)) {
//Filename:
$filename = mt_rand(0, 5000) . '_' . $file['name'];

//Now lets more the file:
$move_file = move_uploaded_file($file['temp'], $this-&gt;;path . $filename . '.');

if($move_file) {
//File uploaded:
$this-&gt;show_notification('File successfully uploaded. Look below for status and link.', 'success');
echo '
Download Link:';
echo '
&lt;input id=&quot;download&quot; type=&quot;text&quot; value=&quot;http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?file=' . $filename . '&quot; /&gt;';
}
}
else {
$this-&gt;show_notification('Your file is too big to upload to our server.', 'error');
}
}
else {
$this-&gt;show_notification('File type not allowed.', 'error');
}
}
}
</pre>
<h4>The Download Function</h4>
<p>For this upload/download system when a user clicks the sharing link for a file the system will force a download of the file using PHP Headers. This is for the ease of use and it is a way to save bandwidth.We will first see is the file is set through a $_GET variable and then see if that file exists in our upload directory.</p>
<pre class="brush: php;">
function download_file() {
//Check for download request:
if(isset($_GET['file'])) {
//Make sure there is a file before doing anything
if(is_file($this-&gt;path . basename($_GET['file']))) {
//Force download through headers:
else {
$this-&gt;show_notification('File not found!', 'error');
}
}
}
</pre>
<p>Now, guess what we have to do, put a little snippet in so the famous Internet Explorer does what we want it to do (Never heard of that before).</p>
<pre class="brush: php;">
//Below required for IE:
if(ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
}
</pre>
<p>Finally, we need to set the headers that will force the download. These are pretty generic headers that most can be figured out by just reading the parameters in head functions. Look at the end of the tutorial for a link to all header descriptions.</p>
<pre class="brush: php;">
//Set Headers:
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($this-&gt;path . basename($_GET['file']))) . ' GMT');
header('Content-Type: application/force-download');
header('Content-Disposition: inline; filename=&quot;' . basename($_GET['file']) . '&quot;');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($this-&gt;path . basename($_GET['file'])));
header('Connection: close');
readfile($this-&gt;path . basename($_GET['file']));
exit();
</pre>
<p>There you have it, the download function is complete and the full upload and download script is complete. Below is the final download function code.</p>
<pre class="brush: php;">function download_file() {
//Check for download request:
if(isset($_GET['file'])) {
//Make sure there is a file before doing anything
if(is_file($this-&gt;path . basename($_GET['file']))) {
//Below required for IE:
if(ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
}

//Set Headers:
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($this-&gt;path . basename($_GET['file']))) . ' GMT');
header('Content-Type: application/force-download');
header('Content-Disposition: inline; filename=&quot;' . basename($_GET['file']) . '&quot;');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($this-&gt;path . basename($_GET['file'])));
header('Connection: close');
readfile($this-&gt;path . basename($_GET['file']));
exit();
}
else {
$this-&gt;show_notification('File not found!', 'error');
}
}
}
</pre>
<p>Implementing It Into Your PageHere is finally the part that makes it all work, we need to add 3 lines at the top of the file. The first is to include the class, second to create the instance, and third to register the download function.</p>
<p>Now just add this one line right before our form (or wherever you want the upload notification/sharing links to show).</p>
<p>The final index file should look like this (This is a example case).</p>
<pre class="brush: xml;">
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--mce:0--&gt;&lt;/script&gt;
&lt;div id=&quot;wrapper&quot;&gt;
&lt;div id=&quot;header&quot;&gt;
&lt;h1&gt;Creating a Upload/Download System Using PHP Classes&lt;/h1&gt;
&lt;/div&gt;
&lt;div id=&quot;content&quot;&gt;
&lt;div id=&quot;upload&quot;&gt;
&lt;form action=&quot;&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;
&lt;input id=&quot;real_upload&quot; class=&quot;hide&quot; name=&quot;file&quot; type=&quot;file&quot; /&gt;
&lt;input id=&quot;real_submit&quot; class=&quot;hide&quot; type=&quot;submit&quot; value=&quot;Upload&quot; /&gt;
&lt;div id=&quot;upload_hack&quot;&gt;
&lt;input id=&quot;fake_upload&quot; onclick=&quot;select_file()&quot; readonly=&quot;readonly&quot; /&gt;
&lt;input id=&quot;fix&quot; onclick=&quot;upload_file()&quot; readonly=&quot;readonly&quot; value=&quot;UPLOAD&quot; /&gt;&lt;/div&gt;
&lt;br class=&quot;fix&quot; /&gt;
&lt;/form&gt;
&lt;div id=&quot;notifications&quot;&gt;upload_file(); ?&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;

&lt;a href=&quot;#&quot;&gt;Creating a Upload/Download System Using PHP Classes&lt;/a&gt; by &lt;a href=&quot;tuttoaster.com&quot;&gt;tuttoaster.com&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>As a little bonus you’ll get the CSS for free.</p>
<pre class="brush: css;">
body {
background: #f4f4f4;
font: 12px Arial;
}

h1 {
font: bold 24px Arial;
line-height: 30px;
}

a  {
color: #000;
text-decoration: none;
}

p {
color: #919191;
}

#wrapper {
margin: 0 auto;
width: 425px;
}

#header, #content, #notifications, #footer {
margin: 30px 0;
}

#upload_hack {
margin: -20px 0 0;
}

#upload_hack input {
background: #FFF;
border: 0px solid #e1e1e1;
-webkit-box-shadow: 0px 0px 5px #c4c4c4;
color: #919191;
float: left;
font-weight: bold;
height: 14px;
margin: 0 10px 0 0;
padding: 21px;
width: 253px;
}

#upload_hack #fix {
background: #FFF;
border: 0px solid #e1e1e1;
-webkit-box-shadow: 0px 0px 5px #c4c4c4;
color: #000;
float: left;
font-weight: bold;
height: 14px;
padding: 21px;
width: 68px;
}

#download {
background: #FFF;
border: 0px solid #e1e1e1;
-webkit-box-shadow: 0px 0px 5px #c4c4c4;
color: #919191;
float: left;
font-weight: bold;
height: 14px;
margin: 10px 0 30px 0;
padding: 21px;
width: 385px;
}

.success {
color: #4fc416;
font-weight: bold;
list-style-image: url('success.png');
list-style-type: none;
}

.error {
color: #f05429;
font-weight: bold;
list-style-image: url('error.png');
}

.success li, .error li {
height: 30px;
line-height: 30px;
}

.fix {
clear: both;
}

.hide {
opacity: 0.0;
}</pre>
<p>Final Thoughts/Closing CommentsThis upload/download system is nowhere near advanced. This is where you come in, as a developer I love seeing people build off my basic or even advanced scripts and make them better. So here is my challenge to you, download our script and look it over and make any improvement you have for it and post below, we can all learn from each other!</p>
<h4>Links for header(); Function Information</h4>
<ul>
<li><a href="http://php.net/manual/en/function.header.php">PHP:header – Manual</a></li>
<li><a href="http://www.w3schools.com/php/func_http_header.asp">PHP Header Function –W3Schools</a></li>
</ul>
<h3>Please don&#8217;t abuse this demo, files will be removed on a weekly base.</h3>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/photoshop-vcard-html-template-free-download/' rel='bookmark' title='Permanent Link: Photoshop vCard HTML Template Free Download'>Photoshop vCard HTML Template Free Download</a></li>
<li><a href='http://www.tuttoaster.com/creating-a-clock-animation-without-css3/' rel='bookmark' title='Permanent Link: Monday Fun: Creating a Clock Animation Without CSS3'>Monday Fun: Creating a Clock Animation Without CSS3</a></li>
<li><a href='http://www.tuttoaster.com/creating-bar-graphs-using-jquery-ui/' rel='bookmark' title='Permanent Link: Creating Bar Graphs using jQuery UI'>Creating Bar Graphs using jQuery UI</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/creating-a-uploaddownload-system-using-php-classes/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Our 15 Favorite Mac Design and Development Applications</title>
		<link>http://www.tuttoaster.com/favorite-mac-design-and-development-applications/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=favorite-mac-design-and-development-applications</link>
		<comments>http://www.tuttoaster.com/favorite-mac-design-and-development-applications/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 15:49:15 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[corporate]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[freelancer]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=7039</guid>
		<description><![CDATA[There&#8217;s no shortage of web designers and developers working on Apple hardware. From part-timers and freelancers to major studios, it&#8217;s becoming rare to see a major development company without an assortment of Apple gear in the office. From giant iMacs to the in-need-of-an-update Mac Pro, most designers are quite comfortable with Cupertino&#8217;s most well-known company&#8217;s [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/10-top-apps-resources-to-speed-up-your-workflow/' rel='bookmark' title='Permanent Link: 10 Top Apps &amp; Resources to Speed Up Your Workflow'>10 Top Apps &amp; Resources to Speed Up Your Workflow</a></li>
<li><a href='http://www.tuttoaster.com/10-must-have-free-tools-for-developers/' rel='bookmark' title='Permanent Link: 10 Must-Have Free Tools for Developers'>10 Must-Have Free Tools for Developers</a></li>
<li><a href='http://www.tuttoaster.com/best-of-april-2010-tutorials-inspiration-and-resources/' rel='bookmark' title='Permanent Link: Best of April 2010, Tutorials, Inspiration and Resources'>Best of April 2010, Tutorials, Inspiration and Resources</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s no shortage of web designers and developers working on Apple hardware. From part-timers and freelancers to major studios, it&#8217;s becoming rare to see a major development company <em>without</em> an assortment of Apple gear in the office. From giant iMacs to the in-need-of-an-update Mac Pro, most designers are quite comfortable with Cupertino&#8217;s most well-known company&#8217;s hardware.</p>
<p>We think it&#8217;s something that goes beyond the interface and questionable increase in stability – Macs <em>do</em> have a great assortment of design applications. These fifteen applications are our personal picks, reflecting the best of what Mac OSX has to offer designers, developers, and online workers.</p>
<p>Note: Obvious picks like Photoshop, Illustrator, and other Adobe applications have been left out of our roundup. It&#8217;s not that we don&#8217;t <em>like</em> Adobe (we&#8217;re not Steve Jobs), just that we&#8217;d prefer to support smaller application developers and suggest less obvious software.</p>
<h2>1. Automator</h2>
<p><a href="http://www.tuttoaster.com/wp-content/uploads/2010/08/automator.png"><img class="alignnone size-full wp-image-7041" title="automator" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/automator.png" alt="automator" width="580" height="300" /></a></p>
<p><a title="automator" href="http://www.macosxautomation.com/automator/"><em>Automator</em></a> could be the computing world&#8217;s simplest robotic assistant. Designed to complete basic and repetitive tasks without endless coding, it&#8217;s one of the most user-friendly automation apps out there. Describe basic tasks in text, use the application&#8217;s built-in automation settings, or simply record yourself completing a task and Automator will copy the task for future use.</p>
<p>We like using Automator for repetitive and time consuming tasks – cropping images, saving media, and searching for specific files in Finder. Spend enough time learning how to use Automator and it&#8217;s highly likely you&#8217;ll run into ways it can optimize the way you work, saving you hundreds of hours each year that would otherwise be wasted on thankless and repetitive tasks.</p>
<h2>2. ScreenFlow</h2>
<p><img class="alignnone size-full wp-image-7042" title="screenflow" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/screenflow.png" alt="screenflow" width="580" height="300" /></p>
<p>Want to guide users through a tutorial, create a promotional video, or record an interview for your blog? <a title="screenflow" href="http://www.telestream.net/screen-flow/overview.htm"><em>ScreenFlow</em></a> is a simple screen capture application that gives Mac users the ability to record and save their on-screen activities without endlessly having to adjust settings or wait for footage to save to disc.</p>
<p>Sounds pretty standard, right? What separates ScreenFlow from other screen capture applications is its powerful editing suite. After you&#8217;ve captured on-screen video, the app&#8217;s editor lets users highlight foreground windows, blur out unnecessary background details, and add on-screen information to their video. It&#8217;s free to try and $99 to buy, but believe us when we say it&#8217;s worth it.</p>
<h2>3. TextMate</h2>
<p><img class="alignnone size-full wp-image-7043" title="textmate" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/textmate.png" alt="textmate" width="580" height="300" /></p>
<p>Need to code? <a title="TextMate" href="http://macromates.com/"><em>TextMate</em></a> is our preferred text coding tool – it&#8217;s simple, incredibly user-friendly, and one of the most intuitive hand coding applications available on <em>any</em> operating system. The program itself is equal parts text application and GUI, giving developers and old fashioned designers a wide range of options for completing their projects.</p>
<p>What makes it better than Apple&#8217;s own <em>TextEdit?</em> First, it&#8217;s great for highlighting and differentiating between on-page tags and different code snippets. Second, it has one of the most effective and quick searching tools we&#8217;ve found on any text editor. Finally, it&#8217;s good for more than just handwritten code and development projects – we could quite happily use TextMate for notes and rough documents.</p>
<h2>4. Pixelmator</h2>
<p><img class="alignnone size-full wp-image-7053" title="pixelmator" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/pixelmator.png" alt="pixelmator" width="580" height="300" /></p>
<p><em>Photoshop</em> is expensive. <em>GIMP</em> is ugly. <a title="pixelmator" href="http://www.pixelmator.com/"><em>Pixelmator</em></a>, on the other hand, is one of the most beautiful and inexpensive image editing applications to hit the Mac, and it&#8217;s damn powerful to boot. Unlike other cross-platform apps which use the Mac&#8217;s hardware as a secondary feature, Pixelmator is built from the ground up for Mac hardware, blending in effortlessly with <em>Spotlight</em> and other Mac-only applications.</p>
<p>It&#8217;s a steal for designers too, priced at just $59 and inclusive of free updates. While we could never give up on Photoshop for image editing and site design, Pixelmator certainly is tempting. The app itself is absolutely beautiful, providing designers with plenty of inspiration while they&#8217;re working.</p>
<h2>5. Airlock</h2>
<p><img class="alignnone size-full wp-image-7054" title="airlock" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/airlock.png" alt="airlock" width="580" height="300" /></p>
<p><a title="airlock" href="http://themha.com/airlock/index.html?s=a"><em>Airlock</em></a> isn&#8217;t an essential app for designers, but it <em>is</em> pretty cool. This micro-application lets iPhone users lock their Mac automatically when they walk away from it using the phone&#8217;s Bluetooth signal as a proximity guide. Configure the app properly and you can lock Mac OSX once you move fifteen meters back, or even set up Airlock to require a password once you lean back in your chair.</p>
<p>It&#8217;s surprisingly accurate, and certainly a cool application for extra security. Designers with a home office probably won&#8217;t be all that interested in Airlock, but those stuck in a shared office space could be; the app could prevent unwanted computer use and keep your designs a little more confidential.</p>
<h2>6. MAMP</h2>
<p><img class="alignnone size-full wp-image-7055" title="mamp" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/mamp.png" alt="mamp" width="580" height="300" /></p>
<p><a title="mamp" href="http://www.mamp.info/en/index.html"><em>MAMP</em></a> is one of the most useful Mac applications out there for designers. An abbreviated form of <em>“Macintosh, Apache, Mysql and PHP,”</em> this app lets designers and developers set up a local server for testing, tweaking, and optimizing their websites, online applications, or server databases.</p>
<p>We&#8217;re big fans of MAMP – it&#8217;s one of the best apps out there for working on design projects without an active connection. Whether you need to modify a WordPress theme on the go or simply test your website without fear of crippling the server, this is the app to do it in. MAMP itself is free of charge, while its bigger brother <em>MAMP Pro</em> is available from $49.</p>
<h2>7. LaunchBar 5</h2>
<p><img class="alignnone size-full wp-image-7056" title="launchbar" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/launchbar.png" alt="launchbar" width="580" height="300" /></p>
<p>Don&#8217;t like searching? <a title="launchbar" href="http://www.obdev.at/products/launchbar/index.html"><em>Launchbar 5</em></a> is one of the few apps that improves on Snow Leopard&#8217;s already impressive search features. Install it and you&#8217;ll be hit with one of the most versatile productivity and file management platforms out there – LaunchBar gives users complete access to Quick Look, their favorite applications, <em>and</em> search options for their clipboard history and system files.</p>
<p>It&#8217;s one of those applications that seem unnecessary, right until you install it. If you&#8217;re accustomed to wasting time switching between applications and searching for development data, install LaunchBar and enjoy quick, simple, and effortless productivity.</p>
<h2>8. Snippet</h2>
<p><img class="alignnone size-full wp-image-7057" title="snippet" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/snippet.png" alt="snippet" width="580" height="300" /></p>
<p>With <em>Automator</em> on your side, coding becomes quicker. With Automater and <a title="snippet" href="http://fuelcollective.com/snippet"><em>Snippet</em></a> installed on your Mac, coding becomes effortlessly smooth and amazingly fast, leaving you with more time to spend on projects and less time spend wading through lines of PHP and Javascript. Priced at $12.95 and available as a free trial, we don&#8217;t doubt this app will quickly become any coder&#8217;s favorite.</p>
<p>Snippet is a simple app that holds snippets of your code, leaving you able to quickly search for and grab the most frequently used parts of your Javascript, PHP, or CSS projects. Bring it up by hitting <em>Ctrl + S</em> and Snippet&#8217;s menu will appear, giving you a list of oft-used code phrases and snippets to use for web development, application development, or CSS modifications.</p>
<h2>9. xScope</h2>
<p><img class="alignnone size-full wp-image-7058" title="xscope" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/xscope.png" alt="xscope" width="580" height="300" /></p>
<p><a title="xscope" href="http://iconfactory.com/software/xscope"><em>xScope</em></a><em> </em>is one of those apps that should install automatically once you start a design project. The app itself is a simple and highly useful collection of design and project double-checking utilities, including a series of on-screen rulers for checking that designs are smooth and in synch, a screen resolution tester for testing websites on different monitor sizes, and a color checker.</p>
<p>But there&#8217;s more to xScope than just checking projects before completion. The application is built for designers and web developers that are tired of wasting time recording information by hand. If you want to minimize the amount of time spent checking over specific details and recording site information, xScope is worth its meager $27 purchase price.</p>
<h2>10. Flow or Cyberduck</h2>
<p><img class="alignnone size-full wp-image-7059" title="flowcyberduck" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/flowcyberduck.png" alt="Flow or Cyberduck" width="580" height="300" /></p>
<p>Every developer needs a go-to file transfer application, and Mac users have two excellent and <em>very</em> different choices. <a title="flow" href="http://extendmac.com/flow/"><em>Flow</em></a> is the first – a file transfer application that&#8217;s stunningly beautiful, powerful enough for most design and development tasks, and compatible with all major web protocols. It&#8217;s priced at $25 and worth every penny, provided you&#8217;re the type that prefers a great interface to an endless list of features.</p>
<p>The second option is <a title="Cyberduck" href="http://cyberduck.ch/"><em>Cyberduck</em></a> – a versatile, powerful, and surprisingly usable open source FTP application. If you&#8217;re less concerned with pure usability and more interested in power, compatibility, and all-round usage, we&#8217;d give Cyberduck the recommendation. As an open source application it&#8217;s free of charge, although the developers would surely welcome a donation.</p>
<h2>11. ShoveBox</h2>
<p><img class="alignnone size-full wp-image-7060" title="shovebox" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/shovebox.png" alt="ShoveBox" width="580" height="300" /></p>
<p>There are plenty of productivity applications out there for Mac users, most of which are loaded with excess features and bloated to the point of worthlessness. <a title="shovebox" href="http://wonderwarp.com/shovebox/"><em>ShoveBox</em></a> is the exact opposite – a clean and simple note taking tool that lets designers, developers, and online workers quickly store and reference important data, images, and entire websites.</p>
<p>If you need to take hundreds of small minor notes each week, incorporate Shovebox into your work strategy and watch previously wasted time reappear. It&#8217;s our favorite all-purpose productivity app for the Mac because of its simplicity – users can drag information to ShoveBox without any extra commands or wasted time. Check out the website and you&#8217;ll find a 30-day trial, with options to purchase for $24.95.</p>
<h2>12. Blinksale</h2>
<p><img class="alignnone size-full wp-image-7061" title="blinksale" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/blinksale.png" alt="blinksale" width="580" height="300" /></p>
<p>Professionalism is <em>everything</em> when you&#8217;re a designer, especially if you want to position yourself as a premium provider and a leading design firm. While Paypal invoices and rough emails are enough for your minor clients and close friends, it&#8217;s worth investing in a proper invoicing application when billing to major clients and large companies.</p>
<p><a title="blinksale" href="http://www.blinksale.com/"><em>Blinksale</em></a> is our personal favorite due to its simplicity, low price, and lengthy list of existing invoice templates. Invoices can be customized to use your own company&#8217;s logo and marketing messages, or even completely outfitted with different CSS and layout data. Whether you need to send a monthly reminder or wish to completely automate credit card processing, this is the online app to use.</p>
<h2>13. Isolator</h2>
<p><img class="alignnone size-full wp-image-7062" title="isolator" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/isolator.png" alt="isolator" width="580" height="300" /></p>
<p><a title="isolator" href="http://willmore.eu/software/isolator/"><em>Isolator</em></a> is a simple application that lets you do one thing: <em>focus on doing one thing</em>. Users can block out needless distractions and configure Isolator to limit their Mac&#8217;s attention to the active window, cutting out needless fiddling and helping to get things done. While not particularly useful for design on its own, it&#8217;s one of the most lucrative free applications we&#8217;ve found for designers that just can&#8217;t focus without a little push.</p>
<p>The app itself is a small, unobtrusive square that sits in OSX&#8217;s menu bar. Click it and you&#8217;ll switch it on, limiting your focus to a single task and <em>(hopefully)</em> helping you get more done. If you&#8217;re a sucker for distractions, Isolator is a must-have addition to your Mac.</p>
<h2>14. Things</h2>
<p><img class="alignnone size-full wp-image-7063" title="Things" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/things.png" alt="Things " width="580" height="300" /></p>
<p><a title="Things" href="http://culturedcode.com/things/"><em>Things</em></a> is a task manager with a difference – one of the few time and project management apps that actually helps users get more individual tasks done, offering both traditional to-do lists and a more in-depth interface for managing personal and business tasks. It&#8217;s clean, collaboration-friendly, and freely able to synchronize with your iPhone or iPad.</p>
<p>If you work alongside a team of designers, developers, or artists, Things is a must-have addition to your digital workspace. Projects are organized similarly to files in Snow Leopard&#8217;s sidebar, giving frequent OSX users a quick and familiar interface for organizing tasks. Single-user licenses are just $49.95, while multi-user packages start from $74.95.</p>
<h2>15. CSSEdit</h2>
<p><img class="alignnone size-full wp-image-7064" title="cssedit" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/cssedit.png" alt="CSSEdit" width="580" height="300" /></p>
<p>There&#8217;s nothing less interesting than scrolling through style sheets in a text editor. <a title="cssedit" href="http://macrabbit.com/cssedit/"><em>CSSEdit</em></a> is one of the best Mac development applications out there, offering designers and web developers a different choice for styling websites and modifying CMS themes. Use the X-Ray feature to tag and check on-page elements, or simply use CSSEdit&#8217;s clean and feature laden text workspace to edit page style.</p>
<p>Pair CSSEdit with <em>TextMate</em> and you&#8217;ll end up with the Mac&#8217;s most intuitive code and style sheet editing suite. A demo version is available with a few limitations (files are limited to 2500 characters and editing options are slightly restricted), and the application itself is available to purchase for $39.</p>
<h3><strong>Mac Users: Do you know any must-have design apps?</strong></h3>
<p>Our fifteen-part lineup covers the major bases for Mac users, but it&#8217;s far from a complete collection. If you know a certain must-have design, development, productivity, or collaboration application for Mac OSX, feel free to let us know in the comments section. No app is too small – desktop utilities, iPhone applications, and online tools are all welcome.</p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/10-top-apps-resources-to-speed-up-your-workflow/' rel='bookmark' title='Permanent Link: 10 Top Apps &amp; Resources to Speed Up Your Workflow'>10 Top Apps &amp; Resources to Speed Up Your Workflow</a></li>
<li><a href='http://www.tuttoaster.com/10-must-have-free-tools-for-developers/' rel='bookmark' title='Permanent Link: 10 Must-Have Free Tools for Developers'>10 Must-Have Free Tools for Developers</a></li>
<li><a href='http://www.tuttoaster.com/best-of-april-2010-tutorials-inspiration-and-resources/' rel='bookmark' title='Permanent Link: Best of April 2010, Tutorials, Inspiration and Resources'>Best of April 2010, Tutorials, Inspiration and Resources</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/favorite-mac-design-and-development-applications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>30 Inspirational Email Newsletters</title>
		<link>http://www.tuttoaster.com/30-inspirational-email-newsletters/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=30-inspirational-email-newsletters</link>
		<comments>http://www.tuttoaster.com/30-inspirational-email-newsletters/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 08:45:33 +0000</pubDate>
		<dc:creator>Matthew Leak</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[corporate]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[web design trends]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=6728</guid>
		<description><![CDATA[Email newsletters are becoming more and more popular on the internet as businesses begin to use them as a viral way of communicating with their audiences/customers. They are, without doubt, great marketing and communication tools.  It allows your site visitors to be constantly kept &#8216;in the loop&#8217; with what&#8217;s new and what&#8217;s to come in [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/design-an-email-newsletter-in-photoshop-2/' rel='bookmark' title='Permanent Link: Design an Email Newsletter in Photoshop'>Design an Email Newsletter in Photoshop</a></li>
<li><a href='http://www.tuttoaster.com/80-unique-and-brilliant-business-cards/' rel='bookmark' title='Permanent Link: 80 Unique and Brilliant Business Cards'>80 Unique and Brilliant Business Cards</a></li>
<li><a href='http://www.tuttoaster.com/code-an-email-newsletter-from-psd-to-html/' rel='bookmark' title='Permanent Link: Code an Email Newsletter from PSD to HTML'>Code an Email Newsletter from PSD to HTML</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Email newsletters are becoming more and more popular on the internet as businesses begin to use them as a viral way of communicating with their audiences/customers. They are, without doubt, great marketing and communication tools.  It allows your site visitors to be constantly kept &#8216;in the loop&#8217; with what&#8217;s new and what&#8217;s to come in the future. The whole point of owning a website that operates as a business is to drive traffic to the website. Email Newsletters are a great tactic to achieve those repeat visits.</p>
<p>Email Newsletters Designs can be much like Website Designs. After all, they exist to serve similar purposes. So a well designed, clean Email Newsletter/Website is a must for any successful business. Here&#8217;s a collection of 30 beautiful inspirational email newsletters for your inspiration.</p>
<h3>37 Signals<span style="font-weight: normal; font-size: 13px;"><a href="http://37assets.s3.amazonaws.com/newsletters/37signals/2010-06-08.html"><img class="alignnone size-full wp-image-6729" title="37signals" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/37signals.png" alt="" width="600" height="598" /></a></span></h3>
<h3>ADC Young Guns</p>
<p><a href="https://app.e2ma.net/app/view:CampaignPublic/id:13810.8311517418/rid:9dd5c82a098bd6e37842914f4dd01113"><img class="alignnone size-full wp-image-6730" title="ADC Young Guns" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/adcyoungguns.png" alt="" width="600" height="702" /></a></h3>
<h3>Apple</p>
<p><a href="http://www.smith-harmon.com/blog/2010/02/_from_apple_subject_line.php"><img class="alignnone size-full wp-image-6731" title="Apple" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/apple2.png" alt="" width="600" height="596" /></a></h3>
<h3>Apple</p>
<p><a href="http://www.smith-harmon.com/blog/2010/02/_from_apple_subject_line.php"><img class="alignnone size-full wp-image-6732" title="Apple" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/apple.png" alt="" width="600" height="542" /></a></h3>
<h3>Bing<a href="http://www.htmlemaildesigns.com/images/emails/bing-5-18-10.jpg"><img class="alignnone size-full wp-image-6733" title="Bing" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/bing.png" alt="" width="600" height="595" /></a></h3>
<h3>Brandtalk<a href="http://ebranding.peopalove.com/ebrandtalk/2010/jun/ebrandtalk.html"><img class="alignnone size-full wp-image-6734" title="Brandtalk" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/brandtalk.png" alt="" width="600" height="520" /></a></h3>
<h3>Bumble and Bumble</p>
<p><a href="http://ebm.cheetahmail.com/c/tag/hBMDj8TB7Q5eoB8K2ISNLbwiXAq/doc.html"><img class="alignnone size-full wp-image-6735" title="Bumble and Bumble" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/bumbleandbumble2.png" alt="" width="600" height="621" /></a></h3>
<h3>Bumble and Bumble</p>
<p><a href="http://ebm.cheetahmail.com/c/tag/hBMBSe$B7Q5eoB8K2ETNLbwiX3Z/doc.html"><img class="alignnone size-full wp-image-6736" title="Bumble and Bumble" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/bumbleandbumble.png" alt="" width="600" height="543" /></a></h3>
<h3>Busted Tees</p>
<p><a href="http://emailview.bustedtees.com/v/1PGXGI/UHY0/QNL3JJR/5IYBO/MAILACTION=1&amp;FORMAT=H"><img class="alignnone size-full wp-image-6737" title="Busted Tees" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/bustedtees.png" alt="" width="600" height="702" /></a></h3>
<h3>Carhartt</p>
<p><a href="http://gallery.campaignmonitor.com/ViewEmail/y/E06B97980622AC14/"><img class="alignnone size-full wp-image-6738" title="Carhartt" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/carharttnews.png" alt="" width="600" height="475" /></a></h3>
<h3>Chanel<a href="http://ebm.enews.chanel.com/c/tag/hBL-oOVB7SRx4B8KMUwM6tUY5Nz/doc.html?email=sendtoben@beautiful-email-newsletters.com&amp;RAF_TRACK="><img class="alignnone size-full wp-image-6739" title="Chanel" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/chanel.png" alt="" width="600" height="532" /></a></h3>
<h3>Digital Consortium</p>
<p><a href="http://thedigitalconsortiumltd.cmail4.com/T/ViewEmail/y/7FB10D79AC6BD16E/"><img class="alignnone size-full wp-image-6740" title="Digital Consortium" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/digitalconsortium.png" alt="" width="600" height="376" /></a></h3>
<h3>Paul Frank Earth Day</p>
<p><a href="http://view.onestopinternet.com/view_email.aspx?j=fe6a1570726107797414&amp;m=fefa12717d6600&amp;ls=fe0111737460017e73147274"><img class="alignnone size-full wp-image-6741" title="Paul Frank Earth Day" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/earthday.png" alt="" width="600" height="658" /></a></h3>
<h3>Email Direct</p>
<p><a href="http://go.emaildirect.com/Archive/EmailDirect/170/Missed_Out_At_adtech.htm"><img class="alignnone size-full wp-image-6742" title="Email Direct" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/emaildirect.png" alt="" width="600" height="657" /></a></h3>
<h3>eRoi</p>
<p><a href="http://www.eroi.com/resources/2010JuneeROINewsletter.html"><img class="alignnone size-full wp-image-6770" title="eRoi" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/eroi.png" alt="" width="600" height="576" /></a></h3>
<h3>Fusion Monarch</p>
<p><a href="http://fusionmonarch.com/emailview.html?utm_source=Mark+Nielsen+and+Patrick+Carmitchel+Associates&amp;utm_campaign=65e45b416b-Initial_FM_Newsletter_FM6_10_2010&amp;utm_medium=email"><img class="alignnone size-full wp-image-6773" title="Fusion Monarch" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/fusionmonarch.png" alt="" width="600" height="551" /></a></h3>
<h3>Jon Burgerman</p>
<p><a href="http://us1.campaign-archive.com/?u=245ce0e754ea29428ec8d1c8d&amp;id=59966d95ce"><img class="alignnone size-full wp-image-6743" title="Jon Burgerman" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/jonburgerman.png" alt="" width="600" height="448" /></a></h3>
<h3>Kate Spade<a href="http://view.ed4.net/v/QJMT90/QKPZ/TU0RZLJ/V1TEH7/MAILACTION=1&amp;FORMAT=H?csm=142604684&amp;csc=35156&amp;csa=142649600&amp;csu=35161"><img class="alignnone size-full wp-image-6744" title="Kate Spade" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/katespade.png" alt="" width="600" height="529" /></a></h3>
<h3>Life Fitness</p>
<p><a href="http://campaign.myspikemail.com/sendstudio/display.php?M=1700579&amp;C=4dcb799cce7e30b32b58c56754726764&amp;S=13355&amp;L=1244&amp;N=3373"><img class="alignnone size-full wp-image-6745" title="Life Fitness" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/lifemagazine.png" alt="" width="650" height="631" /></a></h3>
<h3>Made.com</p>
<p><a href="http://us1.campaign-archive.com/?u=bb902ca9cd9e1e15c72c3984f&amp;id=c42641b106"><img class="alignnone size-full wp-image-6746" title="Made.com" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/made.png" alt="" width="600" height="590" /></a></h3>
<h3>MapMyRide.com</p>
<p><a href="http://go.emaildirect.com/_p_ga4x2nwxtdfubmexga4z6uw3ggfe6jtsga4w2nwx6arubkexyafub8ts22mzxngfs68vnbfvqc8zxuhfj6jbxmjfs8kx37rr548wkjz_p_/trouble.htm"><img class="alignnone size-full wp-image-6747" title="MapMyRide.com" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/mapmyride.png" alt="" width="600" height="575" /></a></h3>
<h3>Nike Store</p>
<p><img class="alignnone size-full wp-image-6748" title="Nike Store" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/nikestore.png" alt="" width="600" height="485" /></h3>
<h3>Nike+</p>
<p><a href="http://s3.amazonaws.com/scrnshots.com/screenshots/98803/nike.png"><img class="alignnone size-full wp-image-6767" title="Nike+" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/Nike+.png" alt="" width="600" height="566" /></a></h3>
<h3>Paul Frank Industries</p>
<p><a href="http://view.onestopinternet.com/view_email.aspx?j=fe561570726003787c1c&amp;m=fefa12717d6600&amp;ls=fe0111737460017e73147274"><img class="alignnone size-full wp-image-6749" title="Paul Frank Industries" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/paulfrank.png" alt="" width="600" height="748" /></a></h3>
<h3>The Publishers Club</p>
<p><a href="http://thepublishersclub.co.uk/emails/LDN01/"><img class="alignnone size-full wp-image-6750" title="The Publishers Club" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/publishersclub.png" alt="" width="600" height="679" /></a></h3>
<h3>Sephora</p>
<p><a href="http://shop.sephora.com/w/webView?cid=17104964778&amp;mid=1169230216&amp;pid=422380&amp;vid=13520&amp;ee=c2VuZHRvYmVuQGJlYXV0aWZ1bC1lbWFpbC1uZXdzbGV0dGVycy5jb20_&amp;si=&amp;mv=H&amp;bv=H&amp;oc=N&amp;sc=&amp;k=15iGc8"><img class="alignnone size-full wp-image-6751" title="Sephora" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/sephora.png" alt="" width="600" height="586" /></a></h3>
<h3>StarbucksStore.com</p>
<p><a href="http://www.starbucksstore.com/onlinenewsletter/sbnwstne02290.asp"><img class="alignnone size-full wp-image-6752" title="Starbucks Store" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/starbucks.png" alt="" width="600" height="656" /></a></h3>
<h3>Steve &amp; Co</p>
<p><a href="http://www.steveandco.com/newsletter/100608/newsletter_IT.htm"><img class="alignnone size-full wp-image-6753" title="Steve &amp; Co" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/steveco.png" alt="" width="600" height="599" /></a></h3>
<h3>Tourist</p>
<p><a href="http://gallery.campaignmonitor.com/ViewEmail/r/E816E9D7ACEBF254/"><img class="alignnone size-full wp-image-6754" title="Tourist" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/trourist.png" alt="" width="600" height="551" /></a></h3>
<h3>Vexio</p>
<p><a href="https://www.vexio.ro/arhiva-newsletter/4/31?utm_source=Vexio&amp;utm_campaign=dc47d39ef0-Newsletter_Concurs_Twitter&amp;utm_medium=email&amp;mc_cid=dc47d39ef0&amp;mc_eid=910469c2ca"><img class="alignnone size-full wp-image-6755" title="Vexio" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/vexio.png" alt="" width="600" height="577" /></a></h3>
<h2>Conclusion</h2>
<p><span style="font-weight: normal;">We can see that many of these Email Newsletters do actually look like Websites. There&#8217;s a great collection of well designed email newsletters above, which one was your favourite?</span></p>
<p><span style="font-weight: normal;">If you want to know how you can go about designing and developing your very own Email Newsletter then I have wrote two tutorials on how you can do just that, check &#8216;em out.</span></p>
<p><span style="font-weight: normal;"><a href="http://www.tuttoaster.com/design-an-email-newsletter-in-photoshop-2/" target="_blank">Design an Email Newsletter in Photoshop<br />
</a></span><a href="http://www.tuttoaster.com/code-an-email-newsletter-from-psd-to-html/" target="_blank">Code an Email Newsletter from PSD to HTML</a></p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/design-an-email-newsletter-in-photoshop-2/' rel='bookmark' title='Permanent Link: Design an Email Newsletter in Photoshop'>Design an Email Newsletter in Photoshop</a></li>
<li><a href='http://www.tuttoaster.com/80-unique-and-brilliant-business-cards/' rel='bookmark' title='Permanent Link: 80 Unique and Brilliant Business Cards'>80 Unique and Brilliant Business Cards</a></li>
<li><a href='http://www.tuttoaster.com/code-an-email-newsletter-from-psd-to-html/' rel='bookmark' title='Permanent Link: Code an Email Newsletter from PSD to HTML'>Code an Email Newsletter from PSD to HTML</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/30-inspirational-email-newsletters/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>7 Products that Changed the Visual Style of Their Industries</title>
		<link>http://www.tuttoaster.com/7-products-that-changed-the-visual-style-of-their-industries/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=7-products-that-changed-the-visual-style-of-their-industries</link>
		<comments>http://www.tuttoaster.com/7-products-that-changed-the-visual-style-of-their-industries/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 08:07:22 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[corporate]]></category>
		<category><![CDATA[coups]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[industrie]]></category>
		<category><![CDATA[Industries]]></category>
		<category><![CDATA[products]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Visual]]></category>
		<category><![CDATA[visual style]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=6938</guid>
		<description><![CDATA[The world of technology is packed with examples of disruptive design. From Apple&#8217;s near endless rollout of slick products to the hundreds of design-is-function startups that have popped up online, it&#8217;s difficult not to witness the way that sleek design and careful usability have entered the business world. It&#8217;s tempting to think that we&#8217;re in [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/49-fantastic-iphone-inspired-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fantastic Iphone Inspired Sites for Your Inspiration'>49 Fantastic Iphone Inspired Sites for Your Inspiration</a></li>
<li><a href='http://www.tuttoaster.com/favorite-mac-design-and-development-applications/' rel='bookmark' title='Permanent Link: Our 15 Favorite Mac Design and Development Applications'>Our 15 Favorite Mac Design and Development Applications</a></li>
<li><a href='http://www.tuttoaster.com/6-changes-additions-optimizations-increase-conversions/' rel='bookmark' title='Permanent Link: 6 Additions and Optimizations to Increase Conversions'>6 Additions and Optimizations to Increase Conversions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The world of technology is packed with examples of disruptive design. From Apple&#8217;s near endless rollout of slick products to the hundreds of design-is-function startups that have popped up online, it&#8217;s difficult <em>not</em> to witness the way that sleek design and careful usability have entered the business world.</p>
<p>It&#8217;s tempting to think that we&#8217;re in the middle of a design revolution, although we&#8217;re not quite sure that&#8217;s the case. Industrial design has resulted in new inventions, sleek products, and ultra-popular devices for hundreds of years, and it&#8217;s certainly not a discipline that&#8217;s limited to the 21st century.</p>
<p>We&#8217;ve tracked down seven products that define industrial design as a discipline. Some are rugged and built to last, while others remain somewhat delicate and immobile. What brings them together isn&#8217;t their function, purpose, or technological ability, but the way they present it. Each one of these design innovations gave technology a user-friendly and attractive canvas on which to operate, and each caused a <em>major</em> design revolution in their respective industries.</p>
<h2>1. Tivoli Model One</h2>
<p><img class="alignnone size-full wp-image-6941" title="Tivoli Model One" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/Tivoli-Model-One.png" alt="Tivoli Model One" width="550" height="356" /></p>
<p>Henry Kloss has a long history in the consumer audio business. The engineer helped design some of the 20th century&#8217;s most important loudspeakers, pioneering bookshelf speakers and creating a string of slick, engineered, and distinctly minimalistic devices along the way. Before his death in 2002, the legendary designer engineered one final product: the <em>Tivoli Model One radio</em>.</p>
<p>The Model One is the home audio industry&#8217;s <em>iPod</em> – a piece of engineering so bare and minimalistic that it&#8217;s usable by almost anyone. While the most basic (and most popular) version includes just an AM/FM tuner and volume control, more advanced versions of the Model One are available, all of which offer a slightly different spin on the radio&#8217;s simplistic control layout.</p>
<h2>2. Western Electric Model 302</h2>
<p><img class="alignnone size-full wp-image-6943" title="Western Electric Model 302" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/Western-Electric-Model-302.png" alt="Western Electric Model 302" width="550" height="356" /></p>
<p>Upon its release, Western Electric&#8217;s <em>Model 302</em> telephone was a technological marvel. The telephone featured a built-in mechanical ringer and accurate turn-dial calling interface – two features that were considered innovations at the time. Released in 1937 and manufactured for over three decades, the Model 302 was the world&#8217;s first mass-market telephone and a huge success for <em>AT&amp;T</em>.</p>
<p>Despite its ancient design and analog calling system, the Model 302 remains an attractive piece of technology. Amazingly, it&#8217;s also one that is just as supported today as it was upon its release; plug the Model 302 into a standard phone outlet and you&#8217;ll find it&#8217;s just as capable of making calls as any other telephone. The ultimate executive desk phone? We certainly think so.</p>
<h2>3. IBM DiskOnKey</h2>
<p><img class="alignnone size-full wp-image-6946" title="IBM DiskOnKey" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/IBM-DiskOnKey.png" alt="IBM DiskOnKey" width="550" height="356" /></p>
<p>The early days of flash storage certainly weren&#8217;t cheap. IBM&#8217;s <em>DiskOnKey</em> was the first mass-market flash storage drive, and boy was it an expensive piece of kit. Priced at $49.00USD and offering an at-the-time impressive figure of <em>eight whole megabytes</em> of storage, it&#8217;s a wonder this pocket storage wonder sold at all.</p>
<p>But look at the DiskOnKey&#8217;s rivals and you&#8217;ll see that it&#8217;s actually a fairly decent deal. The storage device was released in 1999, designed to compete with the then-standard floppy disc and <em>ZIP</em> drive. While the DiskOnKey certainly isn&#8217;t as elegant or sharp as our other favorites, its form makes it an important milestone in the industrial design timeline.</p>
<h2>4. Nintendo NES</h2>
<p><img class="alignnone size-full wp-image-6947" title="Nintendo NES" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/Nintendo-NES.png" alt="Nintendo NES" width="550" height="356" /></p>
<p>In many ways, the <em>Nintendo Entertainment System</em> (or <em>NES</em>, for short) was the world&#8217;s first modern gaming console. While Atari and other manufacturers had broken ground with their <em>Pong</em> systems and <em>Pacman</em> arcade games, it wasn&#8217;t until Nintendo put out their first major console that gaming became mainstream.</p>
<p>And it&#8217;s not hard to see why. Despite its chunky eighties appearance, the NES remains one of the most enduring designs in technology. It quite literally revolutionized gaming design, bringing new features into the fold – the removable control pad, directional control buttons, and licensed gaming cartridge are all NES innovations – and proving that gaming systems needn&#8217;t look like the work of an amateur radio enthusiast to be successful.</p>
<h2>5. iPhone</h2>
<p><img class="alignnone size-full wp-image-6948" title="iphone" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/iphone.png" alt="iphone" width="550" height="356" /></p>
<p>Apple&#8217;s endlessly praised (and equally hated) smartphone has grown into one of the 21st century&#8217;s most important pieces of technology, making touchscreens a standard smartphone feature and all-but eliminating the tactile keyboard. With multi-touch controls and one of the mobile world&#8217;s first good web browsers, the <em>iPhone</em> was the ultimate in disruptive technology after its 2007 release.</p>
<p>If there&#8217;s one certain way to check for &#8216;revolutionary&#8217; status, it&#8217;s through imitation. The iPhone has been endlessly copied throughout its run, its features and design now incorporated into almost every competing touchscreen device. While business users despise its virtual keyboard and techies decry its semi-ridiculous App Store policies, there&#8217;s no doubt that the iPhone is one of the mobile world&#8217;s most important design milestones.</p>
<h2>6. Citroën DS</h2>
<p><img class="alignnone size-full wp-image-6949" title="Citroën DS" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/Citroën-DS.png" alt="Citroën DS" width="550" height="356" /></p>
<p>The <em>Citröen DS</em> certainly didn&#8217;t fit in alongside other executive cars of the 1950s. The French high-end vehicle weighed little more than a ton, offered a laundry list of modern features, and actually looked, well, <em>good</em>. The passion project of famed Italian automotive designer Flaminio Bertoni, the DS was built with almost no regard for automotive standards or design principles.</p>
<p>But strangely enough, it worked. The DS is remembered as one of the 20th century&#8217;s best vehicles, claiming credit for inventions such as directional headlights (now a standard safety feature) and adjustable suspension. The car&#8217;s design was so timeless that it remained virtually unchanged during its twenty-year production run, with Citröen selling almost 1.5 million DSes in total.</p>
<h2>7. Rolex Oyster Perpetual</h2>
<p><img class="alignnone size-full wp-image-6950" title="Rolex Oyster Perpetual" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/Rolex-Oyster-Perpetual.png" alt="Rolex Oyster Perpetual" width="550" height="356" /></p>
<p>How did the world&#8217;s most conservative watch company pioneer so many new features? While Rolex watches are best known as a creature comfort of the super rich, the Swiss luxury brand certainly has a few disruptive technologies up their sleeve. The <em>Oyster Perpetual</em> was the first line of watches to feature a built-in calendar system – a major innovation in the late 1940s.</p>
<p>But far from their technical advances, the Oyster Perpetual line remains an example of supreme form. While other watch manufacturers focused on adding superfluous features, Rolex built the Oyster line around simplicity and design. Clean, evenly spaced, and relatively minimal alongside other Swiss brands, there&#8217;s a reason these watches can command high five-figure prices.</p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/49-fantastic-iphone-inspired-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fantastic Iphone Inspired Sites for Your Inspiration'>49 Fantastic Iphone Inspired Sites for Your Inspiration</a></li>
<li><a href='http://www.tuttoaster.com/favorite-mac-design-and-development-applications/' rel='bookmark' title='Permanent Link: Our 15 Favorite Mac Design and Development Applications'>Our 15 Favorite Mac Design and Development Applications</a></li>
<li><a href='http://www.tuttoaster.com/6-changes-additions-optimizations-increase-conversions/' rel='bookmark' title='Permanent Link: 6 Additions and Optimizations to Increase Conversions'>6 Additions and Optimizations to Increase Conversions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/7-products-that-changed-the-visual-style-of-their-industries/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web and Graphic Designers from the Netherlands</title>
		<link>http://www.tuttoaster.com/web-and-graphic-designers-from-the-netherlands/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=web-and-graphic-designers-from-the-netherlands</link>
		<comments>http://www.tuttoaster.com/web-and-graphic-designers-from-the-netherlands/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 10:17:47 +0000</pubDate>
		<dc:creator>Callum Chapman</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[round up]]></category>
		<category><![CDATA[showcase]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=6889</guid>
		<description><![CDATA[In this first post of the series, we&#8217;re featuring eight web and graphic designers (as well as studios) from the Netherlands: Yummy Gum, Erika van der Bent, The Olifants, Mark Dijkstra, Illutic Web Design, Rutger Ontwerp, Whoooz, and Jonnotie. The post in total features 40 great pieces of work. In the next post of the [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/three-techniques-you-should-be-using-when-designing-a-website/' rel='bookmark' title='Permanent Link: Three Techniques you Should be using when Designing a Website'>Three Techniques you Should be using when Designing a Website</a></li>
<li><a href='http://www.tuttoaster.com/showcase-of-multi-colored-color-schemes-in-web-design/' rel='bookmark' title='Permanent Link: Showcase of Multi-Colored Color Schemes in Web Design'>Showcase of Multi-Colored Color Schemes in Web Design</a></li>
<li><a href='http://www.tuttoaster.com/logos-on-the-internet-the-importance-of-simplicity/' rel='bookmark' title='Permanent Link: Logos on the Internet: The Importance of Simplicity'>Logos on the Internet: The Importance of Simplicity</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In this first post of the series, we&#8217;re featuring eight web and graphic designers (as well as studios) from the Netherlands: Yummy Gum, Erika van der Bent, The Olifants, Mark Dijkstra, Illutic Web Design, Rutger Ontwerp, Whoooz, and Jonnotie. The post in total features 40 great pieces of work.</p>
<p>In the next post of the series, we&#8217;ll be featuring a selection of Australian web and graphic designers/studios, so stay tuned!</p>
<h2>Yummy Gum</h2>
<p><em><a href="http://www.yummygum.nl/">Visit their website</a></em><br />
Yummygum is a design studio from Amsterdam that is all about tasty designs and refreshing ideas. They create websites and web applications, and also design logos.</p>
<h3>Fit &amp; Frutig</h3>
<h3><img title="Fit &amp; Frutig" src="/wp-content/uploads/dutch-showcase/01-netherlands-design.jpg" border="0" alt="Fit &amp; Frutig" width="550" /></h3>
<h3>iconSweets</h3>
<p><img title="iconSweets" src="/wp-content/uploads/dutch-showcase/02-netherlands-design.jpg" border="0" alt="iconSweets" width="550" /></p>
<h3>Willem van Schendel</h3>
<p><img title="Willem van Schendel" src="/wp-content/uploads/dutch-showcase/03-netherlands-design.jpg" border="0" alt="Willem van Schendel" width="550" /></p>
<h3>BTI Foundation</h3>
<p><img title="BTI Foundation" src="/wp-content/uploads/dutch-showcase/04-netherlands-design.jpg" border="0" alt="BTI Foundation" width="550" /></p>
<h3>Colorlab</h3>
<p><img title="Colorlab" src="/wp-content/uploads/dutch-showcase/05-netherlands-design.jpg" border="0" alt="Colorlab" width="550" /></p>
<h2>Erika van der Bent</h2>
<p><em><a href="http://www.geeftvorm.com/">Visit their website</a></em><br />
Erika van der Bent is a freelance multimedia designer from Rotterdam. She produces designs and develops websites, corporate identities and various other designs.</p>
<h3>Enixé</h3>
<p><img title="Enixé" src="/wp-content/uploads/dutch-showcase/06-netherlands-design.jpg" border="0" alt="Enixé" width="550" /></p>
<h3>Icentials</h3>
<p><img title="Icentials" src="/wp-content/uploads/dutch-showcase/07-netherlands-design.jpg" border="0" alt="Icentials" width="550" /></p>
<h3>Ukkies</h3>
<p><img title="Ukkies" src="/wp-content/uploads/dutch-showcase/08-netherlands-design.jpg" border="0" alt="Ukkies" width="550" /></p>
<h3>ComfortCube</h3>
<p><img title="ComfortCube" src="/wp-content/uploads/dutch-showcase/09-netherlands-design.jpg" border="0" alt="ComfortCube" width="550" /></p>
<h3>Ampersandlove</h3>
<p><img title="Ampersandlove" src="/wp-content/uploads/dutch-showcase/10-netherlands-design.jpg" border="0" alt="Ampersandlove" width="550" /></p>
<h2>The Olifants</h2>
<p><em><a href="http://www.theolifants.nl/">Visit their website</a></em><br />
The Olifants are a creative agency focusing on illustration with a strong graffiti and street art influence. They produce wall paintings and canvases, and also run live painting sessions and exhibitions.</p>
<h3>Wallpainting</h3>
<p><img title="Wallpainting" src="/wp-content/uploads/dutch-showcase/11-netherlands-design.jpg" border="0" alt="Wallpainting" width="550" /></p>
<h3>Hand Bones</h3>
<p><img title="Hand Bones" src="/wp-content/uploads/dutch-showcase/12-netherlands-design.jpg" border="0" alt="Hand Bones" width="550" /></p>
<h3>The Olifants</h3>
<p><img title="The Olifants" src="/wp-content/uploads/dutch-showcase/13-netherlands-design.jpg" border="0" alt="The Olifants" width="550" /></p>
<h3>Brain Canvas</h3>
<p><img title="Brain Canvas" src="/wp-content/uploads/dutch-showcase/14-netherlands-design.jpg" border="0" alt="Brain Canvas" width="550" /></p>
<h3>The Olifants</h3>
<p><img title="The Olifants" src="/wp-content/uploads/dutch-showcase/15-netherlands-design.jpg" border="0" alt="The Olifants" width="550" /></p>
<h2>Mark Dijkstra</h2>
<p><em><a href="http://www.markdijkstra.eu/">Visit their website</a></em><br />
Mark Dijkstra is based in the east of Holland and designs and builds beautiful websites and identities. Mark is skilled in Photoshop, Illustrator, Flash, xHTML/CSS, XML, PHP and WordPress.</p>
<h3>MD vCard</h3>
<p><img title="MD vCard" src="/wp-content/uploads/dutch-showcase/16-netherlands-design.jpg" border="0" alt="MD vCard" width="550" /></p>
<h3>Xtra Solutions</h3>
<p><img title="Xtra Solutions" src="/wp-content/uploads/dutch-showcase/17-netherlands-design.jpg" border="0" alt="Xtra Solutions" width="550" /></p>
<h3>YourSurvey</h3>
<p><img title="YourSurvey" src="/wp-content/uploads/dutch-showcase/18-netherlands-design.jpg" border="0" alt="YourSurvey" width="550" /></p>
<h3>404 Error Page</h3>
<p><img title="404 Error Page" src="/wp-content/uploads/dutch-showcase/19-netherlands-design.jpg" border="0" alt="404 Error Page" width="550" /></p>
<h3>OpenSourceHunter</h3>
<p><img title="OpenSourceHunter" src="/wp-content/uploads/dutch-showcase/20-netherlands-design.jpg" border="0" alt="OpenSourceHunter" width="550" /></p>
<h2>Illutic Web Design</h2>
<p><em><a href="http://www.illutic-webdesign.nl/">Visit their website</a></em><br />
Illutic Web Design is an ambitious and dynamic design agency from Enschede, Overijssel. The company name, &#8220;Illutic&#8221;, was a combination of the two English words &#8220;illusion&#8221; and &#8220;fantastic&#8221;.</p>
<h3>Bal Rashmi</h3>
<p><img title="Bal Rashmi" src="/wp-content/uploads/dutch-showcase/21-netherlands-design.jpg" border="0" alt="Bal Rashmi" width="550" /></p>
<h3>Mercuri</h3>
<p><img title="Mercuri" src="/wp-content/uploads/dutch-showcase/22-netherlands-design.jpg" border="0" alt="Mercuri" width="550" /></p>
<h3>Hiranthi&#8217;s Weblog</h3>
<p><img title="Hiranthi's Weblog" src="/wp-content/uploads/dutch-showcase/23-netherlands-design.jpg" border="0" alt="Hiranthi's Weblog" width="550" /></p>
<h3>Famire</h3>
<p><img title="Famire" src="/wp-content/uploads/dutch-showcase/24-netherlands-design.jpg" border="0" alt="Famire" width="550" /></p>
<h3>Bureau Blik</h3>
<p><img title="Bureau Blik" src="/wp-content/uploads/dutch-showcase/25-netherlands-design.jpg" border="0" alt="Bureau Blik" width="550" /></p>
<h2>Rutger Ontwerp</h2>
<p><em><a href="http://www.rutger-ontwerp.nl/">Visit their website</a></em><br />
Rutger Ontwerp is a one man design studio from Zwolle, offering complete dynamic websites, redesigns, online art direction, logos and identities, and print design.</p>
<h3>Kjenning</h3>
<p><img title="Kjenning" src="/wp-content/uploads/dutch-showcase/26-netherlands-design.jpg" border="0" alt="Kjenning" width="550" /></p>
<h3>Ingeborg Lukkien</h3>
<p><img title="Ingeborg Lukkien" src="/wp-content/uploads/dutch-showcase/27-netherlands-design.jpg" border="0" alt="Ingeborg Lukkien" width="550" /></p>
<h3>Versteeg Ermelo</h3>
<p><img title="Versteeg Ermelo" src="/wp-content/uploads/dutch-showcase/28-netherlands-design.jpg" border="0" alt="Versteeg Ermelo" width="550" /></p>
<h3>Libra Bedrijfsadviseurs</h3>
<p><img title="Libra Bedrijfsadviseurs" src="/wp-content/uploads/dutch-showcase/29-netherlands-design.jpg" border="0" alt="Libra Bedrijfsadviseurs" width="550" /></p>
<h3>Blitzkrieg Ballroom</h3>
<p><img title="Blitzkrieg Ballroom" src="/wp-content/uploads/dutch-showcase/30-netherlands-design.jpg" border="0" alt="Blitzkrieg Ballroom" width="550" /></p>
<h2>Whoooz</h2>
<p><em><a href="http://www.whoooz.nl/">Visit their website</a></em><br />
Whoooz are a company dedicated to web media, helping their clients to develop a strong online identity, using beautiful and powerful designs.</p>
<h3>Vind Carlo</h3>
<p><img title="Vind Carlo" src="/wp-content/uploads/dutch-showcase/31-netherlands-design.jpg" border="0" alt="Vind Carlo" width="550" /></p>
<h3>Wernink</h3>
<p><img title="Wernink" src="/wp-content/uploads/dutch-showcase/32-netherlands-design.jpg" border="0" alt="Wernink" width="550" /></p>
<h3>It&#8217;s A Go</h3>
<p><img title="It's A Go" src="/wp-content/uploads/dutch-showcase/33-netherlands-design.jpg" border="0" alt="It's A Go" width="550" /></p>
<h3>Handig In De Baan</h3>
<p><img title="Handig In De Baan" src="/wp-content/uploads/dutch-showcase/34-netherlands-design.jpg" border="0" alt="Handig In De Baan" width="550" /></p>
<h3>Andarr</h3>
<p><img title="Andarr" src="/wp-content/uploads/dutch-showcase/35-netherlands-design.jpg" border="0" alt="Andarr" width="550" /></p>
<h2>Jonnotie</h2>
<p><em><a href="http://jonnotie.nl/">Visit their website</a></em><br />
Jonnotie is the portfolio of Jonno Riekwel, a self-taught web designer from Rotterdam. He loves and is very passionate about what he does.</p>
<h3>Vertrektijden</h3>
<p><img title="Vertrektijden" src="/wp-content/uploads/dutch-showcase/36-netherlands-design.jpg" border="0" alt="Vertrektijden" width="550" /></p>
<h3>Bohemion Coding</h3>
<p><img title="Bohemion Coding" src="/wp-content/uploads/dutch-showcase/37-netherlands-design.jpg" border="0" alt="Bohemion Coding" width="550" /></p>
<h3>365psd</h3>
<p><img title="365psd" src="/wp-content/uploads/dutch-showcase/38-netherlands-design.jpg" border="0" alt="365psd" width="550" /></p>
<h3>Jonno Riekwel</h3>
<p><img title="Jonno Riekwel" src="/wp-content/uploads/dutch-showcase/39-netherlands-design.jpg" border="0" alt="Jonno Riekwel" width="550" /></p>
<h3>Web Application</h3>
<p><img title="Web Application" src="/wp-content/uploads/dutch-showcase/40-netherlands-design.jpg" border="0" alt="Web Application" width="550" /></p>
<p>We really hope you enjoyed this post. This is of course just a very small selection of talented designers from the Netherlands, there are hundreds more, and we will revisit this country in the future. Please do discuss there designers in the comments section! Who is your favorite and why?</p>
<p>Do you have a favorite piece featured here? Let us know! Next time in this series we will be scouting Australia for some the best creative talent &#8211; keep your eyes peeled!</p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/three-techniques-you-should-be-using-when-designing-a-website/' rel='bookmark' title='Permanent Link: Three Techniques you Should be using when Designing a Website'>Three Techniques you Should be using when Designing a Website</a></li>
<li><a href='http://www.tuttoaster.com/showcase-of-multi-colored-color-schemes-in-web-design/' rel='bookmark' title='Permanent Link: Showcase of Multi-Colored Color Schemes in Web Design'>Showcase of Multi-Colored Color Schemes in Web Design</a></li>
<li><a href='http://www.tuttoaster.com/logos-on-the-internet-the-importance-of-simplicity/' rel='bookmark' title='Permanent Link: Logos on the Internet: The Importance of Simplicity'>Logos on the Internet: The Importance of Simplicity</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/web-and-graphic-designers-from-the-netherlands/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>25 Fresh and Inspiring Coming Soon Pages</title>
		<link>http://www.tuttoaster.com/25-fresh-and-inspiring-coming-soon-pages/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=25-fresh-and-inspiring-coming-soon-pages</link>
		<comments>http://www.tuttoaster.com/25-fresh-and-inspiring-coming-soon-pages/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 08:47:00 +0000</pubDate>
		<dc:creator>Liam McCabe</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[coming soon]]></category>
		<category><![CDATA[corporate]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[sign up]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=6521</guid>
		<description><![CDATA[Today we&#8217;re going to show you some fresh and inspiring coming soon and under construction pages. Coming soon and under construction pages are very important when you&#8217;ve purchased a domain for your new website and still not found the time to complete the design, or when your still developing it. Coming soon and under construction pages need [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/logos-on-the-internet-the-importance-of-simplicity/' rel='bookmark' title='Permanent Link: Logos on the Internet: The Importance of Simplicity'>Logos on the Internet: The Importance of Simplicity</a></li>
<li><a href='http://www.tuttoaster.com/15-inspiring-vintage-and-retro-web-designs/' rel='bookmark' title='Permanent Link: 15 Inspiring Vintage and Retro Web Designs'>15 Inspiring Vintage and Retro Web Designs</a></li>
<li><a href='http://www.tuttoaster.com/great-looking-navigation-for-free-download/' rel='bookmark' title='Permanent Link: Great Looking Navigation for Free Download'>Great Looking Navigation for Free Download</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today we&#8217;re going to show you some fresh and inspiring coming soon and under construction pages. Coming soon and under construction pages are very important when you&#8217;ve purchased a domain for your new website and still not found the time to complete the design, or when your still developing it.</p>
<p>Coming soon and under construction pages need to look very basic and they have to contain the information the visitor needs to return to when your done developing, one other important thing is that they do need to look attractive so visitors will return to more of this awesomeness.</p>
<p>So sit back and enjoy these great looking and  well designed coming soon and under construction pages.</p>
<p><a href="http://toonytuts.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/toonytuts.png" alt="toonytuts" width="585" height="400" /></a></p>
<p><a href="http://themeforest.net/item/coming-soon-under-construction-03-4-skins/76173"><img class="alignnone size-full wp-image-6868" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/equinox.png" alt="equinox" width="585" height="400" /></a></p>
<p><a href="http://www.getsunlight.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/sunlight.png" alt="getsunlight" width="585" height="400" /></a></p>
<p><a href="http://www.mynitelife.co.uk/"><img class="alignnone size-full wp-image-6870" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/nightlife.png" alt="my nightlife" width="585" height="400" /></a></p>
<p><a href="http://themeforest.net/item/clean-countdown-timer-construction-page/95941"><img class="alignnone size-full wp-image-6866" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/clean-countdown.png" alt="clean countdown" width="585" height="400" /></a></p>
<p><a href="http://designatr.com/"><img class="alignnone size-full wp-image-6871" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/designatr.png" alt="designatr" width="585" height="400" /></a></p>
<p><a href="http://www.picsengine.com/beta/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/picsengine.png" alt="picsengine" width="585" height="400" /></a></p>
<p><a href="http://phoraapp.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/phora.png" alt="phoraapp" width="585" height="400" /></a></p>
<p><a href="http://latenitesoft.com/sweet/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/sweet.png" alt="latenitesoft" width="585" height="400" /></a></p>
<p><a href="http://themeforest.net/item/fliptimer-under-construction-template/112678?ref=TutToaster"><img class="alignnone size-full wp-image-6861" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/fliptimer.png" alt="" width="585" height="400" /></a></p>
<p><a href="http://favmovie.net/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/favmovie.png" alt="favmovie" width="585" height="400" /></a></p>
<p><a href="http://foundationsix.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/foundationsix.png" alt="foundationsix" width="585" height="400" /></a></p>
<p><a href="http://betterblogger.net/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/betterblogger.png" alt="betterblogger" width="585" height="400" /></a></p>
<p><a href="http://themeforest.net/item/launchit/80079"><img class="alignnone size-full wp-image-6862" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/launchit.png" alt="launchit" width="585" height="400" /></a></p>
<p><a href="http://remindness.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/remindness.png" alt="remindness" width="585" height="400" /></a></p>
<p><a href="http://themeforest.net/item/under-construction-page-with-ajax-twitter-feed/110790"><img class="alignnone size-full wp-image-6864" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/under-construction.png" alt="under construction" width="585" height="400" /></a></p>
<p><a href="http://www.epicwinapp.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/epicwinapp.png" alt="epicwinapp" width="585" height="400" /></a></p>
<p><a href="http://www.tapmates.com/screenport/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/screenport.png" alt="tapmates" width="585" height="400" /></a></p>
<p><a href="http://themeforest.net/item/ultra-sleek-3d-look-under-construction-page/110572"><img class="alignnone size-full wp-image-6865" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/3D-looking-Under-Construction-page.png" alt="3D looking Under Construction page" width="585" height="400" /></a></p>
<p><a href="http://www.fidiz.com/"><img class="alignnone size-full wp-image-6874" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/fidiz.png" alt="fidiz" width="585" height="400" /></a></p>
<p><a href="http://glitch.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/glitch.png" alt="glitch" width="585" height="400" /></a></p>
<p><a href="http://www.wearefokus.com/"><img class="alignnone size-full wp-image-6875" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/wearefokus.png" alt="wearefokus" width="585" height="400" /></a></p>
<p><a href="http://www.rdio.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/rdio.png" alt="rdio" width="585" height="400" /></a></p>
<p><a href="http://discoengine.com/"><img src="http://www.tuttoaster.com/wp-content/uploads/2010/07/discoengine.png" alt="discoengine" width="585" height="400" /></a></p>
<p><a href="http://madc.at/"><img class="alignnone size-full wp-image-6873" src="http://www.tuttoaster.com/wp-content/uploads/2010/08/madcat.png" alt="madcat" width="585" height="400" /></a></p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/logos-on-the-internet-the-importance-of-simplicity/' rel='bookmark' title='Permanent Link: Logos on the Internet: The Importance of Simplicity'>Logos on the Internet: The Importance of Simplicity</a></li>
<li><a href='http://www.tuttoaster.com/15-inspiring-vintage-and-retro-web-designs/' rel='bookmark' title='Permanent Link: 15 Inspiring Vintage and Retro Web Designs'>15 Inspiring Vintage and Retro Web Designs</a></li>
<li><a href='http://www.tuttoaster.com/great-looking-navigation-for-free-download/' rel='bookmark' title='Permanent Link: Great Looking Navigation for Free Download'>Great Looking Navigation for Free Download</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/25-fresh-and-inspiring-coming-soon-pages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Create a Forum in PHP from Scratch</title>
		<link>http://www.tuttoaster.com/how-to-create-a-forum-in-php-from-scratch/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-create-a-forum-in-php-from-scratch</link>
		<comments>http://www.tuttoaster.com/how-to-create-a-forum-in-php-from-scratch/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 08:46:46 +0000</pubDate>
		<dc:creator>Jose</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=4786</guid>
		<description><![CDATA[In this tutorial we&#8217;ll see how to make a forum using PHP and MySQL. We have to cover a lot of different things, so let&#8217;s start! Some details about this tutorial You can download a compressed folder with the whole project inside. So sometimes I won&#8217;t show all the code of a file in order [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/how-to-use-style-and-implement-wordpress-shortcodes/' rel='bookmark' title='Permanent Link: How To Use, Style and Implement WordPress Shortcodes'>How To Use, Style and Implement WordPress Shortcodes</a></li>
<li><a href='http://www.tuttoaster.com/create-an-ajaxjqueryphp-contact-form/' rel='bookmark' title='Permanent Link: Create an AJAX/jQuery/PHP Contact Form'>Create an AJAX/jQuery/PHP Contact Form</a></li>
<li><a href='http://www.tuttoaster.com/create-a-camera-application-in-flash-using-actionscript-3/' rel='bookmark' title='Permanent Link: Create a Camera Application in Flash Using ActionScript 3'>Create a Camera Application in Flash Using ActionScript 3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><!-- Post Begins Here --></p>
<p>In this tutorial we&#8217;ll see how to make a forum using PHP and MySQL. We have to cover a lot of different things, so let&#8217;s start!</p>
<h3>Some details about this tutorial</h3>
<ul>
<li>You can download a compressed folder with the whole project inside. So sometimes I won&#8217;t show all the code of a file in order to focus on the important parts of the project.</li>
<li>The code I&#8217;ll show is exactly the same than the one you can download, except for some comments. In the original project you&#8217;ll have everything well documented (using phpDocumentor).</li>
<li>I&#8217;ll ommit the &lt;?php and ?&gt; tags in the tutorial, but every time you type PHP code in a file you should put it between them.</li>
<li>This project doesn&#8217;t follow a MVC pattern, but we&#8217;ll use classes and try to separate the different functionalities.</li>
</ul>
<h3>What and how</h3>
<p><strong>What</strong> are we going to do? We have to think the answer very carefully, and not only &#8220;a forum&#8221;, also the functionality we want to offer.</p>
<p><strong>Answer</strong>: We are going to develop a forum where anyone can write a post without registration and other people can see it and write a response.</p>
<p><strong>How</strong> are we going to do that? Here we have to think about how we are going to organize the project, the files..etc</p>
<p><strong>Answer</strong>: As you know we are going to use PHP and MySQL. The files are going to be organized by the code they implement, so a class file will be in a different folder than a CSS file, for instance.</p>
<h3>Designing and Building the Database</h3>
<p>When we start to code a project, the first thing we usually do is to think about the database. Because that decision is going to be very important, and a lot of the PHP code depends on it.</p>
<p>There are many options here, we could make a table of posts and another of users, even three tables if we want, but we&#8217;ll take the easiest way in order to focus on the PHP code.</p>
<p><img src="http://www.tuttoaster.com/wp-content/uploads/2010/08/dbSchema.png" alt="DB Schema" width="209" height="240" /> </p>
<p>This table is all we need, at least for a simple forum like ours.</p>
<p>So a thread is going to consist of several rows in the table. The first post of a thread is going to have the permalink_parent set to NULL, and the rest of them are going to have the permalink_parent with the permalink of their parent, as the name suggests.</p>
<p>To create the table we have to execute the following sentence in our database:</p>
<pre class="brush: sql;">
CREATE TABLE `posts` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(128) COLLATE utf8_bin NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `content` text COLLATE utf8_bin NOT NULL,
  `permalink_parent` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  `author` varchar(128) COLLATE utf8_bin NOT NULL,
  `permalink` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `upermalink` (`permalink`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
</pre>
<p>The lengths of some fields depend on how many people are going to use the forum, but these values are enough for the moment.</p>
<p>Note that we are defining an UNIQUE KEY over the permalink column, which means that in our forum a title must be unique, I know we usually can post a couple of threads with the same title in other forum, however for the sake of simplicity we are keeping the title as unique.</p>
<h3>File Organization</h3>
<p>As well as designing the database we need to think about how we are going to organize the project, instead of starting to code without a previous plan.</p>
<p>The title and permalink are going to be unique, so we have to check if a title is taken.</p>
<p>At this point we can also take different approaches, we should try to keep things as simple as we can. So this is a little schema of our final project.</p>
<p><img src="http://www.tuttoaster.com/wp-content/uploads/2010/08/schema.jpg" alt="File Schema" width="209" height="305" /></p>
<p>As you can see there are many files, but all of them are necessary if we want to keep things organized. Let&#8217;s see them step by step, and try to get the techniques we&#8217;ll use.</p>
<h3>The media folder</h3>
<p>This tutorial is focus on the PHP side, so I won&#8217;t explain too much about the CSS and the HTML code, you can download all the code at the end of this tutorial, so don&#8217;t worry. Anyway I&#8217;ll try to summarize the content of this folder.</p>
<ul>
<li><strong>style.css</strong>. It&#8217;s the CSS file for all the forum, includes the reset CSS code and the rest of the styles like a regular CSS file.</li>
<li><strong>bg_container.png</strong>. The background of the main container.</li>
<li><strong>bg_body.png</strong>. The background of the body element.</li>
</ul>
<h3>The Configuration File</h3>
<p>This file is going to be useful from almost every script of the project. There are different options to implement it, but probably the most used is just a file with some define() lines, like this:</p>
<pre class="brush: php;">
define('DB_HOSTNAME','hostname');
define('DB_USERNAME','user');
define('DB_PASSWORD','password');
define('DB_NAME','forum');

define('RE_PUBLIC_KEY','Your recaptcha public key');
define('RE_PRIVATE_KEY','Your recaptcha private key');
</pre>
<p>I&#8217;ll explain later the two last lines. So from now on every time we include the file we can get the value of a constant with something as simple as this:</p>
<pre class="brush: php;">
require_once 'config.inc.php';

echo DB_HOSTNAME; //output: hostname
</pre>
<h3>Header and Footer</h3>
<p>There is a part of the HTML code that isn&#8217;t going to change so we can write once and include the file every time we need it. This is very simple and it will save us time and lines of code.</p>
<h4>Header</h4>
<p>The header.html file will have all we need to build the first part of a page: the doctype tag, the html, head, the beginning of the body element, the link to the CSS file&#8230;</p>
<pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot;content=&quot;text/html; charset=UTF-8&quot;&gt;
	&lt;title&gt;TutToaster Forum [Demo]&lt;/title&gt;
	&lt;link href=&quot;media/style.css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
	&lt;!--[if !IE 7]&gt;
	&lt;style type=&quot;text/css&quot;&gt;
		#wrap {display:table;height:100%}
	&lt;/style&gt;
	&lt;![endif]--&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;wrap&quot;&gt;
	&lt;div id=&quot;header_wrap&quot;&gt;
		&lt;div id=&quot;header&quot;&gt;
			&lt;h1&gt;&lt;a href=&quot;index.php&quot;&gt;TutToaster Forum [Demo]&lt;/a&gt;&lt;/h1&gt;
		&lt;/div&gt;&lt;!-- End #header--&gt;
	&lt;/div&gt;&lt;!-- End #header_wrap--&gt;
	&lt;div id=&quot;main&quot;&gt;
</pre>
<p>As you can see the #main and #wrap divs, the body and html tags are open so we have to close them in the footer.</p>
<h4>Footer</h4>
<p>The footer.html file is very similar, we&#8217;ll include it when we finish the output to &#8220;close&#8221; the page.</p>
<pre class="brush: php;">
	&lt;/div&gt; &lt;!-- End main--&gt;
&lt;/div&gt;  &lt;!-- End Wrap--&gt;
&lt;div  id=&quot;footer_wrap&quot;&gt;
	&lt;div id=&quot;footer&quot;&gt;
		&lt;div id=&quot;footer_right&quot;&gt;
			&lt;p&gt;Forum made by Jose for TutToaster. You can see the whole tutorial &lt;a href=&quot;http://www.tuttoaster.com/how-to-create-a-forum-in-php-from-scratch&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
		&lt;/div&gt; &lt;-- End footer_right--&gt;
	&lt;/div&gt; &lt;!-- End footer--&gt;
&lt;/div&gt; &lt;!-- End footer_wrap--&gt;

&lt;script type=&quot;text/javascript&amp;quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	$('input, textarea').click(function(){
		$(this).select();
	});
    if ($(&quot;#message_header p&quot;).html()) {
		setTimeout(function() {
			$(&quot;#message_header&quot;).slideUp('slow');
		}, 5000);
	}        
</pre>
<p>We are loading the jQuery at the bottom of our page, which is a good practice, because the rest of the site will be rendered before we execute any jQuery code.</p>
<p>The jQuery code is basically to improve the interface, so when a user clicks on an input field all the text will be selected. The if works in this way: when we see the p element (in #message_header) has something, then we hide it with the slideUp effect after 5 seconds. You can see this code working in the live demo after you try to post a message with an empty field or if the title you have selected is already taken.</p>
<p>The difference between require and include is the include() construct will emit a warning if there is an error (script goes on) and require() will emit a fatal error (script stops). As you may guess, adding _once to those statements we prevent the file from being included twice. Let me show you the final result with something very simple like this:</p>
<pre class="brush: php;">
require_once 'header.html';

echo &quot;A very simple message&quot;;

require_once 'footer.html';
</pre>
<p><img src="http://www.tuttoaster.com/wp-content/uploads/2010/08/header_footer.jpg" alt="Header and footer with a simple message" width="600" height="414" /> </p>
<p>Great! Now we have our &#8220;template&#8221; and all we need to output will be shown between the header and the footer code as long as we include these files.</p>
<h3>The Database class</h3>
<p>In order to separate the PHP code that is going to execute SQL queries and the rest of PHP code we&#8217;ll make a database class, this class will connect to the database, get some rows and save data.</p>
<p>If we think about it, if an object always need to connect to the database, the connection code must be in the constructor. So every time we create an object that object is going to be ready to execute queries with the function mysql_query().</p>
<p>Also, the methods we&#8217;ll need are going to depend on the rest of code, but here I show you the beginning of the class as it will be in the end of the development:</p>
<pre class="brush: php;">

require_once 'config.inc.php';

class Database
{

	private $db;

	function __construct()
	{
		// We set our own error_handler
		set_error_handler(array($this,'errorHandler'));

		//Connect to Database
		$this-&gt;db = mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
		mysql_set_charset('utf8', $this-&gt;db);
	 	mysql_select_db(DB_NAME, $this-&gt;db);
	}

	function errorHandler($errno, $errstr)
	{
		switch ($errno){
		    case E_WARNING:
				echo '&lt;b&gt;There has been an error with the MySQL database connection. '.
				  	 'Please, make sure the config file is OK.&lt;/b&gt;';
				die();
		    default:
		        return false;
		}
	}

	function getThreads()
	{
		$query = &quot;SELECT p.title, date_format(p.date,'%m/%d/%Y %T') as date, p.permalink, p.author &quot;.
				 &quot;FROM posts p &quot;.
				 &quot;WHERE permalink_parent IS NULL&quot;;
		return mysql_query($query);
	}

	// ... other useful methods ....

}
</pre>
<p>Probably the most important method is savePost, so let&#8217;s take a look at it apart from the previous ones.</p>
<pre class="brush: php;">
function savePost($input, $permalink, $newThread)
{   

	$postOK = $this-&gt;isValidPost($input, $permalink, $newThread);

	if (!$postOK) {
		return -1;  // something missing
	}

	if ($newThread) {
		$query = 'INSERT INTO posts '
				. '(title, content, author, permalink, permalink_parent) VALUES'
				. '(&quot;%s&quot;,&quot;%s&quot;,&quot;%s&quot;,&quot;%s&quot;, NULL)'; 

		$query = sprintf($query,
			clean(strip_tags($input[&quot;title&quot;])),
			clean(strip_tags($input[&quot;content&quot;])),
			clean(strip_tags($input[&quot;author&quot;])),
			$permalink);
	} else {
		$query = 'INSERT INTO posts '
				. '(content, permalink_parent, author) VALUES'
				. '(&quot;%s&quot;,&quot;%s&quot;,&quot;%s&quot;)'; 

		$query = sprintf($query,
			clean(strip_tags($input['content'])),
			$permalink,
			clean(strip_tags($input['author'])));
	}                       

	if (mysql_query($query)) {
		return 1;   // Ok
	} elseif (mysql_errno() == 1062) {
		return -2;  // Duplicated title error
	} else {
		return -3;  // DB error
	}
}
</pre>
<p>Note when we create the $query string, we use sprintf to make the code cleaner.</p>
<p>The method isValidPost is private and its code is:</p>
<pre class="brush: php;">
private function isValidPost($input, $permalink, $newThread)
{
	if ($newThread) {
		return !empty($input['title'])
			&amp;&amp; !empty($input['content'])
			&amp;&amp; !empty($input['author'])
			&amp;&amp; !empty($permalink);
	} else {
		return !empty($input['content'])
			&amp;&amp; !empty($input['author'])
			&amp;&amp; !empty($permalink);
	}
}
</pre>
<p>The different numbers we return in the savePost method have a meaning (we&#8217;ll see it later), but, basically we have to recognize different kind of errors to show a different message each time, so we can&#8217;t return just false, and the use of exceptions could be complicated for the beginners.</p>
<p>This is actually a classic approach to manage the database from the PHP code, we&#8217;ll see at the end of the tutorial what people are using now and why we should use it too. But this class is enough for us and I assume readers know a little bit about PHP probably also know this way to connect to the database and manage queries.</p>
<h3>Validation Helper</h3>
<p>This script (helpers/validation.php) is just a group of functions we&#8217;ll use all over the project. There are 3 functions here:</p>
<h4>String to Permalink (strToPermalink)</h4>
<p>Takes a string as input and creates a human-friendly URL string. Its implementation is:</p>
<pre class="brush: php;">
function strToPermalink($str)
{
	$permalink = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
	$permalink = preg_replace(&quot;/[^a-zA-Z0-9\/_|+ -]/&quot;, '', $permalink);
	$permalink = strtolower(trim($permalink, '-'));
	$permalink = preg_replace(&quot;/[\/_|+ -]+/&quot;, '_', $permalink);

	return $permalink;
}
</pre>
<p>To sum up all we do here is to remove &#8220;weird&#8221; characters like á or é and others, and then convert -, spaces and others into _. (Permalink is also known as slug or even permanent link).</p>
<h4>Clean input (clean)</h4>
<p>Here we take care of removing slashes if magic_quotes_gpc is enabled and escaping some characters with mysql_real_escape_string. Don&#8217;t worry if you don&#8217;t know what magic quotes are or why we code this function, when we talk about security you&#8217;ll understand it.</p>
<pre class="brush: php;">
function clean($value)
{
	// Stripslashes
	if (get_magic_quotes_gpc()) {
		$value = stripslashes( $value );
	}

	// Quote if not a number or a numeric string
	if (!is_numeric($value) &amp;&amp; !empty($value)) {
		$value = mysql_real_escape_string($value);
	}
	return $value;
}
</pre>
<h4>Process post (processPost)</h4>
<p>This function has a lot of lines (compare to the rest of this file), I&#8217;ll try to explain all of them without code:</p>
<ol>
<li>Prepare the array to be returned with all values initialized as NULL</li>
<li>If it has everything in the array to start, then checks if the Recaptcha answer is OK, generates the permalink, tries to save the post and returns a message.</li>
<li>If the input array is not empty but it hasn&#8217;t got all we need OR the Recaptcha input field is wrong, then it returns an error message.</li>
<li>Finally, the showBox variable in the array is set. The box we&#8217;ll be shown if there was an error, or always in case we are in the page where users can write a response.</li>
</ol>
<p>I&#8217;ll explain Recaptcha later, now let&#8217;s focus on the rest of the code. The array it will return is initialized in this way:</p>
<pre class="brush: php;">

/* This is not neccesary but it makes code cleaner,
and we could change this new array and without modifying
the original $_POST */
$input = $_POST; 

$returnArray = array('errorHTML' =&gt; NULL,
					 'okMessage' =&gt; NULL,
					 'recaptchaError' =&gt; NULL,
					 'showBox' =&gt; NULL);
</pre>
<p>Then we code the steps 2 and 3 of the list we did before.</p>
<pre class="brush: php;">
if (array_sum($input) &gt; 0 &amp;&amp; !empty($input[&quot;recaptcha_response_field&quot;])) {
	//We have something in the $input and the Recaptcha response
	$resp = recaptcha_check_answer (RE_PRIVATE_KEY,
		$_SERVER[&quot;REMOTE_ADDR&quot;],
		$input[&quot;recaptcha_challenge_field&quot;],
		$input[&quot;recaptcha_response_field&quot;]);
	if ($resp-&gt;is_valid) {
		require_once 'classes/Database.php';
		$db = new Database();

		if (is_null($permalink)){
			$permalink = strToPermalink(strip_tags($input['title']));
		} 

		$saveResult = $db-&gt;savePost($input,
									clean(strip_tags($permalink)),
									$newThread);

		switch ($saveResult) {
			case -1:  //A field is empty
				$returnArray['errorHTML'] = 'All fields are required';
				break;

			case -2: //The title is already in use
				$returnArray['errorHTML'] = 'Duplicated title, please, choose another one.';
				break;
			case -3: //There has been an error with the query
				$returnArray['errorHTML'] = 'There has been an error with the Database, '.
										'please, try again later.';
				break;				

			default: //Everything is OK
				$returnArray['okMessage'] = '&lt;p&gt;The post has been published. You can see it '
					.'&lt;a href=&quot;view_thread.php?permalink=' . $permalink . '&quot;&gt;here&lt;/a&gt;&lt;/p&gt;';
		}
	} else { //The recaptcha response is not valid.
		$returnArray['recaptchaError'] = $resp-&amp;gt;error;
	}
} elseif (array_sum($input) &amp;gt; 0) {
	//We have something in the $input array but the recaptcha response is not
	$returnArray['errorHTML'] = 'All fields are required';
}
</pre>
<p>You can see here the different kind of errors we return and the reasons. Finally we set the showBox variable of $returnArray:</p>
<pre class="brush: php;">
if ($newThread) {
	$returnArray['showBox'] = !empty($returnArray['errorHTML'])
	|| !empty($returnArray['recaptchaError'])
	|| empty($input);
}
</pre>
<h3>The View Class</h3>
<p>There is a part of the HTML code that depends on some parameters that come from PHP. To keep things as clear as we can we are going to make a class exclusively for this purpose.</p>
<p>The home page is going to show a list of threads, so let&#8217;s code that method and the constructor of our new class:</p>
<pre class="brush: php;">
// we need the class db to make an object
require_once 'Database.php';

//we'll also need the recaptcha helper later
require_once 'helpers/recaptcha.php';

class View{

	private $db;

	function __construct()
	{
		$this-&gt;db = new Database();
	}     

    function tableThreads()
	{
		$content = &quot;&quot;;

		if (($threads = $this-&gt;db-&gt;getThreads()) &amp;&amp; mysql_num_rows($threads) &gt; 0) {
			 $content .= '&lt;h1&gt;Threads&lt;/h1&gt;';
			 $content .= '&lt;table border=&quot;0&quot; width=&quot;&quot; id=&quot;posts_list&quot;&gt;';
			 $content .= '&lt;tr&gt;';
			 $content .= '&lt;th class=&quot;title&quot;&gt;Title&lt;/td&gt;';
			 $content .= '&lt;th&gt;Date&lt;/td&gt;';
			 $content .= '&lt;th&gt;User&lt;/td&gt;';
			 $content .= '&lt;/tr&gt;';

			while ($row = mysql_fetch_assoc($threads)) {
				$content .= '&lt;tr class=&quot;thread&quot;&gt;';
				$content .= '&lt;td class=&quot;title&quot;&gt;';
				$content .= '&lt;a href=&quot;view_thread.php?permalink=';
				$content .= htmlspecialchars($row['permalink']) . '&quot;&gt;'.$row['title'].'&lt;/a&gt;';
				$content .= '&lt;/td&gt;';
				$content .= '&lt;td class=&quot;date&quot;&gt;'.htmlspecialchars($row['date']).'&lt;/td&gt;';
				$content .= '&lt;td class=&quot;author&quot;&gt;'.htmlspecialchars($row['author']).'&lt;/td&gt;';
				$content .= '&lt;/tr&gt;';
			}
			$content .= '&lt;/table&gt;';
			return $content;
		} else {
			return false;
		}
	}
</pre>
<p>The htmlspecialchars function provides a way to change some HTML elements into entities, so every time we are going to output something from the database we should use this function. We&#8217;ll se more about this later.</p>
<p>The next method we&#8217;ll code is composeTable, and it will be useful to show all the posts of a thread.</p>
<pre class="brush: php;">
// ... previous code ... 

private function composeTable($post, $firstPost, $numRows)
{
	$htmlTable = &quot;&quot;;

	if ($firstPost)
		$htmlTable .= '&lt;h1&gt;'.htmlspecialchars($post['title']).'&lt;/h1&gt;';

	$htmlTable .= '&lt;table border=&quot;0&quot; width=&quot;895&quot;&gt;';
	$htmlTable .= '	&lt;tr&gt;';
	$htmlTable .= '		&lt;th&gt;Message&lt;/th&gt;';
	$htmlTable .= '		&lt;th&gt;Date&lt;/th&gt;';
	$htmlTable .= '		&lt;th&gt;Author&lt;/th&gt;';
	$htmlTable .= '	&lt;/tr&gt;';
   	$htmlTable .= '	&lt;tr&gt;';
	$htmlTable .= '		&lt;td class=&quot;title&quot;&gt;'.htmlspecialchars($post['content']).'&lt;/td&gt;';
	$htmlTable .= '		&lt;td class=&quot;date&quot;&gt;'.htmlspecialchars($post['date']).'&lt;/td&gt;';
	$htmlTable .= '		&lt;td class=&quot;author&quot;&gt;'.htmlspecialchars($post['author']).'&lt;/td&gt;';
	$htmlTable .= '	&lt;/tr&gt;';
	$htmlTable .= '&lt;/table&gt;';
	if ($firstPost &amp;&amp; $numRows &amp;gt; 1)
		$htmlTable .= '&lt;h1&gt;Responses&lt;/h1&gt;';

	return $htmlTable;
}

function tableThreadContent($permalink)
{
	$content = &quot;&quot;;

	if ($posts = $this-&gt;db-&gt;getContentThread($permalink)) {
		$num_rows = mysql_num_rows($posts);
		if ($num_rows &gt; 0) {
			while($row = mysql_fetch_assoc($posts))
				$content .= $this-&gt;composeTable($row,
					is_null($row['permalink_parent']),
					$num_rows);
		}
		return $content;
	} else {
		return false;  //database error
	}
}

[/html]

&lt;p&gt;The second method goes around all the posts in a thread and composes the HTML with the first one (composeTable). &lt;/p&gt;

&lt;p&gt;The method composeTable is private because we'll only call it from the tableThreadContent method in the same class and its functionality is only useful inside this class. In the future if we want to make a class that extends this one and uses that method all we need to do is change private for protected.&lt;/p&gt;

&lt;p&gt;Now let's think about what happens if we don't have a single thread. Apart from being very sad it could be a problem if we don't show a warning message. This is a very simple method to do that:&lt;/p&gt;
[php]
// ... previous code ...
function htmlError($from_view_thread = false)
{
	if ($from_view_thread) {
		//From view_thread.php
	   	$html = '&lt;p class=&quot;error&quot;&gt;There is no thread with this title. Sorry! ';
		$html .= 'You can go back to &lt;a href=&quot;index.php&quot;&gt;the main page&lt;/a&gt;.&lt;/p&gt;';
	}else{
		// From index.php
	   	$html = '&lt;p class=&quot;error&quot;&gt;There aren\'t any threads. Sorry! &lt;/p&gt;';
	}
	return $html;
}
</pre>
<p>If we call the method from view_thread.php it means we are in a thread that doesn&#8217;t exist, so we show a different message in that case.</p>
<p>Now we need to create a form for users who want to send new posts (responses or the beginning of a new thread).</p>
<h4>Recaptcha or how to avoid spam</h4>
<p>At this point we have to think about the spam problem. As you can see there is no registration process so anyone can just fill the form and post a message with the content they want every time they like. How to handle the input will be discussed later, but the problem here is a bot could fill the form and submit it.</p>
<p>How can we avoid that? Well, the easiest and probably most used solution is a captcha system. Yes, those boring images of characters we have to identify and replicate. Specifically the implementation bought by Google, Recaptcha.</p>
<p>But what are the guarantees? Well, Twitter uses it in the sign up process and if we forum doesn&#8217;t grow too much (actually like Amazon or Google) we won&#8217;t have more problems. The question now is: how can we use it?</p>
<p>Recaptcha provides a file (in our project is helpers/recaptcha.php) and there we have all the functions we need, actually even more. You can see the documentation at the the end of the tutorial. </p>
<p>Finally, the other two methods are messageBox and buttonPostThread. The first one will return a string with the HTML needed to compose a post (a form) when we need to and the second one just returns a div to go to post_message.php and create a new post.</p>
<pre class="brush: php;">
// ... previous code ...
function messageBox($new, $recaptchaError = null, $errorHTML = null)
{
	$content = '&lt;div&gt;';
	if (!empty($errorHTML)) {
		$content .= '&lt;div&gt;&lt;p class=&quot;error&quot;&gt;' . $errorHTML . '&lt;/p&gt;&lt;/div&gt;';
	}
	if ($new) {
		$content .= '&lt;h1&gt;Post a Message&lt;/h1&gt;';
	} else {
		$content .= '&lt;h1&gt;Post a Response&lt;/h1&gt;';
	}
	$content .= '&lt;form action=&quot;&quot; method=&quot;post&quot; accept-charset=&quot;utf-8&quot;&gt;';
	if ($new) {
		$content .= '';
	}
	$content .= '';
	$content .= '&lt;textarea name=&quot;content&quot; rows=&quot;8&quot; cols=&quot;88&quot;&gt;Message&lt;/textarea&gt;';
	$content .= recaptcha_get_html(RE_PUBLIC_KEY, $recaptchaError);
	$content .= '';
	$content .= '&lt;/form&gt;';
	$content .= '&lt;/div&gt;';

	return $content;
}
</pre>
<p>The $new parameter indicates if the form will be shown in post_message.php to send a new thread or in view_thread.php (to send a response). This will helps, for instance, to ask for the title of the thread if it&#8217;s going to be a new one or not.</p>
<p>The $recaptchaError is what we need to render properly the box with the captcha and the input, because in case the user types wrong the code the recaptcha_get_html will take care of showing a message.</p>
<p>Finally, the $errorHTML could contain an string of an error and we have to show it here. (We&#8217;ll see later what kind of errors could happen).</p>
<p>The last method will be buttonPostThread, and as I&#8217;ve said before its only functionality will be to return a string, but the reason we make it is to keep consistent the idea of not writing HTML code in some scripts like index.php or view_thread.php, besides of that the code of these pages will be very clear if we keep that idea in mind.</p>
<pre class="brush: php;">
// ... previous code ...
function buttonPostThread()
{
	return '&lt;div class=&quot;newThread&quot;&gt;'
		  .'&lt;a href=&quot;post_message.php&quot;&gt;Create a new thread&lt;/a&gt;'
		  .'&lt;/div&gt;';
}
</pre>
<p>Probably you are thinking: &#8220;why all this code if we haven&#8217;t written a script which shows anything directly?&#8221;. And it&#8217;s OK you wonder that, but now you will see the advantages of having a modular and independent code.</p>
<h3>Home page</h3>
<p>Let&#8217;s start with our first page, index.php. These are the things we have to show: </p>
<ul>
<li>Header</li>
<li>List of threads OR a warning if there aren&#8217;t threads</li>
<li>Link to make a new thread</li>
<li>Footer</li>
</ul>
<p>The code is as simple as this list:</p>
<pre class="brush: php;">
require_once 'classes/View.php';
require_once 'header.html';

$view = new View(); 

if ($htmlString = $view-&gt;tableThreads()) {
	echo $htmlString;
} else {
	echo $view-&gt;;htmlError();
}

echo $view-&gt;buttonPostThread();	         

require_once 'footer.html';
</pre>
<p>The output in the browser with 3 threads is:</p>
<p><img src="http://www.tuttoaster.com/wp-content/uploads/2010/08/index.jpg" alt="Home" width="600" height="391" /></p>
<h3>Create a new post</h3>
<p>The post_message.php script is going to show a form, get the input and try to process this input as a new post. If everything is ok we&#8217;ll show the link to the new post, otherwise we&#8217;ll show an error message.</p>
<pre class="brush: php;">
require_once 'classes/View.php';
require_once 'helpers/validation.php';
require_once 'header.html';

$result = processPost();	 

if ($result['showBox']) {
	$view = new View();
	echo $view-&gt;messageBox(true, $result['recaptchaError'], $result['errorHTML']);
} else {
	echo $result['okMessage'];
}      

require_once 'footer.html';
</pre>
<p>The processPost function is implemented in helpers/validation.php and, as I&#8217;ve explained before, processes the input, tries to save the post and return an array with different values. This is the output in Firefox:</p>
<p><img src="http://www.tuttoaster.com/wp-content/uploads/2010/08/post_message.jpg" alt="Post Message" width="600" height="414" /></p>
<h3>View Thread</h3>
<p>The view_thread.php script will combine a couple of things.</p>
<ul>
<li>We have to get some posts, the initial one first, and show them properly.</li>
<li>The form to write a response is going to be almost the same than the one we did to write a new thread. (Hint: We&#8217;ll use the same function).</li>
</ul>
<p>The first thing we do is to include all the files we need and clean the input ($_GET) with a function (implemented in the helpers/validation.php file).</p>
<pre class="brush: php;">
require_once 'classes/View.php';
require_once 'helpers/validation.php';
require_once 'header.html';

$view = new View();
$permalink = clean($_GET['permalink']);
</pre>
<p>Here we process the $_POST array and create a &#8220;message box&#8221;, a form to send a response to the thread.</p>
<pre class="brush: php;">
// .. previous code ...

$postInput = $_POST;

$result = processPost($permalink, false);

$messageBox = $view-&gt;;messageBox(false,
	$result['recaptchaError'],
	$result['errorHTML']);
</pre>
<p>Finally we print the posts and the form to write a new response. In case we get a false value from messageBox we&#8217;ll show an error because there isn&#8217;t a thread with that permalink.</p>
<pre class="brush: php;">

if ($htmlString = $view-&gt;tableThreadContent($permalink)) {
	echo $htmlString;
	echo $messageBox;
} else {
	echo $view-&gt;htmlError(true);
}

require_once 'footer.html';
</pre>
<p>So all these parts together compose our view_thread.php script. Here we have the final result with a thread and a response to the first post:</p>
<p><img src="http://www.tuttoaster.com/wp-content/uploads/2010/08/view_thread.jpg" alt="View Thread" width="600" height="408" /></p>
<h3>MySQL from PHP alternatives</h3>
<p>We have used some functions to manage the database like:</p>
<pre class="brush: php;">
mysql_connect();
mysql_set_charset();
mysql_select_db();
mysql_query();
</pre>
<p>The reason I&#8217;ve used these functions is because they are well known by the most of novice PHP developers, but you should know these functions have lost their popularity. I&#8217;ll explain you why.</p>
<p>Actually, there are many reasons, the mysql functions provide a procedural interface, doesn&#8217;t support a lot of things in the new versions of MySQL (newer than 4.1.3) and have more security problems. So take a look at the alternatives:</p>
<h4>MySQL Improved (mysqli)</h4>
<p>This extension was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. Some features are: </p>
<ul>
<li>Object-oriented interface</li>
<li>Support for Prepared Statements</li>
<li>Support for Transactions</li>
<li>&#8230;</li>
</ul>
<p>Apart from that is more secure than the mysql classic extension because we can use bound parameters (details in links at the conclusion).</p>
<h4>PHP Data Objects (PDO)</h4>
<p>The main difference is this API can be used with any kind of database (in theory), that means it doesn&#8217;t have to be MySQL. So the change of the database system in the project it&#8217;s going to be easier.</p>
<p>But like yin yang there is a disadvantage, some advanced new features of new MySQL versions are not supported. Anyway is usually better use this or the previous alternative than the classic mysql extension.</p>
<h4>Comparative from official documentation</h4>
<p><img src="http://www.tuttoaster.com/wp-content/uploads/2010/08/comparative.jpg" alt="Comparative of MySQL extensions" width="600" height="761" /></p>
<p>The details of how to use mysqli or PDO are in the official documentation.</p>
<h3>The security issue</h3>
<p>First of all I have to say I&#8217;m not a security expert but if you are going to make a web app you need to know the possible security holes, and try to prevent attacks, not being a hacker doesn&#8217;t mean you don&#8217;t need to know about security. So let&#8217;s see the most common attacks in a web app, and how to prevent them in our forum.</p>
<h4>Cross Site scripting (XSS)</h4>
<p>XSS exists when your PHP code outputs some data that has neither been filtered nor escaped. Some code like this is vulnerable to XSS:</p>
<pre class="brush: php;">
echo $_POST['var1'];
</pre>
<p>That means someone could send whatever they want in a form and will be shown later, and that&#8217;s very dangerous. The simplest thing they can send is: </p>
<pre class="brush: plain;">
alert('This will be shown instead of a real var1!!')
</pre>
<p>So the the code will be executed by the browser. A more dangerous use, could be extract cookie content with javascript and log in a system using that cookie. So, now we have understood it&#8217;s dangerous, how can we prevent it?</p>
<p>We have to escape data which comes from users. In this forum we have made a couple of things. First of all we strip the HTML and PHP code with strip_tags(), and when we show data from database we escape using htmlspecialchars(). Let&#8217;s see some code:</p>
<pre class="brush: php;">
// The user sends this:
// $_POST['email'] = &quot;alert('fool!')&quot;;
// $_POST['name'] = &quot;&lt;strong&gt;Hercules&lt;/strong&gt;&quot;;

// Now we remove all the HTML and PHP code
$email = strip_tags($_POST['email']);

echo $email; //Output: alert('fool')
echo $name; //Output: Hercules
</pre>
<p>As you can see the script tags are not shown so the alert will not be executed. But Hercules wanted to show his name with strong tags, and actually it&#8217;s harmless, but we removed those tags too. A possible solution is to provide a list of our own tags and then replace them with the actual HTML elements. We haven&#8217;t implemented this, but it would be very easy:</p>
<pre class="brush: php;">
$string = strip_tags($_POST['name']);
$string = str_replace('[strong]','&lt;strong&gt;');
$string = str_replace('[/strong]','&lt;/strong&gt;');
</pre>
<p>The other thing we do is to use htmlspecialchars(), this is redundant because with strip_tags HTML code will be removed and not inserted into our database, but there are some characters which do nothing so we can convert them into HTML entities. Remember it&#8217;s usually better to a be a little bit paranoid when we talk about security.</p>
<pre class="brush: php;">
// From database
$result = &quot;alert('ups!')&quot;;

$resultOK = htmlspecialchars($result);

echo $resultOK; //Output: alert('ups!') 
</pre>
<p>The output is exactly the string, but some characters are actually HTML entities, so the code is not executed, just shown in the browser.</p>
<h4>SQL injection</h4>
<p>This vulnerability is, as the name suggests, when someone injects SQL code into your web app. Here we have to take care of a couple of details, but let&#8217;s see the main problem.</p>
<p>We have a query with some variables from $_POST, something like:</p>
<pre class="brush: php;">
$user = $_POST['user'];
$password = $_POST['password']; 

$query = &quot;SELECT name, age, credit_card
		  FROM users
		  WHERE username = '$user' AND password = '$password' &quot;;
</pre>
<p>What if someone sends: <i>&#8216; or 1=1 ; &#8211;</i> as the password? The query would be:</p>
<pre class="brush: sql;">
SELECT name, age, credit_card
FROM users
WHERE username = 'jose' AND password = '' or 1=1 ; -- '
</pre>
<p>So the WHERE condition is always true because (1=1) is, and (false) || (true) is also true. Consequence? The query selects all the records.</p>
<p>A simple way to prevent this is to use the function mysql_real_escape_string() which escapes special characters in a string taking into account the current character set of the connection so that it is safe to place it in a mysql_query(), as we do in the clean function (helpers/validation.php file).</p>
<p>But still there could be a problem with slashes and magic_quotes. To summarize magic_quotes is something annoying and we have to deal with it. Magic quotes is a deprecated PHP configuration that, when turned on it automatically escapes characters for you. </p>
<p>The problem is sometimes we don&#8217;t want that, so in our forum when we clean the input we use stripslashes() in case magic_quotes is turned on, which un-quotes a quoted string, and from that point we escape the data. (see clean function at the beginning of this tutorial). So with this implementation we can insert O&#8217;connor, and it won&#8217;t be a problem, without this consideration, the input could be inserted as O\&#8217;Connor into the database.</p>
<p>There could be a problem with the magic_quotes_sybase configuration, but, apart from being deprecated, it&#8217;s turned off by default so usually it won&#8217;t be a problem, and in our forum we don&#8217;t deal with it.</p>
<p>If we had used other alternative to manage the database from PHP, a lot of these precautions wouldn&#8217;t be necessary, you have more details in the official documentation.</p>
<h4>Cross-Site Request Forgery (CSRF)</h4>
<p>According to Wikipedia, is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user that the website trusts. But we don&#8217;t have to worry about that since our forum is open to anyone who wants to write and there aren&#8217;t sign up and log in processes. Anyway at the conclusion you have some links in case you want to know more about this exploit.</p>
<h3>How to set up your own forum</h3>
<p>When you download the code, you have to follow the next steps to have your own forum working:</p>
<ul>
<li>Get a Recaptcha key <a href="http://recaptcha.net/whyrecaptcha.html">here</a>.</li>
<li>Create a database with the SQL query at the beginning of the tutorial.</li>
<li>Change the values of constants in the config.inc.php file with yours.</li>
<li>And, of course, put the files where you can access with PHP and Apache working (localhost&#8217;s directory).</li>
</ul>
<div class="dash"></div>
<h2>Conclusion</h2>
<p>I have to admit this tutorial is long but if you read it a couple of times and take a look at the code I&#8217;m sure you&#8217;ll be able to understand all the project.</p>
<p>The organization of code in classes and files is up to the developer. And as long as we don&#8217;t write the same code over and over again, or just type queries, html and PHP code in the same file, the project will be ok. I mean, everything about make more or less classes or create a specific function is not a science. It&#8217;s more a design problem, so feel free to think about other ways to develop this forum, it will help you to be a better developer.</p>
<p>For instance I could have written a post class, or make everything procedural, but this was just an approach, and you can see the power of this in how many lines we have written in our index or post_message web pages. In addition, if we need more features the development will be very easy since everything is well documented in the files you can download.</p>
<p>There is other feature we could implement, to set the value of the inputs to the content of $_POST if it&#8217;s received, but that could make the code the code less clear, so I&#8217;ve avoid it in order to make things easier.</p>
<p>Here you have some links to some sites where you can learn more about security, PHP and MySQL.</p>
<ul>
<li><a href="http://recaptcha.net/plugins/php/" title="Recaptcha official site">Recaptcha official site</a></li>
<li><a href="http://es2.php.net/manual/en/mysqli.overview.php" title="Alternatives to manage a database from PHP">Alternatives to manage a database from PHP</a></li>
<li><a href="http://www.addedbytes.com/writing-secure-php/" title="Writing Secure PHP Series">Writing Secure PHP Series</a></li>
<li><a href="http://en.wikipedia.org/wiki/Sql_injection" title="SQL injection">SQL injection</a></li>
<li><a href="http://shiflett.org/articles/cross-site-request-forgeries" title="Cross site request forgeries (XSRF)">Cross site request forgeries (XSRF)</a></li>
<li><a href="http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29" title="Design Patterns in Wikipedia">Design Patterns in Wikipedia</a></li>
</ul>
<p><!-- Post Ends Here --></p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/how-to-use-style-and-implement-wordpress-shortcodes/' rel='bookmark' title='Permanent Link: How To Use, Style and Implement WordPress Shortcodes'>How To Use, Style and Implement WordPress Shortcodes</a></li>
<li><a href='http://www.tuttoaster.com/create-an-ajaxjqueryphp-contact-form/' rel='bookmark' title='Permanent Link: Create an AJAX/jQuery/PHP Contact Form'>Create an AJAX/jQuery/PHP Contact Form</a></li>
<li><a href='http://www.tuttoaster.com/create-a-camera-application-in-flash-using-actionscript-3/' rel='bookmark' title='Permanent Link: Create a Camera Application in Flash Using ActionScript 3'>Create a Camera Application in Flash Using ActionScript 3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/how-to-create-a-forum-in-php-from-scratch/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>20 Inspiring Textured Websites</title>
		<link>http://www.tuttoaster.com/20-inspiring-textured-websites/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=20-inspiring-textured-websites</link>
		<comments>http://www.tuttoaster.com/20-inspiring-textured-websites/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 19:37:36 +0000</pubDate>
		<dc:creator>Matthew Leak</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[concrete]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[texture]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[wood]]></category>

		<guid isPermaLink="false">http://www.tuttoaster.com/?p=6442</guid>
		<description><![CDATA[Textured Websites are becoming more and more popular. Mainly because adding simple, subtle textures to a design can really make a difference and improve the visual appearance. Textures can be anything: wood, metal, brick, even simple dust scratches. There are tonnes of great resources around the net that offer free high quality textures. Two of [...]


Related posts:<ol><li><a href='http://www.tuttoaster.com/49-fascinating-e-commerce-websites-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fascinating E-Commerce Websites for your Inspiration'>49 Fascinating E-Commerce Websites for your Inspiration</a></li>
<li><a href='http://www.tuttoaster.com/50-amazing-and-gorgeous-apple-related-websites/' rel='bookmark' title='Permanent Link: 50 Amazing and Gorgeous Apple Related Websites'>50 Amazing and Gorgeous Apple Related Websites</a></li>
<li><a href='http://www.tuttoaster.com/15-inspiring-minimal-web-designs/' rel='bookmark' title='Permanent Link: 15 Inspiring Minimal Web Designs'>15 Inspiring Minimal Web Designs</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Textured Websites are becoming more and more popular. Mainly because adding simple, subtle textures to a design can really make a difference and improve the visual appearance. Textures can be anything: wood, metal, brick, even simple dust scratches.</p>
<p>There are tonnes of great resources around the net that offer free high quality textures. Two of my favourites being <a href="http://blog.spoongraphics.co.uk">Spoon Graphics</a> and <a href="http://circleboxblog.com">Circle Box</a>.</p>
<p>Here&#8217;s a collection of what I feel are 20 of the most visually appearing and inspiring textured websites.</p>
<h3>A Simple Measure</h3>
<p><a href="http://www.asimplemeasure.com/"><img class="alignnone size-full wp-image-6443" title="A Simple Measure" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/asimplemeasure.png" alt="" width="600" height="287" /></a></p>
<h3>Backburner Theme</h3>
<p><a href="http://backburnertheme.tumblr.com/"><img class="alignnone size-full wp-image-6444" title="Backburner Theme" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/backburnertheme.png" alt="" width="600" height="230" /></a></p>
<h3>The Brooklyn Circus</h3>
<p><a href="http://thebkcircus.com/bkc/"><img class="alignnone size-full wp-image-6445" title="The Brooklyn Circus" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/bkc.png" alt="" width="600" height="331" /></a></p>
<h3>Christian Swinnen</h3>
<p><a href="http://www.chriswi.be/christian/chriswi/index.html"><img class="alignnone size-full wp-image-6446" title="Christian Swinnen" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/chiswi.png" alt="" width="600" height="330" /></a></p>
<h3>Digital Labs</h3>
<p><a href="http://www.digitallabs.tv/"><img class="alignnone size-full wp-image-6447" title="Digital Labs" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/digitallabs.png" alt="" width="600" height="334" /></a></p>
<h3>Brett Chaney</h3>
<p><a href="http://www.brettchaney.com/"><img class="alignnone size-full wp-image-6448" title="Brett Chaney" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/dreamscapestudios.png" alt="" width="600" height="390" /></a></p>
<h3>Emily Whitesmith</h3>
<p><a href="http://www.emilywhitesmith.com/"><img class="alignnone size-full wp-image-6449" title="Emily Whitesmith" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/emilysmith.png" alt="" width="600" height="333" /></a></p>
<h3>Get into Gardening</h3>
<p><a href="http://www.getintogardening.co.uk/"><img class="alignnone size-full wp-image-6450" title="Get into Gardening" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/homebase.png" alt="" width="600" height="370" /></a></p>
<h3>Idyllic Creative</h3>
<p><a href="http://www.idylliccreative.com.au/"><img class="alignnone size-full wp-image-6451" title="Idyllic Creative" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/idyllic-creative.png" alt="" width="600" height="331" /></a></p>
<h3>Interexpresso</h3>
<p><a href="http://www.interexpresso.pt/"><img class="alignnone size-full wp-image-6452" title="Interexpresso" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/interexpresso.png" alt="" width="600" height="330" /></a></p>
<h3>Made by Duncan</h3>
<p><a href="http://www.madebyduncan.com/"><img class="alignnone size-full wp-image-6453" title="Made by Duncan" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/mademyduncan.png" alt="" width="600" height="298" /></a></p>
<h3>Matthew Leak</h3>
<p><a href="http://matthewleak.co.uk"><img class="alignnone size-full wp-image-6454" title="Freelance Web Designer Matthew Leak" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/matthewleak.png" alt="" width="600" height="332" /></a></p>
<h3>Peaxl</h3>
<p><a href="http://www.peaxl.com/"><img class="alignnone size-full wp-image-6455" title="Peaxl" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/peaxl.png" alt="" width="600" height="332" /></a></p>
<h3>United Pixelworkers</h3>
<p><a href="http://www.unitedpixelworkers.com/"><img class="alignnone size-full wp-image-6456" title="United Pixelworkers" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/pixelworkers.png" alt="" width="600" height="334" /></a></p>
<h3>Rapture of the Deep</h3>
<p><a href="http://www.raptureofthedeep.de/"><img class="alignnone size-full wp-image-6457" title="Rapture of the deep" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/rotd.png" alt="" width="600" height="324" /></a></p>
<h3>StringMania</h3>
<p><a href="http://www.stringmaniaapp.com/"><img class="alignnone size-full wp-image-6458" title="StringMania" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/string-mania.png" alt="" width="600" height="333" /></a></p>
<h3>Sofa Surfer</h3>
<p><a href="http://www.sofasurfer.eu/"><img class="alignnone size-full wp-image-6459" title="Sofa Surfer" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/timeforchange.png" alt="" width="600" height="336" /></a></p>
<h3>Trevor Hutchison</h3>
<p><a href="http://www.trevorhutchison.com/"><img class="alignnone size-full wp-image-6460" title="Trevor Hutchison" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/trevorhutchison.png" alt="" width="600" height="332" /></a></p>
<h3>WeGraphics</h3>
<p><a href="http://wegraphics.net/"><img class="alignnone size-full wp-image-6461" title="wegraphics" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/wegraphics.png" alt="" width="600" height="372" /></a></p>
<h3>Wireframe Plus</h3>
<p><a href="http://wireframeplus.com/"><img class="alignnone size-full wp-image-6462" title="WireframePlus" src="http://www.tuttoaster.com/wp-content/uploads/2010/07/wireframeplus.png" alt="" width="600" height="326" /></a></p>
<h2>Conclusion</h2>
<p>As you can see, textures can really make a difference and improve the visual appearance of a sites&#8217; design. Do you think that the sites listed would be as appealing as they are without the textures? I wouldn&#8217;t think so.</p>
<p>Remember, textures can be anything: wood, metal, brick, even simple dust scratches. They don&#8217;t have to be &#8216;full on&#8217; and dominating the design, subtle can be just as effective.</p>
<p>Do you know any sites that make great uses of textures and haven&#8217;t been listed? Let us know!</p>
<p>Tell us what your favourite listed design is too! <img src='http://www.tuttoaster.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://www.tuttoaster.com/49-fascinating-e-commerce-websites-for-your-inspiration/' rel='bookmark' title='Permanent Link: 49 Fascinating E-Commerce Websites for your Inspiration'>49 Fascinating E-Commerce Websites for your Inspiration</a></li>
<li><a href='http://www.tuttoaster.com/50-amazing-and-gorgeous-apple-related-websites/' rel='bookmark' title='Permanent Link: 50 Amazing and Gorgeous Apple Related Websites'>50 Amazing and Gorgeous Apple Related Websites</a></li>
<li><a href='http://www.tuttoaster.com/15-inspiring-minimal-web-designs/' rel='bookmark' title='Permanent Link: 15 Inspiring Minimal Web Designs'>15 Inspiring Minimal Web Designs</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.tuttoaster.com/20-inspiring-textured-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 162/315 queries in 0.252 seconds using disk

Served from: www.tuttoaster.com @ 2010-09-10 05:13:56 -->