<?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>Code Pencil &#187; sakai</title>
	<atom:link href="http://www.codepencil.com/index.php/category/sakai/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codepencil.com</link>
	<description>Manu Mahajan`s blog</description>
	<lastBuildDate>Tue, 14 Apr 2009 16:15:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sakai Development Diary &#8211; Getting Started</title>
		<link>http://www.codepencil.com/index.php/sakai-development-diary-getting-started/</link>
		<comments>http://www.codepencil.com/index.php/sakai-development-diary-getting-started/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 12:48:38 +0000</pubDate>
		<dc:creator>Manu Mahajan</dc:creator>
				<category><![CDATA[sakai]]></category>

		<guid isPermaLink="false">http://www.codepencil.com/index.php/sakai-development-diary-getting-started/</guid>
		<description><![CDATA[I&#8217;ve been playing around with Sakai for the last few days. Sakai calls itself a &#8216;Collaborative Learning Environment&#8217; and is much more than a typical LMS system. I don&#8217;t want to get into describing the project but you can read about it here
www.sakaiproject.org
It&#8217;s a pretty large project and to be able to understand how things [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with Sakai for the last few days. Sakai calls itself a &#8216;Collaborative Learning Environment&#8217; and is much more than a typical LMS system. I don&#8217;t want to get into describing the project but you can read about it here<br />
<a href="http://www.sakaiproject.org">www.sakaiproject.org</a></p>
<p>It&#8217;s a pretty large project and to be able to understand how things work you need to work with a lot of different things like tomcat, maven, spring, hibernate, jsf and many design patterns <img src='http://www.codepencil.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It took me a while to get used to the terminology and different elements that make up the project. In this post I&#8217;m describing my effort in setting up a development environment which could be the starting point for any development effort and the various useful links that I came across while searching for information. </p>
<p><span id="more-11"></span></p>
<h2>Development Environment Set Up</h2>
<p>Sakai 2.4 is the stable version but I decided to go for 2.5 which is in development and brings in a lot of new features. There is a very useful page which describes most of the stuff that&#8217;s required but there are some small things that have the potential to make you want to pull your hair out when things don&#8217;t work. I suggest you read the comments at the bottom of the page very carefuly.<br />
<a href="http://bugs.sakaiproject.org/confluence/display/BOOT/Development+Environment+Setup+Walkthrough">http://bugs.sakaiproject.org/confluence/display/BOOT/ Development+Environment+Setup+Walkthrough</a></p>
<p>Another, simpler way to start could be to have a look at this screencast by Zach Thomas of Aerpolane Software<br />
<a href="http://aeroplanesoftware.com/wordpress/wp-content/uploads/2008/01/developing-for-sakai-getting-started960x540.mov">aeroplanesoftware.com/wordpress/wp-content/uploads/2008/01/ developing-for-sakai-getting-started960&#215;540.mov</a></p>
<p>I set-up everything on an ubuntu machine based on the above guide and here are a few things that bugged me:-</p>
<ul>
<ol><b>Java 1.6 does not work</b> &#8211; I had Sun jdk 6 installed but sakai doesn&#8217;t yet support java 1.6 so I had to set-up java 1.5 as my primary jvm. (Particularly, I got compile errors with java 6)</ol>
<ol><b>Tomcat 5.5 tar/zip version only</b> &#8211; Make sure you download and install the Tomcat zip or tar version which can unzipped into a folder. It&#8217;s necessary to have a separate tomcat just for running sakai. </ol>
<ol><b>No Spaces</b> &#8211; For windows users it is VERY IMPORTANT to not have spaces in the paths to jdk, tomcat and the maven repositories. I tried running the demo on a Windows machine which had a jdk installed in the default location(C:\Program Files\Java\&#8230;) and I started getting a lot of exceptions all over the site</ol>
<ol><b>&#8220;mvn clean install sakai:deploy&#8221;</b> is not same as <b>&#8220;mvn clean install + mvn sakai:deploy&#8221;</b> &#8211; I don&#8217;t know why this happens but sometimes after changing code if i run <em>mvn clean install sakai:deploy</em> it doesn&#8217;t work and I don&#8217;t see code getting updated in tomcat but running the 2 commands separately always works.</ol>
<ol><b>Memory</b> &#8211; Default memory settings for either of eclipse,tomcat or maven are not going to work so you need to make sure you give them all a high amount of RAM as described in the guides above or you will start getting java.lang.outOfMemory errors. For development purposes I found that running tomcat from within eclipse saves you a lot of RAM instead of running them both in separate virtual machines.</ol>
</ul>
<p>One thing that I had trouble with in particular, was trying to add the projects to ecplise. Eclipse did not recognize individual projects and kept showing the whole code as one large project. I had to add each sub project individually. I faced this problem with code downloaded from the &#8216;trunk&#8217;. After that I downloaded the &#8216;beta2&#8242; tag from subversion and the problem did not arise with that.</p>
<h2>Debugging</h2>
<p>If you are setting up a development environment sooner or later you will need to be able to debug the code in some way. And especially with this project because of the time that is required to restart the server every time you make a change in the code. On my laptop tomcat takes about 4 mins to restart.</p>
<p>There are various approaches available for debugging. The following page describes them in detail.<br />
<a href="http://bugs.sakaiproject.org/confluence/display/BOOT/Debugging+Tomcat+Remotely+Using+Eclipse">http://bugs.sakaiproject.org/confluence/display/BOOT/ Debugging+Tomcat+Remotely+Using+Eclipse</a></p>
<p>For me the third approach in which tomcat is set up as a server within eclipse seems to work best on an ubuntu system. I have also found that when you run tomcat from within eclipse you need less amount of total RAM. So I&#8217;d recommend this approach unless you have tomcat and eclipse on separate machines.</p>
<h2>Sakai Tools</h2>
<p>Sakai Tools are responsible for generating user interfaces. If you download the source code you will see a couple of projects in the samples folder namely &#8211; </p>
<ul>
<li>sample-tool-jsf</li>
<li>sample-tool-servlet</li>
</ul>
<p>Studying these tools seems to be a good way to start exploring. I haven&#8217;t used jsf in any of the projects that I&#8217;ve worked with so it that&#8217;s one new thing to learn in the next few days <img src='http://www.codepencil.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I will post more about my encounters with sakai in the next few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codepencil.com/index.php/sakai-development-diary-getting-started/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://aeroplanesoftware.com/wordpress/wp-content/uploads/2008/01/developing-for-sakai-getting-started960x540.mov" length="17987984" type="video/quicktime" />
		</item>
	</channel>
</rss>
