<?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>ITworks &#187; SWT</title>
	<atom:link href="http://itworks.hu/tag/swt/feed/" rel="self" type="application/rss+xml" />
	<link>http://itworks.hu</link>
	<description>Random musings in IT</description>
	<lastBuildDate>Mon, 09 Jan 2012 08:01:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Developing J2ME application on Linux</title>
		<link>http://itworks.hu/2007/06/08/developing-j2me-application-on-linux/</link>
		<comments>http://itworks.hu/2007/06/08/developing-j2me-application-on-linux/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 23:27:49 +0000</pubDate>
		<dc:creator>csak</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[J2ME]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[SWT]]></category>

		<guid isPermaLink="false">http://itworks.hu/?p=15</guid>
		<description><![CDATA[We are starting up prototyping on a new project I&#8217;ve mentioned in this article. Our aim is to provide a proof-of-concept implementation of a simple off-line application running on the PDA&#8217;s we have. The PDA&#8217;s of today are quite well &#8230; <a href="http://itworks.hu/2007/06/08/developing-j2me-application-on-linux/">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are starting up prototyping on a new project I&#8217;ve mentioned in <a href="http://itworks.hu/?p=8">this article</a>. Our aim is to provide a proof-of-concept implementation of a simple off-line application running on the PDA&#8217;s we have.<br />
<span id="more-15"></span><br />
The PDA&#8217;s of today are quite well equipped, they come with ample processor power and enough RAM for running medium sized applications. We&#8217;re supplied with some rugged Symbol PDAs, running Windows CE 2003 (I might be wrong there, as I haven&#8217;t laid my hand on one for longer than 5 minutes)<br />
Just to make things clear, I never done any J2ME development and I&#8217;m not very familiar with the concept of configurations or profiles either.<br />
Going through the Net and checking the scene I&#8217;ve found that there are only few options for J2ME development other than vi. The most favored recommendation seemed to be the <a href="http://www.netbeans.org/kb/articles/mobility.html">Netbeans Mobility Pack</a>, but I said I&#8217;m not touching that with a six foot pig-teaser pole. For the first run I&#8217;ve opted for using EclipseME instead.<br />
EclipseME 1.6.8 is a pretty simple solution, and can use <a href="http://java.sun.com/products/sjwtoolkit/">Sun&#8217;s Java Wireless toolkit 2.5.1</a> seamlessly under Linux.<br />
In a couple of minutes I was able to bang together a simple HelloWorld midlet, being pleased with myself. This was going better than I thought, so I went on with extending the application. I banged together a simple form display using SAX based xml parser and the lcdui controls. After I had my first form with a couple of controls displayed I went out to the Net to see which embedded language I could use to store and evaluate the logic parsed from the XML. I went to see the usual suspects, <a href="http://jakarta.apache.org/bsf/">BSF</a>, <a href="http://http://groovy.codehaus.org/">Groovy</a>, <a href="http://www.jython.org/">Jython</a>, <a href="http://www.mozilla.org/rhino/">JavaScript</a> and my favorite <a href="http://www.beanshell.org/">BeanShell</a>. There were traces on the forums that some people have already struggled with this out there, this didn&#8217;t make me feel more secure, but at least I knew I was not alone. After hours of reading it turned out that BSH has the smallest footprint of this all (cca. 145Kb) but whatever I do the language will use reflection to access the host objects. This was hardly a surprise, but the surprise came when I realized MIDP and CLDC do <strong>NOT</strong> support reflection. This was the time when I realized that I was using the wrong environment all along.<br />
No problem! &#8211; I thought &#8211; I just switch over to <a href="http://jcp.org/en/jsr/detail?id=218">CDC</a> and <a href="http://jcp.org/en/jsr/detail?id=219">Foundation</a> or <a href="http://jcp.org/en/jsr/detail?id=217">Personal Basis </a> Profile and I&#8217;m all set!<br />
This was when my hair started graying, I went through the Internet to find a single CDC implementation that can run on Linux, but no luck. Sun, Nokia, Motorola, Sony just to name a few, even though all strongly support Linux don&#8217;t provide any development environment for any OS other than Windows. This basically means that once you want to develop for any PDA in J2ME you are resorted to use a Windows based machine.<br />
There seems to be a touch of light on the end of the tunnel though, IBM does provide a solution even if it&#8217;s quite dated, that is Linux compatible. See the <a href="http://www-306.ibm.com/software/wireless/wctme_fam/index.html">Websphere Studio Device Developer</a> site to get a trial version. I thought Eclipse 2.0 is something I&#8217;ll never see in my life, but this is something I give a hearty welcome to! For our current project this is a reasonable alternative to use, but buying this for any other project seems unreasonable. As far as I can see this product is already discontinued, so I don&#8217;t expect to have it around for much longer.</p>
]]></content:encoded>
			<wfw:commentRss>http://itworks.hu/2007/06/08/developing-j2me-application-on-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Off-line SWT application</title>
		<link>http://itworks.hu/2007/05/10/off-line-swt-application/</link>
		<comments>http://itworks.hu/2007/05/10/off-line-swt-application/#comments</comments>
		<pubDate>Wed, 09 May 2007 23:02:05 +0000</pubDate>
		<dc:creator>csak</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[MQ]]></category>
		<category><![CDATA[RCP]]></category>
		<category><![CDATA[SWT]]></category>

		<guid isPermaLink="false">http://itworks.hu/?p=8</guid>
		<description><![CDATA[One of our current Customers have a very interesting requirement for an upcoming project. The nature of the project requires mobile clients and frequent (or even instant) database updates, but there is no guarantee to have constant connectivity. We more &#8230; <a href="http://itworks.hu/2007/05/10/off-line-swt-application/">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of our current Customers have a very interesting requirement for an upcoming project. The nature of the project requires mobile clients and frequent (or even instant) database updates, but there is no guarantee to have constant connectivity. We more or less have full control on the choice of tools to use for this application, but since our developer resources are limited, it would be great if we could use the architecture from a previous project. We&#8217;ve been working with András on this for quite a while and it seems we found a pretty interesting way to do this.<br />
<span id="more-8"></span><br />
The current architecture looks like this:<br />
<img src="http://itworks.hu/wp-content/uploads/2007/05/current-layout.png" alt="Current layout" align="left" /><br />
The RCP client connects to the application server using Axis based web services that uses our framework to call the business logic which accesses the database through Hibernate.</p>
<p>As the application currently uses web services to access the framework containing the business logic and this is already separated in the application it&#8217;s relatively straightforward to modify this dispatcher to access the business logic.</p>
<p><img src="http://itworks.hu/wp-content/uploads/2007/05/new-layout.png" alt="Planned layout" align="right" /><br />
When online the modified application works just like the one above, and during the online period the application will synchronize its database with the server using DB2 Everyplace.</p>
<p>When the application is off-line the actions will perform the actions on the locally synchronized database, and send MQ messages of these actions through the local MQ Everyplace. Thus the application will see the local database as it&#8217;s own and perform the actions on it&#8217;s local database. The requirements allow for this, as the data is distributed among the users, (it&#8217;s more of a data collector, than business application) and there is only a very little chance of simultaneous updates.</p>
<p>When the client goes on-line again first the MQ messages will be sent to the server, the client will then wait for all the sent messages to be consumed by a message bean on the application server. After the messages are consumed the local database can be synchronized with the server so the data modified by other clients will be reflected on the client.</p>
<p>We&#8217;ve also considered using the features of the Lotus Expeditor platform, which works similarly, but decided against it. Our two main concerns were, that firstly we have limited resources and learning a new platform is time consuming, especially for such a new framework, the other was that Lotus Expeditor&#8217;s works offline like the original Lotus Notes platform (this is our assumption, based on a very short research) has the preconception, that noone is allowed to use the same database at the same time. If someone does the records are marked as save conflicts that must be reconciled manually.</p>
<p>Our way would permit the business logic to handle these updates gracefully, by either simply applying the updates on the given record in sequence, or refusing the update using either a version- or timestamp, or in workflow like cases statuses.</p>
<p>I&#8217;m sure this is not the only, and very likely not the best way to do this, but it&#8217;s most certainly the one that would require the smallest effort.</p>
<p>The images suck, I know, but I&#8217;m not in a drawing mood right now. <img src='http://itworks.hu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://itworks.hu/2007/05/10/off-line-swt-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

