<?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>Cagatay Civici's Weblog</title>
	<atom:link href="http://cagataycivici.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cagataycivici.wordpress.com</link>
	<description>Sovereignty is not given, it is taken</description>
	<lastBuildDate>Sun, 15 Nov 2009 20:19:27 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='cagataycivici.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/46d39b8ab52e321f0d8d928ee4febbef?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Cagatay Civici's Weblog</title>
		<link>http://cagataycivici.wordpress.com</link>
	</image>
			<item>
		<title>Mobile GPS Navigation App with JSF</title>
		<link>http://cagataycivici.wordpress.com/2009/11/15/mobile-gps-navigation-app-with-jsf/</link>
		<comments>http://cagataycivici.wordpress.com/2009/11/15/mobile-gps-navigation-app-with-jsf/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 15:32:02 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=637</guid>
		<description><![CDATA[I&#8217;ve created various sample mobile apps before such as Translator, Weather, News, Notes, Twitter Client and Mobile Chat (powered by PrimeFaces/Atmosphere Push infastructre) etc.  Since these are webapps tuned for mobile app look and feel, I was wondering the limits of a mobile webapp compared to a native app. Geolocation and GPS support might sound like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=637&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve created various sample mobile apps before such as <a href="http://cagataycivici.wordpress.com/2009/09/20/sample-iphone-apps-with-touchfaces/">Translator, Weather, News, Notes</a>, <a href="http://cagataycivici.wordpress.com/2009/11/05/mobile-twitter-client-with-jsf/">Twitter Client</a> and <a href="http://cagataycivici.wordpress.com/2009/10/12/mobile-ajax-push-for-iphone-with-primefaces/">Mobile Chat</a> (powered by PrimeFaces/Atmosphere Push infastructre) etc.  Since these are webapps tuned for mobile app look and feel, I was wondering the limits of a mobile webapp compared to a native app. Geolocation and GPS support might sound like one of these limitations but well, it is not <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  As a proof of concept for a <a href="http://primefaces.prime.com.tr">PrimeFaces/TouchFaces</a> app I&#8217;ve created the <strong>PathFinder</strong>, A mobile GPS Navigation app for iphone.</p>
<p>To begin with here&#8217;s the final output; There&#8217;re two screens, one is for map with directions and other is for settings. Click images for higher resolution.</p>
<table style="margin-left:auto;margin-right:auto;">
<tbody>
<tr>
<td><a href="http://cagataycivici.files.wordpress.com/2009/11/pf1.png"><img class="aligncenter size-medium wp-image-638" title="pf1" src="http://cagataycivici.files.wordpress.com/2009/11/pf1.png?w=161&#038;h=300" alt="pf1" width="161" height="300" /></a></td>
<td><a style="text-decoration:none;" href="http://cagataycivici.files.wordpress.com/2009/11/pf2.png"><img class="aligncenter size-medium wp-image-638" title="pf2" src="http://cagataycivici.files.wordpress.com/2009/11/pf2.png?w=161&#038;h=300" alt="pf1" width="161" height="300" /></a></td>
<td><a href="http://cagataycivici.files.wordpress.com/2009/11/pf3.png"><img class="aligncenter size-medium wp-image-638" title="pf3" src="http://cagataycivici.files.wordpress.com/2009/11/pf3.png?w=161&#038;h=300" alt="pf1" width="161" height="300" /></a></td>
</tr>
</tbody>
</table>
<p><strong>See it in action</strong></p>
<p>I&#8217;ve recorded a short screencast as well running the PathFinder on iPhone Emulator.</p>
<p><span style='text-align:center; display: block;'>
<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=7624075&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA">
	<param name="quality" value="best" />
	<param name="allowfullscreen" value="true" />
	<param name="scale" value="showAll" />
	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=7624075&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA" />
</object>
</span></p>
<p>All of this is basically a simple JSF page; <strong>pathfinder.jsf</strong></p>
<pre class="brush: xml;">
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;f:view xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
	xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot;
	xmlns:f=&quot;http://java.sun.com/jsf/core&quot;
	xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
	xmlns:p=&quot;http://primefaces.prime.com.tr/ui&quot;
	xmlns:i=&quot;http://primefaces.prime.com.tr/touch&quot;
	contentType=&quot;text/html&quot;&gt;

	&lt;i:application icon=&quot;/images/touch/mapicon.png&quot;&gt;
		&lt;f:facet name=&quot;meta&quot;&gt;
			&lt;script src=&quot;http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;sensor=true&amp;amp;key=ABQIAAAAfC5eyG3CuuRKtsMbGj42fhThrJrTqAJnkzhJQxjbFhIXTdSD6xRglAovT0AWB71tfpSZxEd9pJoxwQ&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
			&lt;script type=&quot;text/javascript&quot;&gt;

				PathFinder = {

						init : function() {
							map = new GMap2(document.getElementById(&quot;map&quot;));
							map.setUIToDefault();

				        	navigator.geolocation.getCurrentPosition(
						        function(position) {
							        lat = position.coords.latitude;
							        lng = position.coords.longitude;
							        var center = new GLatLng(position.coords.latitude, position.coords.longitude);
							        map.setCenter(center, 15);
							        map.addOverlay(new GMarker(center));
							        geocoder = new GClientGeocoder();
							        directions = new GDirections(map, document.getElementById('route'));
						        });
						},

						findAndGo : function() {
							var address = document.getElementById('address').value;
							geocoder.getLatLng(address,function(point) {
								 if (!point) {
						              alert(address + &quot; not found&quot;);
						          } else {
						              directions.load(&quot;from &quot; + lat + &quot; &quot; + lng + &quot; to &quot; + point.lat() + &quot; &quot; + point.lng());
						           }
							});
						}
					};

				if(!navigator.geolocation) {
					alert('Error: PathFinder requires a GPS capable device.');
				} else {
					window.onload = PathFinder.init;
				}

			&lt;/script&gt;
			&lt;meta content=&quot;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;&quot; name=&quot;cube&quot;/&gt;
		&lt;/f:facet&gt;

		&lt;i:view id=&quot;home&quot; title=&quot;PathFinder&quot;&gt;
			&lt;f:facet name=&quot;rightNavBar&quot;&gt;
				&lt;i:navBarControl label=&quot;Settings&quot; view=&quot;settings&quot; type=&quot;button&quot; effect=&quot;cube&quot;/&gt;
			&lt;/f:facet&gt;

			&lt;h:form prependId=&quot;false&quot;&gt;
				&lt;i:tableView&gt;
					&lt;i:rowGroup display=&quot;edgetoedge&quot;&gt;
						&lt;div id=&quot;map&quot; style=&quot;width:100%;height:285px;&quot;&gt;&lt;/div&gt;
					&lt;/i:rowGroup&gt;

					&lt;i:rowGroup&gt;
						&lt;i:rowItem&gt;
							&lt;h:inputText id=&quot;address&quot;/&gt;
						&lt;/i:rowItem&gt;
					&lt;/i:rowGroup&gt;

					&lt;p:commandLink style=&quot;margin:10px 10px;&quot; styleClass=&quot;whiteButton&quot; value=&quot;#&quot; onclick=&quot;PathFinder.findAndGo();return false;&quot;&gt;Find and Go!&lt;/p:commandLink&gt;

					&lt;i:rowGroup&gt;
							&lt;i:rowItem&gt;
								&lt;div id=&quot;route&quot;&gt;&lt;/div&gt;
							&lt;/i:rowItem&gt;
					&lt;/i:rowGroup&gt;
				&lt;/i:tableView&gt;
			&lt;/h:form&gt;

		&lt;/i:view&gt;

		&lt;i:view id=&quot;settings&quot; title=&quot;Settings&quot;&gt;
			&lt;f:facet name=&quot;leftNavBar&quot;&gt;
				&lt;i:navBarControl label=&quot;Home&quot; view=&quot;home&quot; /&gt;
			&lt;/f:facet&gt;

			&lt;h:form prependId=&quot;false&quot;&gt;
				&lt;i:tableView&gt;

					&lt;i:rowGroup&gt;
						&lt;i:rowItem&gt;
							&lt;h:outputText value=&quot;Transport&quot; /&gt;
							&lt;h:selectOneMenu&gt;
								&lt;f:selectItem itemLabel=&quot;Driving&quot; itemValue=&quot;d&quot; /&gt;
								&lt;f:selectItem itemLabel=&quot;Walking&quot; itemValue=&quot;w&quot; /&gt;
							&lt;/h:selectOneMenu&gt;
						&lt;/i:rowItem&gt;

						&lt;i:rowItem&gt;
							&lt;h:outputText value=&quot;Traffic&quot; /&gt;
							&lt;i:switch id=&quot;traffic&quot;/&gt;
						&lt;/i:rowItem&gt;
					&lt;/i:rowGroup&gt;

				&lt;/i:tableView&gt;

				&lt;p:commandLink style=&quot;margin:0 10px;&quot; styleClass=&quot;whiteButton&quot; value=&quot;#&quot; onclick=&quot;TouchFaces.goBack();&quot;&gt;Save&lt;/p:commandLink&gt;

			&lt;/h:form&gt;

		&lt;/i:view&gt;

	&lt;/i:application&gt;

&lt;/f:view&gt;
</pre>
<p>That&#8217;s just it, now you have a GPS enabled navigation app with a couple of lines. Let&#8217;s breakdown the important points to see how it works;</p>
<p>* GEOLocation info is provided by mobile safari, navigation geolocation api is an HTML5 feature supported by major browsers like Safari and Firefox (no IE of course). When you run the application, safari asks for a confirmation since the app tries to access hardware information and on page load places a markers on map with the geo location info.</p>
<p>* Once we have the location, it&#8217;s trivial to place a map and do some gmap api coding. &#8216;Find and Go&#8217; button simply does a geocoding and retrieves the latitude and longitude, with that it asks gmap api for directions and updates the map. Update happens in 5 seconds with the updated geo location info.</p>
<p>* A settings view is also added, I left out the implementation of settings UI but it helps to demonstrate how easy it can be to create another UI for customizations.</p>
<p><strong>Summary</strong></p>
<p>PathFinder is a simple reference app, things can be done with PrimeFaces is limitless. For example, since PrimeFaces also supports Ajax Push, it would be so easy to create location based mobile Comet applications as well.</p>
<p>Finally one thing I&#8217;d like to emphasize again, what PrimeFaces has so far (70+ Ajax Components, Ajax Push/Comet, Lightweight design, TouchFaces, GPS enabled apps, &#8230;) is just <strong>the beginning</strong>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/637/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=637&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/11/15/mobile-gps-navigation-app-with-jsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/11/pf1.png?w=161" medium="image">
			<media:title type="html">pf1</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/11/pf2.png?w=161" medium="image">
			<media:title type="html">pf2</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/11/pf3.png?w=161" medium="image">
			<media:title type="html">pf3</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;m speaking at JSFSummit 09</title>
		<link>http://cagataycivici.wordpress.com/2009/11/09/im-speaking-at-jsfsummit-09/</link>
		<comments>http://cagataycivici.wordpress.com/2009/11/09/im-speaking-at-jsfsummit-09/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 00:39:13 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=630</guid>
		<description><![CDATA[I&#8217;ll be speaking at JSFSummit 09 in Orlando between December 1-4 with my &#8220;Rapid RIA with PrimeFaces&#8221; session. I really enjoyed last year in Washington D.C. when the conference was called JSFOne back then. 
I&#8217;m really looking forward to get together again with folks like Ed Burns, my man Matthias Wessendorf, Martin Marinschek, Max Katz, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=630&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ll be speaking at <a href="http://www.jsfsummit.com">JSFSummit 09</a> in Orlando between December 1-4 with my &#8220;Rapid RIA with PrimeFaces&#8221; session. I really enjoyed last year in Washington D.C. when the conference was called JSFOne back then. </p>
<p>I&#8217;m really looking forward to get together again with folks like Ed Burns, my man Matthias Wessendorf, Martin Marinschek, Max Katz, Kito Mann and Andy Schwartz. It&#8217;ll be a great conference!</p>
<p><img class="aligncenter" src="http://www.therichwebexperience.com/images/2009/JSFSummit_125x125.jpg" alt="" width="125" height="125" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/630/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=630&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/11/09/im-speaking-at-jsfsummit-09/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>

		<media:content url="http://www.therichwebexperience.com/images/2009/JSFSummit_125x125.jpg" medium="image" />
	</item>
		<item>
		<title>Mobile Twitter Client with JSF</title>
		<link>http://cagataycivici.wordpress.com/2009/11/05/mobile-twitter-client-with-jsf/</link>
		<comments>http://cagataycivici.wordpress.com/2009/11/05/mobile-twitter-client-with-jsf/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 00:29:33 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=619</guid>
		<description><![CDATA[I&#8217;ve added another sample to TouchFaces showcase applications, this one is called TwitFaces allowing to view someone&#8217;s tweets in your iphone. The app integrates with twitter rest api and created with TouchFaces mobile JSF kit of PrimeFaces.
Let&#8217;s begin with TwitterService

package org.primefaces.examples.service;

import java.util.List;

public interface TwitterService {

	public List&#60;String&#62; getTweets(String username);
}

And TwitterRSSService, the RSS based implementation using Rome.

package org.primefaces.examples.service;

import [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=619&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve added another sample to TouchFaces showcase applications, this one is called TwitFaces allowing to view someone&#8217;s tweets in your iphone. The app integrates with twitter rest api and created with TouchFaces mobile JSF kit of PrimeFaces.</p>
<p>Let&#8217;s begin with <strong>TwitterService</strong></p>
<pre class="brush: java;">
package org.primefaces.examples.service;

import java.util.List;

public interface TwitterService {

	public List&lt;String&gt; getTweets(String username);
}
</pre>
<p>And <strong>TwitterRSSService</strong>, the RSS based implementation using Rome.</p>
<pre class="brush: java;">
package org.primefaces.examples.service;

import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;

import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;

public class TwitterRSSService implements TwitterService {

	private static final Logger logger = Logger.getLogger(TwitterRSSService.class.getName());

	public List&lt;String&gt; getTweets(String username) {
		List&lt;String&gt; tweets = new ArrayList&lt;String&gt;();

		try {
			URL feedSource = new URL(&quot;http://twitter.com/statuses/user_timeline.rss?screen_name=&quot; + username);

			SyndFeedInput input = new SyndFeedInput();
			SyndFeed feed = input.build(new XmlReader(feedSource));
			for(Object f : feed.getEntries()) {
				SyndEntry entry = (SyndEntry) f;
				tweets.add(entry.getTitle().substring(username.length() + 2));
			}
		}catch(Exception e) {
			logger.severe(e.getMessage());
		}

		return tweets;
	}
}
</pre>
<p>And the JSF backing bean called <strong>TwitterController</strong> powered by PrimeFaces Optimus.</p>
<pre class="brush: java;">
package org.primefaces.examples.touch;

import java.util.List;

import javax.faces.event.ActionEvent;

import org.primefaces.examples.service.TwitterService;
import org.primefaces.optimus.config.Scope;
import org.primefaces.optimus.config.annotations.Controller;

import com.google.inject.Inject;

@Controller(name=&quot;twitterController&quot;, scope=Scope.REQUEST)
public class TwitterController {

	@Inject private TwitterService twitterService;

	private String username;

	private List&lt;String&gt; tweets;

	public void loadTweets(ActionEvent actionEvent) {
		tweets = twitterService.getTweets(username);
	}

	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}

	public List&lt;String&gt; getTweets() {
		return tweets;
	}
	public void setTweets(List&lt;String&gt; tweets) {
		this.tweets = tweets;
	}
}
</pre>
<p>Finally create your app as a JSF page, <strong>twitfaces.xhtml</strong>;</p>
<pre class="brush: xml;">
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;f:view xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
	xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot;
	xmlns:f=&quot;http://java.sun.com/jsf/core&quot;
	xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
	xmlns:p=&quot;http://primefaces.prime.com.tr/ui&quot;
	xmlns:i=&quot;http://primefaces.prime.com.tr/touch&quot;
	contentType=&quot;text/html&quot;&gt;

	&lt;i:application icon=&quot;/images/touch/twiticon.png&quot;&gt;
		&lt;i:view id=&quot;home&quot; title=&quot;TwitFaces&quot;&gt;
			&lt;h:form prependId=&quot;false&quot;&gt;
				&lt;i:tableView&gt;
					&lt;i:rowGroup&gt;
						&lt;i:rowItem&gt;
							&lt;h:inputText value=&quot;#{twitterController.username}&quot; /&gt;
						&lt;/i:rowItem&gt;
					&lt;/i:rowGroup&gt;

					&lt;p:commandLink actionListener=&quot;#{twitterController.loadTweets}&quot; style=&quot;margin:10px 10px;&quot;
					styleClass=&quot;whiteButton&quot; value=&quot;#&quot; update=&quot;display&quot;&gt;Get Tweets&lt;/p:commandLink&gt;

					&lt;i:rowGroup id=&quot;display&quot;&gt;
						&lt;ui:repeat value=&quot;#{twitterController.tweets}&quot; var=&quot;tweet&quot;&gt;
							&lt;i:rowItem&gt;
								#{tweet}
							&lt;/i:rowItem&gt;
						&lt;/ui:repeat&gt;
					&lt;/i:rowGroup&gt;
				&lt;/i:tableView&gt;
			&lt;/h:form&gt;
		&lt;/i:view&gt;
	&lt;/i:application&gt;

&lt;/f:view&gt;
</pre>
<p>That&#8217;s it running <strong>twitfaces.jsf</strong> displays;</p>
<p><a style="text-decoration:none;" href="http://cagataycivici.files.wordpress.com/2009/11/twitfaces.png"><img class="aligncenter size-medium wp-image-620" title="twitfaces" src="http://cagataycivici.files.wordpress.com/2009/11/twitfaces.png?w=161&#038;h=300" alt="twitfaces" width="161" height="300"></a></p>
<p>TwitFaces is a very simple app, a full blown twitter client can be written on top of it easily using TouchFaces/PrimeFaces.</p>
<p><strong>Online Demo</strong></p>
<p>Check out TwitFaces app live on <a href="http://97.107.138.40:8080/prime-showcase/">PrimeFaces Online Demos</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/619/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=619&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/11/05/mobile-twitter-client-with-jsf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/11/twitfaces.png?w=161" medium="image">
			<media:title type="html">twitfaces</media:title>
		</media:content>
	</item>
		<item>
		<title>PrimeFaces Reorg</title>
		<link>http://cagataycivici.wordpress.com/2009/11/03/primefaces-reorg/</link>
		<comments>http://cagataycivici.wordpress.com/2009/11/03/primefaces-reorg/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 00:12:48 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=615</guid>
		<description><![CDATA[Two PrimeFaces modules, Optimus and FacesTrace are moved to the PrimeFaces Extensions as spin-off projects and PrimeFaces UI module is renamed as PrimeFaces. 
Main goal of PrimeFaces has always been to be the ultimate JSF component suite, by this change PrimeFaces became all about UI again.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=615&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Two PrimeFaces modules, Optimus and FacesTrace are moved to the <a href="http://code.google.com/p/primefaces-ext/">PrimeFaces Extensions</a> as spin-off projects and PrimeFaces UI module is renamed as <a href="http://primefaces.prime.com.tr/en/">PrimeFaces</a>. </p>
<p>Main goal of PrimeFaces has always been to be the ultimate JSF component suite, by this change PrimeFaces became all about UI again.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/615/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=615&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/11/03/primefaces-reorg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic Images with JSF</title>
		<link>http://cagataycivici.wordpress.com/2009/11/02/dynamic-images-with-jsf/</link>
		<comments>http://cagataycivici.wordpress.com/2009/11/02/dynamic-images-with-jsf/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 00:22:53 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=607</guid>
		<description><![CDATA[Legacy way to display binary images is to create a servlet and send the byte content as a stream. This requires a dedicated servlet and probably different servlets dealing with handling cases.
PrimeFaces features a simple but powerful StreamedContent API and p:graphicImage component to display any binary image easily. This binary image could be images stored [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=607&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Legacy way to display binary images is to create a servlet and send the byte content as a stream. This requires a dedicated servlet and probably different servlets dealing with handling cases.</p>
<p><a href="http://primefaces.prime.com.tr">PrimeFaces</a> features a simple but powerful StreamedContent API and p:graphicImage component to display any binary image easily. This binary image could be images stored in a database or images created programmatically on-the-fly. Following are a couple examples for demonstrating how easy it is to display binary images with PrimeFaces.</p>
<p><strong>Images Stored in Database</strong><br />
This example retrieves a blob from a jdbc resultset and provides it&#8217;s inputstream as a StreamedContent.</p>
<pre class="brush: java;">
public class BackingBean {

	private StreamedContent dbImage;

	public BackingBean() {
		InputStream dbStream = //Get inputstream of a blob eg javax.sql.Blob.getInputStream() API
		dbImage = new DefaultStreamedContent(dbStream, &quot;image/jpeg&quot;);
	}

	//getters and setters
}
</pre>
<pre class="brush: xml;">
 &lt;p:graphicImage value=&quot;#{backingBean.dbImage}&quot; /&gt;
</pre>
<p><a href="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-jsf.jpeg"><img class="aligncenter size-medium wp-image-608" title="dynamicImage.jsf" src="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-jsf.jpeg?w=300&#038;h=240" alt="dynamicImage.jsf" width="300" height="240" /></a></p>
<p><strong>Generated Chart Images</strong><br />
JFreeChart is a popular open source charting library, PrimeFaces also have flash based cool charts but if you want<br />
to use JFreeChart instead you don&#8217;t need a wrapper JSF component for this. Just create your chart and define it as<br />
as a streamed content.</p>
<pre class="brush: java;">
public class BackingBean {

	private StreamedContent chartImage;

	public BackingBean() {
		try {
			JFreeChart jfreechart = ChartFactory.createPieChart(&quot;Turkish Cities&quot;, createDataset(), true, true, false);
			File chartFile = new File(&quot;dynamichart&quot;);
			ChartUtilities.saveChartAsPNG(chartFile, jfreechart, 375, 300);
			chartImage = new DefaultStreamedContent(new FileInputStream(chartFile), &quot;image/png&quot;);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	private PieDataset createDataset() {
		DefaultPieDataset dataset = new DefaultPieDataset();
		dataset.setValue(&quot;Istanbul&quot;, new Double(45.0));
		dataset.setValue(&quot;Ankara&quot;, new Double(15.0));
		dataset.setValue(&quot;Izmir&quot;, new Double(25.2));
		dataset.setValue(&quot;Antalya&quot;, new Double(14.8));

		return dataset;
	}

	//getters and setters
}
</pre>
<pre class="brush: xml;">
 &lt;p:graphicImage value=&quot;#{backingBean.dbImage}&quot; /&gt;
</pre>
<p>This chart example truly demonstrates the power of PrimeFaces StreamedContent, I&#8217;ve created a JSFChartCreator component long time ago which became quite popular in JSF community. The problem was when you wrap a huge API like JFreeChart, flexibility gets lost since it&#8217;s just too hard to support every different setting in JFreechart API with a wrapper component. StreamedContent and p:graphicImage simply makes any other JSF component wrapping JFreeChart obselete. Instead with this way you still have the full power of chart api and a very easy way to display it.</p>
<p><a href="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-jsf.png"><img class="aligncenter size-medium wp-image-609" title="dynamicImage.jsf" src="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-jsf.png?w=300&#038;h=240" alt="dynamicImage.jsf" width="300" height="240" /></a></p>
<p><strong>Runtime Barcode Creator</strong><br />
Similar to the chart example, an on-the-fly generated barcode can easily be presented. This example uses barbecue project to create barcodes.</p>
<pre class="brush: java;">
public class BackingBean {

	private StreamedContent barcode;

	public BackingBean() {
		try {
			File barcodeFile = new File(&quot;dynamicbarcode&quot;);
			BarcodeImageHandler.saveJPEG(BarcodeFactory.createCode128(&quot;PRIMEFACES&quot;), barcodeFile);
			barcode = new DefaultStreamedContent(new FileInputStream(barcodeFile), &quot;image/jpeg&quot;);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	//getters and setters
}
</pre>
<pre class="brush: xml;">
 &lt;p:graphicImage value=&quot;#{backingBean. barcode}&quot; /&gt;
</pre>
<p><a href="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-1-jsf1.jpeg"><img class="aligncenter size-medium wp-image-611" title="dynamicImage-1.jsf" src="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-1-jsf1.jpeg?w=300&#038;h=16" alt="dynamicImage-1.jsf" width="300" height="16" /></a></p>
<p><strong>Online Demo</strong><br />
Examples I&#8217;ve given here are also available live at <a href="http://97.107.138.40:8080/prime-showcase/ui/dynamicImage.jsf">PrimeFaces Showcase</a>.</p>
<p><strong>Summary</strong><br />
One of the design principles behind <a href="http://primefaces.prime.com.tr">PrimeFaces</a> is to hide complexity and keep the flexibility, this is just one example of it in <a href="http://primefaces.prime.com.tr">PrimeFaces</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/607/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=607&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/11/02/dynamic-images-with-jsf/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-jsf.jpeg?w=300" medium="image">
			<media:title type="html">dynamicImage.jsf</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-jsf.png?w=300" medium="image">
			<media:title type="html">dynamicImage.jsf</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/11/dynamicimage-1-jsf1.jpeg?w=300" medium="image">
			<media:title type="html">dynamicImage-1.jsf</media:title>
		</media:content>
	</item>
		<item>
		<title>Primus RC Trailer</title>
		<link>http://cagataycivici.wordpress.com/2009/10/25/primus-rc-trailer/</link>
		<comments>http://cagataycivici.wordpress.com/2009/10/25/primus-rc-trailer/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 23:58:34 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=603</guid>
		<description><![CDATA[

	
	
	
	


       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=603&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style='text-align:center; display: block;'>
<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=7254605&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA">
	<param name="quality" value="best" />
	<param name="allowfullscreen" value="true" />
	<param name="scale" value="showAll" />
	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=7254605&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA" />
</object>
</span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/603/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/603/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/603/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/603/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/603/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/603/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/603/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/603/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/603/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/603/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=603&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/10/25/primus-rc-trailer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Based Ajax Terminal</title>
		<link>http://cagataycivici.wordpress.com/2009/10/21/web-based-ajax-terminal/</link>
		<comments>http://cagataycivici.wordpress.com/2009/10/21/web-based-ajax-terminal/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 08:19:11 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=585</guid>
		<description><![CDATA[PrimeFaces brings desktop terminals to the web, p:terminal is an ajax powered JSF component to execute commands defined on server side. Usage is very simple, just place the terminal and provide a command handler.
Code

    &#60;p:terminal commandHandler=&#34;#{mybean.handleCommand}&#34; /&#62;

CommandHandler is a simple java method taking two parameters, first one is the name of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=585&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://primefaces.prime.com.tr">PrimeFaces</a> brings desktop terminals to the web, p:terminal is an ajax powered JSF component to execute commands defined on server side. Usage is very simple, just place the terminal and provide a command handler.</p>
<p><a href="http://cagataycivici.files.wordpress.com/2009/10/screen-shot-2009-10-20-at-8-47-11-pm.png"><img class="aligncenter size-full wp-image-587" title="Screen shot 2009-10-20 at 8.47.11 PM" src="http://cagataycivici.files.wordpress.com/2009/10/screen-shot-2009-10-20-at-8-47-11-pm.png?w=602&#038;h=401" alt="Screen shot 2009-10-20 at 8.47.11 PM" width="602" height="401" /></a><strong>Code</strong></p>
<pre class="brush: xml;">
    &lt;p:terminal commandHandler=&quot;#{mybean.handleCommand}&quot; /&gt;
</pre>
<p>CommandHandler is a simple java method taking two parameters, first one is the name of the command and second parameter is an array of command arguments.</p>
<pre class="brush: java;">
    public String handleCommand(String command, String[] params) {
		if(command.equals(&quot;greet&quot;))
			return &quot;Hello&quot; + params[0];
		else if(command.equals(&quot;date&quot;))
			return new Date().toString();
		else
			return command + &quot; &quot; + not found;
	}
</pre>
<p><strong>Terminal in Mock OS X</strong><br />
I&#8217;ve integrated terminal to famous PrimeFaces Mock OS X, there&#8217;s a terminal icon in the dock displaying the terminal in a dialog. Check out the terminal in <a href="http://97.107.138.40:8080/prime-showcase/ui/macosx.jsf">Mock OS X demo</a>. CommandHandler is the one I&#8217;ve posted above with greet and date commands.</p>
<p><strong>More Demos</strong><br />
There&#8217;re two more terminal demos;<br />
* <a href="http://97.107.138.40:8080/prime-showcase/ui/terminalDialog.jsf">Terminal in a dialog</a><br />
* <a href="http://97.107.138.40:8080/prime-showcase/ui/terminalFull.jsf">Full page Terminal</a></p>
<p>Aim of PrimeFaces is to create the Ultimate Component Suite to rule them all. What PrimeFaces has so far is just the beginning.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/585/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=585&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/10/21/web-based-ajax-terminal/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/10/screen-shot-2009-10-20-at-8-47-11-pm.png" medium="image">
			<media:title type="html">Screen shot 2009-10-20 at 8.47.11 PM</media:title>
		</media:content>
	</item>
		<item>
		<title>Benchmarking Ajax JSF Libraries</title>
		<link>http://cagataycivici.wordpress.com/2009/10/18/benchmarking-ajax-jsf-libraries/</link>
		<comments>http://cagataycivici.wordpress.com/2009/10/18/benchmarking-ajax-jsf-libraries/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 18:04:33 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=566</guid>
		<description><![CDATA[Mert Caliskan posted a simple ajax performance test comparing PrimeFaces, RichFaces and Trinidad.  He used simple partial page rendering examples in demo applications which reveals PrimeFaces is 2x/3x faster than RichFaces and Trinidad. Also Alex Smirnov tested the same demo apps and got a set of different results.
Well benchmark tests usually cause debates, I&#8217;ve also done [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=566&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.jroller.com/mert/entry/benchmarking_jsf_libs">Mert Caliskan</a> posted a simple ajax performance test comparing PrimeFaces, RichFaces and Trinidad.  He used simple partial page rendering examples in demo applications which reveals PrimeFaces is 2x/3x faster than RichFaces and Trinidad. Also <a href="http://alexsmirnov.wordpress.com/2009/10/16/about-benchmarking-jsf-libs/">Alex Smirnov</a> tested the same demo apps and got a set of different results.</p>
<p>Well benchmark tests usually cause debates, I&#8217;ve also done similar tests but to improve the accuracy and cause less debates I&#8217;ve created three different applications rather than using showcases. All applications are deployed on tomcat6, use server side state management and facelets for view. The box used for testing is a mac book pro 2.4 ghz with 4gb ram running snow leopard.</p>
<p>Let&#8217;s start with PrimeFaces.</p>
<p><strong>PrimeFaces</strong></p>
<p><em>Page</em>: primeppr.xhtml</p>
<pre class="brush: xml;">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
	xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
	xmlns:p=&quot;http://primefaces.prime.com.tr/ui&quot;&gt;
&lt;head&gt;
	&lt;p:resources /&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;h:form prependId=&quot;false&quot;&gt;
		&lt;h:inputText value=&quot;#{testBean.text}&quot; /&gt;
		&lt;p:commandButton value=&quot;Submit&quot; update=&quot;out&quot; /&gt;
		&lt;h:outputText id=&quot;out&quot; value=&quot;#{testBean.text}&quot; /&gt;
	&lt;/h:form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><em>Configuration</em>: None (PrimeFaces is a lightweight library so basically there&#8217;s nothing to configure <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://cagataycivici.files.wordpress.com/2009/10/primeppr.png"><img class="aligncenter size-full wp-image-567" title="primeppr" src="http://cagataycivici.files.wordpress.com/2009/10/primeppr.png?w=650&#038;h=336" alt="primeppr" width="650" height="336" /></a></p>
<p><strong>RichFaces</strong></p>
<p><em>Page</em>: primeppr.xhtml</p>
<pre class="brush: xml;">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
	xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
	xmlns:rich=&quot;http://richfaces.org/rich&quot;
	xmlns:a4j=&quot;http://richfaces.org/a4j&quot;&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;h:form&gt;
		&lt;h:inputText value=&quot;#{testBean.text}&quot; /&gt;
		&lt;a4j:commandButton value=&quot;Submit&quot; reRender=&quot;out&quot; /&gt;
		&lt;h:outputText id=&quot;out&quot; value=&quot;#{testBean.text}&quot; /&gt;
	&lt;/h:form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><em>Configuration</em>: As far as I know disabling forceparser improves RichFaces performance, so I set forceparser to false.</p>
<p><a href="http://cagataycivici.files.wordpress.com/2009/10/richppr.png"><img class="aligncenter size-full wp-image-568" title="richppr" src="http://cagataycivici.files.wordpress.com/2009/10/richppr.png?w=650&#038;h=336" alt="richppr" width="650" height="336" /></a></p>
<p><strong>Trinidad</strong></p>
<p><em>Page</em>: trinidadppr.xhtml</p>
<pre class="brush: xml;">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
	xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
	xmlns:tr=&quot;http://myfaces.apache.org/trinidad&quot;&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;tr:document&gt;
		&lt;h:form&gt;
			&lt;tr:inputText value=&quot;#{testBean.text}&quot; /&gt;
			&lt;tr:commandButton id=&quot;btn&quot; text=&quot;Submit&quot; partialSubmit=&quot;true&quot;/&gt;
			&lt;tr:outputText id=&quot;out&quot; value=&quot;#{testBean.text}&quot; partialTriggers=&quot;btn&quot;/&gt;
		&lt;/h:form&gt;
	&lt;/tr:document&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><a style="text-decoration:none;" href="http://cagataycivici.files.wordpress.com/2009/10/trinidadppr.png"><img class="aligncenter size-full wp-image-569" title="trinidadppr" src="http://cagataycivici.files.wordpress.com/2009/10/trinidadppr.png?w=650&#038;h=336" alt="trinidadppr" width="650" height="336" /></a><span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;"><em>Configuration</em>: I&#8217;ve disabled debug setting of Trinidad in trinidad-config.xml.</span></p>
<p><strong>Results</strong></p>
<p>For 10 requests for the exact simple use case, average processing times are;</p>
<p><strong>PrimeFaces: 8.4 ms</strong></p>
<p><strong>RichFaces: 16.7 ms</strong></p>
<p><strong>Trinidad: 9.7 m</strong>s (Note that Trinidad has more optimization features like view state caching which can improve the performance even further.)</p>
<p>I believe these results can be realized as more accurate compared to other two tests I&#8217;ve mentioned because for my tests rather than using the different showcase apps I&#8217;ve created the same application three times with each library.</p>
<p>I&#8217;m glad that PrimeFaces is performing well, the reason is as a result of aiming to keep things simple. PrimeFaces has no servlet filter, html parser, custom viewhandler, custom statemananger and etc. This helps PrimeFaces to keep things clean, do less computation, use less memory and be lightweight. Even acouple of PrimeFaces users were kind enough to provide <a href="http://primefaces.prime.com.tr/en/testimonials.html">testimonials</a> which proves it. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/566/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=566&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/10/18/benchmarking-ajax-jsf-libraries/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/10/primeppr.png" medium="image">
			<media:title type="html">primeppr</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/10/richppr.png" medium="image">
			<media:title type="html">richppr</media:title>
		</media:content>

		<media:content url="http://cagataycivici.files.wordpress.com/2009/10/trinidadppr.png" medium="image">
			<media:title type="html">trinidadppr</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile Ajax Push for iPhone with PrimeFaces</title>
		<link>http://cagataycivici.wordpress.com/2009/10/12/mobile-ajax-push-for-iphone-with-primefaces/</link>
		<comments>http://cagataycivici.wordpress.com/2009/10/12/mobile-ajax-push-for-iphone-with-primefaces/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 23:24:46 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=562</guid>
		<description><![CDATA[PrimeFaces 1.0.0.RC aka PRIMUS will introduce the new Ajax Push aka Comet features powered by Atmosphere, after doing the initial integration I&#8217;ve created a sample chat application for a demo. It&#8217;s a simple app with login and message sending capabilities powered by http-streaming. I&#8217;ll also add support for long-polling approach soon.
After creating it, I took [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=562&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://primefaces.prime.com.tr">PrimeFaces</a> 1.0.0.RC aka <a href="http://www.vimeo.com/6891229">PRIMUS</a> will introduce the new Ajax Push aka Comet features powered by <a href="http://atmosphere.dev.java.net">Atmosphere</a>, after doing the initial integration I&#8217;ve created a sample chat application for a demo. It&#8217;s a simple app with login and message sending capabilities powered by http-streaming. I&#8217;ll also add support for long-polling approach soon.</p>
<p>After creating it, I took the integration one step further and using TouchFaces, created an iPhone app as a chat client. App will also work well with other mobile devices such as <strong>Android Phones, Palm Pre, Nokia S60 and more</strong>, any handheld device with a webkit browser is supported well.</p>
<p>Following is a short screencast, begins with demonstrating how easy it&#8217;s to use PrimeFaces Push and then adds more flavour with the TouchFaces client. Don&#8217;t forget to watch the video in HD. You can also play with this stuff via the <a href="http://97.107.138.40:8080/prime-showcase/ui/chat.jsf">online demo</a> of PrimeFaces. Mobile chat client is also available at the <a href="http://97.107.138.40:8080/prime-showcase/touch/index.jsf">TouchFaces section</a> of PrimeFaces showcase.</p>
<p style="text-align:center;"><span style='text-align:center; display: block;'>
<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=7031930&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA">
	<param name="quality" value="best" />
	<param name="allowfullscreen" value="true" />
	<param name="scale" value="showAll" />
	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=7031930&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA" />
</object>
</span></p>
<p style="text-align:left;">
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/562/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=562&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/10/12/mobile-ajax-push-for-iphone-with-primefaces/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>
	</item>
		<item>
		<title>PrimeFaces Talk Video and Slides</title>
		<link>http://cagataycivici.wordpress.com/2009/10/11/primefaces-talk-video-and-slides/</link>
		<comments>http://cagataycivici.wordpress.com/2009/10/11/primefaces-talk-video-and-slides/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 21:17:11 +0000</pubDate>
		<dc:creator>cagataycivici</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PrimeFaces]]></category>

		<guid isPermaLink="false">http://cagataycivici.wordpress.com/?p=559</guid>
		<description><![CDATA[Last week, I gave my &#8220;Rapid RIA with PrimeFaces&#8221; talk at an event organized by London Java Web Users Group. The session is recorded
and available as a 90 minute podcast. Slides are also available at PrimeFaces project page.
My next stop is JSFSummit 2009 where I&#8217;ll be doing an updated version of this talk in Orlando, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=559&subd=cagataycivici&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">Last week, I gave my &#8220;Rapid RIA with PrimeFaces&#8221; talk at an event organized by London Java Web Users Group. The session is recorded</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">and available as a 90 minute podcast. Slides are also available at PrimeFaces project page.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">My next stop is JSFSummit 2009 where I&#8217;ll be doing an updated version of this talk in Orlando, USA. See you there!</div>
<p>Last week, I gave my &#8220;Rapid RIA with PrimeFaces&#8221; talk at an event organized by <a href="http://www.jroller.com/javawug/entry/javawug_bof_51_primefaces">London JUG</a>. The session is recorded  and available as a 90 minute podcast. Slides are also available at PrimeFaces <a href="http://primefaces.prime.com.tr/en/documentation.html">project page</a> and you can watch the podcast at <a href="http://skillsmatter.com/podcast/java-jee/rapid-ria-development-with-primefaces">skills matter site</a>.</p>
<p>My next stop is <a href="http://www.jsfsummit.com/conference/orlando/2009/12/home">JSFSummit 2009</a> where I&#8217;ll be doing an updated version of this talk in Orlando, USA. See you there!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cagataycivici.wordpress.com/559/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cagataycivici.wordpress.com/559/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cagataycivici.wordpress.com/559/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cagataycivici.wordpress.com/559/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cagataycivici.wordpress.com/559/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cagataycivici.wordpress.com/559/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cagataycivici.wordpress.com/559/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cagataycivici.wordpress.com/559/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cagataycivici.wordpress.com/559/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cagataycivici.wordpress.com/559/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cagataycivici.wordpress.com&blog=983329&post=559&subd=cagataycivici&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cagataycivici.wordpress.com/2009/10/11/primefaces-talk-video-and-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cagataycivici</media:title>
		</media:content>
	</item>
	</channel>
</rss>