<?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>byte bohemian &#187; SCM</title>
	<atom:link href="http://nicl.net/category/scm/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicl.net</link>
	<description></description>
	<lastBuildDate>Sat, 15 May 2010 20:51:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Contemporary Software Development: Building</title>
		<link>http://nicl.net/2010/05/contemporary-software-development-building/</link>
		<comments>http://nicl.net/2010/05/contemporary-software-development-building/#comments</comments>
		<pubDate>Sat, 15 May 2010 20:51:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile software development]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[Buildr]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://nicl.net/?p=68</guid>
		<description><![CDATA[The subject of my first post of the series "Contemporary Software Development" will be building. How to build your software project is a decision which is made quite early when you start developing.
Unfortunately in a lot of projects this very important topic does not get the appreciation it deserves. On one hand side it's a [...]]]></description>
			<content:encoded><![CDATA[<p>The subject of my first post of the series "Contemporary Software Development" will be building. How to build your software project is a decision which is made quite early when you start developing.</p>
<p>Unfortunately in a lot of projects this very important topic does not get the appreciation it deserves. On one hand side it's a very sad story of suffering and endurance. On the other hand side we are talking about a lot of wasted money.<span id="more-68"></span>In my career as software engineer I experienced some different approaches to the project setup and the build process.</p>
<p>It started with something like <code>find . -name '*.java' | xargs javac</code>, which worked quite well for the first weeks of my professional career. But with a couple of software developer working on a project <em>you want something more standardized.</em></p>
<p>So we went on with <code>make</code><a href="http://www.gnu.org/software/make/">(*)</a>. I guess most of the software engineers will know this build tool which still is a standard tool in the Unix/Linux world. <code>make</code> is a very powerful tools but has its peculiarities also. The <code>make</code> grammar is very delicate when it comes to white spaces. I quess quite a few people sat over a broken <code>make</code> build when a <code>TAB</code> char wasted your build script.</p>
<p>In the Java world <a href="http://ant.apache.org/">Apache Ant</a> was the successor to <code>make</code> in my career. The problem with <code>make</code> and the Java world is, that make is not really platform independent. There are <code>make</code> ports for Microsoft Windows but (at least when I made the jump from <code>make</code> to Ant) it does not work very well. So if you have a heterogeneous environment e.g. you develop on Microsoft Windows and you deploy into a Linux based cloud, <em>you want your build to to be platform independent.</em></p>
<p>A nice story about platform independence. I did some consulting in a project for the Deutsche Bank Italy and a very large (and expensive) consulting company provided the BEA Weblogic build and setup. I am not 100% sure but I guess it was an <a href="http://ant.apache.org/">Apache Ant</a> based build. One major issue was the application server integration integration. To solve it, the complete project was placed and build in the application server which was committed in to the CVS source control management system. The delivery artifact was - of course - delivered without the application server. But this leads to another wish I have when I am using a build. <em>You want the build to credit the current  environment.</em> If you are building for your local development environment you may have different requirements concerning the built artifact as when you are creating an artifact that will be deployed on staging or productive environment.</p>
<p>Back on memory lane: <a href="http://ant.apache.org/">Apache Ant</a> worked pretty well for some years and a couple of projects. But one thing that started to annoy me. Every project was using a slightly build setup so in the daily business there were always searching for artifacts or checking library versions.</p>
<p>Some former colleagues introduced me to <a href="http://maven.apache.org/">Apache Maven</a>. I started with <a href="http://maven.apache.org/maven-1.x/index.html">Maven 1</a> which is a quite interesting mixture of <a href="http://ant.apache.org/">Ant</a> with a framework that offered the possibility to manipulate the Ant build file during the runtime. But <a href="http://maven.apache.org/">Apache Maven</a> had some features which I hat to get used to.<br />
An example is the rigid directory structure defined in a Maven build: Why do I have to follow them? I want my special directory names! But nowadays I love this structure which is equal in every project. You find your files so fast now and even in foreign project. That's another thing that you want: <em>You want your builds to follow standards, so you can get familiar with the project in very short time.</em> If you are working in the software business a couple of years, may have already realized that you will see very much projects during a professional career and standard projects and processes will make your life much more easy.</p>
<p>Let's talk about some goodies now which modern build system offer. I will use <a href="http://maven.apache.org/">Apache Maven</a> as example but other systems like <a href="http://rake.rubyforge.org/">rake</a> or <a hef="http://buildr.apache.org/">buildr</a> offer similar functions.</p>
<p>One thing I love/hate is dependency management. When I started with make or ant, we where committing all libraries into our CVS. Which worked quite well, in most cases you could check our the project, performed the initial build and started to work. But there where lots of minor but very nasty problems. Starting from which library version is really used to incompatibilities of the build tool version. </p>
<p>With the <a href="http://maven.apache.org/">Apache Maven</a> dependency resolution mechanism a new area begun. If you are having one independent project the mechanism is pretty easy to use. You define the libraries you want to use in your <code>pom.xml</code> and maven takes care of the rest. Okay if you want to use libraries which are not in the maven central repository it's a little more complicated <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>If you are having a multi module/project environment things will get messy pretty easy, but: They would also if you don't use the dependency management mechanism. You ask why? When you don't use this mechanism you'll normally have a huge monolithic project in your SCM system which will get even more difficult to manage or build. So you <em>want to have a transparent dependency management in your build system</em>. With <a href="http://ant.apache.org/ivy/">Ivy</a> for example you'll have an add-on which offers the possibility to have an dependency management when you are using <a href="http://ant.apache.org/">Ant</a>.</p>
<p>Another goodie is release management. It's very handy if you start a build to create your release artifact and your tag (or something similar) in the SCM system of your choice. <em>You want your release process embedded in your build system, so you can perform the build when you are creating your release.</em></p>
<p>Another important topic is testing. You <em>really want your build tool to support your testing facilities.</em> At least when you create your release or deployment artifact you want your build to automatically run your test suite.</p>
<p>I have only one topic left in this post, that is IDE support. Unfortunately most modern IDE like <a href="http://www.eclipse.org/">Eclipe</a>, <a href="http://netbeans.org/">Netbeans</a> or <a href="http://www.jetbrains.com/idea/">Intellij IDEA</a> offer a IDE specific build. This this very comfortable if you have a small project and what to deal only with your IDE. But you'll grow really beyond this (my experience). But integration into other build tools is sometimes really poor. So you have to check how you can bridge the gap between your IDE and the build tool. E.g. the maven directory structure troubles some IDE<br />
standard configurations. Fortunatly more and more projects provide solutions for this.</p>
<p>So let's have a quick resume. This is what you should want in your build system:</p>
<ul>
<li>standardized process</li>
<li>platform indipendence (if your need it)</li>
<li>credit current environment</li>
<li>standardized structures</li>
<li>dependency management</li>
<li>embeddable release process (including SCM support)</li>
<li>support of your test tools</li>
<li>IDE support</li>
</ul>
<p>I think this list is not too lang and offers some major improvements for your daily work. So if your build process is missing some items from this list, you maybe should think about your build process. And remember: Your development resources are far to valuable to be wasted in an inefficient build process <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nicl.net/2010/05/contemporary-software-development-building/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>git-ing around</title>
		<link>http://nicl.net/2009/10/git-ing-around/</link>
		<comments>http://nicl.net/2009/10/git-ing-around/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 09:24:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile software development]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://nicl.net/?p=47</guid>
		<description><![CDATA[The last weeks I had some spare time to play around with the Git source control management system. My interest was aroused by a vote on the Apache Tapestry mailing list to migrate the Tapestry Subversion repository into a Git repository.
After a little more than a glimpse into the capabilities of Git I am quite [...]]]></description>
			<content:encoded><![CDATA[<p>The last weeks I had some spare time to play around with the <a href="http://www.git-scm.com">Git</a> source control management system. My interest was aroused by a vote on the <a href="http://tapestry.apache.org">Apache Tapestry</a> mailing list to migrate the <a href="http://tapestry.apache.org">Tapestry</a> <a href="http://subversion.tigris.org/">Subversion</a> repository into a <a href="http://www.git-scm.com">Git</a> repository.</p>
<p>After a little more than a glimpse into the capabilities of <a href="http://www.git-scm.com">Git</a> I am quite impressed!<span id="more-47"></span>I think I have a quite common background in source code management systems (SCM). I started with CVS at <a href="http://www.fh-wedel.de">university</a> and I really hated it. On my <a href="http://www.sinnerschrader.de">first job</a> I continued with CVS and started to value a good source code management system. </p>
<p>When you are working with a bunch of guys on a large Java/HTML project you can't work without a SCM system. CVS was a good system with some quite nice GUI clients like the <a href="http://www.eclipse.org">Eclipse</a> CVS plugin or <a href="http://www.wincvs.org">WinCVS</a>. </p>
<p>I am not quite aware when, but it was 2004-2005 I initiated a project to update the SCM infrastructure to <a href="http://subversion.tigris.org/">Subversion</a> to address some problems with CVS. If you ever created a major release tag on CVS you'll know what I mean <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
In my opinion <a href="http://subversion.tigris.org/">Subversion</a> is more than a worthy successor to CVS but it has it's own weaknesses.</p>
<p>The greatest weakness is the lack of branches and tags as an additional dimension in the SCM model. This makes at least branching with <a href="http://subversion.tigris.org/">SVN</a> not a very nice task. Tracking the changes of files through branches or tags is not that easy, because <a href="http://subversion.tigris.org/">SVN</a> simulates a branch/tag in the file structure.<br />
On my <a href="http://www.scoyo.de">current job</a> we came across some special <a href="http://subversion.tigris.org/">SVN</a> related problem. <a href="http://subversion.tigris.org/">SVN</a> uses the HTTP protocol for communication between <a href="http://subversion.tigris.org/">SVN</a> client and server. This solves al lot of network related issues, because HTTP is a well known and wide spread protocol. But creates a some new ones. So the synchronization of the working copy can some time, especially for for large binary assets and/or large projects. </p>
<p>But let me emphasize that <a href="http://subversion.tigris.org/">SVN</a> is a great SCM system with very well tool support (<a href="http://www.eclipse.org">Eclipse</a>, <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, etc.) and a large community. So let's stop <a href="http://subversion.tigris.org/">SVN</a> "bashing" and start with the real topic.</p>
<p><a href="http://www.git-scm.com">Git</a> is a relatively new SCM system. It was started in April 2005 by <a href="http://torvalds-family.blogspot.com">Linus Torvalds</a>. It was created due to the change in license of <a href="http://www.bitkeeper.com">Bit Keeper</a>, so that the linux kernel developers have no longer access to the SCM system.</p>
<p>The main difference between Git and SVN is, that SVN (like CVS) has a centralized model and Git has a decentralized model. What does this mean? In the SVN world you have one (central) repository which keeps track of all versions. In the Git world you have a local repository which can pull or push versioning data with other (remote) repositories. This has some fancy effects on the Git SCM system:</p>
<p>One thing that puzzled me most during my switch form CVS to SVN was the change in the version number. CVS provides for each file a version number (e.g. <code>1.1</code>, <code>1.3.4</code>, etc.) but SVN uses a version number for the whole repository (e.g. <code>47382</code>). This works only because the is one leading instance (repository). Git does not have this central instance so the Version number is a SHA1 id (e.g. <code>f4d267c9374da99c95222a95e203dab6c15a499</code>). I guess you noticed the difference too <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  But this is necessary because you cannot tell which version (number) this other guy half the way around the world created a moment ago. The version is also provided for a defined set of changes when committed. The version tracks the parent version and so you can build a version tree. This this is quite different the the linear model of SVN, where the version number is an integer.</p>
<p>Another effect of the design is, that there is more emphasis on branching and merging. So the Git provides a lost more support for this tasks. Like <code>git stash</code> which pushes the changes on the working copy into a local branch and restores the <code>HEAD</code>. This is quite nice, if you want to store your work to e.g. fix an urgent problem. Of course you can easily create a new named branch of your stashed changes. Needless to say that merging is quite easy in the Git world. Git also provides a good visualization of the different branches and commits. This makes cherry picking quite easy.</p>
<p>Since I am playing around with Git, I realized how SVN is conceptually weak in branching and merging. A <a href="http://software.thomasjacob.de">former colleague</a> mentioned this already in 2004 when the migration at my <a href="http://www.sinnerschrader.de">former employer</a> started. I think I understand him now <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Another nice feature of Git is that you can fetch versioning informations of SVN. So if you have a central SVN repository, you can push and pull version to this repository and keep track of you local work/changes in Git.</p>
<p>Last topic for this blog entry (yeah, all good things must come to an end <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) is the Git tool support. Git is a quite nice command line tool. But sometimes I am quite lazy so I want a GUI tool as well. <a href="http://www.eclipse.org">Eclipse</a> is mandatory for any competitor in the SCM game. Let me mention some real surprise: The <a href="http://www.eclipse.org/egit/">EGit</a> Eclipse plugin is the first SCM eclipse plugin (I came across) which could move and rename files and keep track of the version history!<br />
Of course there are various tools for all kind of platforms (e.g. <a href="http://gitx.frim.nl/">GitX</a>, <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> or <a href="http://sourceforge.net/projects/qgit">qgit</a>).</p>
<p>I guess, I will keep an eye on Git  ...</p>
]]></content:encoded>
			<wfw:commentRss>http://nicl.net/2009/10/git-ing-around/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
