<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>sukru&#039;s blog</title>
	<atom:link href="http://sukru.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sukru.wordpress.com</link>
	<description>Another drop in the vast blogosphere</description>
	<lastBuildDate>Sun, 14 Mar 2010 18:59:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sukru.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>sukru&#039;s blog</title>
		<link>http://sukru.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sukru.wordpress.com/osd.xml" title="sukru&#039;s blog" />
	<atom:link rel='hub' href='http://sukru.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Starting with Scala</title>
		<link>http://sukru.wordpress.com/2009/07/11/starting-with-scala/</link>
		<comments>http://sukru.wordpress.com/2009/07/11/starting-with-scala/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 17:26:41 +0000</pubDate>
		<dc:creator>sukru</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[scala java programming services]]></category>

		<guid isPermaLink="false">http://sukru.wordpress.com/?p=11</guid>
		<description><![CDATA[While discussing with my friend Ersin, I discovered that Scala is the next new thing for Java world. Actually I was quite late to come to that conclusion, since there already are next next new things (like Clojure), but let&#8217;s &#8230; <a href="http://sukru.wordpress.com/2009/07/11/starting-with-scala/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukru.wordpress.com&amp;blog=98424&amp;post=11&amp;subd=sukru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While discussing with my friend <a href="http://www.ersiner.net/">Ersin</a>, I discovered that <a href="http://www.scala-lang.org/">Scala</a> is the next new thing for Java world. Actually I was quite late to come to that conclusion, since there already are next next new things (like Clojure), but let&#8217;s take one step at a time.</p>
<p>I&#8217;ll be designing an in-house framework that will provide access to various text services, so taking this new project as an excuse I started a Scala development in Eclipse. After downloading latest Eclipse J2EE bundle, and the latest stable Scala plug-in, and a  few tries of coding, I got &#8220;hello world&#8221; working,&#8230; so far so good.</p>
<p>Anyways, continuing on the mention of services, I&#8217;d like to use lightweight interfaces, and a similarly designed framework (probably Spring) to instantiate them. Learning from Google, Java interfaces are handled by &#8220;Traits&#8221; in Scala, and since Scala is supposedly a Java language replacement, I decided to give the following code a shot:</p>
<blockquote>
<pre>trait Service {
 def getService(text: String) : String;
}

$ javap Service
Compiled from "Service.scala"
public interface edu.asu.cips.text.Service{
 public abstract java.lang.String getService(java.lang.String);
}</pre>
</blockquote>
<p>It really is working, right? Nope, apparently not!</p>
<p>I built a JUnit 4 package in the same project to test my definitions. Since the consumers of the framework will be Java coders, it made sense to write the actual tests in Java (at least some of them). However, a simple implementation failed, giving the following error message:</p>
<blockquote><p>The type SampleService must implement the inherited abstract method ScalaObject.$tag()</p></blockquote>
<p>A quick web search came up with a <a href="http://www.codecommit.com/blog/java/interop-between-java-and-scala">nice blog, that explains this situation, and more, and suggests the implementation of a function retuning zero</a>. While it does actually work, it is cumbersome for consumers in Java, so I moved on to having the interfaces defined in Java, and the rest will stay in Scala.</p>
<p>Adding a Java source code (in this case interface, but no reason for classes not to, too)  to a Scala project just works, and showed only a minor issue. Scala editor did not have a quick fix for implementing the interface methods! After being spoiled by Eclipse Java toolkit, and Refactor for C# in Visual Studio, I assumed this were the default standard. But considering the age of Scala tools in Eclipse, and me now knowing all the options/features of it yet, I can let this one go.</p>
<p>Thus, it seems like I will need to spend some more effort to complete the project. Learning a new language is usually a pleasant experience, and I&#8217;m hoping this proves to be so.</p>
<br /> Tagged: scala java programming services <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukru.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukru.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukru.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukru.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukru.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukru.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukru.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukru.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukru.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukru.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukru.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukru.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukru.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukru.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukru.wordpress.com&amp;blog=98424&amp;post=11&amp;subd=sukru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukru.wordpress.com/2009/07/11/starting-with-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/723af96d638897c0e43bf0859072feaf?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sukru</media:title>
		</media:content>
	</item>
		<item>
		<title>New Blog</title>
		<link>http://sukru.wordpress.com/2009/06/24/new-blog/</link>
		<comments>http://sukru.wordpress.com/2009/06/24/new-blog/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 07:36:46 +0000</pubDate>
		<dc:creator>sukru</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sukru.wordpress.com/?p=6</guid>
		<description><![CDATA[I&#8217;ve restarted blogging, and in English this time. This new blog will feature my adventures in life, research, and software development. static void Main() { Console.Write(&#34;Hello World&#34;); }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukru.wordpress.com&amp;blog=98424&amp;post=6&amp;subd=sukru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> I&#8217;ve restarted blogging, and in English this time.</p>
<p>This new blog will feature my adventures in life, research, and software development.</p>
</p>
<pre class="csharpcode"><span class="kwrd">static</span> <span class="kwrd">void</span> Main()
{
  Console.Write(<span class="str">&quot;Hello World&quot;</span>);
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukru.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukru.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukru.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukru.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukru.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukru.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukru.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukru.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukru.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukru.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukru.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukru.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukru.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukru.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukru.wordpress.com&amp;blog=98424&amp;post=6&amp;subd=sukru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukru.wordpress.com/2009/06/24/new-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/723af96d638897c0e43bf0859072feaf?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sukru</media:title>
		</media:content>
	</item>
	</channel>
</rss>
