<?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>Connecting the dots... &#187; product development cycle</title>
	<atom:link href="http://blog.rajatpandit.com/tag/product-development-cycle/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rajatpandit.com</link>
	<description>Thoughts on Web Development, Infrastructure and Application Scalability</description>
	<lastBuildDate>Thu, 29 Dec 2011 13:21:11 +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>using svn for development in symfony</title>
		<link>http://blog.rajatpandit.com/2009/02/08/using-svn-for-development-in-symfony/</link>
		<comments>http://blog.rajatpandit.com/2009/02/08/using-svn-for-development-in-symfony/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 15:36:14 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bug fixes]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[directory structure]]></category>
		<category><![CDATA[dramatic changes]]></category>
		<category><![CDATA[empty directory]]></category>
		<category><![CDATA[initial directory]]></category>
		<category><![CDATA[iteration]]></category>
		<category><![CDATA[nature of the product]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[product development cycle]]></category>
		<category><![CDATA[repos]]></category>
		<category><![CDATA[secret project]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=204</guid>
		<description><![CDATA[The recent project that I am working on for a client has taught me more about svn than I ever did because of the complex nature of the product. It...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.rajatpandit.com/wp-content/uploads/2009/02/tdgts_pile.jpg" alt="Symfony" title="Symfony" width="300" height="410" class="alignright size-full wp-image-206" />The recent project that I am working on for a client has taught me more about <code>svn</code> than I ever did because of the complex nature of the product. It has been going through a proper product development cycle which involves quick iteration of features and sometimes, such dramatic changes that can make the entire code base unstable for weeks until the change is brought about.<br />
In addition to that, I have always preferred to work with the latest version of symfony so that I am always up-to-date in terms of bug fixes and manage to provide the very best of code base.</p>
<p>I trolled through the <code>svn</code> manuals and <a href="http://stereointeractive.com/blog/2008/12/10/starting-a-new-symfony-project/">some really interesting blog posts</a> and summarizing the steps that I took to put my code base back into control. Its rather unusual that none of the steps below are anything special its just that I hadnt had to work on a situation where I had to work on a feature which might or might not see the daylight of being pushed to production. </p>
<p>So the first thing to do was to create the trunk, branches and tags directory. </p>
<pre class="brush: bash; title: ; notranslate">
$ mkdir ~/websites/secret-project/trunk \
            ~/websites/secret-project/branches \
            ~/websites/secret-project/tags
</pre>
<p>I now use <a href="http://dreamhost.com">dreamhost</a> for my svn but you can replace this with any other repo (local or remote) to manage your code. So I would start by creating the initial directory structure in the repo.</p>
<pre class="brush: bash; title: ; notranslate">
$ svn import -m 'Importing the initial directory structure' \
                http://svn.rajatpandit.com/secret-project/trunk \
                http://svn.rajatpandit.com/secret-project/branches \

http://svn.rajatpandit.com/secret-project/tags
</pre>
<p>Now checking out the empty directory locally to setup the local directories we created locally.</p>
<pre class="brush: bash; title: ; notranslate">
$ svn co http://svn.rajatpandit.com/secret-project/trunk \
               ~/websites/secret-project/trunk
</pre>
<p>The next step is to ensure that you are always using the most recent version of symfony. I like this feature about svn. You can have multiple directories pointing to multiple repos, that we can always ensure that your project can benefit from the most recent versions. We start that by setting up the lib/symfony and marking that as having an external repo.</p>
<pre class="brush: bash; title: ; notranslate">
$ cd  ~/websites/secret-project/
$ mkdir trunk/lib
$ mkdir trunk/lib/vendor
$ svn propedit svn:externals lib/vendor
symfony http://svn.symfony-project.com/tags/RELEASE_1_2_4/
</pre>
<p>(1.2.4 being the most recent release at the time of writing this post)<br />
This is a good time to commit this to the svn and get the latest code.</p>
<pre class="brush: bash; title: ; notranslate">
$ svn ci -m 'updating symfony to 1.2.4'
$ svn update lib/vendor
</pre>
<p>With the most recent codebase available in the vendors directory, now is a good time to do any sanity checks if you fancy.</p>
<pre class="brush: bash; title: ; notranslate">
php lib/vendor/symfony/data/bin/check_configuration.php
php lib/vendor/symfony/data/bin/symfony -V
</pre>
<p>If all works fine then there is one other configuration change that is required, after which you can start generating the basic stub of your code base. The change is to update the path <code>sfCoreAutoload.class.php</code> so that its picked up relative to where its placed.</p>
<pre class="brush: bash; title: ; notranslate">
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
</pre>
<p>With that done and your basic symfony apps and modules created, you can now update the svn configuration so that you can ignore the <code>cache</code> and <code>logs</code> directory.</p>
<pre class="brush: bash; title: ; notranslate">
$ rm -rf cache/*
$ rm -rf log/*
$ chmod 777 cache
$ chmod 777 log
$ svn add *
$ svn propedit svn:ignore log
$ svn propedit svn:ignore cache
$ svn ci -m &quot;updating the codebase with new apps/modules&quot;
</pre>
<p>Its also a good idea to ensure that the auto generated files dont make it to the repo, which is clearly a waste as its usually good to generate them on the server after deployment, that way you are usually sure about your configurations and settings.</p>
<pre class="brush: bash; title: ; notranslate">
svn add --non-recursive lib/model
svn add --non-recursive lib/model/om
svn add --non-recursive lib/model/map
svn propedit svn:ignore lib/model/om
svn propedit svn:ignore lib/model/map
</pre>
<p>You can also do the same for <code>forms</code> and <code>filters</code> any other auto generated file like sql files). Obviously needless to say, you need to commit your files as often as possible and tag after each release. </p>
<p>This post has been heavily adapted from a post on <a href="http://stereointeractive.com/blog/">Stereo Interactive</a> which is a blog I usually end up on when I get stuck on symfony problems. Worth reading it as well. This post would usually form as my own pointer when starting on the next project on symfony.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/02/08/using-svn-for-development-in-symfony/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

