<?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>jc-designs.net &#187; Web Development</title>
	<atom:link href="http://jc-designs.net/blog/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://jc-designs.net/blog</link>
	<description>jc-designs blog</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:30:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Adventures In Adding Large Video Files In WordPress</title>
		<link>http://jc-designs.net/blog/2012/01/adventures-in-adding-large-video-files-in-wordpress/</link>
		<comments>http://jc-designs.net/blog/2012/01/adventures-in-adding-large-video-files-in-wordpress/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 23:38:26 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=1058</guid>
		<description><![CDATA[Adding video to WordPress seems easy, right? Why am I writing this post? Because if you have followed this blog for a while, you know I like not only passing what I&#8217;ve learned along to up and coming web developers, but I use this as a reference sometimes. I recently completed a freelance project that [...]]]></description>
			<content:encoded><![CDATA[<h3>Adding video to WordPress seems easy, right?</h3>
<p>Why am I writing this post? Because if you have followed this blog for a while, you know I like not only passing what I&#8217;ve learned along to up and coming web developers, but I use this as a reference sometimes. I recently completed a freelance project that involved moving very large video files into a new WordPress install, and I came across multiple problems that were hard to find answers to. Adding video looks like it would be easy, right? Just click that little Upload/Insert button, drag/drop the file onto the page, and BAM! Video file is in the media library. What could POSSIBLY go wrong? I&#8217;ll start with the background to the project, and go over how I solved the issue.<br />
<span id="more-1058"></span></p>
<h3>Transfer a WordPress blog please!</h3>
<p>It all started with an email from my website asking if I could transfer his WP blog from wordpress.com, to a self hosted WP install. The site&#8217;s main feature was the video clips on the site. If I couldn&#8217;t get the video over, then it was a no go. After some chatting, the client asked if I could honestly tell him if wordpress.com&#8217;s guided transfer was something he should look at, since it was cheaper than what I was charging. I told him that I have no idea, as I don&#8217;t know anyone that had paid for that. Blah, blah, blah&#8230;.I got the job, and started transferring his blog over.</p>
<h3>It always seems easy in the beginning</h3>
<p>As it turns out, getting the data out of a WP.com hosted site is pretty damn easy. Under tools, they have a nifty little Export option, that will download an xml file for you. At that point, everything was going well. Wow, got the file, now how do I get it into a self hosted WP site? Simple, install the WordPress Importer plugin. It easily imports the data file into the new install! You click import, and then use the WordPress option. That is about as far as I got without any problems, because there is a checkbox asking if you want to import all of the media files attached to the data. Why the hell wouldn&#8217;t I want to do that? This seemed like a dream come true! I would be done with this little project in a couple of hours! So I checked the box and clicked import&#8230;</p>
<p>And the shit hit the fan.</p>
<h3>What do you mean memory limit?</h3>
<p>I kid you not, five seconds into the import and I got an error saying &#8220;Fatal error: Allowed memory size of &#8230;&#8221;. What? Google then tells me it is because the memory limit in the host&#8217;s php.ini file is set at 64Megs, all I have to do is ask my host to increase it. Soooo, I get the host (hostgator by the way &#8211; and they do indeed rock) to increase my limit temporarily after I explain what I was trying to do. THANK YOU! So they tell me, try again, which I do. Unfortunately this produces the same error. They then increase it to 300 and something for me, import again, and same error. At which point he asks me how large the video files are.</p>
<p>I didn&#8217;t really look, which was my fault. I did now though, and to my astonishment, the first file it is trying to import is a massive 687 megs. HOLY @#$%! That is huge. After a while, I realize this isn&#8217;t going to work. Quick thinking on my part, I say &#8220;Jeremy, why don&#8217;t we try using the file manager and upload them through the host itself?&#8221; Quick, yes. Stupid? Yes. I should have skipped this step, but don&#8217;t worry, I quickly found out why that was not going to work. Unfortunately it made me assume something that wasn&#8217;t true. The host&#8217;s file manager has a 500Mg single file limit, but I didn&#8217;t find that out until I had tried uploading the file though, which took about ten minutes. </p>
<h3>Let&#8217;s look at a different approach</h3>
<p>This is where I called the client and told him, this is probably not the best way to do video. Let&#8217;s look at hosting them on YouTube? WordPress has a very easy way of getting video from YouTube into a post. Looking into at first brought a smile to my face. YouTube&#8217;s limit for a single file is one gig. Awesome, none of the video is larger than that. Oh, but wait&#8230;how long are these videos minutes wise? See, YouTube limits it to 15 minutes. Some of these videos are over twenty. No good there, and after a brief conversation the client concludes that he doesn&#8217;t want to cut the videos up. Fine. Back to the drawing board.</p>
<h3>Determination wins the day</h3>
<p>At that point, I was up for trying anything. Enter FileZilla, which I should have done right from the start. I uploaded the videos into WordPress&#8217; uploads folder, fully expecting it to die when it hit the 500 mark. To my astonishment though, it went through. All the way. Why? No idea. The host&#8217;s file manager has a limit, but using ftp didn&#8217;t. I was happy though because now I got the video up on the server.</p>
<p>I then login to WordPress, go to the media library, and&#8230;.nothing is there. Shiznit. More searching with Google, and I find that there is a plugin called Add From Server. This little thing takes files you uploaded onto the server, and places them into the library for you. That was what I needed. I puts a nice little button in the Media tab that says Add From Server, and a list of all the files shows up when you click it. You then check all the boxes of the files you want in the library, and it moves them over for you. I was then free to insert them into the post at will!</p>
<h3>Conclusion</h3>
<p>Why was this so hard to figure out? Because apparently not many people have uploaded files this large into WordPress. I found tons on uploading 4Meg files, but nothing in the 500+ range. Google didn&#8217;t help me there. Large video files like that are not the best way of handling things, but I had to figure out how to do it. Doing that again would only take me a couple of hours total, but because I had never done it, and most others haven&#8217;t either made the process a bitch.</p>
<p>Wondering how the client got his files up on WP.com? Easy&#8230;he paid for an extension called Video Press that allows you to upload large video files into WordPress. Hell if I could find the same kind of thing though for a self hosted version.</p>
<p>So, if you need to do something like this follow this guideline:</p>
<ul>
<li>Import the WP data file with the WordPress Importer plugin</li>
<li>Don&#8217;t transfer the media if you have large files like what I talked about. Won&#8217;t happen.</li>
<li>Install the Add From Server Plugin</li>
<li>Use FileZilla, or other ftp software to upload the video</li>
<li>Use the Add From Server button in the Media tab to import the video into the Media Library</li>
<li>Insert the video into the post</li>
</ul>
<p><strong>NOTE</strong>: <em>If you use FileZilla, make sure you have the most up-to-date version. I originally tried with an older one I had installed and it truncated the files by a few thousand bytes or so. The files were then unusable. Once I updated FileZilla to the current version, this stopped happening.</em></p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-" rel="nofollow"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1058" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2012/01/adventures-in-adding-large-video-files-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple jQuery Photo Gallery</title>
		<link>http://jc-designs.net/blog/2011/12/a-simple-jquery-photo-gallery/</link>
		<comments>http://jc-designs.net/blog/2011/12/a-simple-jquery-photo-gallery/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 23:48:23 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=1050</guid>
		<description><![CDATA[Simple is best I haven&#8217;t done anything on jQuery in a while, so I thought I would write about another simple photo gallery I had to write. Nothing complicated, and easy to add to or edit. I&#8217;m basically writing some jQuery to automatically write the large image source attribute, and the thumbnail&#8217;s CSS background property, [...]]]></description>
			<content:encoded><![CDATA[<h3>Simple is best</h3>
<p>I haven&#8217;t done anything on jQuery in a while, so I thought I would write about another simple photo gallery I had to write. Nothing complicated, and easy to add to or edit. I&#8217;m basically writing some jQuery to automatically write the large image source attribute, and the thumbnail&#8217;s CSS background property, then throwing in some simple effects. For those of you that are just learning jQuery, you will hopefully learn something and be able to modify this little script to suit your needs. So lets get started. Take a look at the demo first though, so you can see what is going on.</p>
<p><a class="viewDemo" href="http://jc-designs.net/demo/gallery3.html" title="A Simple jQuery Photo Gallery Demo" target="_blank">View Demo</a><br />
<span id="more-1050"></span><br />
Here is the HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div class=&quot;halfBlack&quot;&gt;&lt;/div&gt;
	&lt;div id=&quot;container&quot;&gt;
		&lt;div id=&quot;newGalleryLarge&quot;&gt;
			&lt;div class=&quot;lrgImgContainer group1&quot;&gt;
				&lt;ul&gt;
					&lt;li class=&quot;close&quot;&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-1-1b.jpg&quot; /&gt;&lt;p&gt;This is image 1&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-1-1b.jpg&quot; /&gt;&lt;p&gt;This is image 2&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-1-1b.jpg&quot; /&gt;&lt;p&gt;This is image 3&lt;/p&gt;&lt;/li&gt;
				&lt;/ul&gt;
			&lt;/div&gt;
			&lt;div class=&quot;lrgImgContainer group2&quot;&gt;
				&lt;ul&gt;
					&lt;li class=&quot;close&quot;&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-2-1b.jpg&quot; /&gt;&lt;p&gt;This is image 1&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-2-1b.jpg&quot; /&gt;&lt;p&gt;This is image 2&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-2-1b.jpg&quot; /&gt;&lt;p&gt;This is image 3&lt;/p&gt;&lt;/li&gt;
				&lt;/ul&gt;
			&lt;/div&gt;
			&lt;div class=&quot;lrgImgContainer group3&quot;&gt;
				&lt;ul&gt;
					&lt;li class=&quot;close&quot;&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-3-1b.jpg&quot; /&gt;&lt;p&gt;This is image 1&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-3-1b.jpg&quot; /&gt;&lt;p&gt;This is image 2&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-3-1b.jpg&quot; /&gt;&lt;p&gt;This is image 3&lt;/p&gt;&lt;/li&gt;
				&lt;/ul&gt;
			&lt;/div&gt;
			&lt;div class=&quot;lrgImgContainer group4&quot;&gt;
				&lt;ul&gt;
					&lt;li class=&quot;close&quot;&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-4-1b.jpg&quot; /&gt;&lt;p&gt;This is image 1&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-4-1b.jpg&quot; /&gt;&lt;p&gt;This is image 2&lt;/p&gt;&lt;/li&gt;
					&lt;li&gt;&lt;img src=&quot;images/image-4-1b.jpg&quot; /&gt;&lt;p&gt;This is image 3&lt;/p&gt;&lt;/li&gt;
				&lt;/ul&gt;
			&lt;/div&gt;
		&lt;/div&gt;
		&lt;ul id=&quot;newGalleryThumbs&quot;&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;/a&gt;Group 1&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;/a&gt;Group 2&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;/a&gt;Group 3&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;/a&gt;Group 4&lt;/li&gt;
		&lt;/ul&gt;</pre></div></div>

<p>Each thumbnail is a list item, and pertains to one of the groups above. Need another thumbnail and its corresponding gallery? Add a list item to the ul &#8220;newGalleryThumbs&#8221;, copy one of the image groups above it and change the number. Nothing too hard going on here.</p>
<p>Let&#8217;s get on to the jQuery&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;">$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #003366; font-weight: bold;color: #439AD0;">function</span> <span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
	<span style="color: #003366; font-weight: bold;color: #439AD0;">var</span> $thumbs <span style="color: #339933;color: #439AD0;">=</span> $<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'#newGalleryThumbs a'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #003366; font-weight: bold;color: #439AD0;">var</span> $thumbsContainer <span style="color: #339933;color: #439AD0;">=</span> $<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'#newGalleryThumbs'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #003366; font-weight: bold;color: #439AD0;">var</span> $largeImages <span style="color: #339933;color: #439AD0;">=</span> $<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'#newGalleryLarge div'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;color: #439AD0;">var</span> a <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #CC0000;color: #439AD0;">0</span><span style="color: #339933;color: #439AD0;">,</span> b <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #CC0000;color: #439AD0;">0</span><span style="color: #339933;color: #439AD0;">,</span> c <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #CC0000;color: #439AD0;">0</span><span style="color: #339933;color: #439AD0;">,</span> d <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #CC0000;color: #439AD0;">0</span><span style="color: #339933;color: #439AD0;">,</span> e <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #CC0000;color: #439AD0;">0</span><span style="color: #339933;color: #439AD0;">,</span> f <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #CC0000;color: #439AD0;">0</span><span style="color: #339933;color: #439AD0;">;</span>	
&nbsp;
	$thumbs.<span style="color: #660066;">each</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
		a<span style="color: #339933;color: #439AD0;">++;</span>
		$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">this</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'background'</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">'url(images/image-'</span> <span style="color: #339933;color: #439AD0;">+</span> a <span style="color: #339933;color: #439AD0;">+</span> <span style="color: #3366CC;color: #439AD0;">'a.jpg)'</span> <span style="color: #339933;color: #439AD0;">+</span> <span style="color: #3366CC;color: #439AD0;">' no-repeat left top'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
&nbsp;
	$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.group1 img'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
		b<span style="color: #339933;color: #439AD0;">++;</span>
		$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">this</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'src'</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">'images/image-1-'</span> <span style="color: #339933;color: #439AD0;">+</span> b <span style="color: #339933;color: #439AD0;">+</span> <span style="color: #3366CC;color: #439AD0;">'b.jpg'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
&nbsp;
	$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.group2 img'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
		c<span style="color: #339933;color: #439AD0;">++;</span>
		$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">this</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'src'</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">'images/image-2-'</span> <span style="color: #339933;color: #439AD0;">+</span> c <span style="color: #339933;color: #439AD0;">+</span> <span style="color: #3366CC;color: #439AD0;">'b.jpg'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
&nbsp;
	$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.group3 img'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
		d<span style="color: #339933;color: #439AD0;">++;</span>
		$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">this</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'src'</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">'images/image-3-'</span> <span style="color: #339933;color: #439AD0;">+</span> d <span style="color: #339933;color: #439AD0;">+</span> <span style="color: #3366CC;color: #439AD0;">'b.jpg'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
&nbsp;
	$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.group4 img'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
		e<span style="color: #339933;color: #439AD0;">++;</span>
		$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">this</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'src'</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">'images/image-4-'</span> <span style="color: #339933;color: #439AD0;">+</span> e <span style="color: #339933;color: #439AD0;">+</span> <span style="color: #3366CC;color: #439AD0;">'b.jpg'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
&nbsp;
&nbsp;
	$thumbsContainer.<span style="color: #660066;">delegate</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">&quot;li&quot;</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">&quot;click&quot;</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span>e<span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
		$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.halfBlack'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #CC0000;color: #439AD0;">500</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
		$largeImages.<span style="color: #660066;">eq</span><span style="color: #009900;color: #439AD0;">&#40;</span>$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">this</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">index</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #CC0000;color: #439AD0;">1000</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
&nbsp;
	$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.halfBlack, .close'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span>e<span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
		$largeImages.<span style="color: #660066;">fadeOut</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #CC0000;color: #439AD0;">1000</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
		$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.halfBlack'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #CC0000;color: #439AD0;">500</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

<p>Two things to quickly note for you newbies, is that in the script above, I am using variable caching. I am not really sure it is actually caching, but it does store information so that it can be used again without jQuery making further calls to it. You will see that in the first few lines. Looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #003366; font-weight: bold;color: #439AD0;">var</span> $thumbs <span style="color: #339933;color: #439AD0;">=</span> $<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'#newGalleryThumbs a'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

<p>If you are going to be calling something more than once, store the crap in a variable. Got it? Good. The other thing to take note of, is that I am using &#8216;.delegate()&#8217;. <a href="http://jc-designs.net/blog/2010/04/jquery-delegate-and-what-it-does/" target="_blank">Read the post</a> I wrote about it and you&#8217;ll see why.</p>
<p>After the variables, you will see that I am using the each() method on the thumbs variable. This is looking at each &#8216;a&#8217; tag in the unordered list (newGalleryThumbs) and writing the CSS for background on each of them in turn. It takes the variable &#8216;a&#8217;, which starts at 0, and increments it by one each time through the loop. I do a similar thing with the large image groups, only I&#8217;m writing the &#8216;src&#8217; for the image rather than the CSS.</p>
<p>This all works because I am following a strict naming convention in this gallery. All of the thumbnails are going to be named: image-1a.jpg, image-2a.jpg, and so on. All of the large images, say in group 1 will be named image-1-1b.jpg, image-1-2b.jpg, and so on. By naming the images this way, I can use jQuery to write out the source values, and it makes adding more images later on very easy.</p>
<p>Next comes the click function on the thumbnails&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;">$thumbsContainer.<span style="color: #660066;">delegate</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">&quot;li&quot;</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">&quot;click&quot;</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span>e<span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
	$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.halfBlack'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #CC0000;color: #439AD0;">500</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
	$largeImages.<span style="color: #660066;">eq</span><span style="color: #009900;color: #439AD0;">&#40;</span>$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">this</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">index</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #CC0000;color: #439AD0;">1000</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
<span style="color: #009900;color: #439AD0;">&#125;</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

<p>When one of the thumbnails is clicked, a div with the class name &#8216;halfBlack&#8217;, which is initially hidden, is set to display: block. All that div is, is an empty div with a background image (an all black png set to 50% opacity). This creates the lightbox style effect. The next line says get one of the large image groups and show it. Which one exactly? The one whose index value is equal to the index value of the thumbnail that was clicked. If the first thumbnail is clicked, its index value is &#8217;0&#8242;, and it then shows the div that has an index value of &#8217;0&#8242;.  Piece of cake!</p>
<p>Finally we have to get the large images to go away. I basically am treating this as a light box. Which it pretty much is, I guess. When either the close button or the black div is clicked, it fades out the images, and hides the black div.</p>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1050" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/12/a-simple-jquery-photo-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby On Rails &#8211; A Beginners Journey &#8211; Part 1</title>
		<link>http://jc-designs.net/blog/2011/11/ruby-on-rails-a-beginners-journey-part-1/</link>
		<comments>http://jc-designs.net/blog/2011/11/ruby-on-rails-a-beginners-journey-part-1/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 03:47:04 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=1033</guid>
		<description><![CDATA[Let&#8217;s document my trip, shall we? I set myself a goal at the beginning of the year to learn Ruby by the end of it. Well, I finally started doing just that. Actually I&#8217;ve tried a couple of times, but didn&#8217;t get far into it. By starting with Rails this time, I am actually picking [...]]]></description>
			<content:encoded><![CDATA[<h3>Let&#8217;s document my trip, shall we?</h3>
<p>I set myself a goal at the beginning of the year to learn Ruby by the end of it. Well, I finally started doing just that. Actually I&#8217;ve tried a couple of times, but didn&#8217;t get far into it. By starting with Rails this time, I am actually picking up things a lot quicker. I&#8217;ll give all the credit to Michael Hartl, who wrote the book <a href="http://www.amazon.com/gp/product/0321743121/ref=s9_simh_gw_p14_d0_g14_i1?pf_rd_m=ATVPDKIKX0DER&#038;pf_rd_s=center-2&#038;pf_rd_r=0EBRTVQ9KDHS5F7NBCWY&#038;pf_rd_t=101&#038;pf_rd_p=470938631&#038;pf_rd_i=507846" title="Ruby on Rails 3 Tutorial on Amazon">Ruby On Rails 3 Tutorial</a>, which is what I am using, and so far recommend. You can also visit the site <a href="http://ruby.railstutorial.org/" title="Ruby on Rails 3 Tutorial website">here</a>. This isn&#8217;t a book review, though I might do later on. This post is the beginning of many that I&#8217;m going to use to document my progress. You know, show you where I was being stupid, and the awesome &#8220;ah-HA!&#8221; moments.</p>
<p><span id="more-1033"></span></p>
<h3>The beginning is the hardest</h3>
<p>I&#8217;m talking about setup here, not writing any code. There are a lot of things that I had to do before I could start typing anything that looked like Ruby. First came Rails. Installing Rails is actually the easiest part of it. I didn&#8217;t have any trouble there. </p>
<p>Then came Git. Had to download an install that, and there is a bunch of stuff you need to do to get that to work with <a href="http://github.com/" title="Github">github.com</a>. Be it the key you have to type in, create a repository, then do a test app and add the files, followed by commiting them, then pushing them&#8230;went on and on it seemed, but I got Git up and running. Go me!</p>
<p>Next came Heroku. A place to store your newly created app and view it online. Where Git is the version control, <a href="http://www.heroku.com/" title="Heroku Cloud Application Platform">heroku.com</a> is like the host. But in order for that to function right, you have to create an app space. Oh ya, install the Heroku gem by the way. Once you have the app space created, you then have to hook it up with Git, so you can use Git to push your app to Heroku. Luckily there is pretty good documentation for this stuff, so if anything goes wrong, which it will, you aren&#8217;t dead in the water.</p>
<p>Of course that doesn&#8217;t exactly mean everything will go smoothly.</p>
<h3>Rails&#8217; Gemfile is cool</h3>
<p>This is a file that Rails creates where you tell it what gems your app needs in order to work. I have had a little experience with gems before because of my use of Sass, and recently Haml. While going through this glorious book it tells you what gems to require, and how to add them. So simple in fact that I decided let&#8217;s add a few just to see if it really IS that easy. In went Sass, Haml, and Compass. Then of course, you must bundle all this crap together with the &#8220;bundle install&#8221; at the command line. Piece of cake!</p>
<p>That is until I tried getting everything in the tutorial to work with Heroku. You see, in the book it tells you to include this line:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;color: #439AD0; font-weight: bold;">gem <span style="color:#996600;color: #439AD0;">'sqlite3-ruby'</span>, 1.2.5<span style="color:#996600;color: #439AD0;">', :require =&gt; '</span>sqlite3<span style="color:#996600;color: #439AD0;">'</span></pre></div></div>

<p>This gave me an error when I tried to push it to Heroku. Why? Easy! Heroku doesn&#8217;t support SQLite databases. FREAKIN&#8217; awesome. I then spent a long time figuring this crap out until a friend sent me to <a href="http://stackoverflow.com/questions/3897431/deploying-ror-app-to-heroku-with-sqlite3-fails" title="Heroku sqlite3 fix">Stack Overflow</a> for the fix. The funny part was that I had already seen that article and I swear I tried the solution. Apparently not though, because putting this in my Gemfile instead, worked:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;color: #439AD0; font-weight: bold;">group <span style="color:#ff3333; font-weight:bold;">:production</span>, <span style="color:#ff3333; font-weight:bold;">:staging</span> <span style="color:#9966CC; font-weight:bold;color: #439AD0;">do</span>
  gem <span style="color:#996600;color: #439AD0;">&quot;pg&quot;</span>
<span style="color:#9966CC; font-weight:bold;color: #439AD0;">end</span>
&nbsp;
group <span style="color:#ff3333; font-weight:bold;">:development</span>, <span style="color:#ff3333; font-weight:bold;">:test</span> <span style="color:#9966CC; font-weight:bold;color: #439AD0;">do</span>
  gem <span style="color:#996600;color: #439AD0;">&quot;sqlite3-ruby&quot;</span>, <span style="color:#996600;color: #439AD0;">&quot;~&gt; 1.3.0&quot;</span>, :<span style="color:#CC0066; font-weight:bold;color: #439AD0;">require</span> <span style="color:#006600; font-weight:bold;color: #439AD0;">=&gt;</span> <span style="color:#996600;color: #439AD0;">&quot;sqlite3&quot;</span>
<span style="color:#9966CC; font-weight:bold;color: #439AD0;">end</span></pre></div></div>

<p>Everything then was handy dandy for a while. Until I added the Blueprint framework CSS and tried to push it to Heroku. Some error about the SCSS file not precompiled. Again I had to go and search Google&#8217;s pages to find the answer, which was to change a line to this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;color: #439AD0; font-weight: bold;">config.<span style="color:#9900CC;">assets</span>.<span style="color:#9900CC;">compile</span> = <span style="color:#0000FF; font-weight:bold;color: #439AD0;">true</span></pre></div></div>

<h3>I&#8217;m told testing is good!</h3>
<p>Test-driven development is good according to this book. From what I know now, that is probably a good thing to get into the habit of. This led to installing rspec, which places files in Rails and lets your write test to see if things are working properly. Is the correct title showing up on the right page? Good. No? Fix it. Well, installing rspec was fine, but running my first test popped up an error about something or other. All I remember is having to install something called ANSICON v1.40. Can&#8217;t remember what it does, but that it was being asked for.</p>
<p>From rspec install, to first test, to installing ANSICON, to test again was probably about 40 minutes of time. Not terrible, but when you start adding all this stuff up and realize I haven&#8217;t actually done anything yet, you start to think that this isn&#8217;t as simple as you were hoping. Ruby might be an easy language to read, but getting all this crap going is a serious pain in the ass.</p>
<h3>Actually learning something&#8230;priceless</h3>
<p>At work I sometimes have to dive into the folder structure of Symfony, which is a framework for PHP. Never liked it. Finding crap was a pain because I could never remember where certain things were placed. Learning Rails though has cleared some things up a little. I now understand MVC a bit more. What the hell is MVC? Good question.</p>
<p>It stands for Model View Controller. The Model is what talks to the database. The Controller tells the View what to display and gives/takes things from the View to relate back to the Model. They really need to come out with a book for noobs explaining all the vocabulary in plain terms. Rails provides folders actually called: models, views, and controllers, so you actually get this stuff buried in your brain some.</p>
<h3>I see the power of Haml more clearly</h3>
<p>Within the folder structure you have a file that makes me think of &#8220;template&#8221;, called &#8216;application.html.erb.&#8217; Which now that I just looked it up, apparently IS a templating system, just not as cool as Haml. You can go read my <a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/" title="Intro to Haml Part 1" target="_blank">four part series on Haml</a> at your leisure. One thing that really became apparent though is how perfect a fit Haml is with Rails. Rails seems to be about building things quickly and easy to read (due to Ruby), and Haml just adds to that. Now add in Sass? Holy F*$# this is getting exciting. I wish I didn&#8217;t feel so late to the party.</p>
<h3>A good but difficult start</h3>
<p>Well now, it looks like it is going to be a long trip. So far I feel like I have learned a lot, while at the same time having a voice in the back of my head telling me I&#8217;m not grasping all of it. Maybe it will take me a couple of passes through this book, who knows. What I do know is that I am having fun learning this, and that has kind of been missing for a little while. I need something to dig into, and Rails/Ruby seem to finally be it for me.</p>
<p>This is not a subject that the average front end developer is going to like unless you have been looking to get into a programming language. Most I know, have no desire to actually do that. A major barrier with Rails though, at least for the inexperienced, is the amount of time you spend using the command line and fixing problems just to get everything running smooth. So much depends on what version of whatever it is you are using, which can cause so many problems. If you add up all the time I spent just trying to get to the &#8220;Ok, NOW I can start writing crap&#8221; moment, most people would have given their computer the finger and said screw it. This is even more infuriating due to my book saying stupid crap like &#8220;If that doesn&#8217;t work, try using version 1.2.5. Beyond that use Google.&#8221; Ok, not that exactly, but really freaking close.</p>
<p>Anyway, I will write about my progress as I go along and learn or come upon. This is basically what I started this blog for almost two years ago. To show what I&#8217;ve learned and what bugged or created difficulty for me.</p>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1033" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/11/ruby-on-rails-a-beginners-journey-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Large Web Development Projects &#8211; What I Have Learned</title>
		<link>http://jc-designs.net/blog/2011/11/large-web-development-projects-what-i-have-learned/</link>
		<comments>http://jc-designs.net/blog/2011/11/large-web-development-projects-what-i-have-learned/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 02:53:16 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=1019</guid>
		<description><![CDATA[Learning how NOT to do things I have built plenty of websites for freelance, and I thought I had everything down. I know how to guide a client away from bad decisions, give advice that may go against what they want to do, get the information I need, and everything else that goes with starting [...]]]></description>
			<content:encoded><![CDATA[<h3>Learning how NOT to do things</h3>
<p>I have built plenty of websites for freelance, and I thought I had everything down. I know how to guide a client away from bad decisions, give advice that may go against what they want to do, get the information I need, and everything else that goes with starting a project. At least&#8230;I thought I did. I came across a problem with my latest project that I wasn&#8217;t really prepared for: building a site where the client wasn&#8217;t even sure what the whole idea was from the start. They knew what the basics were, but not the whole, and that is where I ran into trouble. It is because of this, that I learned how not to do things in the future. The most important being writing out the project&#8217;s scope.</p>
<p>Enter <a href="http://www.closetfish.com" title="Closet Fish">Closet Fish</a>&#8230;</p>
<div class="center">
<img src="http://jc-designs.net/newimages/blogImages/closet1.jpg" alt="Closet Fish website" />
</div>
<p><span id="more-1019"></span></p>
<h3>In the beginning&#8230;</h3>
<p>The clients are two very cool women who work in the fashion world. Something that I know absolutely nothing about. Their concept was a voting site where the user pays to upload photos of outfit options and get professional advice from the owners of the site. While I got the information I needed from them, I realized that I couldn&#8217;t build this on my own. There was going to be a lot of back-end programming that was beyond me. Part of the learning process for me was the role of project manager. I have never really done that with more than the client and myself. I was going to need to involve other developers who knew some crap. </p>
<p>I ended up being pretty good at that. At least I think so. Anyway, I recruited a programmer I know, and he came up with a time frame and a dollar amount. I then went back to the client and told them the price. I have no idea if they shopped around, but I believe they did and realized more quickly than I did that we had completely underbid.</p>
<h3>Colors, colors, colors</h3>
<p>All I knew about what the client really wanted the site to look like was that it had to have pink. Not just any old pink, but freakin&#8217; HOT pink. The kind that blinds you in its awfulness. It was something though, and I went with it. Hot pink is not easy to use in a design. In fact, you should never do it. I tried 2 designs, going through every color pallet I could think of that would make hot pink bearable. Even using hot pink as the accent color wasn&#8217;t working. I then said enough is enough. Hot pink is out. I then toned it down to a very soft and mellow pink and everything went much smoother.</p>
<p>I then called the clients and said &#8220;Hot pink is out. You will respect my authority in this matter.&#8221; Ok, I didn&#8217;t say that, but I was able to get them out of the hot pink mode, and they were happy with the colors once they saw it. One of the best things working with these particular clients was that they were very open to any ideas. If I gave them a good reason, they would listen and usually take my advice. There were a couple of times they did not, but they did when I thought it really mattered. I love them for that.</p>
<h3>Logos are not easy</h3>
<p>After designing the layout I added a temporary logo to show what it would look like. Nothing fancy, just a nice font with a gradient and some cute little bubbles floating around it. A very quick logo design, with barely any thought put in because I knew I wasn&#8217;t going to be using it. I then sent them the design, telling the clients that &#8220;Hey, this logo is just for placement, I am having one created for you.&#8221;</p>
<p>I then call a graphic designer friend of mine (ironic because my degree is IN graphic design) to come up with a logo. Why didn&#8217;t I do it? One, I didn&#8217;t want to spend time doing that when I could be writing the front-end, and two&#8230;he is better at it than I am. I knew he would do a good job. When I got the design back, I knew that I had made the right decision.</p>
<p>After replacing the logo on the mockup and resending it to them, I waited to here back. Which I did right away. &#8220;This is AWESOME! But&#8230;we think we like the other logo better,&#8221; came the reply. Not good because I was paying my friend to do this, and his logo was clearly better. Once the project all came together I think they are happy with me talking them in to using it. What do you think?</p>
<p>My 5 minute job:</p>
<div class="center">
<img src="http://jc-designs.net/newimages/blogImages/closet2.jpg" alt="Quick logo" />
</div>
<p>Or his:</p>
<div class="center">
<img src="http://jc-designs.net/newimages/blogImages/closet3.jpg" alt="Closet Fish logo" />
</div>
<h3>Things started to get crazy</h3>
<p>After some time went by I start getting emails about other websites the client has seen. Can you add this? What if we do that? Lets make most of the site free where EVERYONE can give advice and then&#8230;.Wait, what? After a few emails back and forth and a couple of calls, the scope of the project had changed. Looking back now, I realize a whole ton of crap I should have done.</p>
<p>First, I should have written a good old contract, but I didn&#8217;t because I dealt with this client before. I needed to have something down that said, here is the cost for what you have asked for. Anything further will have additional charges added, and the date for launch pushed further. But the programmer and I were yes men on this one, so we changed everything so that everyone could give advice, but you still had to pay for professional comments.</p>
<p>The second issue was photos. I generally pick the photos for a site I am doing. This time, because I had no idea about the fashion world, and because I thought they would want some specific things, I thought I would let them give me some options. Very VERY bad. on two counts. I didn&#8217;t specify that only certain photo groups could be picked from. Why did that matter? Because they started picking photos that were going to cost about $200 a pop&#8230;.for web quality. Screw that!</p>
<p>Part B of this has to do with the website&#8217;s actual name. <a href="http://www.closetfish.com" title="Closet Fish">Closet Fish</a>. Cool name once you understand what the site is doing and what people are doing on it. BUT, and this was a big head slapping moment when the emails came in with image selection. They were picking images that contained women and&#8230;.take a guess! Got it? Freakin right! Images with women in lying in bed with a dead (though very fresh looking) fish lying on the pillow next to her. Images of mermaids, and marine scenes with fish swimming all over the place.  After looking at a bunch of their choices, I made a quick phone call and told them to halt what they were doing.</p>
<p>See, it took a while for me to come around and start actually liking the name. The thing was, while it has the word fish in it, I felt the site shouldn&#8217;t have anything what so ever to do with actual fish. We are closet fishing for clothes here, and having people think of dead smelly fish is not a good way to get people to the site. Once I had them on the band wagon with that, image selection became easier.</p>
<h3>Shit hits the fan</h3>
<p>When the project was FINALLY coming down to the wire, we came to a round of testing. I called them up and said &#8220;You guys need to start getting people to come and test this website.&#8221; To which I get a reply, &#8220;Great idea! We&#8217;ll get some friends to do that!&#8221; A few days later I get an email saying things looked great, we just want this changed to that. No problem, cause you expect a ton of the micro changes crap. A couple of more days go by, and it is like 3 days before we said we were going to launch, and things went bad. &#8220;WHAT THE FUCK! WE CAN&#8217;T GET ANY IMAGES UPLOADED TO THE SITE! IT KEEPS GIVING US AN ERROR!&#8221;</p>
<p>To which I replied, &#8220;Don&#8217;t panic. THIS is why we wanted you to test the site.&#8221; After some thorough problem solving we found the issue. Rule number 4 of web development: NEVER rely on web developers alone to test your stuff for you. When we tested image upload, we were grabbing images from the internet&#8230;Google, Facebook, whatever we could find. It didn&#8217;t matter because it wasn&#8217;t going to stay up there. Any idea what the problem with that is? Real users are going to be using their camera or phone to take these images. Bigger problem? I&#8217;m guessing no one adjusts the image size of the images they are taking.</p>
<p>Question&#8230;WHY would you take an image with your phone that is 3000 pixels wide?? WHAT THE HELL are you going to do with that photo? Aren&#8217;t most photos taken thrown up on Facebook anyway? Well regardless of what I think people SHOULD do, they don&#8217;t. The problem was that each image was like 4 megs each. We were uploading photos that were like 200k each. The server had a built in limiter, and the image resizing script did as well. When they uploaded their images, server said nooooo way, and crashed. That got fixed and everyone was happy.</p>
<p>Now, I calmed them down, but I learned another very valuable lesson. I already know to expect things like that to happen at the last minute. The client that doesn&#8217;t know that though, will panic and start freaking out all the while calling you unprofessional.</p>
<h3>I am now smarter for doing this project</h3>
<p>Why? Well for one, this project was easily worth $15-$20k. I bid substantially lower because none of us knew what was going to be involved. A contract would have equaled this all out for us. This would have helped us more than them.</p>
<p>I really understand what project management is all about now because of <a href="http://www.closetfish.com" title="Closet Fish">Closet Fish</a>, and I found that I really liked doing it. I found I was good at getting it all together, but learned a lot in the process. I think the biggest thing I learned though was the danger posed by a client who (while having a good idea) doesn&#8217;t have everything ironed out. </p>
<p>If a client comes to you and says &#8220;I have this great idea for a website. People come and do X,&#8221; you had better start asking questions about how they do X. What happens after they do X? Get all the details about how the site is going to function before you do anything. Then give them a quote for that work, and then let them know that anything else besides what you talked about, goes beyond the scope of the project. Which will cost more and set the deadline back. I saw this in action, and it is the one thing I do not want to repeat again in my career.</p>
<h3>So what did we learn here? And by we I mean me</h3>
<p>It basically comes down to these:</p>
<ul>
<li>No client is perfect, but these two were close</li>
<li>Get ALL the details hammered out BEFORE you start working on a project</li>
<li>Write up a contract, regardless if you worked with the client(s) before</li>
<li>Anything beyond what was talked about for the quote will cost more, and push the deadline</li>
<li>The people working on the site make horrible testers &#8211; they won&#8217;t use the site like a normal person would</li>
<li>Explain to the client before hand that SOMETHING will go wrong&#8230;just don&#8217;t panic</li>
</ul>
<p>All in all, I had a really good time working on this project. I think what made it so awesome to do was the fact that I got really lucky in who the clients were. They were open to suggestions, trusted my advice, and were extremely friendly and nice. I wish them all the luck with <a href="http://www.closetfish.com" title="Closet Fish">Closet Fish</a>, and I really hope to work with them again sometime. It is rare to see the amount of drive these women have, and I hope you go check out their new website.</p>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1019" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/11/large-web-development-projects-what-i-have-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Haml For HTML Layouts for Newbs &#8211; Part 4: Final thoughts</title>
		<link>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-4-final-thoughts/</link>
		<comments>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-4-final-thoughts/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 18:59:50 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Haml]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[sass]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=1012</guid>
		<description><![CDATA[Abstraction languages are cool We need more of them. I only know of a few, but the ones that I do are pretty bad ass. Seems odd that the two I use were created by the same person, but if you have used Haml and Sass then you will see the connection and some of [...]]]></description>
			<content:encoded><![CDATA[<h3>Abstraction languages are cool</h3>
<p>We need more of them. I only know of a few, but the ones that I do are pretty bad ass. Seems odd that the two I use were created by the same person, but if you have used Haml and Sass then you will see the connection and some of the thinking behind them.</p>
<p>Language abstractions make me think differently about the way I do things. Sass taught me to be a lot tighter in my CSS, and Haml showed me how you can write out an HTML page faster than lighting. In short, because of the these, I have improved as a web developer. For that alone they get my high praise and a check mark in the cool category.<br />
<span id="more-1012"></span></p>
<h3>Will I use Haml in the future?</h3>
<p>Simple answer: yes. But I&#8217;ll go into the long one because this is my blog.</p>
<p>Even without knowing Ruby, I&#8217;m still going to use Haml. Just in the tests that I did myself I was able to breeze through an HTML page. Learning the syntax took less than twenty minutes. Haml did to HTML, what Sass did to CSS. It cut out the crap, and made coding out a page fast. I know you&#8217;re thinking that you can write out an HTML page quickly as it is. I can too. Haml just makes me faster than you now. By the time you have three divs with an id on them, I will have most of the layout written out, getting ready to add the content. I&#8217;m being totally serious when I say that. Even with having to open the command line to render it into HTML, I will blow you out of the water.</p>
<p>I use it in a bastardized way though. At least at the moment. I&#8217;ll create the layout in HAML, the content in Markdown, and when I&#8217;m done I&#8217;ll render it to HTML to modify that from there on out. That is not how it is supposed to be used, but it makes writing HTML so awesome I don&#8217;t care.</p>
<h3>Should YOU use them?</h3>
<p>Yes, because I think even knowing just one of these will help you. Writing something you think you know well in different way, makes you rethink how you were doing everything to begin with. In a good way, I promise. You&#8217;ll see the stupid mistakes you were making (and don&#8217;t even pretend you don&#8217;t make any) and how to slim it down or write it more efficiently.</p>
<p>I must warn you about something though. Learning Haml or Sass is like taking the red pill in the Matrix. Once you do, you can&#8217;t unlearn it. Why is that bad? Ask yourself if you like writing CSS. Did you answer yes like a good web developer? We all do, because it is cool to see what we are doing come to life on the web, or we wouldn&#8217;t be doing it. The problem I ran into is that once I really started using Sass on my freelance projects, writing CSS became a real pain in the ass.</p>
<p>At work, I write plain old CSS. You start writing out the styles and halfway through the stylesheet you start thinking how redundant a lot of it is. I am constantly thinking about how much clutter I could get rid of if had the use of variables, mixins, and nesting. Honestly, it is sometimes a real drag writing CSS now. That is the red pill for you. If you take the blue, CSS remains awesome. Take the red though&#8230;well, I warned you. And you won&#8217;t truly get what that means unless you try it.</p>
<p>So to stop my rambling on, yes, you most certainly should use them. You&#8217;ll learn something new, learn how to do the old better, and most likely save time by using them. Haml and Markdown will show you the speed, and if you combine it with Sass you&#8217;ll add the power.</p>
<h3>Closing Arguments</h3>
<p>If you were going to choose one language abstraction, I&#8217;ll be honest and say that I wouldn&#8217;t recommend Haml. You won&#8217;t learn as much. You will write up an HTML page very quickly, but in the end I don&#8217;t think you come away with much more than that. I would recommend Sass first. You learn a LOT about how you write your CSS, see a lot of the mistakes you make and how to correct them, and how to make your stylesheets tighter all around. Sass makes you think about what it is you are writing, where Haml is just a speed boost.</p>
<p><strong>Articles in this series</strong>:</p>
<ul>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/" title="Intro to Haml Part 1">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 1: Installing Stasis</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-2-writing-haml/" title="Intro to Haml Part 2 - Writing Haml">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 2: Writing Haml</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-3-markdown-syntax-for-content/" title="Intro to Haml Part 3 - Markdown Syntax for Content">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 3: Markdown Syntax For Content</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-4-final-thoughts/" title="Intro to Haml Part 4 - Final Thoughts">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 4: Final thoughts</a></li>
</ul>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-" rel="nofollow"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1012" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-4-final-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Haml For HTML Layouts for Newbs &#8211; Part 3: Markdown Syntax For Content</title>
		<link>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-3-markdown-syntax-for-content/</link>
		<comments>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-3-markdown-syntax-for-content/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 14:47:00 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Haml]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[markdown]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=1003</guid>
		<description><![CDATA[Haml rocks for Layout, but what about content? So obviously I really like Haml. Pretty sure that comes through in my writing. I&#8217;ve also stated that it is good for the layout/structure of your page, but what about the fluff of the page? You know, all the paraphraphs, lists and other crap the end user [...]]]></description>
			<content:encoded><![CDATA[<h3>Haml rocks for Layout, but what about content?</h3>
<p>So obviously I really like Haml. Pretty sure that comes through in my writing. I&#8217;ve also stated that it is good for the layout/structure of your page, but what about the fluff of the page? You know, all the paraphraphs, lists and other crap the end user will actually read. Let me finally give you an example of why Haml is not the way to go for this.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">#content
    %ul
        %li
            %a{:href=&gt; &quot;/index.html&quot;} Home
        %li
            %a{:href=&gt; &quot;/services&quot;} Services
        %li
            %a{:href=&gt; &quot;/about&quot;} About</pre></div></div>

<p><span id="more-1003"></span><br />
Keep in mind this is a very uncomplicated example, but I want you to note that each element has to be on its own line, which is a pain in the ass when dealing with content. There is a better way though, and that is where <a href="http://daringfireball.net/projects/markdown/" title="Markdown syntax">Markdown</a> comes in (and use that link for reference later). Think of Markdown as a small syntax, within another syntax, used specifically to write plain text formatting and turn it into HTML. All you have to do is use Haml&#8217;s Markdown filter. How the hell do you do that? Easy, and I&#8217;m glad you were so thoughtful to ask. A simple colon, followed by the filter name. To write the same thing I wrote above using Markdown, you would write:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">#content
    :markdown
        + [Home](/index.html)
        + [Services](/services)
        + [About](/about)</pre></div></div>

<p>Much easier to read, wouldn&#8217;t you agree? If you want to see a really good example, go and check <a href="http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-for-content/" title="Haml Sucks for Content">Chris Eppstein&#8217;s article</a> and you will REALLY get the point. Which basically is that Haml isn&#8217;t really made for creating content because of how it must be written. Markdown though handles it very well. Seriously, check out that link and you will see what must be done to get a simple link within a paragraph tag.</p>
<h3>Markdown&#8217;s basic syntax</h3>
<p>Markdown isn&#8217;t going to pay attention to your indentation. It is better to give you a clear cut example though of the basics, because it is easier to see than to explain it.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">#content
    :markdown
	#This is an h1 tag
	##This is an h2 tag
	###This is an h3 tag
&nbsp;
	This is a paragraph
&nbsp;
	&lt;p class=&quot;highlight&quot;&gt;You can also insert html&lt;/p&gt;
&nbsp;
	This is **strong**
&nbsp;
	This is *italic*, and below is an image
        ![Alt text](/path/to/img.jpg)
&nbsp;
        + List item
        + List item
        + List item</pre></div></div>

<p>This will render in HTML as:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div id='content'&gt;
        &lt;h1&gt;This is an h1 tag&lt;/h1&gt;
&nbsp;
        &lt;h2&gt;This is an h2 tag&lt;/h2&gt;
&nbsp;
        &lt;h3&gt;This is an h3 tag&lt;/h3&gt;
&nbsp;
        &lt;p&gt;This is a paragraph&lt;/p&gt;
&nbsp;
        &lt;p class=&quot;highlight&quot;&gt;You can also insert html&lt;/p&gt;
&nbsp;
        &lt;p&gt;This is &lt;strong&gt;strong&lt;/strong&gt;&lt;/p&gt;
&nbsp;
        &lt;p&gt;This is &lt;em&gt;italic&lt;/em&gt;, and below is an image
        &lt;img src=&quot;/path/to/img.jpg&quot; alt=&quot;Alt text&quot; /&gt;&lt;/p&gt;  
&nbsp;
        &lt;ul&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;/ul&gt;
&lt;/div&gt;</pre></div></div>

<p>There are some things to note, as there always are when using something like this. First, as you can see in the Haml part, you are free to inject HTML within the Markdown filter. Yep, that&#8217;s right! Second, there are multiple ways to do certain things, such as the header tags which you can see marked with the &#8216;#&#8217; in front of them. Here are two ways to do &#8216;h1&#8242; and &#8216;h2&#8242; tags in Markdown:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">#This is an h1 tag in Markdown
&nbsp;
This is also an h1 tag
================
&nbsp;
##This is an h2 tag in Markdown
&nbsp;
This is also an h2 tag
--------------------</pre></div></div>

<p>Any number of equal signs or dashes will work underneath the headings, but the cool part is that there are different options to write the same thing. Bold and italic also have different options, but for my main example I used the ones I preferred. The heading tags just seem easier to remember if I use the correct number of &#8216;#&#8217; in front of them. If you want to see all of the syntax used in Markdown, go to the site that I linked to above.</p>
<h3>Wait, so I have to learn TWO different kinds of syntax?</h3>
<p>Oh GOD with your complaining. No, feel free to use Haml for the content of your site. See if I give a crap. I guarantee after about five minutes you will be fed up. Also, it&#8217;s not like you are learning a coding language. Haml basics take about 20 minutes or less to learn, and once you have written some basic content in Markdown, you will understand it without much need to go look something up. It is that easy.</p>
<p>I can&#8217;t explain in words how fun it is to write a page out using Haml. You have to go and do it yourself to really get it. Once you do though, I&#8217;ll bet you will see how much better it is to write your layout in Haml. Using Markdown to write the content makes it even easier. Not only will you actually enjoy it, you will see how clean your web page can really be. Feel free to leave a comment thanking me after showing you the light.</p>
<p>Now go and do it!</p>
<p><strong>Articles in this series</strong>:</p>
<ul>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/" title="Intro to Haml Part 1">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 1: Installing Stasis</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-2-writing-haml/" title="Intro to Haml Part 2 - Writing Haml">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 2: Writing Haml</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-3-markdown-syntax-for-content/" title="Intro to Haml Part 3 - Markdown Syntax for Content">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 3: Markdown Syntax For Content</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-4-final-thoughts/" title="Intro to Haml Part 4 - Final Thoughts">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 4: Final thoughts</a></li>
</ul>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-" rel="nofollow"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1003" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-3-markdown-syntax-for-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Haml For HTML Layouts for Newbs &#8211; Part 2: Writing Haml</title>
		<link>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-2-writing-haml/</link>
		<comments>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-2-writing-haml/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 18:08:17 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Haml]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=995</guid>
		<description><![CDATA[The difference between structure and content Haml is great! But for what, is the real question. According to Haml&#8217;s website, &#8220;Markup should be beautiful.&#8221; It definitely does make things look clean and easy to read, but there seems to be a catch. Chris Eppstein (creator of Compass) wrote an article that basically says don&#8217;t use [...]]]></description>
			<content:encoded><![CDATA[<h3>The difference between structure and content</h3>
<p>Haml is great! But for what, is the real question. According to <a href="http://haml-lang.com/" title="Haml language">Haml&#8217;s</a> website, &#8220;Markup should be beautiful.&#8221; It definitely does make things look clean and easy to read, but there seems to be a catch. Chris Eppstein (creator of Compass) wrote an <a href="http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-for-content/" title="Haml Sucks for Content">article</a> that basically says don&#8217;t use Haml for content, and I suggest reading it when you are done reading this. Looking at his first example, which I won&#8217;t duplicate here, you see what he is driving at right away. For the actual content of the site, Haml starts to look like garbage. What it IS good for though, is the actual structure of the template. Template, file, whatever. The stuff you write in HTML, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div id=&quot;luckDragon&quot;&gt;&lt;/div&gt;</pre></div></div>

<p>Haml can do better:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">#luckDragon</pre></div></div>

<p>The lesson to be learned here is that, for the main layout of your site use Haml. For the fluff we&#8217;ll use something called Markdown, which I&#8217;ll talk about in Part 3 of this series. In this post, we are going to deal with the basics of Haml though.</p>
<p><span id="more-995"></span></p>
<h3>Haml&#8217;s syntax</h3>
<p>The first part you need in an HTML file is the doctype, and while there are many you can use (which you can see <a href="http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#doctype_" title="Haml syntax for doctypes">here</a>), I am going to use the HTML5 version. The doctype is written out with three exclamation points, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">!!!5</pre></div></div>

<p>Which will give you this HTML output:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;!DOCTYPE html&gt;</pre></div></div>

<p>Pretty sweet, because I am all about eliminating as many characters as possible, so I can get my work done faster. Haml does this with almost everything.</p>
<p>After that, things are pretty straight forward. Elements start with a &#8220;%&#8221;, id&#8217;s start with a &#8216;#&#8217;, class starts with a &#8216;.&#8217;. What is really badass is that Haml defaults id&#8217;s and classes to render as a &#8216;div&#8217; in the HTML output file, unless you specify otherwise. Let&#8217;s take a look some basic syntax in an actual example:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">!!! 5
%html
	%head
		%title Stasis - Static Sites Made Powerful
		%link{ :href =&gt; &quot;stasis.css&quot;, :media =&gt; &quot;screen&quot;, :rel =&gt; &quot;stylesheet&quot;, :type =&gt; &quot;text/css&quot; }
	%body
		#container
			%nav
				%ul
					%li
						%a{:href=&gt; &quot;#&quot;} Home
					%li
						%a{:href=&gt; &quot;#&quot;} Services
					%li
						%a{:href=&gt; &quot;#&quot;} About Us
					%li
						%a{:href=&gt; &quot;#&quot;} Blog
					%li
						%a{:href=&gt; &quot;#&quot;} Contact Us
			#content</pre></div></div>

<p>If you have followed along so far, you can easily see what is going on here. Everything with a &#8216;%&#8217; symbol in front of it, is an element. Everything with a &#8216;#&#8217; in front of it is a div tag with an id. Once you render this into the HTML file, this is what you get:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Stasis - Static Sites Made Powerful&lt;/title&gt;
    &lt;link href='stasis.css' media='screen' rel='stylesheet' type='text/css' /&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id='container'&gt;
      &lt;nav&gt;
        &lt;ul&gt;
          &lt;li&gt;
            &lt;a href='#'&gt;Home&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href='#'&gt;Services&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href='#'&gt;About Us&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href='#'&gt;Blog&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href='#'&gt;Contact Us&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
      &lt;div id='content'&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>Now I know what you are thinking. Yes, the HTML is not formatted the way you would like it to be, but there are options in changing that, which I won&#8217;t get into right now. For now, just accept it and move along. In reality, if you are using Haml, the actual HTML is not what you are going to be working with. You would use the &#8216;.haml&#8217; file. That is the point here. </p>
<p>Moving forward now, so keep up. If you really looked at the example I used above, you will see something I didn&#8217;t mention, and that is an element&#8217;s attributes. Not that big of a deal, it&#8217;s just markup you wouldn&#8217;t recognize if you haven&#8217;t seen Ruby. After the element you are going to put the &#8216;{}&#8217; in, and between that are the attributes. If you have multiple, they are seperated by a comma, and each attribute starts with a colon. The odd part you will most likely forget without looking the first few times is the &#8216;=>&#8217;. I look at it as the attribute pointing to the value it is supposed to be. That could have been the intention, but what the hell do I know. Here is what the link to a css file would look like though:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">%a{:href=&gt; &quot;#&quot;} Home</pre></div></div>

<p>Which outputs this HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;a href='#'&gt;Home&lt;/a&gt;</pre></div></div>

<h3>Indentation matters, so pay attention!</h3>
<p>Yes, Haml pays attention to how you indent your markup. You probably already do this kind of thing in your normal HTML when you nest your div tags, but it isn&#8217;t required. Forget to indent at the right place using Haml, and you could get an error when you try to render it into HTML. In the following example, you will see Haml&#8217;s markup for the HTML5 doctype:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">!!! 5
%html</pre></div></div>

<p>The above is correct, but if you tabbed over the &#8216;%html&#8217;, which renders as the &#8216;html&#8217; tag, you will get the error: &#8220;Illegal nesting: nesting within a header command is illegal.&#8221; This is because Haml treats the indent as if you were nesting the &#8216;html&#8217; tag within the doctype.</p>
<p>Now, if you indented an element over twice (2 tabs) from its parent, you would get an error that says something like &#8220;The line was indented 2 levels deeper than the previous line.&#8221; If you ever get an error like this, you know what your problem is. Indenting is extremely important because it shows Haml how to structure everything. If it is tabbed over from the element above it, that element becomes nested within. Seriously, this is important if you are going to be using Haml.</p>
<h3>Rendering Haml into HTML</h3>
<p>Two methods really. The regular way, and the way Stasis does it if you have that all loaded and ready from the previous post. I&#8217;ll show you both though, just in case.</p>
<p>Using Stasis: at the command line, cd to the directory your file is in (index.html.haml) and type:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ stasis -o index.html.haml</pre></div></div>

<p>This will output an HTML file in the public folder named &#8216;index.html&#8217;.</p>
<p>Just using Haml, in the command line, cd to your project folder, and type:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ haml index.haml index.html</pre></div></div>

<p>The first file (index.haml) is obviously your Haml file, while the second is what you want the output file to be called (index.html in this case).</p>
<p>Either way is easy, you just don&#8217;t have to go through all that install crap that I went through in my <a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/" title="Introduction to Haml For HTML Layouts For Newbs – Part 1: Installing Stasis" target="_blank">first post in this series</a>. I was using <a href="http://stasis.me/" title="Ruby Gems - Stasis">Stasis</a> because I might be using its options later.</p>
<h3>Final thoughts</h3>
<p>I REALLY like Haml for its simplicity, and almost as much as I love Sass. You become aware of things pretty quickly once you start using it, such as indentation being key to writing your structure. I think the best part of writing your layout using this, is that the basics are learned quickly. Once you have it down, writing the main structure becomes a breeze. I should also point out that while you are using Haml&#8217;s syntax, you can also inject HTML into it just like normal. Seems kind of pointless, but the option is there. </p>
<h3>What&#8217;s next?</h3>
<p>Since Haml is not great for writing the actual content of the site, the third post in this series will deal with <a href="http://daringfireball.net/projects/markdown/" title="Markdown syntax">Markdown</a>. It is a plain text formatting syntax that you can use within Haml, and makes writing the content easier.</p>
<p>Hope you learned something today, so leave a comment and let me know!</p>
<p><strong>Artilces in this series</strong>:</p>
<ul>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/" title="Intro to Haml Part 1">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 1: Installing Stasis</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-2-writing-haml/" title="Intro to Haml Part 2 - Writing Haml">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 2: Writing Haml</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-3-markdown-syntax-for-content/" title="Intro to Haml Part 3 - Markdown Syntax for Content">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 3: Markdown Syntax For Content</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-4-final-thoughts/" title="Intro to Haml Part 4 - Final Thoughts">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 4: Final thoughts</a></li>
</ul>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-" rel="nofollow"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=995" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-2-writing-haml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Introduction to Haml For HTML Layouts For Newbs &#8211; Part 1: Installing Stasis</title>
		<link>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/</link>
		<comments>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 01:51:07 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Haml]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=983</guid>
		<description><![CDATA[Part one of four Learning something new is awesome, and writing about what I am learning helps me get it into my head a lot more. Yesterday I started learning how to use Haml, and once I started, I thought I would pass on this newly acquired knowledge on to you. This series is for [...]]]></description>
			<content:encoded><![CDATA[<h3>Part one of four</h3>
<p>Learning something new is awesome, and writing about what I am learning helps me get it into my head a lot more. Yesterday I started learning how to use Haml, and once I started, I thought I would pass on this newly acquired knowledge on to you. This series is for NON programmers. You might know javascript/jQuery, but the people I am writing this for are not really going to have any real knowledge of programming. If you have just gotten into using Sass, then this is a perfect next step for you. Here are the topics in this four part series:</p>
<ul>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/" title="Intro to Haml Part 1">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 1: Installing Stasis</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-2-writing-haml/" title="Intro to Haml Part 2 - Writing Haml">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 2: Writing Haml</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-3-markdown-syntax-for-content/" title="Intro to Haml Part 3 - Markdown Syntax for Content">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 3: Markdown Syntax For Content</a></li>
<li><a href="http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layouts-for-newbs-part-4-final-thoughts/" title="Intro to Haml Part 4 - Final Thoughts">Introduction to Haml For HTML Layouts for Newbs &#8211; Part 4: Final thoughts</a></li>
</ul>
<p><img class="right" src="http://www.jc-designs.net/newimages/blogImages/haml.gif" alt="Haml logo" />So what the hell is Haml anyway? Well, imagine taking out the syntax of an HTML document, and replacing it with a cleaner syntax. It also adds a ton of other functionality, but what I&#8217;m going to be talking about in this series is just basic HTML layout writing. Mainly because I just got started with it myself, so the other stuff will have to wait.<br />
<span id="more-983"></span></p>
<h3>Let&#8217;s install Stasis</h3>
<p>I have been wanting to use Haml (a Ruby gem) for a long time now, but I didn&#8217;t know how to go about doing it. If you are not familiar with the command line or Ruby, things like this are intimidating.  Thanks to another Ruby gem, called <a href="http://stasis.me/">Stasis</a>, I was finally able to get a Haml file rendered into an HTML file and finally get started with seeing what it is all about. I love learning new things, so thank you to <a href="http://twitter.com/smashingmag" title="SmashingMagazine's Twitter feed">SmashingMagazine</a> for tweeting about it yesterday. Who would have thought they would be the ones to let me know about this? </p>
<div class="center">
<img src="http://jc-designs.net/newimages/blogImages/stasis.jpg" alt="Stasis logo" />
</div>
<p>First, we need to get a few things installed. Most importantly, Stasis, but even before that, we need to make sure we have a few things done. Open your command line and make sure your Ruby Gems are updated (it&#8217;s probably just a good idea to do so):</p>
<p><em>NOTE: the &#8216;$&#8217; seems to be a universal thing when showing that you are writing a command line instruction. No idea why, but I&#8217;ll use it as well. Just note that you do <strong>NOT</strong> type the &#8216;$&#8217; in the command line.</em></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ gem update --system</pre></div></div>

<p>Then install Haml:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ gem install haml</pre></div></div>

<p>That was the easy part. Now onto the annoying crap. I had to install a bunch of gems to get stasis to work, and while I am not sure which ones are required, I recommend doing all of them at the same time. The one I know you need for certain, is the <a href="http://rubyinstaller.org/downloads/" title="Get the Ruby DevKit installer">Ruby DevKit</a>. Go there, download it, extract it (I did it straight to my C: drive), and then go to the command line, change directories until you are at the location of where you put the DevKit, and type:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ ruby dk.rb init</pre></div></div>

<p>After you get the confirmed initialized message, type this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ ruby dk.rb install</pre></div></div>

<p>Now, it might just work after that, but mine was still having issues, so I went to the <a href="http://rubygems.org/gems/stasis" title="Ruby Gems - Stasis">Stasis page</a> on the Ruby Gems website and installed everything that was listed at the bottom:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ gem install directory_watcher
$ gem install redis
$ gem install slop
$ gem install tilt
$ gem install yajl-ruby
$gem install rake
$gem install rspec</pre></div></div>

<p>I&#8217;m guessing you don&#8217;t need all of that, but it didn&#8217;t hurt. Once you have all of THAT done, NOW you can install Stasis:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ gem install stasis</pre></div></div>

<h3>Start a new project</h3>
<p>Now that you have Stasis installed, go and create a folder to test all this crap in. Create a new file and save it as &#8216;index.html.haml&#8217; using a text editor (Notepad++ for me!), within that folder. Next, go back to the command line and change directories until you are in that folder, then:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">$ stasis</pre></div></div>

<p>This should place a folder within the one you created, called &#8216;public&#8217;. In it, you will see a file called &#8216;index.html&#8217;. </p>
<h3>Can I use Haml now? Please?</h3>
<p>YES! Just not in this post. I&#8217;ve probably already went beyond your capacity to really pay attention to me anymore, so you shall have to wait until the next post!  I&#8217;ll let you see a hint of what Haml is all about though.</p>
<p>What you might write in HTML</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div id=&quot;container&quot;&gt;
    &lt;p&gt;This is typical crap.&lt;/p&gt;
&lt;/div&gt;</pre></div></div>

<p>The same thing, but written in Haml:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">#container
    %p This is typical crap.</pre></div></div>

<h3>So what will we be learning in the next post?</h3>
<p>The fun stuff of course. Haml&#8217;s basic syntax as I walk you through how to write up a standard static web page. The third post will be on writing the content (what you read on the site) using Markdown syntax, and putting it within Haml. The final post in the series will be my thoughts on all of it combined. </p>
<p>If any pros have an easier way to just use Haml (and quickly), I&#8217;d love to hear it!</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-" rel="nofollow"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=983" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/09/introduction-to-haml-for-html-layout-for-newbs-part-1-installing-stasis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Muse &#8211; A Threat To Web Development? Probably Not</title>
		<link>http://jc-designs.net/blog/2011/08/adobe-muse-a-threat-to-web-development-probably-not/</link>
		<comments>http://jc-designs.net/blog/2011/08/adobe-muse-a-threat-to-web-development-probably-not/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 17:31:44 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=974</guid>
		<description><![CDATA[They took our jerbs! If you haven&#8217;t heard of Adobe&#8217;s latest offering, Muse, then you probably don&#8217;t read any web development blogs, including this one. If you do read them, and still haven&#8217;t heard of it, well, you have now! You may thank me for your enlightenment later. Anyway, there are a LOT of comments [...]]]></description>
			<content:encoded><![CDATA[<h3>They took our jerbs!</h3>
<p>If you haven&#8217;t heard of Adobe&#8217;s latest offering, <a href="http://muse.adobe.com" title="Adobe Muse">Muse</a>, then you probably don&#8217;t read any web development blogs, including this one. If you do read them, and still haven&#8217;t heard of it, well, you have now! You may thank me for your enlightenment later. Anyway, there are a LOT of comments from web developers bashing the hell out of this product. I have not seen many (I can&#8217;t even recall one actually) comments praising it for what it does. What <em>does</em> it do? Write serious crappy code. I mean divititus to the umpteenth degree.</p>
<p>This product isn&#8217;t meant for my people though. Who do I mean by &#8220;my people&#8221;? I&#8217;m talking about those who hand code their sites and left software like Dreamweaver in the dust years back. Muse is meant for graphic designers, or web designers that don&#8217;t actually know how to create a site but design them anyway. They create a design, and then use Muse (which has tools like other Adobe products &#8211; think Photoshop) to make a nice little layout. Hit a button and BAM! Here is your website.</p>
<p>I think many of the people doing this for a living though feel a slight twinge of fear, thinking this might cut into our freelance projects, or possibly worse&#8230;our jobs.</p>
<p>Damn&#8230;that went all serious, didn&#8217;t it?</p>
<p><span id="more-974"></span></p>
<h3>Nothing to fear</h3>
<p>If anything, Muse might actually GIVE us more work for the future. Some designer building a site for a client that wants a little functionality, or some jQuery bit added later, is going to get screwed. &#8220;I&#8217;m sorry Mr. Client, but I don&#8217;t actually know how to do that cool widget thing,&#8221; which in turn makes the client go out and look for someone like us. They give us a call, and we say yes, we can help. We go to their current site, look around and say &#8220;Nice design you have.&#8221; But&#8230;then we look at the source. In two seconds we think &#8220;Well this is interest&#8230;WHAT THE F#$@!?&#8221; Because we are looking at something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div class=&quot;colelem&quot; id=&quot;n4&quot;&gt;&lt;!-- group --&gt;
     &lt;div class=&quot;grpelem&quot; id=&quot;n5&quot;&gt;&lt;!-- group --&gt;
      &lt;div class=&quot;grpelem&quot; id=&quot;n6&quot;&gt;&lt;!-- content --&gt;
       &lt;p id=&quot;n8&quot;&gt;Some stupid line about hummingbirds&lt;/p&gt;
       &lt;div class=&quot;wrap&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;grpelem&quot; id=&quot;n10&quot;&gt;&lt;!-- content --&gt;
       &lt;p id=&quot;n12&quot;&gt;Yes, hummingbirds are indeed small.&lt;/p&gt;
       &lt;p id=&quot;n14&quot;&gt;&amp;nbsp; &lt;span id=&quot;n15&quot;&gt;&lt;/span&gt;&lt;/p&gt;
       &lt;p id=&quot;n16&quot;&gt;They are even fast as hell!&lt;/p&gt;
       &lt;div class=&quot;wrap&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;</pre></div></div>

<p>Ok, I changed the actual text in there, but the HTML is actually from one of Muse&#8217;s showcase sites. What is worse is, that is only a small piece. While looking at this poor client&#8217;s site, after the initial shock, we take a look at the CSS and pray for something brilliant. What do we see?</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #cc00cc;">#n18</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#n148</span>
<span style="color: #00AA00;color: #439AD0;">&#123;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">z-index</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">100</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">534px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">min-height</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">82px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">relative</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">margin-right</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">-534px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">margin-top</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">199px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">left</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">299px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#n26</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#n156</span>
<span style="color: #00AA00;color: #439AD0;">&#123;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">z-index</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">108</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">447px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">relative</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">margin-right</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">-447px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">margin-top</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#n28</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#n158</span>
<span style="color: #00AA00;color: #439AD0;">&#123;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">z-index</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">110</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">534px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">min-height</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">214px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">relative</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">margin-right</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">-534px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">margin-top</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">301px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">left</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">434px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>At that point I would get up and throw my trackball at the wall cursing the heavens for making my eyes see this offense to the gods of web development. &#8220;Why?!&#8221; My first reaction was actually just speechless. I seriously HATE negative margins. HATE them. This stylesheet is littered with it. On top of that, everything is positioned pixel perfect. That is just a few items you see positioned relatively, and z-indexed to hell. Trust me, the whole THING is like that. So what would you do if a client comes to you for some changes or additions to a site built like this?</p>
<p>For me, there are two options: 1) I either flat out tell them no, because I don&#8217;t want to get involved knowing that this type of client isn&#8217;t going to want to pay me what I need/want, or 2) I charge them my usual hourly rate and warn them this could possibly cost them more than what they paid for the site. I either get the money for the work I&#8217;ll have to put into it, or I won&#8217;t end up having to deal with this pile of crap.</p>
<h3>People are overreacting</h3>
<p>I understand all of the bad comments I&#8217;ve read. I agree with some of them. Muse writes horrible code. Must writes horrible CSS. Muse is bad for the web. Wait&#8230;what? See that is where I don&#8217;t agree. One, I think the audience for this product is going to be very small. It&#8217;s not like every freakin&#8217; graphic designer is going to go out and buy this and think &#8220;HAHAHA! Screw all you HTML junkies, I can build websites too!&#8221; Absolutely not. If people are really into learning how to build a website, they aren&#8217;t going to be getting into Muse. No one is going to start a business where they build websites for clients using it. Just won&#8217;t happen.</p>
<p>The people that will use it are going to be designers who want a portfolio of their work up, but don&#8217;t know how to build a site, or maybe a person starting a small business that has no budget or a willing relative that dabbles in HTML. Or maybe a print designer who has done a bunch of advertising work for a small client, who then needs a basic info site which they can provide now. We are talking about a very small fraction of people here.</p>
<p>Here is a quote from the comment section of this <a href="http://elliotjaystocks.com/blog/adobe-muse-a-step-in-the-wrong-direction/">article</a> that really sums up what others are also probably feeling:</p>
<blockquote><p>
&#8220;This whole idea to me seems like cheating and it devalues our trade. To top it off, it does not even create elegant, semantic or as you rightly say, fluid markup either!&#8221;
</p></blockquote>
<p>Does it create non-semantic code? Yes. Does this matter to anyone that isn&#8217;t a web developer? No. Clients do not know, nor do they care about semantics. I&#8217;ve never had a client actually even look at the HTML of a site I&#8217;ve built. Ever. It just needs to work for them to be happy.</p>
<p>Does Muse take the web a step backwards? Are we going to see thousands of  sites made with Muse, and end any type of innovation? What?? No, that is ridiculous. We all need to take a step back and take a breath. Web developers are taking such huge offense by this product. &#8220;How dare they make a product that makes it seem like what we do is easy!&#8221; Adobe didn&#8217;t take aim at our jobs. There is no hidden agenda trying to belittle what we do. They are trying to make money, that&#8217;s it.</p>
<h3>Read about it and forget it</h3>
<p>My whole point is that the people hating on Muse, are the people that won&#8217;t be using it. It was NEVER intended for web developers. I will never open the program, and mostly likely neither will you. Muse is meant to get a website up by people that have no idea about how to do it. It is another WYSIWYG, and we left those behind some time ago anyway, haven&#8217;t we? I say bring on the freelance projects that might come our way because of it. The amount of time it will take to correct Muse&#8217;s crap will bring in some nice cash! Unfortunately it is hard to gauge how actual users like the product because we are the only ones commenting on it. Which kind of seems unfair. Let a designer use it who hasn&#8217;t built a site before make the call. I don&#8217;t see much difference between Muse and Dreamweaver&#8217;s design view. Muse just writes the HTML/CSS in a much more offensive manner.</p>
<p>Your opinion and mine don&#8217;t really matter on it. I&#8217;d like to know what the actual potential users of it think, but by now they are probably too scare to comment because a lot of us are bitching up a storm.</p>
<p>If you wish to read <a href="http://www.netmagazine.com/features/developers-respond-adobe-muse">another article about Muse</a>, this one was worth the effort as well.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-" rel="nofollow"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=974" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/08/adobe-muse-a-threat-to-web-development-probably-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Mobile Review</title>
		<link>http://jc-designs.net/blog/2011/07/jquery-mobile-review/</link>
		<comments>http://jc-designs.net/blog/2011/07/jquery-mobile-review/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 03:42:47 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Product Reviews]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=970</guid>
		<description><![CDATA[Great things come in small packages A project I&#8217;m working on had me looking into how to create a nice looking mobile site. Two very popular frameworks came to mind: jQuery Mobile, and Sencha Touch. The back-end guy I&#8217;m working with on this project recommended Sencha Touch, so I took a look at that first. [...]]]></description>
			<content:encoded><![CDATA[<h3>Great things come in small packages</h3>
<p>A project I&#8217;m working on had me looking into how to create a nice looking mobile site. Two very popular frameworks came to mind: <a href="http://jquerymobile.com/">jQuery Mobile</a>, and <a href="http://www.sencha.com/products/touch/">Sencha Touch</a>. The back-end guy I&#8217;m working with on this project recommended Sencha Touch, so I took a look at that first. Let me just say that if you haven&#8217;t worked with Ext.js and it&#8217;s panel component, or are not even familiar with that library, you are going to have one hell of a time. It is not all that easy to use, and the limited amount of tutorials on how to use it suck beyond belief. After a couple of hours fiddling with it, I decided to say screw it, and went over to jQuery Mobile. The difference? I got a site up and running in roughly a half hour with no problems themeing. jQuery Mobile wins in ease of use hands down.</p>
<p>This isn&#8217;t to say that Sencha Touch is bad, because it sure looks good,  but it isn&#8217;t as intuitive as Mobile. This isn&#8217;t really about Touch though&#8230;it&#8217;s about Mobile. So let&#8217;s get into it!</p>
<div class="center"><img src="http://www.jc-designs.net/newimages/blogImages/jqueryMobile.png" alt="jQuery Mobile logo" /></div>
<p><span id="more-970"></span></p>
<h3>Pages, nav bars, and buttons &#8211; this stuff is easy!</h3>
<p>Not just those specifically, but everything in general. Pages though, couldn&#8217;t be any more simple because you can do it on one layout. Each different type of section is identified by the attribute &#8216;data-role&#8217;. A page has a data-role of page, a nav bar has a role of nav, footer has a role of footer, header &#8211; header, and it goes on from there. You could almost guess at most of them. So let&#8217;s say you have a mobile page, and you want a header, a nav bar, the content section, and a footer. Check out the simplicity of how you would write this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div data-role=&quot;page&quot; id=&quot;homePage&quot;&gt;
&nbsp;
	&lt;div data-role=&quot;header&quot;&gt;
		&lt;h1&gt;Home&lt;/h1&gt;
	&lt;/div&gt;
&nbsp;
        &lt;div data-role=&quot;navbar&quot;&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;a href=&quot;#homePage&quot; class=&quot;ui-btn-active&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
&nbsp;
	&lt;div data-role=&quot;content&quot;&gt;	
		&lt;p&gt;Any idiot with an HTML editor can do this!&lt;/p&gt;	
	&lt;/div&gt;
&nbsp;
	&lt;div data-role=&quot;footer&quot;&gt;
		&lt;h4&gt;All your footer crap goes here. Like social icons that no one cares about.&lt;/h4&gt;
	&lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<p>For the second page (about in the above example) you would just copy the above html, and change the id of the page dive to &#8216;about&#8217;, and switch the &#8216;ui-btn-active&#8217; class to the &#8216;about&#8217; link in the nav, and you are good to go. Want more pages? Keep doing that. That is what makes this framework so nice. I don&#8217;t have to think about what I am doing. How about buttons? Piece of cake!</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;a href=&quot;#contact&quot; data-role=&quot;button&quot;&gt;Contact us&lt;/a&gt;
&lt;a href=&quot;#pricing&quot; data-role=&quot;button&quot;&gt;Pricing&lt;/a&gt;
&lt;a href=&quot;#services&quot; data-role=&quot;button&quot;&gt;services&lt;/a&gt;</pre></div></div>

<p>Or a list:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;h1&gt;Favorite Movies&lt;/h1&gt;
&lt;ul data-role=&quot;listview&quot; data-theme=&quot;d&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;#a&quot;&gt;Goonies&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#b&quot;&gt;Better Off Dead&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#c&quot;&gt;Interview with the Vampire&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<h3>Theming jQuery Mobile</h3>
<p>Theming also couldn&#8217;t get any better. There are five basic theme swatches, which is what the framework calls them. They are lettered a, b, c, d, and e. Certain data-roles default to specific swatches, like header and footer, which default to &#8216;a&#8217;. Others default to c. There is a hierarchy on how something defaults, but you don&#8217;t really care about this crap because you are going to style your own in any case.</p>
<p>Well besides adding the necessary script to get jQuery Mobile to work, there is also a CSS file you will link to. All of the required styles are in there. So let&#8217;s say you want your header to use swatch &#8216;b&#8217; (which is blue), you would just have to add the data-theme attribute with the correct letter, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div data-role=&quot;header&quot; data-theme=&quot;d&quot;&gt;
     &lt;h1&gt;Home&lt;/h1&gt;
&lt;/div&gt;</pre></div></div>

<p>Your header would now have the blue color with white text. But no one is going to use the that blue color, so you go into the style sheet, and find the class and change the color. You could create a whole new swatch theme by copying the necessary styles, and changing the letters within the class names to &#8216;f&#8217;. Be careful though because any button that is placed within a bar, such as the header, will automatically be assigned a swatch letter that matches its parent bar.</p>
<h3>jQuery Mobile for the win!</h3>
<p>My main point in showing you the things that I did above is that the entire framework is easy as hell to use, from basic html to methods for page transitions, to touch events. The documentation is really easy to read, gets to the point quickly, and gives great examples. This is one of the major reasons why I think Sencha Touch will be the number two framework. Anyone can create a nice looking mobile page with jQuery mobile, and get it done quickly.</p>
<p>This doesn&#8217;t mean that the framework only does simple things. It is up to you to use it and do some very cool stuff with it. I also just touched on the basics, so be aware that there are things you have to look out for. An example being that anchor tag linking doesn&#8217;t work because Mobile uses the hash tag to identify pages. Point being, go and actually read the documentation on each part you are working on so that you don&#8217;t run into problems later.</p>
<p>For the brief time I have used jQuery Mobile, I am already a huge fan.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-" rel="nofollow"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=970" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2011/07/jquery-mobile-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

