<?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>Doga Berntas &#187; Java</title>
	<atom:link href="http://doganberktas.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://doganberktas.com</link>
	<description>is actually from a small planet somewhere in the vicinity of Betelgeuse</description>
	<lastBuildDate>Sat, 21 Apr 2012 21:48:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Hello RoR</title>
		<link>http://doganberktas.com/2010/07/13/hello-ror/</link>
		<comments>http://doganberktas.com/2010/07/13/hello-ror/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 00:19:13 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Grails Meetup Group]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Starbucks Corporation]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[web continuations]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=392</guid>
		<description><![CDATA[Ruby on Rails (RoR) is the new framework I have been playing with and so far I should say it is really amazing. It has all these intuitive approaches that you find out by just guessing. I can only compare it with a couple of other technologies like RIFE (ogrence.net) and Grails (remotespots.com). RIFE has [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Ruby on Rails (RoR) is the new framework I have been playing with and so far I should say it is really amazing. It has all these intuitive approaches that you find out by just guessing. I can only compare it with a couple of other technologies like RIFE (ogrence.net) and Grails (remotespots.com). RIFE has some neat features (template mechanism, web continuations, asynchronous mail queue, persistence layer, etc) but since the lead developer Geert Bevin stop actively developing it, it takes its place in the graveyard of dead tech. Then I try something different, Grails, which is a Groovy version of RoR. It is really good especially after Java Enterprise, convention over configuration is an excellent approach! But it is kind of very young, also Grails has this really fast development cycles, in a couple of month, I had to update my applications two times in which I spend hours to overcome plug-in dependencies, deployment issues, etc. ( one more thing, I can not find any other cool projects that uses Grails, even at <a href="http://www.meetup.com/java-161/">SF Bay Groovy and Grails Meetup Group</a> , actually I was the only one who is currently using Grails <img src='http://doganberktas.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
<p style="text-align: center;"><a title="Ruby on Rails" href="http://flickr.com/photos/26572975@N00/177722693"><img class="aligncenter" src="http://farm1.static.flickr.com/74/177722693_8aca6c7e82.jpg" alt="" width="400" height="320" /></a></p>
<p style="text-align: justify;">Since finding a good starter document is a very important decision, I took my time to select my first RoR source. I went over the following books and decided to use the latter one:</p>
<ul>
<li>Ruby on Rails For Dummies</li>
<li>Sitepoint Simply Rails 2nd Edition</li>
<li>Beginning Ruby on Rails</li>
<li><a href="http://railstutorial.org/">The Ruby on Rails Tutorial Book</a></li>
</ul>
<p style="text-align: justify;">Although it is called as a tutorial, when you get the pdf dump, the 12 chapter tutorial is approximately 500 pages, which is literally a book.</p>
<p style="text-align: justify;">The language of the book is very clean and most of the time funny. You can easily develop the code when you are reading it.  You can also follow a test driven approach if you want, but you don&#8217;t have (I didn&#8217;t).</p>
<p style="text-align: justify;">I finished the book in 7 days with a daily 4 hours concentrated reading/coding sessions and with lots of Starbucks Misto (thanks <a href="http://foursquare.com/venue/614429">Starbucks Besevler</a> crew!).</p>
<p style="text-align: justify;">The final code is at <a href="http://github.com/dkberktas/kediler">Github</a>, and live demo site at <a href="http://kediler.heroku.com/">Heroku</a>.</p>
<p style="text-align: justify;">As a pointer for the further steps, the tutorial suggest some <a href="http://railstutorial.org/chapters/following-users#sec:extensions_to_the_sample_application">pointers</a> but I prefer to go on with my path, which requires ImageMagick and Paperclip, so next post will be about these two.</p>
<p style="text-align: justify;">See you next time!</p>
<p style="text-align: justify;">ps. I really like Heroku. Grails has something <a href="http://www.cloudfoundry.com/">similar</a> but to be honest, it is not that magical (as in iPad).</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/07/13/hello-ror/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java Dergisi</title>
		<link>http://doganberktas.com/2010/06/22/java-dergisi/</link>
		<comments>http://doganberktas.com/2010/06/22/java-dergisi/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 01:49:52 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[turkce]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[java dergisi]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=337</guid>
		<description><![CDATA[Java Dergisinin ilk sayisini bir [KurumsalJava] grubundan duydum. Oldukca guzel bir girisim. &#8212; ozellikle, diger bilgisayar dergilerinin genellikle ayni icerigi tasimasi ve dergi olarak tuketilecek bir icerik sunmamasida dusunursek, bu dergi yazilim agirlikli olmasi ile beni oldukca heyecanlandird&#8211; Burda aklimdaki bir soruyuda hemen eklemem gerekiyor, basili dergiler daha ne kadar devam edecek cok merak ediyorum? [...]]]></description>
			<content:encoded><![CDATA[<p>Java Dergisinin ilk sayisini bir [KurumsalJava] grubundan duydum. Oldukca guzel bir girisim. &#8212; ozellikle, diger bilgisayar dergilerinin genellikle ayni icerigi tasimasi ve dergi olarak tuketilecek bir icerik sunmamasida dusunursek, bu dergi yazilim agirlikli olmasi ile beni oldukca heyecanlandird&#8211; Burda aklimdaki bir soruyuda hemen eklemem gerekiyor, basili dergiler daha ne kadar devam edecek cok merak ediyorum?</p>
<p><img src="http://doganberktas.com/wp-content/uploads/2010/06/kapak1.jpg" alt="" width="308" height="436" /></p>
<p>Java Dergisi dagitim olarak cok iyi bir is basarmis, neredeyse her yerde gormek mumkun. Derginin fiyati biraz yuksek(9.90) ozellikle Java ile ilgilenmesi olasi ogrenciler icin fiyat biraz hedef kitleyi dusurebilir. Derginin basim kalitesini dusurerek, dergi fiyatinda biraz oynama yapilabilir diye tahmin ediyorum, cunku kullanilan kagit cok cok sacma bir bicimde kaliteli. Guzel ornekler icin, bkn Matematik Dunyasi, Wired, NTV Bilim.</p>
<p>Yazilar korktugum gibi giris seviyesi tutoriallardan olusmuyor, gerci burada bir denge yakalamak cok zor, onlarca dali olan java dunyasinin hangi alanina girseniz bir uzmanlik alani cikiyor. Ornegin Java ME ve Androiddin arka arkaya yazilar ile islenmesi cok hostu. Biri gitmek uzere olan, biri yerlesmeye baslamis siki teknoloji.</p>
<p>Teknik yazilarin disinda, birazda genel havayi soluyan yazilarin eklenmesi derginin okuma keyfini arttirabilir, ornegin bu sayida James Gosling&#8217;in SUN&#8217;dan ayrilmasi ya da Oracle&#8217;in SUN&#8217;i satin almasi satir aralarinda gecistirilmis.</p>
<p>Son olarak, derginin Java dergisi olmasi illaki Java programlamasi ile ilgili olmasini gerektirmez. JVM ustunde calisan diger dillerden de bahsedilmesi (jruby, jython, scala, groovy) ve bunlari kullanan frameworklerin tanitilmasi da bence onemli bir katki olur.</p>
<p>Umarim dergi yeterli satis rakamlarini saglar ve surekliligi saglayabilir.</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/06/22/java-dergisi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT &#8212; Calling a Java Method from Handwritten JavaScript</title>
		<link>http://doganberktas.com/2010/04/02/gwt-calling-a-java-method-from-handwritten-javascript/</link>
		<comments>http://doganberktas.com/2010/04/02/gwt-calling-a-java-method-from-handwritten-javascript/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 00:12:55 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[remotespots]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[Google Web Toolkit]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JSNi]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=236</guid>
		<description><![CDATA[For the remotespots project, we developed a notification panel which is very similiar to Stackoverflow notification bar. So, what this bar provides is the a HTML message and a close bottom at the right end. For the close button, instead of adding a hyperlink from the java code, this time we used JSNI which enables [...]]]></description>
			<content:encoded><![CDATA[<p>For the <a href="http://remotespots.com">remotespots</a> project, we developed a notification panel which is very similiar to Stackoverflow notification bar. So, what this bar provides is the a HTML message and a close bottom at the right end.</p>
<p>For the close button, instead of adding a hyperlink from the java code, this time we used JSNI which enables you to integrate JavaScript directly into your application.</p>
<p>We have a class called <em>GenericNotifcation </em>in the package <em>org.remote.dogan.client. </em>When a noticition bar is needed,</p>
<pre>public static void showNotification(String message, int seconds)
</pre>
<p>is called.To hide the bar the following method is called,</p>
<pre>public static void hideNotification()
</pre>
<p>So, to make the JSNI close method call from js, we need to call the hideNotification java method from js.</p>
<p>To do this, we add amethod to register hideNotification method a js method for the handwritten javascript</p>
<pre>public static native void exportStaticMethod() /*-{
$wnd.closeNotification =
	@org.remote.dogan.client.GenericNotifcation::hideNotification();
}-*/;
</pre>
<p>As a second step, we should call the method exportStaticMethod() to actually make the registration of the js method. We do this in showNotification method but for a generic case, onModuleLoad is good candidate.</p>
<pre>public static void showNotification(String message, int seconds)

{
<strong>GenericNotifcation.exportStaticMethod();</strong>
...
}
</pre>
<p>So as the last step, we add the js call in the html template like the following:<br />
<strong>&lt;a title=&#8221;close this notification&#8221; onclick=&#8217;closeNotification()&#8217; /&gt;x&lt;/a&gt;</strong></p>
<p>For further information, the documentation for GWT JSNI is <a href="http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/04/02/gwt-calling-a-java-method-from-handwritten-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Twitter oauth on GAE/J</title>
		<link>http://doganberktas.com/2010/01/26/using-twitter-oauth-on-gaej/</link>
		<comments>http://doganberktas.com/2010/01/26/using-twitter-oauth-on-gaej/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 23:22:03 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[appengine-web.xml]]></category>
		<category><![CDATA[gae/j]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java platform]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Twitter Inc]]></category>
		<category><![CDATA[twitter oauth]]></category>
		<category><![CDATA[web application]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=212</guid>
		<description><![CDATA[Twitter supports oauth and there are many libraries for it, for  Java(twitter4J)(oauth-signpost),  most of the time you see examples of a desktop version, so it can take time to implement it on a web application (it did take time for my case). Step 1. Get a Twitter account and create a Twitter application from http://twitter.com/apps [...]]]></description>
			<content:encoded><![CDATA[<p>Twitter supports <a href="http://apiwiki.twitter.com/OAuth-FAQ">oauth </a>and there are many libraries for it, for  Java(<a href="http://twitter4j.org/en/index.html#introduction">twitter4J</a>)(<a href="http://code.google.com/p/oauth-signpost/">oauth-signpost</a>),  most of the time you see examples of a desktop version, so it can take time to implement it on a web application (it did take time for my case).</p>
<p>Step 1. Get a Twitter account and create a Twitter application from http://twitter.com/apps (don&#8217;t forget to check in browser and enter a  valid callback url. <a href="http://doganberktas.com/wp-content/uploads/2010/01/2.jpg"><img class="size-full wp-image-218 alignnone" title="2" src="http://doganberktas.com/wp-content/uploads/2010/01/2.jpg" alt="" width="523" height="536" /></a></p>
<p>Step 2.  Download <a href="http://twitter4j.org/en/index.html#download">twitter4J</a> add the library (in my case twitter4j-core-2.1.1-SNAPSHOT.jar) to project and update classpath</p>
<p>Step 3. Create a <a href="http://code.google.com/eclipse/docs/getting_started.html#creating">web application</a> (I assume you have the <a href="http://code.google.com/eclipse/">Google plugin for Eclipse </a>)</p>
<p><a href="http://doganberktas.com/wp-content/uploads/2010/01/1.jpg"><img class="size-full wp-image-219 alignnone" title="1" src="http://doganberktas.com/wp-content/uploads/2010/01/1.jpg" alt="" width="455" height="559" /></a></p>
<p>Step 4. Add the following servlets and update your web.xml. First servlet will handle login part. It will create a RequestToken which will create the magical aggrements between the consumer(your application) and provider(twitter). First servlet save the  token and secret token since we will need them later.</p>
<pre>String token = requestToken.getToken();
String tokenSecret = requestToken.getTokenSecret();
</pre>
<ul>
<li><a href="http://code.google.com/p/dogansartifacts/source/browse/trunk/GoogleAppEngineJava/TwiitterClient/src/a/b/c/server/HomeServlet.java">Home servlet</a></li>
<li><a href="http://code.google.com/p/dogansartifacts/source/browse/trunk/GoogleAppEngineJava/TwiitterClient/src/a/b/c/server/LoginServlet.java">Login Servlet</a></li>
</ul>
<p>Step 5. You forget to update web.xml didn&#8217;t you, update the web.xml</p>
<p>Step 6.  Enable <a href="http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions">session</a> by adding</p>
<pre>    &lt;sessions-enabled&gt;true&lt;/sessions-enabled&gt;
</pre>
<p>to appengine-web.xml.</p>
<p>You can see my version from <a href="http://90.latest.denemekaya.appspot.com/login">http://90.latest.denemekaya.appspot.com/login</a></p>
<p>ps. don&#8217;t forget to set the callback in Twittter to the url of the servlet for callback.</p>
<p>Links:</p>
<ul>
<li>http://www.pakzilla.com/2009/10/03/tutorial-java-based-twitter-app-on-google-app-engine/</li>
<li>Explain the same procedure with Grails &#8212; http://blogs.bytecode.com.au/glen/2009/12/08/log-into-your-grails-app-using-your-twitter-credentials.html</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/01/26/using-twitter-oauth-on-gaej/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Memcache with Google App Engine (GAE/J)</title>
		<link>http://doganberktas.com/2010/01/18/using-memcache-with-google-app-engine-gaej-a-simple-beginning-fragman-iphone-application/</link>
		<comments>http://doganberktas.com/2010/01/18/using-memcache-with-google-app-engine-gaej-a-simple-beginning-fragman-iphone-application/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 21:39:23 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[gae/j]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[ifragman]]></category>
		<category><![CDATA[iphone application]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Servlet]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[Technology/Internet]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=196</guid>
		<description><![CDATA[A simple beginning &#8212; Fragman iPhone Application Memcache provides convenience to store a frequent query in memory, so that you don&#8217;t have to make the same execution over and over again. For the iPhone application I build (Fragman), I build a GAE/J backend for managing movie names, IMDB URLs, thumb images, video files, etc. It [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A simple beginning &#8212; Fragman iPhone Application</strong></p>
<p>Memcache provides convenience to store a frequent query in memory, so that you don&#8217;t have to make the same execution over and over again. For the <a href="http://ifragman.com"><span style="color: #800000;">iPhone application I build (Fragman</span></a><span style="color: #800000;">)</span>, I build a GAE/J backend for managing movie names, IMDB URLs, thumb images, video files, etc. It interacts with the Obj-c code via calls encoded in JSON.</p>
<p>Since the categories are updated so frequently (new trailer, top 250 , soap opera trailers), every time the user starts the application from her iPhone, the corresponding categories Id(key) lists are  created which includes all the aspects mentioned above,</p>
<p>what I see, after people start to use the application that, most of the time, the application got stuck with the time constraint of GAE and  this causes inconvenience, so I decided to hold the category lists&#8217;s JSON in memory. Following is the code ,</p>
<p>this is the servlet for creating the JSON which is called after say upcoming movie list is changed. This servlet updates the memcached list</p>
<pre>        List keyList = new ArrayList();
	static Cache cache;
	static
	{
		try
		{
			CacheFactory cacheFactory =</pre>
<pre>CacheManager.getInstance().getCacheFactory();
			cache = cacheFactory.createCache(</pre>
<pre>Collections.emptyMap());
		}
		catch (CacheException e)
		{
			// ...
		}
		//.....
                public void doGet(HttpServletRequest request,</pre>
<pre>HttpServletResponse response) throws ServletException, IOException</pre>
<pre>	        {
                       //................
                       if(cache.containsKey(mode))
		       {
			     cache.remove(mode);
		       }
		       cache.put(mode, keyList);
	        }</pre>
<pre>                //........</pre>
<pre>          }</pre>
<p>And this is the servlet that fetch the Fragman beans from the datastore with the given keys (key list is got from the memecached list)</p>
<pre>          keyList = (List)cache.get(mode);</pre>
<pre>By doing this, I reduce the time that the servlet that creates the JSON takes.</pre>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/01/18/using-memcache-with-google-app-engine-gaej-a-simple-beginning-fragman-iphone-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple Chart for a GWT Application on GAE/J</title>
		<link>http://doganberktas.com/2009/12/19/a-simple-chart-for-a-gwt-application-on-gaej/</link>
		<comments>http://doganberktas.com/2009/12/19/a-simple-chart-for-a-gwt-application-on-gaej/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 02:41:17 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[gchart]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[Google Web Toolkit]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[gwt 2.0]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Web development software]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=147</guid>
		<description><![CDATA[I am trying charting solutions for a GWT project and gchart seems a nice one. After some digging I create a sample project which is hosted on Google App Engine (GAE) demo. Source code is at Google project The chart will show the remaining number of months in the current year. First download the jar [...]]]></description>
			<content:encoded><![CDATA[<p>I am trying charting solutions for a GWT project and gchart seems a nice one. After some digging I create a sample project which is hosted on Google App Engine (GAE) <a href="http://ghart-samples.appspot.com/">demo</a>. Source code is at <a href="https://dogansartifacts.googlecode.com/svn/trunk/GoogleAppEngineJava/GChart-samples">Google project</a></p>
<p>The chart will show the remaining number of months in the current year.</p>
<ul>
<li>First download the jar from the project home page http://code.google.com/p/gchart/</li>
<li>Put it under war/WEB-INF/lib and add the gchart.jar to your classpath</li>
<li>Create a  Web Application project called it GChart-samples (I assume you have Google Eclipse Plugin and follow the basic steps from <a href="http://code.google.com/eclipse/docs/getting_started.html">here</a>)</li>
<li>This step is for make-up, find GChart_samples.html under war/WEB-INF and clear the part between &lt;body&gt; tags.</li>
<li>Open GChart_samples.gwt.xml and add the following line
<pre>&lt;inherits name='com.googlecode.gchart.GChart'/&gt;</pre>
</li>
<li>Create a class in client folder called FirstChart and change it as the following
<pre>package com.dogan.kaya.client;

import com.googlecode.gchart.client.GChart;

public class FirstChart extends GChart
{
	public FirstChart()
	{
		setChartSize(350, 350);

		addCurve();

		int[] data = { 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
		for (int i = 0; i &lt; data.length; i++)
		{
			getCurve().addPoint(i + 1, data[i]);
		}
		//curve customization
		getCurve().getSymbol().setHeight(10);
		getCurve().getSymbol().setWidth(10);
		getCurve().getSymbol().setBorderColor("black");
		getCurve().getSymbol().setBorderWidth(3);
		getCurve().getSymbol().setSymbolType(SymbolType.LINE);
		getCurve().getSymbol().setFillThickness(2);
		getCurve().getSymbol().setFillSpacing(0);
		//chart customization
		getXAxis().setAxisMin(1);
		getXAxis().setAxisMax(12);
		getXAxis().setTickCount(12);
		getXAxis().setHasGridlines(false);
		getXAxis().setTickLocation(TickLocation.CENTERED);
		getXAxis().setTickLabelFontSize(10);
		getYAxis().setAxisMin(0);
		getYAxis().setAxisMax(12);
		//to get inteter values on y axis, be careful
		//about the number of intervals it can be tricky
		getYAxis().setTickCount(13);
		getYAxis().setTicksPerLabel(2);
		getYAxis().setHasGridlines(false);
		getYAxis().setTickLabelFontSize(10);
		//
		update();
	}
}</pre>
</li>
<li>Open GChart_samples class and change it like the following
<pre>package com.dogan.kaya.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class GChart_samples implements EntryPoint
{
	public void onModuleLoad()
	{
		RootPanel.get().add(new FirstChart());
	}
}</pre>
</li>
<li>My output is sth like that</li>
</ul>
<p><a href="../wp-content/uploads/2009/12/chart1.jpg"></a><a href="http://doganberktas.com/wp-content/uploads/2009/12/chart11.jpg"><img class="alignnone size-full wp-image-154" title="chart1" src="http://doganberktas.com/wp-content/uploads/2009/12/chart11.jpg" alt="" width="361" height="199" /></a></p>
<p>ps:</p>
<p>some nice links about gchart are as follows:</p>
<ol>
<li style="text-align: justify;">gchart <a href="http://code.google.com/p/gchart/">homepage</a></li>
<li style="text-align: justify;">A simple tutorial at http://whatwouldnickdo.com/wordpress/264/simple-charts-in-gwt-with-gchart/</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2009/12/19/a-simple-chart-for-a-gwt-application-on-gaej/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to basics &#8212; A simple beginning to Grails</title>
		<link>http://doganberktas.com/2009/12/11/back-to-basics-a-simple-beginning-to-grails/</link>
		<comments>http://doganberktas.com/2009/12/11/back-to-basics-a-simple-beginning-to-grails/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 03:50:15 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache Struts]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[grails tutorial]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java enterprise platform]]></category>
		<category><![CDATA[Java platform]]></category>
		<category><![CDATA[relaible product]]></category>
		<category><![CDATA[Rife]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[Web application frameworks]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=138</guid>
		<description><![CDATA[I guess I can finally finish my search for a good server side companion (at least for now).  A couple years ago RIFE was my only choice but unfortunately, it didn&#8217;t work out well as I expected (RIFE is an open source project but partly because of developers like me  who uses the framework but [...]]]></description>
			<content:encoded><![CDATA[<p>I guess I can finally finish my search for a good server side companion (at least for now).  A couple years ago <a href="http://rifers.org/">RIFE </a>was my only choice but unfortunately, it didn&#8217;t work out well as I expected (RIFE is an open source project but partly because of developers like me  who uses the framework but doesn&#8217;t pay his gratitude by adding sth to it, RIFE for the time being a dead project (at least for me!))</p>
<p style="text-align: center;"><a title="English Speaker" href="http://flickr.com/photos/23515014@N04/2948892935"><img class="alignnone" src="http://farm4.static.flickr.com/3254/2948892935_67a1da4122.jpg" alt="" width="454" height="500" /></a></p>
<p>Anyway, for some time I consider turn back to good old J2EE, then wander on the land of some other Java enterprise frameworks (Spring MVC, Wicket, Struts 2, Hibernate etc ) then Google App engine Java with its in progress full stack framework like environment. Then I decide that all the ones mentioned above has steep learning curves and without feeling complely comfortable with them, It is imposible to develop sth quickly.</p>
<p>Then the obvious direction was rails. First give a try to Django, then read some about  RoR but both of them somehow scare me out. I need to learn a new language (which Django tutorial specificly warns about looking a good python tutorial before devlde into Django), on the other hand, Grails (my love!) just start the sentence with &#8220;don&#8217;t worry about the groovy, you can learn it along the way&#8221;.</p>
<p>Obviously, Grails is relatively new compared to two other alternative and it has (or used to have) to many bugs for a relaible product.</p>
<p>But trust me, it is easy to just start and kick the first alfa version of sth out is a joy.</p>
<p>&#8211;</p>
<p>Ok this post is suppose to be a yet another introduction to Grails tutorial, so&#8230;</p>
<p><strong>Steps to Get Started</strong></p>
<p>1.  install Grails (there is nothing I can add here &#8212; <a href="http://www.grails.org/Installation">http://www.grails.org/Installation</a>)</p>
<p>2. open command line and create a project with grails create-app Yeap</p>
<p>3. Go to the created directory cd Yeap</p>
<p>4. Type grails run-app</p>
<p>That&#8217;s it!</p>
<p>I&#8217;m currently using <a href="http://grails.org/plugin/shiro">Apache Shiro</a> plugin (previously JSecurity), <a href="http://code.google.com/p/derjanandhisblog/wiki/GWTGrailsTutorial">Gwt plugin</a>, Postgresql, Eclipse for the development, More posts related to these will be here soon (I hope)</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2009/12/11/back-to-basics-a-simple-beginning-to-grails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Converting a Mysql table into a &#8220;proper&#8221;  Turkish XML file</title>
		<link>http://doganberktas.com/2009/09/03/converting-a-mysql-table-into-a-proper-turkish-xml-file/</link>
		<comments>http://doganberktas.com/2009/09/03/converting-a-mysql-table-into-a-proper-turkish-xml-file/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 14:38:49 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[character encoding]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Turkish]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=17</guid>
		<description><![CDATA[Character sets, encoding, decoding, anything related to non-English characters make me feel uncomfortable, since at each time I have problem related to these things, I spend hours just to see a proper Turkish character like &#8220;ç&#8221;. This was again the case with an old mysql table with encoding utf8_general_ci. Before there was UTF-16 then UTF-8 [...]]]></description>
			<content:encoded><![CDATA[<p>Character sets, encoding, decoding, anything related to non-English characters make me feel uncomfortable, since at each time I have problem related to these things, I spend hours just to see a proper Turkish character like &#8220;ç&#8221;.</p>
<div class="wp-caption aligncenter" style="width: 250px"><a title="The Hidden Buddhist Temple of Borobudur at Sunrise" href="http://flickr.com/photos/95572727@N00/2336220351"><img src="http://farm3.static.flickr.com/2242/2336220351_825a1b92d3_m.jpg" alt="" width="240" height="136" /></a><p class="wp-caption-text">tagaroo suggests this image is appropriate for the post </p></div>
<p>This was again the case with an old mysql table with encoding <strong>utf8_general_ci</strong>. Before there was UTF-16 then UTF-8 now I have deal with the subleties of utf8_general_ci (which is in fact has other types like utf8_unicode_ci).</p>
<p>Anyway, after spending hours just to see the correct characters in the console, very near to the point I gave up, I found a <a href="http://www.r10.net/php/193407-str_replace-kodlari-lazim-utf-8-icin-ornek-a-o.html">link</a> that suggest to just replace the unwanted characters like &#8220;Ã§&#8221; to ç. here is the complete list that I use in Java,  but be careful about the order you replaced:</p>
<p><code>textVal = textVal.replace("ÄŸ","&#287;");<br />
textVal = textVal.replace("Ä±","&#305;");<br />
textVal = textVal.replace("Ä°","&#304;");<br />
textVal = textVal.replace("Ä","&#286;");</code></p>
<p><code>textVal = textVal.replace("Ü","Ü");<br />
textVal = textVal.replace("Ã¼","ü");<br />
textVal = textVal.replace("Ã‡","Ç");<br />
textVal = textVal.replace("Ã§","ç");<br />
textVal = textVal.replace("Ã–","Ö");<br />
textVal = textVal.replace("Ã¶","ö");<br />
textVal = textVal.replace("ÅŸ","&#351;");<br />
textVal = textVal.replace("Å","&#350;");</code></p>
<p>Yeap, that solved my problem, thanks to you guys at the forum. But, I still doesn&#8217;t understand why we still need to have that number of encoding!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 316px; width: 1px; height: 1px;">&amp;#350;</div>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2009/09/03/converting-a-mysql-table-into-a-proper-turkish-xml-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

