<?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>Brandon&#039;s Blog &#187; cms</title>
	<atom:link href="http://www.foszor.com/blog/tag/cms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.foszor.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 01 Sep 2011 21:26:46 +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>Writing a CMS</title>
		<link>http://www.foszor.com/blog/2008/10/writing-a-cms/</link>
		<comments>http://www.foszor.com/blog/2008/10/writing-a-cms/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 20:02:29 +0000</pubDate>
		<dc:creator>brandon</dc:creator>
				<category><![CDATA[Website]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.foszor.com/blog/?p=32</guid>
		<description><![CDATA[*** Preface: For those who want to further read about what a CMS is click here A content management system (CMS) is a computer application used to create, edit, manage, and publish content in a consistently organized fashion So the last website design I cooked up was pretty neat, but I&#8217;m remaking it (see my [...]]]></description>
			<content:encoded><![CDATA[<p><small>*** Preface: For those who want to further read about what a CMS is click <a href="http://en.wikipedia.org/wiki/Content_management_system">here</a></small></p>
<blockquote><p>A content management system (CMS) is a computer application used to create, edit, manage, and publish content in a consistently organized fashion</p></blockquote>
<p>So the last website design I cooked up was pretty neat, but I&#8217;m remaking it (<em>see my previous post to understand why</em>). The other thing I&#8217;m focusing on is the script that drives the site. Last time it was a rudimentary PHP script that just spit out content. This time I&#8217;ve taken a step back and decided to do it <strong>RIGHT</strong>.</p>
<p>I&#8217;m going to write it myself from the ground up. Its easy enough to go with some prepackaged script some nerds put together, but then I&#8217;ll end up hacking the shit out of it to make it do what I want&#8230; so whats the point in using it in the first place? The other reason to write this myself is because the website interacts with the game server so much; I want to make sure I have as much control over this as possible.</p>
<p>Here&#8217;s some cool things I&#8217;ve learned that you should all use at one point or another in a PHP script:</p>
<ul>
<li>Classes. Use classes or you&#8217;re and idiot. Object orientated programming is your friend.</li>
<li><a href="http://us3.php.net/ob_start">ob_start</a>&#8230; look this function up and harness its power.</li>
<li>Just like any application, make your web applications modular. God kicks a puppy in the face every time you don&#8217;t.</li>
<li>Comment your code. Even if you&#8217;re the only person that&#8217;s ever going to look at it, it helps you debug and sometimes even reminds you what the fuck you were thinking.</li>
</ul>
<p>I don&#8217;t think I&#8217;ll make a template system. I&#8217;ll just make a hybrid index.php that renders the basic site layout and calls functions to display content. I&#8217;ve tossed around the idea of making templates, but I think its a waste of time for what my needs are.</p>
<p>I&#8217;m still working on the new site design&#8230; I&#8217;m getting closer. One step closer I guess, but now I&#8217;m off to play some Xbox 360.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foszor.com/blog/2008/10/writing-a-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

