<?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>EclipseSource Blog &#187; new &amp; noteworthy</title>
	<atom:link href="http://eclipsesource.com/blogs/tag/new-noteworthy/feed/" rel="self" type="application/rss+xml" />
	<link>http://eclipsesource.com/blogs</link>
	<description>Eclipse Equinox OSGi</description>
	<lastBuildDate>Fri, 18 May 2012 15:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The new Application API in RAP</title>
		<link>http://eclipsesource.com/blogs/2012/05/09/the-new-application-api-in-rap/</link>
		<comments>http://eclipsesource.com/blogs/2012/05/09/the-new-application-api-in-rap/#comments</comments>
		<pubDate>Wed, 09 May 2012 12:58:56 +0000</pubDate>
		<dc:creator>Ralf Sternberg</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[juno]]></category>
		<category><![CDATA[new & noteworthy]]></category>
		<category><![CDATA[OSGi]]></category>
		<category><![CDATA[rap]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=7640</guid>
		<description><![CDATA[RAP 1.5 includes a new API to define and start RAP applications programmatically (up to RAP 1.4, this was only possible using Eclipse extensions or web.xml properties). With this new API, RAP can also be used for leightweight applications based on OSGi, but without the entire Eclipse stack, even with other OSGi containers like Apache [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://eclipse.org/rap/downloads/1.5/">RAP 1.5</a> includes a new API to define and start RAP applications programmatically (up to RAP 1.4, this was only possible using Eclipse extensions or web.xml properties). With this new API, RAP can also be used for leightweight applications based on OSGi, but without the entire Eclipse stack, even with other OSGi containers like <a href="http://felix.apache.org/">Apache Felix</a>. Also traditional web applications, that use RWT as a library without OSGi, benefit from the new API.</p>
<p>This API contains a couple of interfaces that we had trouble to find suitable names for. If you&#8217;ve used this API already you know that there were two interfaces side-by-side in the same package with almost the same name: <em>ApplicationConfigurator</em> and <em>ApplicationConfiguration</em>. Even though these names seemed to be correct, it <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=369942">turned out</a> that they were hard to tell apart, and if mixed up in a service declaration, the application did not start, without any warning.</p>
<p>So we reviewed the case and eventually came up with better names for the interfaces without changing the structure. Let me explain the new API and our reasoning behind it.</p>
<h2>Implementing an ApplicationConfiguration</h2>
<p>A RAP application consists of various parts, such as entrypoints, URL mappings, themes, service handlers, etc. All these parts constitute an <em>ApplicationConfiguration</em>. The configuration is like the blueprint for an application. Based on an ApplicationConfiguration, the framework can create and start an application instance. There can be more than one application instances at runtime, e.g. running on different network ports or different servlet contexts.</p>
<p>Hence, when you write a RAP application, you have to provide an <em>ApplicationConfiguration</em>.</p>
<p>An <em>ApplicationConfiguration</em> is used to configure an application before it is started. For this step, RAP follows a callback approach to leave the responsibility for creating and starting the application with the framework. Therefore, the configuration must actively configure the application. To do so, it has one method <em>configure( Application )</em>. The framework provides a reference to the created <em>Application</em> as a parameter to this method. Here&#8217;s how a simple implementation looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SimpleConfiguration <span style="color: #000000; font-weight: bold;">implements</span> ApplicationConfiguration <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> configure<span style="color: #009900;">&#40;</span> Application application <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    application.<span style="color: #006633;">addEntryPoint</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/simple&quot;</span>, SimpleEntryPoint.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    application.<span style="color: #006633;">addEntryPoint</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/other&quot;</span>, AnotherEntryPoint.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Registering the ApplicationConfiguration</h2>
<p>When using OSGi, the <em>ApplicationConfiguration</em> can be registered as a service. I&#8217;d recommend using OSGi declarative services (DS) like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scr:component</span> <span style="color: #000066;">xmlns:scr</span>=<span style="color: #ff0000;">&quot;http://www.osgi.org/xmlns/scr/v1.1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;implementation</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;com.example.SimpleConfiguration&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;service<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;provide</span> <span style="color: #000066;">interface</span>=<span style="color: #ff0000;">&quot;org.eclipse.rwt.application.ApplicationConfiguration&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/service<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scr:component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The bundle <em>org.eclipse.rap.rwt.osgi</em> will automatically start this application on every available HttpService. When using Equinox, don&#8217;t forget to also include the <em>org.eclipse.equinox.ds</em> bundle. You can find an example of a simple RAP application using DS on <a href="https://github.com/ralfstx/rap-helpers/tree/master/example.rwt.simple">github</a>.</p>
<p>When using RWT as a library in a traditional web application, i.e. without OSGi, you can register your <em>ApplicationConfiguration</em> in the <em>web.xml</em> by adding a <em>context-param</em> with the fully qualified class name of the implementation:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;context-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.rap.applicationConfiguration<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.example.ExampleConfiguration<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/context-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>You can always look up the param-name in the constant <em>ApplicationConfiguration#CONFIGURATION_PARAM</em>. The RAP FAQ has a <a href="http://wiki.eclipse.org/RAP/FAQ#How_do_I_develop_an_RWT_standalone_application_with_RAP_.3E.3D_1.5">complete example</a>.</p>
<h2>Starting an Application</h2>
<p>When an ApplicationConfiguration has been registered as described above, the application is automatically started by the framework. Alternatively, it can also be started explicitly using an <em>ApplicationRunner</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">ApplicationConfiguration configuration <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleConfiguration<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
ApplicationRunner runner <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ApplicationRunner<span style="color: #009900;">&#40;</span> configuration, servletContext <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
runner.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>There&#8217;s a <a href="http://martinfowler.com/bliki/TwoHardThings.html">saying</a> that there were only two hard things in computer science, cache invalidation and naming things. I don&#8217;t happen to know what&#8217;s so tricky about cache invalidation <img src='http://eclipsesource.com/blogs/wp-includes/images/smilies/icon_wink.gif' alt="icon wink The new Application API in RAP" class='wp-smiley' title="The new Application API in RAP" />  But I can hardly remember any <em>technical</em> problem that caused me as much of a headache as these few names did. I hope that after so many discussions, this new API will prove to be simple to understand and to use.</p>
<p>Thanks to <a href="http://www.codeaffine.com/author/fappel/">Frank</a>, <a href="http://www.codeaffine.com/author/rherrmann/">Rüdiger</a>, <a href="http://eclipsesource.com/blogs/author/hstaudacher/">Holger</a> and <a href="http://eclipsesource.com/blogs/author/jordi/">Jordi</a> for great discussions and especially to Frank for contributing this new API to RAP!</p>
<p>The changes are part of RAP 1.5M7, published this Friday, May 11.</p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2012/05/09/the-new-application-api-in-rap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eclipse RAP 1.3 M3 hits the road</title>
		<link>http://eclipsesource.com/blogs/2009/11/16/eclipse-rap-1-3-m3-hits-the-road/</link>
		<comments>http://eclipsesource.com/blogs/2009/11/16/eclipse-rap-1-3-m3-hits-the-road/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 23:54:08 +0000</pubDate>
		<dc:creator>Benjamin Muskalla</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[eclipseRT]]></category>
		<category><![CDATA[helios]]></category>
		<category><![CDATA[milestone]]></category>
		<category><![CDATA[new & noteworthy]]></category>
		<category><![CDATA[rap]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=3370</guid>
		<description><![CDATA[After another 6 weeks of working hard towards the Helios Release, we&#8217;re a step closer. RAP M3 for Eclipse 3.6 is out and can be obtained from the RAP project page. Besides another 130 bugfixes and many New and Noteworthy features, here are my personal favorites of this milestone: Non-shared SWT resources Finally, we decided [...]]]></description>
			<content:encoded><![CDATA[<p>After another 6 weeks of working hard towards the <a href="http://wiki.eclipse.org/Helios">Helios</a> Release, we&#8217;re a step closer. RAP M3 for Eclipse 3.6 is out and can be <a href="http://eclipse.org/rap/downloads/">obtained</a> from the RAP project page. Besides another <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;classification=RT&amp;product=RAP&amp;target_milestone=1.3+M3&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;status_whiteboard_type=allwordssubstr&amp;status_whiteboard=&amp;keywords_type=allwords&amp;keywords=&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;emailtype1=substring&amp;email1=&amp;emailtype2=substring&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;order=Reuse+same+sort+as+last+time&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">130 bugfixes</a> and many <a href="http://eclipse.org/rap/noteworthy/news_13M3.php">New and Noteworthy</a> features, here are my personal favorites of this milestone:</p>
<p><strong>Non-shared SWT resources</strong></p>
<p>Finally, we decided to provide constructors and a dispose mechanism for SWT resources like fonts, images, colors and cursors. While we still recommend to use the factory-based approach, this features helps a lot when single-sourcing applications that use the resource constructors in a verbose manner.</p>
<div id="attachment_3377" class="wp-caption alignnone" style="width: 415px"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2009/11/color_ctor.png"><img class="size-full wp-image-3377 " title="color_ctor" src="http://eclipsesource.com/blogs/wp-content/uploads/2009/11/color_ctor.png" alt="color ctor Eclipse RAP 1.3 M3 hits the road" width="405" height="67" /></a><p class="wp-caption-text">Yay, it compiles!</p></div>
<p><strong>Browser History support</strong></p>
<p>You now have the possibility to interact with the client-side browser history. This allows you to set &#8220;bookmarks&#8221; (eg. when switching tabs or processing a particular workflow) and the user can jump back and forward. Thanks again to Ralf Zahn from ARS who <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283291">contributed</a> this feature.</p>
<p><img class="alignnone" title="Browser History support in RAP" src="http://eclipse.org/rap/noteworthy/BrowserHistory.png" alt="BrowserHistory Eclipse RAP 1.3 M3 hits the road" width="318" height="206" /></p>
<p><strong>Dispose events on session timeout</strong></p>
<p>We also introduced new Listener support on the Display so you&#8217;re now able to listen for Dispose events of the Display which is triggered when the session terminates. This way you don&#8217;t need to rely on servlet-specific API but rather use the same mechanism as in SWT to clean up your session. In addition you can queue runnables via Display#disposeExec that are executed once the session dies.</p>
<p>I hope you all enjoy the new milestone and give as feedback as fast as possible, API and feature freeze  is approaching <img src='http://eclipsesource.com/blogs/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Eclipse RAP 1.3 M3 hits the road" class='wp-smiley' title="Eclipse RAP 1.3 M3 hits the road" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2009/11/16/eclipse-rap-1-3-m3-hits-the-road/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

