<?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>Function1 &#187; google web toolkit</title>
	<atom:link href="http://www.function1.com/tag/google-web-toolkit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.function1.com</link>
	<description>Discussing all things portal, WebCenter Interaction, WebCenter Suite, Sharepoint, and related technologies.</description>
	<lastBuildDate>Fri, 20 Aug 2010 00:28:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Integrating a Google Web Toolkit application with WCI and the imageserver</title>
		<link>http://www.function1.com/2009/12/integrating-a-google-web-toolkit-application-with-wci-and-the-imageserver/</link>
		<comments>http://www.function1.com/2009/12/integrating-a-google-web-toolkit-application-with-wci-and-the-imageserver/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 18:35:27 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[google web toolkit]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[Portal]]></category>
		<category><![CDATA[wci]]></category>

		<guid isPermaLink="false">http://wp.function1.server296.com/?p=429</guid>
		<description><![CDATA[Google Web Toolkit (GWT) is an open-source web development toolkit that facilitates building rich, Javascript-based applications entirely through Java coding. It is very useful in speeding up complex application development, as well as in multi-developer projects where Java’s static typing enforces convention across the board. Function1 has employed GWT in the development of its product [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> (GWT) is an open-source web development toolkit that facilitates building rich, Javascript-based applications entirely through Java coding.  It is very useful in speeding up complex application development, as well as in multi-developer projects where Java’s static typing enforces convention across the board.  Function1 has employed GWT in the development of its product line and on the client site.</p>
<p>A GWT application code consists of the generated GWT static resource files (HTML, Javascript, and CSS) on the front end, and server-side service code on the middle and back end.  For performance reasons, static resource files are often deployed to the image server.  And <a href="http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.html#How_do_I_change_the_location_of_my_cache/nocache_HTML_files?">as of version 1.6, Google Web Toolkit easily allows for seamlessly changing the location of the generated GWT static resource files</a> from the default location in the war deployment.</p>
<p>If you do wish to pursue separating the generated static resources from the backing server code, there are a few steps to take.  The primary reason for this change is to avoid potential cross-domain issues that will arise from separating your resources; your imageserver may be running on imageserver.domain.com:80, while your application service might be running on appserver.domain.com:7001.</p>
<p><span id="more-429"></span></p>
<p>For this example, we’ll assume your application is called <em>formbuilder</em>.</p>
<ul>
<li>Under the <em>war</em> folder that GWT generates, you will find a folder with your application name, <em>formbuilder</em>.  Copy that folder to a target folder on the image server, such as /imageserver/RemoteGadgets/formbuilder/gwt/.</li>
<li>On the GWT entry point JSP page, you’ll make two changes.  The first is to create a Javascript variable that stores the gatewayed URL of the servlet.  The second is to change the GWT entry point Javascript reference.</li>
</ul>
<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img class="mt-image-none" src="http://www.function1.com/site/GWT%20portlet%20before.png" alt="GWT portlet before.png" width="603" height="560" /></span></p>
<ul>
<li>After the changes, your JSP will look something like the screenshot below.</li>
</ul>
<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img class="mt-image-none" src="http://www.function1.com/site/GWT%20portlet%20after.png" alt="GWT portlet after.png" width="603" height="560" /></span></p>
<ul>
<li>Finally, in the Java class that implements the EntryPoint interface, you will reference the gatewayed service URL using GWT’s <a href="http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface">Javascript Native Interface</a> (JNSI).</li>
</ul>
<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img class="mt-image-none" src="http://www.function1.com/site/FormBuilderApp.png" alt="FormBuilderApp.png" width="597" height="753" /></span></p>
<hr />
<p>Bonus tip: As discussed earlier in this post, Google Web Toolkit provides tools to create rich, complex web applications entirely through Java code.  GWT was built with cross-browser compatibility in mind, but not all generated HTML is treated equally.   For example, adding a widget that generates a block level element into a container that generates an inline element may result in an “Error: Invalid source HTML for this operation.” error in Internet Explorer.  When building in GWT, remember that while you are coding in Java, your output is HTML + CSS + Javascript.  As with any web application, be sure to test your GWT app in a variety of browsers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2009/12/integrating-a-google-web-toolkit-application-with-wci-and-the-imageserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
