<?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>Web Development by Joe Sak &#187; tutorial</title>
	<atom:link href="http://www.joesak.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joesak.com</link>
	<description>Rails, HTML5, CSS3, jQuery - Thoughts, Advice &#38; Work</description>
	<lastBuildDate>Tue, 27 Jul 2010 14:10:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Resources for iPhone Developer Beginners</title>
		<link>http://www.joesak.com/2010/05/23/resources-for-iphone-developer-beginners/</link>
		<comments>http://www.joesak.com/2010/05/23/resources-for-iphone-developer-beginners/#comments</comments>
		<pubDate>Sun, 23 May 2010 18:01:10 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[iphone apps]]></category>
		<category><![CDATA[iphone sdk]]></category>
		<category><![CDATA[mobile development]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.joesak.com/?p=306</guid>
		<description><![CDATA[Hey, I&#8217;m starting to learn how to develop applications for the iPhone, so I thought I&#8217;d start sharing what I find along the way. First, I picked up two books: iPhone SDK Development &#38; Beginning iPhone Development Turns out, I&#8217;m not quite ready for those books. But a peek at the first few pages in [...]]]></description>
			<content:encoded><![CDATA[<p>Hey, I&#8217;m starting to learn how to develop applications for the iPhone, so I thought I&#8217;d start sharing what I find along the way.</p>
<p>First, I picked up two books:</p>
<ul>
<li><a href="http://pragprog.com/titles/amiphd/iphone-sdk-development">iPhone SDK Development</a> &amp;</li>
<li><a href="http://apress.com/book/view/1430216263">Beginning iPhone Development</a></li>
</ul>
<p>Turns out,<strong><span style="font-weight: normal;"> I&#8217;m </span>not quite ready for those books</strong>. But a peek at the first few pages in each told me that  my Ruby background would help me learn the basics of C, Objective-C, and my Rails and RubyGem API experience should guide me through the iPhone SDK. If you&#8217;re like me, feel free to buy them now. The tutorials for C and Objective-C aren&#8217;t long, and the books promise this will be enough knowledge to learn with.</p>
<p>So the next thing I did (which <strong>should have been the first thing I did</strong>) was find C and Objective-C tutorials:</p>
<ul>
<li><a href="http://cocoadevcentral.com/articles/000081.php">Learn C for Cocoa</a><br />
&#8211; This is enough C knowledge to learn Objective-C</li>
<li><a href="http://cocoadevcentral.com/d/learn_objectivec/">Learn Objective-C</a></li>
</ul>
<p>I&#8217;m only up to &#8220;chapter&#8221; 6 on Objective-C, but so far the concepts are pretty simple. Some things I don&#8217;t like and other things I do like.</p>
<p><strong>In C, variable types must be declared.</strong> In Ruby, that&#8217;s not the case. And you have to use type conversion (casting) to get different results. If you&#8217;re confused about what this means, the <a href="http://cocoadevcentral.com/articles/000081.php">C for Cocoa tutorial</a> should help. I prefer Ruby&#8217;s duck typing. It&#8217;s less to write and worry about. Functions have to be typed, too. Yech.</p>
<p>In C, you can define a function and implement it later or in a separate file. I think that&#8217;s kind of nice. You can quickly scan what type the functions return, their names, their arguments and what types they should be; all without the code in between.</p>
<p>In C, you can declare your own types! That&#8217;s pretty cool. It&#8217;s kind of similar to creating a class in Ruby.</p>
<p>In Objective-C, so far I&#8217;ve created a class and I had to declare the getters, the setters and the methods. And the methods just return the getters that are set by the setters. It&#8217;s weird. But it&#8217;s probably just a ridiculously simplified model to teach me how those things interact.</p>
<p>That&#8217;s all for now. I&#8217;m going to keep sharing as I go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2010/05/23/resources-for-iphone-developer-beginners/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Build a slick portfolio w/ jQuery &amp; the Cycle slider plugin</title>
		<link>http://www.joesak.com/2010/04/09/build-a-slick-portfolio-w-jquery-the-cycle-slider-plugin/</link>
		<comments>http://www.joesak.com/2010/04/09/build-a-slick-portfolio-w-jquery-the-cycle-slider-plugin/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 21:55:29 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.joesak.com/?p=273</guid>
		<description><![CDATA[I posted a tutorial for using jQuery with Cycle at the Neoteric Design blog. I really love working there, and I may have some thoughts on that later. Please check it out: http://www.neotericdesign.com/blog/2010/04/build-a-slick-portfolio-w-jque.php]]></description>
			<content:encoded><![CDATA[<p>I posted <a href="http://www.neotericdesign.com/blog/2010/04/build-a-slick-portfolio-w-jque.php">a tutorial for using jQuery with Cycle</a> at the <a href="http://www.neotericdesign.com">Neoteric Design</a> blog. I really love working there, and I may have some thoughts on that later.</p>
<p>Please check it out:</p>
<p><a href="http://www.neotericdesign.com/blog/2010/04/build-a-slick-portfolio-w-jque.php">http://www.neotericdesign.com/blog/2010/04/build-a-slick-portfolio-w-jque.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2010/04/09/build-a-slick-portfolio-w-jquery-the-cycle-slider-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online Photo Gallery, Payment &amp; Order Fulfillment: Ruby on Rails Tutorial</title>
		<link>http://www.joesak.com/2009/09/18/online-photo-gallery-payment-order-fulfillment-ruby-on-rails-tutorial/</link>
		<comments>http://www.joesak.com/2009/09/18/online-photo-gallery-payment-order-fulfillment-ruby-on-rails-tutorial/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 16:51:04 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[Improving Code]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.joesak.com/?p=255</guid>
		<description><![CDATA[This post is a follow-up to the post on my personal blog, titled &#8220;Ruby on Rails Photo Gallery &#38; Shopping Cart with RESTful Authentication&#8221; In that article, I merely showed off what I&#8217;d done with Ruby on Rails, but I didn&#8217;t show anyone how. Well, I&#8217;ve gotten some comments from people asking me to show [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a follow-up to the post on <a title="Joe Sak's Web Development Blog" href="http://www.joesak.com">my personal blog</a>, titled &#8220;<a title="Ruby on Rails Photo Gallery &amp; Shopping Cart with RESTful Authentication" href="http://www.joesak.com/2009/05/31/ruby-on-rails-photo-gallery-shopping-cart-restful-authentication/">Ruby on Rails Photo Gallery &amp; Shopping Cart with RESTful Authentication</a>&#8221; In that article, I merely showed off what I&#8217;d done with Ruby on Rails, but I didn&#8217;t show anyone how. Well, I&#8217;ve gotten some comments from people asking me to show them how to build it.</p>
<p>That&#8217;s what this post is for.</p>
<p>So on to the nitty gritty details.</p>
<p>Start with the RESTful Authentication Tutorial:</p>
<p><script src="http://gist.github.com/189148.js"></script> <a></a> Follow the README to install, but <a title="Fix #1 to RESTful Authentication Install" href="http://railsforum.com/viewtopic.php?pid=96632#p96632">READ THIS FIRST</a> to fix the ExceptionLogger error  Then <a href="http://railsforum.com/viewtopic.php?pid=99223#p99223">follow these instructions</a> to fix the OpenID plugin error  Make sure you get your <a href="http://recaptcha.net/whyrecaptcha.html">recaptcha keys</a> for the config.yml, otherwise failed login attempts will bust your application.  Fill out the config &amp; database.yml files accordingly, run your database create &amp; migrate rakes, fire up the server and make sure it looks good. Cool? Let&#8217;s move on:  <strong>Define the objects</strong> Let&#8217;s begin by pointing out what, exactly, we&#8217;ll be building this application around: <strong>Galleries </strong>of <strong>Photos </strong>that <strong>Customers</strong> can order with a private <strong>Account</strong> provided to them by an <strong>Admin</strong> who can manage the galleries and review the <strong>Orders</strong>, which are also available to their respective customers.  I will go through how to set up the following models like so:</p>
<ul>
<li>Galleries
<ul>
<li>has_many :photos</li>
<li>belongs_to :customer</li>
<li>title</li>
<li>acts_as_urlnameable (pretty URLs)</li>
</ul>
</li>
<li>Photos
<ul>
<li>belongs_to :gallery</li>
<li>paperclip attachment: image</li>
</ul>
</li>
<li>Customers
<ul>
<li>username, password, full name</li>
</ul>
</li>
<li>Orders
<ul>
<li>has_many :line_items</li>
<li>belongs_to :customer</li>
</ul>
</li>
<li>Line Items
<ul>
<li>belongs_to <img src='http://www.joesak.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> rder</li>
<li>quantity, size, price</li>
</ul>
</li>
</ul>
<p>So let&#8217;s build the Galleries first:  <script src="http://gist.github.com/189161.js"></script></p>
<p>Then edit the Gallery model:</p>
<p><script src="http://gist.github.com/189149.js"></script> That&#8217;ll be fine for now. Let&#8217;s add the Photos model with paperclip image attached:  <script src="http://gist.github.com/189151.js"></script></p>
<p>Now edit the Photo model as such:</p>
<p><script src="http://gist.github.com/189152.js"></script> You should read all about <a href="http://thoughtbot.com/projects/paperclip">the paperclip gem</a> if you need more info on this model. Basically, we&#8217;re telling it to allow image attachments to the Photo model.  Customers can be the RESTful Authentication Tutorial User model, just need to add a couple things here:  <script src="http://gist.github.com/189153.js"></script></p>
<p>Let&#8217;s worry about Orders and Line Items later. We&#8217;ll have to add a cart, too. I&#8217;ll cover it, but it is all derived from <a href="http://www.pragprog.com/titles/rails3/agile-web-development-with-rails">Agile Web Development with Ruby on Rails Third Edition</a></p>
<p>Run your rake db:migrate and confirm all is well. Delete the Galleries layout file so it uses the application layout.</p>
<p>Let&#8217;s go see http://localhost:3000/galleries and play around. Add a gallery and then go to edit it. This is where we&#8217;ll add SWFUpload. <a href="http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/">Follow Jim Neath&#8217;s advice for this</a>.</p>
<p>You&#8217;ll want a photos controller:</p>
<p><script src="http://gist.github.com/189155.js"></script> The create method I use is:  <script src="http://gist.github.com/189156.js"></script></p>
<p>I had no luck getting Jim Neath&#8217;s session fix working, so I put skip_before_filter :verify_authenticity_token in the Photos Controller. Bad? Yea, probably. I haven&#8217;t found a better way yet.</p>
<p>Add this code to app/views/galleries/edit.html.erb:</p>
<p><script src="http://gist.github.com/189157.js"></script> Which leads you to add the following partial: app/views/photos/_image.html.erb  <script src="http://gist.github.com/189159.js"></script></p>
<p>We&#8217;ll worry about the destroy link later, let&#8217;s integrate swfupload. <a href="http://code.google.com/p/swfupload/">Download the latest copy of SWFUpload</a>. Copy flash/swfupload.swf to public/flash (make directory first). Copy swfupload.js &amp; upload.js (in Jim Neath&#8217;s demo app) to public/javascripts. Copy Jim Neath&#8217;s swfupload.css file to public/stylesheets. Copy Jim Neath&#8217;s images/icons folder to public/images.</p>
<p>Add this code to app/views/galleries/edit.html.erb:</p>
<p><script src="http://gist.github.com/189160.js"></script></p>
<p>Yep, a lot is going on there. Reload your galleries/edit page and see if it&#8217;s still working <img src='http://www.joesak.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ok, so this gets you to a functioning online photo gallery. Up next will be adding user accounts, a shopping cart, ordering options, customers &amp; paypal integration. Stay tuned!</p>
<p>For now, please find the <a href="http://github.com/joemsak/proofs_package">source</a> here: <a href="http://github.com/joemsak/proofs_package">http://github.com/joemsak/proofs_package</a></p>
<p>And for help on your project, visit us at <a href="http://www.simplifyadvance.com">http://www.simplifyadvance.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2009/09/18/online-photo-gallery-payment-order-fulfillment-ruby-on-rails-tutorial/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 6/16 queries in 0.009 seconds using disk

Served from: www.joesak.com @ 2010-09-08 02:13:30 -->