<?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>The Open Source U &#187; Technologies</title>
	<atom:link href="http://blog.theopensourceu.com/category/technologies/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.theopensourceu.com</link>
	<description>An Open-Source Discovery/Education Blog</description>
	<lastBuildDate>Fri, 07 May 2010 18:39:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Backup Issue</title>
		<link>http://blog.theopensourceu.com/2010/04/backup-issue/</link>
		<comments>http://blog.theopensourceu.com/2010/04/backup-issue/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 20:20:14 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[vpsBackup]]></category>

		<guid isPermaLink="false">http://blog.theopensourceu.com/?p=877</guid>
		<description><![CDATA[I needed a method to backup my web &#38; database servers; while there are a ton of great options out there such as rsync and unison, I found it difficult and time consuming to get the Linux server to sync to Windows*. My main problem was actually more ssh than anything else. Either I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a method to backup my web &amp; database servers; while there are a ton of great options out there such as <a title="rsync webpage" href="http://samba.anu.edu.au/rsync/">rsync</a> and <a title="unison web page" href="http://www.cis.upenn.edu/~bcpierce/unison/">unison</a>, I found it difficult and time consuming to get the Linux server to sync to Windows*. My main problem was actually more ssh than anything else. Either I don&#8217;t know enough about it or the software available on Windows isn&#8217;t as developed. (I&#8217;d love others&#8217; perspectives on this&#8230;)</p>
<p>Anyway, for the time being I decided that the easiest thing for me to do is to write my own little (python) program to handle the backup and automatic retrieval of said backup archives. I don&#8217;t push or pull a lot of data between the computers, so pulling full archives though the network (as opposed to the changed bits that rsync or unison would do) doesn&#8217;t matter so much to me. The most important part is that the backup is current.</p>
<p>The programs are by no means complicated or unique; in fact, they might be the simplest backup programs ever. I&#8217;ve posted the source code at <a title="Bit Bucket (my profile)" href="http://bitbucket.org/frankv01">BitBucket.org</a> and can be viewed at: <a title="vpsBackup at BitBucket - The backup solution for the server that runs this site." href="http://bitbucket.org/frankv01/vpsbackup">http://bitbucket.org/frankv01/vpsbackup</a></p>
<p>If you either end up using it or deriving a new backup solution from it, please drop me a line. I&#8217;d love to know that.</p>
<p><em>* </em>You might wonder why someone who writes-on (lives and breaths) open source would use windows&#8230;  The of matter of fact is my professional work (as of this writing, at least) is done on Windows &#8212; SQL Server and the .Net to be specific. I&#8217;ve never said anything bad about Microsoft nor will I. I believe that Open Source and traditional closed-source has their place. A software developer  can run their coded bases as desired. I, for one, prefer open source to closed-source &#8212; paid or otherwise.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2010/04/backup-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move a MySQL database &#8211; How To</title>
		<link>http://blog.theopensourceu.com/2010/04/move-a-mysql-database-how-to/</link>
		<comments>http://blog.theopensourceu.com/2010/04/move-a-mysql-database-how-to/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 16:01:44 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.theopensourceu.com/?p=808</guid>
		<description><![CDATA[I had to move one of my databases from the main OS drive to a different partition. Being that I&#8217;ve not administered my own mysql database before &#8212; nothing beyond SQL level administration &#8212; I needed to find some sort of guide. I found the following and was quite pleased; I thought that other might [...]]]></description>
			<content:encoded><![CDATA[<p>I had to move one of my databases from the main OS drive to a different partition. Being that I&#8217;ve not administered my own mysql database before &#8212; nothing beyond SQL level administration &#8212; I needed to find some sort of guide. I found the following and was quite pleased; I thought that other might be able to use this.</p>
<p><a title="Article at Ubuntu HowTo" href="http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive">How  to move MySql database to another drive or partition</a>.</p>
<p>While this post is not strictly about the internal workings of an open source software package, it does have to do with the administration of notable open source software and hence, worth this blog&#8217;s posting.</p>
<p><strong>The one thing to note</strong> is that the instructions seem out of date. The instructions were written using Ubuntu Server 7.10 (Gutsy Gibbon) as a basis. The instructions worked for me except for the <a title="AppArmor article at Wikipedia" href="http://en.wikipedia.org/wiki/AppArmor">apparmor</a> note below. I&#8217;m currently using Ubuntu Server 8.04 LTS.</p>
<p>You many need to modify apparmor&#8217;s configuration file and then restart the service.  You can see the conversation in the comments (on the article) about it, but the brief version of it is:</p>
<ol>
<li><em>Complete the <a title="Article at Ubuntu HowTo" href="http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive">main instructions</a> first (Understand the entire article before starting.)<br />
</em></li>
<li>Open <code class="codecolorer text default"><span class="text">nano /etc/apparmor.d/usr.sbin.mysqld</span></code></li>
<li>Modify entries pointing to the old location to point to then new location. This will look like: <code class="codecolorer text default"><span class="text">/var/www/mysql_datadir/ r, /var/www/mysql_datadir/** rwk,</span></code></li>
<li>Restart apparmor which can be done via: <code class="codecolorer text default"><span class="text">/etc/init.d/apparmor restart</span></code></li>
</ol>
<p>Again, the full article is: <a title="Article at Ubuntu HowTo" href="http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive">How to move MySql database to another drive or partition</a>.</p>
<p><a title="Article at Ubuntu HowTo" href="http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive">http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2010/04/move-a-mysql-database-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processes and Threads</title>
		<link>http://blog.theopensourceu.com/2010/04/processes-and-threads/</link>
		<comments>http://blog.theopensourceu.com/2010/04/processes-and-threads/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:53:27 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Multi-Threading]]></category>
		<category><![CDATA[Open Source Project]]></category>
		<category><![CDATA[tOSU-WebServer]]></category>
		<category><![CDATA[threads]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=708</guid>
		<description><![CDATA[I was having a conversation with a friend of my mine; we were discussing how computers organize the processes and threads. Essentially, how the processors (cores, actually) handle the various tasks required of them. This led me to my usage of Threads in the tOSU-WebServer and made me feel that some might benefit from a [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a conversation with a friend of my mine; we were discussing how computers organize the processes and threads. Essentially, how the processors (cores, actually) handle the various tasks required of them.</p>
<p>This led me to my usage of Threads in the tOSU-WebServer and made me feel that some might benefit from a practical, applied overview of the topic.</p>
<h2>What are Threads</h2>
<p>A computer consists of many components; the components are numerous and truly vary from computer-to-computer. A component that is key to a computer is the central processing unit. A while ago, when I started programing it was <em>almost </em>necessary to understand how a CPU works. These days, this isn&#8217;t so much the case.</p>
<p>The tOSU-WebServer utilizes threads; I&#8217;d suspect that most web servers would require this though I don&#8217;t believe this is a <em>strict</em> requirement<em>.</em></p>
<p>In order to understand tOSU, however, basic knowledge of threads will certainly be useful. To start, I think it is helpful to understand that computers can only accomplish so much at a given time. At one point, computers could only accomplish one thing at a time; this is quickly fading away as mutlicore processors are quite common these days.</p>
<p>But what does multicore actually mean? A core, in a general sense, is the component that does the actual calculations and logic. When you write: <code class="codecolorer text default"><span class="text">if( j &gt; 0 ) i = j + 2;</span></code>  A &#8216;core&#8217; actually handles both the logic and mathematics. This means that a dual core machine can do two of these concurrently, whereas a quad-core can do four of these at any given moment. More is better, but obviously there are dependencies upon previous steps.</p>
<h3>A simple example</h3>
<p>In order to help initial understanding of a program with multiple threads, I&#8217;ve put together a small Java &#8220;Hello,World&#8221; like program that utilizes multiple threads. This code is basic but should introduce the topics nicely. If you are new to threads, analyzing and running this program on your local computer will be greatly helpful.</p>
<p>The source code can be view directly at: <a title="MultiThreadedHelloWorld  / MultiThreadedHelloWorld.java " href="http://bitbucket.org/frankv01/multithreadedhelloworld/src/1b2f082eaf2b/MultiThreadedHelloWorld.java#">MultiThreadedHelloWorld.java</a></p>
<p>The output for the program ends up as:</p>
<pre>Hello World!
-&gt; Each Thread started. Waiting for all threads to complete
Hello, Becky
Hello, Frank
Hello, Heather
Hello, Jim
Hello, Evan
Hello, Charlie
Hello, Alex
Hello, Greg
Hello, Irene
Hello, Doug
-&gt; Done, exiting</pre>
<p>Note that the names were load loaded in to the <code class="codecolorer text default"><span class="text">ArrayList</span></code> in alphabetical order. This is one of the <em>things</em> of threads.</p>
<h2>tOSU-WebServer</h2>
<p>Anyway, using that as a basis, we can move on to the actual tOSU-WebServer. The server uses different threads for different tasks. Aside from the processing benefits, this separates code that responds to the client from code that handles incoming connections. The two are different tasks. The code that waits for incoming connections, will spawn (create) a thread to handle the incoming connection.</p>
<p>So, what handles what? The class &#8220;<code class="codecolorer text default"><span class="text">MyWebServer</span></code>&#8221; (<a title="view MyWebServer.java" href="http://bitbucket.org/frankv01/tosu-webserver/src/836b81b1dd86/src/com/theOpenSourceU/webserver/ui/MyWebServer.java">view</a>) (in the <code class="codecolorer text default"><span class="text">ui</span></code> package) handles the incoming connections. The &#8220;<code class="codecolorer text default"><span class="text">HttpWorker</span></code>&#8221; (<a title="view HttpWorker.java" href="http://bitbucket.org/frankv01/tosu-webserver/src/836b81b1dd86/src/com/theOpenSourceU/webserver/http/HttpWorker.java">view</a>) (in the <code class="codecolorer text default"><span class="text">http</span></code> package) handles the client request. Lets take a brief look at the code that is actively starting threads.</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>77<br />78<br />79<br />80<br />81<br />82<br />83<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asocket+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Socket</span></a> sock <span style="color: #339933;">=</span> servsock.<span style="color: #006633;">accept</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> _mode <span style="color: #339933;">==</span> ServerMode.<span style="color: #006633;">WebServer</span> <span style="color: #009900;">&#41;</span><br />
WorkerFactory.<span style="color: #006633;">newServerWorker</span><span style="color: #009900;">&#40;</span>sock, _pathToServeFrom, _dPrinter<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">else</span><br />
WorkerFactory.<span style="color: #006633;">newListener</span><span style="color: #009900;">&#40;</span>sock, _dPrinter<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>This snippet is lines 77 though 85 in file <a title="view MyWebServer.java" href="http://bitbucket.org/frankv01/tosu-webserver/src/836b81b1dd86/src/com/theOpenSourceU/webserver/ui/MyWebServer.java">MyWebServer.java</a> <a title="tOSU-WebServer @ BitBucket - Tagged Revision" href="http://bitbucket.org/frankv01/tosu-webserver/src/836b81b1dd86/">tagged as v0.5.2</a>. There is actually much more here than we needed but using this actual, running code should make the example easier to follow. Either method, <code class="codecolorer text default"><span class="text">newServerWorker()</span></code> or <code class="codecolorer text default"><span class="text">newListener()</span></code> return a class that is a instance of <code class="codecolorer text default"><span class="text">Thread</span></code>. (<a title="Thread - Java 6 SE API" href="http://java.sun.com/javase/6/docs/api/java/lang/Thread.html">Thread in the Java API</a>). Once we call the <code class="codecolorer text default"><span class="text">start()</span></code> method, the computer returns to line 78 to wait for a new incoming connection and <strong>concurrently </strong>the thread starts executing. If you recall, it executes the content of the instances&#8217; <code class="codecolorer text default"><span class="text">run()</span></code> method and this runs regardless if a new connection is received and additional <code class="codecolorer text default"><span class="text">start()</span></code> methods are called. Each connection is handled independently of the other even if all responses go back to the client.</p>
<p>That is pretty much all there is to it. From the start, it might have sounded complex, but in reality it is simpler. Coordinating large, multi-threaded programs, however, can become complex &#8212; particularly in regards to passing data and coordinating such handling. This topic is an entirely different blog entry. Thank you for reading. Please leave comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2010/04/processes-and-threads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Presenting tOSU Web Server &#8211; An open source web server</title>
		<link>http://blog.theopensourceu.com/2010/03/presenting-tosu-web-server-an-open-source-web-server/</link>
		<comments>http://blog.theopensourceu.com/2010/03/presenting-tosu-web-server-an-open-source-web-server/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 23:30:28 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[Graduate School]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Multi-Threading]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Understanding Software]]></category>
		<category><![CDATA[tOSU-WebServer]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=600</guid>
		<description><![CDATA[I&#8217;ve just finished my Winter 2010 term for my graduate degree. I took two classes this term, SE-450 and CSC-435. Both classes were great, but taking them concurrently was not a great idea. Nevertheless, I have something to share which is ultimately a derivative of the two classes. One of the project assignments in CSC-435 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished my Winter 2010 term for my graduate degree. I took two classes this term, <a title="CDM - SE-450" href="http://mycti.cti.depaul.edu/programs/courses_mycti.asp?deptmne=SE&amp;courseid=450">SE-450</a> and <a title="DePaul - CSC-435" href="http://mycti.cti.depaul.edu/programs/courses_mycti.asp?deptmne=CSC&amp;courseid=435">CSC-435</a>. Both classes were great, but taking them concurrently was not a great idea. Nevertheless, I have something to share which is ultimately a derivative of the two classes. One of the project assignments in CSC-435 &#8211; Distributed Systems I &#8211; was to create a web server. We were given the basics of how a web server and client works, but then left to our own devices to gather the HTTP response codes and other such information. My intention is to share a good portion of <em>the basics</em> here but then also my web server (slightly modified for this site).</p>
<h2>Background</h2>
<p>Web servers (and browsers) work on top of basic <a title="Socket at Wikipedia" href="http://en.wikipedia.org/wiki/Socket">sockets</a>. While this entry isn&#8217;t going to be a comprehensive introduction to the networking technologies involved, one area that is key to the web server is the idea of <strong>sockets</strong>. A socket is defined as a communication channel in which two programs can communicate. The communication takes place over ports.</p>
<p>Now, we need to understand how to use a <a title="Java 6 SE API - Socket" href="http://java.sun.com/javase/6/docs/api/java/net/Socket.html">Socket</a> in Java which is the implementation language for the <strong>tOSU Web Server</strong>. Java (SE 6) has two implementations for a Socket. One is the <code class="codecolorer text default"><span class="text">ServerSocket</span></code> and the other is a <code class="codecolorer text default"><span class="text">Socket</span></code>. The former, waits for incoming socket connections. Essentially, it becomes the server. The <code class="codecolorer text default"><span class="text">socket</span></code>, on the other hand, is a incoming connection; it becomes the communication channel between the client and the server.</p>
<p>The high level idea of creating a web server is to create a <code class="codecolorer text default"><span class="text">ServerSocket</span></code> instances and wait for incoming connections. Assuming it receives a properly formatted request for a HTTP server, we handle the request and return data &#8212; web pages &#8212; to the client. The question is, what constitutes a <em>valid</em> HTTP request.</p>
<h3>The HTTP Request</h3>
<p>HTTP is nothing more than a protocol. We&#8217;ve all heard this, I&#8217;m not sure we all know what this means. A protocol is <a title="Protocol on Wikipedia" href="http://en.wikipedia.org/wiki/Protocol_%28computing%29">merely a set of rules</a>. I don&#8217;t believe that a protocol is anything more or anything less.  The <a title="HTTP definition" href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP protocol</a> is actually quite comprehensive but creating the tOSU-WebServer has taught me that we do not need to implement the entire protocol for a  pedagogical web server application. We simply need to provide the basics, perhaps a little more, and it&#8217;ll  work. This is what my web server represents.</p>
<div id="attachment_614" class="wp-caption alignright" style="width: 310px"><a href="http://theopensourceu.com/wp-content/uploads/2010/03/httpfox-tOSU.png"><img class="size-medium wp-image-614 " title="HttpFox results for Cat.html " src="http://theopensourceu.com/wp-content/uploads/2010/03/httpfox-tOSU-300x108.png" alt="HttpFox results for Cat.html" width="300" height="108" /></a><p class="wp-caption-text">HttpFox results for  Cat.html </p></div>
<p>I learned about the protocol in two ways, neither had to do with reading the actual published documentation. I utilized a Firefox Plug in called <a title="HttpFox :: Add-ons for Firefox" href="https://addons.mozilla.org/en-US/firefox/addon/6647">HttpFox</a> to review the server/client communication between an existing web server (the Apache server for this site) serving a simple HTML page and I created (as an assignment) a &#8220;Listener&#8221; / echo program. The listener program is built-in (as a switch) to the tOSU-WebServer. I&#8217;ll cover utilizing this in the following sections. The screen capture on the right is my results for retrieving a HTML file called &#8220;cat.html (click on the image to zoom-in).</p>
<p>The top row is a single request; if you enable Httpfox for a request on this site, you&#8217;ll notice that several requests are made. Each resource (html, css, images) become a request. The left side is the request header (for the selected request) or what Firefox sent to the web server. The right side is what the web server responded to Firefox. Our web server implementation must accept and read in the request header, process it, and along with the html page / data return the response header to the client.</p>
<p>As I write that, it sounds like a lot but it really isn&#8217;t hard to do. There are only a few required items on each side. The important line in the request header (from the client) is the &#8220;(Request-Line)&#8221; and on the client side the &#8220;(Status-Line)&#8221;.  The request-line is what the browser is requesting &#8212; the file. The status line is the response. You can view is a <a title="List of HTTP status codes on Wikipedia" href="http://en.wikipedia.org/wiki/Http_status_codes">list of common status codes</a> on Wikipedia but again, only a small subset is pertinent to the implementation of a simple web server.</p>
<h3>Headers as Implemented</h3>
<p>The headers that tOSU-WebServer must read and generate is quite straight forward.</p>
<p>The line we must process from the client browser is the request line which looks like <code class="codecolorer text default"><span class="text">GET /overview-summary.html HTTP/1.1</span></code>.  The <code class="codecolorer text default"><span class="text">GET</span></code> indicates that the browser wants to get a file, the <code class="codecolorer text default"><span class="text">/overview-summary.html</span></code> is the file we want and the <code class="codecolorer text default"><span class="text">HTTP/1.1</span></code> is the protocol the client is using &#8212; the format of the request. This single line is the only relevant line we are interested in. The client sends more but tOSU-WebServer ignores the remaining items.</p>
<p>The web server must respond with a few more lines but it still is not extensive. The first line, as previously mentioned, is the status line. This is formatted as <code class="codecolorer text default"><span class="text">HTTP/1.1 200 OK</span></code>. The <code class="codecolorer text default"><span class="text">200</span></code> and <code class="codecolorer text default"><span class="text">OK</span></code> can be various numbers and statues, but the idea holds. The <code class="codecolorer text default"><span class="text">HTTP/1.1</span></code> is the response protocol.</p>
<p>The next two lines is <code class="codecolorer text default"><span class="text">Content-Length: 500</span></code> (where &#8220;500&#8243; is <a title="Content-Length Reference in HTTP 1.1" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13">the size in bytes</a>) and <code class="codecolorer text default"><span class="text">Content-Type: text/html</span></code> where <code class="codecolorer text default"><span class="text">text/html</span></code> is the appropriate <a title="MIME type on Wikipedia" href="http://en.wikipedia.org/wiki/MIME_type">MIME type.</a></p>
<p>Each one of these must be terminated with a carriage-return and then newline. In Java, this is delimited by <code class="codecolorer text default"><span class="text">\r\n</span></code>.  Finally, to indicate that headers are complete, we send <code class="codecolorer text default"><span class="text">\r\n\r\n</span></code>. The browser would then expect the content.</p>
<h2>tOSU WebServer</h2>
<p>First, where is the code? I&#8217;ve placed the code on <a title="BitBucket's home page" href="http://bitbucket.org/">BitBucket</a>. The BitBucket project path is: <a title="BitBucket - tOSU Web Server Repo" href="http://bitbucket.org/frankv01/tosu-webserver/overview/">http://bitbucket.org/frankv01/tosu-webserver/overview</a> BitBucket provides a software project with various services, one of which is a <a title="Mercurial's site" href="http://mercurial.selenic.com/">Mercurial</a> based repository. The site also has the option to retrieve archived versions of the <em>tip</em> of the repository. This option currently exists on the page above on the far right called &#8220;<strong>get source</strong>&#8220;.</p>
<p>The command to clone the repository (full history) is:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hg clone http://bitbucket.org/frankv01/tosu-webserver/ tOSU-WebServer</div></div>
<p>This will give you a repository clone where you issued the command, called tOSU-WebServer; this is essentially the project&#8217;s name (for lack of a better one). <em>Note</em>: This article is being written against the tag &#8220;v0.5.x&#8221;. Once  you clone the repository, run &#8220;<code class="codecolorer text default"><span class="text">hg update v0.5.1</span></code>&#8221;</p>
<p>While I&#8217;d love to review everything, including the architecture, this inaugural post can only include so much information. I figure the first aspect is understanding the overall architecture enough to looking though the code. Then we&#8217;ll take a look at the specific code segments that process incoming requests.</p>
<h3>Architecture</h3>
<p>As I stated at the start of this post, this program was developed while I attended an object-orientated architecture course <strong>and</strong> a distributed computing course. This combination made this program take on an architecture that is likely more complex than it needed to be, but is strongly OO in nature. This design led to a large number of classes but each with a finite task to accomplish. I beleive that this will make it easier to understand&#8230; once you can follow the design.  <strong>Please</strong> feel free to ask questions. I learn by teaching and I can only improve articles like this by receiving questions.</p>
<h3>Package Layout &amp; Design</h3>
<p>I&#8217;ve used packages to organize the program; understanding these should make it easier to find what you might be looking for.</p>
<ul>
<li><code class="codecolorer text default"><span class="text">com.theOpenSourceU.webserver.arguments</span></code> : A package to handle command-line argument/flag processing and parsing.</li>
<li><code class="codecolorer text default"><span class="text">com.theOpenSourceU.webserver.debugutil</span></code> : A package to handle text based debug and error messages.</li>
<li><code class="codecolorer text default"><span class="text">com.theOpenSourceU.webserver.http</span></code> : The core of the program, this contains the code that ultimately <em>is</em> the web server.</li>
<li><code class="codecolorer text default"><span class="text">com.theOpenSourceU.webserver.ui</span></code> : Contains the main executing class; the program to launch and manage the various pieces of the web server.</li>
</ul>
<h3>What <code class="codecolorer text default"><span class="text">main</span></code> does</h3>
<p>Since the goal is to understand how the program works, lets review what the program actually does. The file we are reviewing is the MyWebServer.java (in the <code class="codecolorer text default"><span class="text">ui</span></code> package), which contains a class called (surprise) <code class="codecolorer text default"><span class="text">MyWebServer</span></code>.</p>
<p>What the program basically does is:</p>
<ol>
<li>Process any given arguments, setting class level fields.</li>
<li>Get a new instances of <code class="codecolorer text default"><span class="text">ServerSocket</span></code>. When we construct the new instances, we give it the port (<code class="codecolorer text default"><span class="text">_port</span></code>) and the queue size. Both values will be covered later.</li>
<li>Next, we call <code class="codecolorer text default"><span class="text">servsock.accept()</span></code> which is a blocking call; it will block the program until a connection is received.</li>
<li>Once a connection is received (via the port) the program will receive an instance of that and stash it in <code class="codecolorer text default"><span class="text">sock</span></code>.</li>
<li>Depending on the server mode, either a new Server Worker will be created and started or a new listener. Each of these are different modes and are set via the arguments. Note that each one of these are a derivative of a <code class="codecolorer text default"><span class="text">Thread</span></code> and hence we are starting new threads upon calling <code class="codecolorer text default"><span class="text">start()</span></code></li>
<li>Go back to 3 to wait for another connection.</li>
</ol>
<p>This is the gist of the programs flow. The details of handling the request are handled in the <code class="codecolorer text default"><span class="text">http</span></code> package. We&#8217;ll review this package in the next section.</p>
<h3>Implementation</h3>
<p>The <code class="codecolorer text default"><span class="text">http</span></code> package contains various classes, only a small subset is actually public.  We&#8217;ll review a few classes in the next few paragraphs however, the best way to review all of the classes is to generate the javadoc files and review those.</p>
<p>In the earlier section, we saw the class <code class="codecolorer text default"><span class="text">WorkerFactory</span></code>. This is a class to generate appropriate instances of the two works contained in the package. A <code class="codecolorer text default"><span class="text">worker</span></code> is a class derived from <code class="codecolorer text default"><span class="text">Thread</span></code> that performs some task, in our case handle http requests. The two concrete classes that can be generated are <code class="codecolorer text default"><span class="text">HttpWorker</span></code> and <code class="codecolorer text default"><span class="text">MyListener</span></code>.</p>
<p>The <code class="codecolorer text default"><span class="text">HttpWorker</span></code> class is the class of interest here. This class becomes the worker thread that handles the request sent to the server. Another way to put this is that this is what the client-browser is actually talking to, and not the <code class="codecolorer text default"><span class="text">MyWebServer</span></code> instances. This is how the web server can handle several requests at once.</p>
<p>Since we are on it, why don&#8217;t we continue on from the <code class="codecolorer text default"><span class="text">HttpWorker</span></code> class. The class extends <code class="codecolorer text default"><span class="text">Thread</span></code> and we are implementing the run method. Let&#8217;s not go in to detail, but this is the code that processes the request and ultimately provides the content to sends back to the client browser.  Inside this method, we reference another factory &#8212; <code class="codecolorer text default"><span class="text">HttpContentFactory</span></code>. This factory can provide implementations of <code class="codecolorer text default"><span class="text">HttpContent</span></code> for a variety of files types, including css, html and a made up dynamic page. (Images weren&#8217;t working <a title="Status of issue 1" href="http://bitbucket.org/frankv01/tosu-webserver/issue/1/images-are-not-served">Status</a>)</p>
<p>The contrast to <code class="codecolorer text default"><span class="text">HttpContent</span></code> is the <code class="codecolorer text default"><span class="text">HttpClientHeaders</span></code> instance. This represents what becomes the server response headers. This web server only supports a few codes (recall, not all need to be supported). The class <code class="codecolorer text default"><span class="text">HttpClientHeadersImpl</span></code> provides support a 404 error, 500 error (internal server error) and 200 success status. The implementation details are not relevant to this initial introduction but it is important to know that the <code class="codecolorer text default"><span class="text">HttpWorker</span></code> class can&#8217;t complete it&#8217;s job without an instance of this to report status (success/error) to the client.</p>
<p>From here, <code class="codecolorer text default"><span class="text">HttpWorker</span></code> <em>renders</em> these two instances and sends the contents back to the original request.</p>
<h3>More to Come&#8230;</h3>
<p>In the details, the program does a lot more than what I&#8217;ve outlines in the last few sections. However, I suspect that wrapping your hands around these first sections can make reviewing the source code less intimidating.</p>
<p>If you have any questions or feel that the article above can be improved, please let me know via the comments. I hope to post more educational articles on tOSU-WebServer and I would greatly appropriate direction. If you are interested in a particular section, please let me know (again, via the comments). <em>Oh,</em> and don&#8217;t forget to <em>follow</em> the project on BitBucket.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2010/03/presenting-tosu-web-server-an-open-source-web-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Tools of Open Source</title>
		<link>http://blog.theopensourceu.com/2009/10/the-tools-of-open-source/</link>
		<comments>http://blog.theopensourceu.com/2009/10/the-tools-of-open-source/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 20:44:19 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[FireFox]]></category>
		<category><![CDATA[Open Source Project]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Understanding Software]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=480</guid>
		<description><![CDATA[As some readers will know, I&#8217;ve been working to study the architecture of FireFox. One thing I realize is that I&#8217;m not as familiar as I should be with some of the common open source tools, or what I consider to be the common open source tools. Below is a list of tools that are [...]]]></description>
			<content:encoded><![CDATA[<p>As some readers will know, I&#8217;ve been working to study the architecture of FireFox. One thing I realize is that I&#8217;m not as familiar as I should be with some of the common open source tools, or what I consider to be the common open source tools.</p>
<p>Below is a list of tools that are worth learning (in my opinion). I&#8217;ve also included a short description of why it might be worth learning them. (The list is in no particular order)</p>
<p>If you have an interest in open source, it will not hurt to get a quick base understanding of each of these. I&#8217;m not saying you (nor am I trying to) become an expert in each of these tools. However, having a basic understanding of syntax and function should save time and headache while trying to understand a project.</p>
<ol>
<li><strong>Linux</strong>: The concepts in and around Linux are often used on other open source products. I think Open Source developers tend to stick with using open source software. So, there is a link there.</li>
<li><strong>Bash</strong>: The de-facto standard shell for Linux (as far as I can tell). Knowing the basic usage of bash can save you time and confusion.  Certain scripts can depend on feature of your terminal interface. <a title="Mac OS X and bash" href="http://macdevcenter.com/pub/a/mac/2004/02/24/bash.html">The Mac OS X ships with a version of bash</a>, which is good to know&#8230;</li>
<li><strong>GCC</strong>: This is the GNU Compiler Collection and is often a requirement to build open source packages.</li>
<li><strong>Make</strong>: This is a part of the GCC but I want to make special mention of this because knowing how to read the script files and error messages can help diagnose an error.</li>
<li><strong>C / C++</strong>: Low Level libraries are often written in C or C++, even for an otherwise Java or Python based program.</li>
<li><strong>Python: </strong>Python is sometimes used in conjunction with Make to check for build dependencies, verify (build) requirements, or many other possible things.</li>
<li><strong>Perl:</strong> Often used like Python, from what I understand but I&#8217;ve yet to learn much about it.</li>
<li><strong>Subversion</strong>: This is the most common open source <a title="Version Control System at Wikipedia" href="http://en.wikipedia.org/wiki/Version_control_system">VCS</a> software in use (based on my own observations)</li>
<li><strong>Mercurial:</strong> One of the two popular <a title="Distributed Revision Control System at Wikipedia" href="http://www.wikipedia.org/wiki/Distributed_Version_Control_System">DVCS </a>systems. I&#8217;ve noticed more and more open source projects switching to DVCSs, so a basic working knowledge of Mercurial and Git is helpful.</li>
<li><strong>git</strong>: The second of the two popular DVCS systems.</li>
</ol>
<p>If you&#8217;d like to contribute to the list, please leave a comment below but please ensure you include a fair reason.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2009/10/the-tools-of-open-source/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using COALESCE to Build Comma-Delimited String directly in SQL</title>
		<link>http://blog.theopensourceu.com/2009/10/using-coalesce-to-build-comma-delimited-string/</link>
		<comments>http://blog.theopensourceu.com/2009/10/using-coalesce-to-build-comma-delimited-string/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 18:46:50 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=488</guid>
		<description><![CDATA[The following article covers a great should-know piece of information for any SQL Server developer. Though, comma delimited strings are not usually desired in database, it can be nice to receive data this way for things like embedding in to a query string or passing over a web service*. http://www.sqlteam.com/article/using-coalesce-to-build-comma-delimited-string *I don&#8217;t necessarily suggest the [...]]]></description>
			<content:encoded><![CDATA[<p>The following article covers a great should-know piece of information for any SQL Server developer. Though, comma delimited strings are not usually desired in database, it can be nice to receive data this way for things like embedding in to a query string or passing over a web service*.</p>
<p><a title="Build a Comma-Delimited string on SQL Server with SQL!" href="http://www.sqlteam.com/article/using-coalesce-to-build-comma-delimited-string">http://www.sqlteam.com/article/using-coalesce-to-build-comma-delimited-string</a></p>
<p>*<small>I don&#8217;t necessarily suggest the web service idea. I was just saying for illustrative purposes&#8230;</small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2009/10/using-coalesce-to-build-comma-delimited-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Memory Performance</title>
		<link>http://blog.theopensourceu.com/2009/10/python-memory-performance/</link>
		<comments>http://blog.theopensourceu.com/2009/10/python-memory-performance/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 16:32:05 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=487</guid>
		<description><![CDATA[I&#8217;ve been studying Python because it is extensively used in open source projects to script certain types of work or actions. I think Mozilla uses it to verify build time requirements, for example. But, python itself is a full fledged programming language &#8212; not really a scripting language. In fact, Mercurial is written in Python [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been studying Python because it is extensively used in open source projects to script certain types of work or actions. I think Mozilla uses it to verify build time requirements, for example.</p>
<p>But, python itself is a full fledged programming language &#8212; not really a scripting language. In fact, Mercurial is written in Python which at first amazed me.</p>
<p>So, anyway as part of my pursuit of studying Firefox, I thought I should (at least) learn the basics of Python so that I could read any relevant scripts. Python is quite different from other languages I&#8217;ve encountered.</p>
<p>One thing I started to notice about python is that it seems to use more memory. I&#8217;m not sure, nor am I suggesting that it uses more than other languages. I just noticed that memory consumption seemed to grow rapidly when running a python script.</p>
<p>The following article seems to explain why. Instantiating a class is expensive. <a title="Python Memory Usage: What values are taking up so much memory?" href="http://www.valuedlessons.com/2008/10/blog-post.html">According to the article</a>, a class is 336 bytes. Since in general, a class will use multiple other classes, I can see why memory consumption was growing rapidly.</p>
<p>Ultimately, I don&#8217;t think it matters. You just need to be aware that it happens. A modern computer will run the script without any notice to this phenomenon. You&#8217;d need to create a lot of objects to cause a problem. But I do beleive it is worth acknowledge that it happens so that you can be aware of the memory usage. It&#8217;s mostly noticeable on my work computer (the company provided) which only has 1 GBs of RAM (it runs Windows XP).</p>
<p><a title="Python Memory Usage: What values are taking up so much memory?" href="http://www.valuedlessons.com/2008/10/blog-post.html">http://www.valuedlessons.com/2008/10/blog-post.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2009/10/python-memory-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Undocumented Methods in NSIndexPath &#8211; Row, Section</title>
		<link>http://blog.theopensourceu.com/2009/05/undocumented-methods-in-nsindexpath-row-section/</link>
		<comments>http://blog.theopensourceu.com/2009/05/undocumented-methods-in-nsindexpath-row-section/#comments</comments>
		<pubDate>Tue, 12 May 2009 03:03:24 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[iPhone Development]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=291</guid>
		<description><![CDATA[Did you know that the NSIndexPath object apparently has undocumented properties / methods? I&#8217;m working on a hobby iPhone OS Application that I hope to release and I&#8217;ve been trying to figure out how to use the instances of indexPath provided by: tableView:cellForRowAtIndexPath: Full protocol: 12tableView:&#40;UITableView *&#41;tableView &#160; &#160; cellForRowAtIndexPath:&#40;NSIndexPath *&#41;indexPath I was flipping though [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that the <a title="NSIndexPath class Reference" href="http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/Reference/Reference.html">NSIndexPath object</a> <em>apparently</em> has undocumented properties / methods? I&#8217;m working on a hobby iPhone OS Application that I hope to release and I&#8217;ve been trying to figure out how to use the instances of indexPath provided by: <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDataSource/tableView:cellForRowAtIndexPath:">tableView:cellForRowAtIndexPath:</a></p>
<p>Full protocol:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView <br />
&nbsp; &nbsp; cellForRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/"><span style="color: #400080;">NSIndexPath</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath</div></td></tr></tbody></table></div>
<p>I was flipping though my iPhone Dev book and was reminded that we have a section method in the instances of indexPath. I just wanted to post this here because this is (at this time) not on apple&#8217;s documentation.</p>
<p>Thus far, there are two that I want to mention: section and row.  Both of these most iPhone developers will know about&#8230; except if you are new at this&#8230; Then this can be perplexing&#8230;</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; NSUInteger section <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>indexPath section<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; NSUInteger row <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>indexPath row<span style="color: #002200;">&#93;</span>;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2009/05/undocumented-methods-in-nsindexpath-row-section/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great SQL Server Tip</title>
		<link>http://blog.theopensourceu.com/2009/05/great-sql-server-tip/</link>
		<comments>http://blog.theopensourceu.com/2009/05/great-sql-server-tip/#comments</comments>
		<pubDate>Fri, 08 May 2009 21:40:30 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=286</guid>
		<description><![CDATA[A couple of great blog articles on sp_msforeachtable. This is an undocumented stored procedure.]]></description>
			<content:encoded><![CDATA[<p>A couple of great blog articles on sp_ms<strong>ForEachTable</strong>. This is an undocumented stored procedure.</p>
<p><a title="http://www.shanedevane.net/msforeachtable" href="http://www.shanedevane.net/msforeachtable">http://www.shanedevane.net/msforeachtable</a><br />
<a href="http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/">http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/</a></p>
<p><a title="Undocumented System Procedure 'sp_MSforeachtable' and the @whereand parameter - Stack Overflow" href="http://stackoverflow.com/questions/977400/undocumented-system-procedure-spmsforeachtable-and-the-whereand-parameter">http://stackoverflow.com/questions/977400/undocumented-system-procedure-spmsforeachtable-and-the-whereand-parameter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2009/05/great-sql-server-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book Review: Beginning iPhone Development</title>
		<link>http://blog.theopensourceu.com/2009/04/book-review-beginning-iphone-development/</link>
		<comments>http://blog.theopensourceu.com/2009/04/book-review-beginning-iphone-development/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 18:29:49 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[iPhone Development]]></category>

		<guid isPermaLink="false">http://theopensourceu.com/?p=271</guid>
		<description><![CDATA[I&#8217;ve been wanting to learn how to develop iPhone applications for a while&#8230; Basically since the platform hit the streets. I found out the hard way that you need a Intel based Mac OS X computer to do so. That left me out in the cold because I didn&#8217;t want to buy a Mac Computer [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wanting to learn how to develop iPhone applications for a while&#8230; Basically since the platform hit the streets. I found out the hard way that you need a Intel based Mac OS X computer to do so.</p>
<p>That left me out in the cold because I didn&#8217;t want to buy a Mac Computer just to do this, but I did. I bought a <a title="Apple MacBook" href="http://www.apple.com/macbook/">MacBook</a> because I wanted a laptop. On a side note, I love the computer. The hardware is much better than Dell (whose been sliding on the quality of their hardware) and furthermore, Mac OS X is very, very elegant.</p>
<p>Anyway, I dived in to the iPhone SDK with the hopes of getting my first program out the door quickly. While I was able to get programs together and working, the platform is very, very different. To top it all off, the programming language is Objective-C which is quite different from any other language I&#8217;ve used.</p>
<div class="wp-caption alignleft" style="width: 237px"><img title="Beginning iPhone Development: Exploring the iPhone SDK" src="http://ecx.images-amazon.com/images/I/41ejKMzh6rL.jpg" alt="Beginning iPhone Development: Exploring the iPhone SDK" width="227" height="300" /><p class="wp-caption-text">Beginning iPhone Development: Exploring the iPhone SDK</p></div>
<p>I was up to the challenge but I needed help, so I recruited a book. The book is: <a title="Beginning iPhone Development: Exploreing the iPhone SDK homepage" href="http://www.apress.com/book/view/1430216263" target="_blank">Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark and Jeff LaMarche</a>.</p>
<p>The book was wonderful; I read it cover to cover in about 1 month. There are a few typos but I&#8217;m sure they&#8217;ll be corrected in a revision release, I&#8217;m sure. It is easy to read and easy to follow. I feel I understand everything the book was trying to tell us about. The authors go in to each topic enough for you to understand what they are talking about but they never go so far that they &#8220;lose you&#8221;.</p>
<p>A wonderful aspect is that their is an active forum to answer questions specifically about your work or learning in the book. Since others have gone though the capture, other readers can normally hep. Though, if all else fails, the authors will help you.</p>
<p>This book won&#8217;t make you a master iPhone developer, but it lays a very solid foundation in which to build your skills upon.</p>
<p><strong>Overall, I highly recommend this book for anyone who wants to learn about developing iPhone or iPod touch applications.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.theopensourceu.com/2009/04/book-review-beginning-iphone-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
