<?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>something crafty is in the works &#187; Technology</title>
	<atom:link href="http://www.bagu.org/blog/tag/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bagu.org/blog</link>
	<description></description>
	<lastBuildDate>Fri, 16 Dec 2011 13:34:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>The Online in OnlineGlom</title>
		<link>http://www.bagu.org/blog/2011/03/14/the-online-in-onlineglom/</link>
		<comments>http://www.bagu.org/blog/2011/03/14/the-online-in-onlineglom/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 14:02:14 +0000</pubDate>
		<dc:creator>Ben Konrath</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Glom]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.bagu.org/blog/?p=500</guid>
		<description><![CDATA[In my last blog post about OnlineGlom, I talked about my experience creating Java bindings for libglom using Swig. This time I&#8217;m going to talk about the web side of OnlineGlom. GWT As I mentioned previously, OnlineGlom uses GWT for &#8230; <a href="http://www.bagu.org/blog/2011/03/14/the-online-in-onlineglom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.bagu.org/blog/2011/01/25/an-update-about-online-glom/">last blog post</a> about <a href="http://gitorious.org/online-glom">OnlineGlom</a>, I talked about my experience creating Java bindings for libglom using Swig. This time I&#8217;m going to talk about the web side of OnlineGlom.</p>
<p><strong>GWT</strong></p>
<p>As I mentioned previously, OnlineGlom uses GWT for the UI with the GWT-RPC / servlet combo to interface with the Java bindings for libglom on the server. The honeymoon stage of my &#8220;relationship&#8221; with GWT is definitely over but I&#8217;m still pretty happy with it. As most people know, GWT lets you write code in Java which is compiled into optimized JavaScript that properly deals with issues between browsers. Besides the major advantage of not having to customize JavaScript for each browser, there are a couple of other nice features that I like. </p>
<p>One of these features is the GWT-RPC mechanism. This feature allows you to easily send Java objects back and forth between the client code and the servlet without too much hassle. There are a few restrictions on how the classes are defined but it&#8217;s easy enough to create conforming classes. A typical use for the GWT-RPC is to send model objects between the client and the server. I guess this is old news for J2EE developers but I still think it&#8217;s a neat trick and that it&#8217;s super convenient.</p>
<p>Another thing that I like about GWT that it&#8217;s written in Java. And I&#8217;m not just saying this because Java is one of the languages that I know well. I really think that the Java world has some great tools to make development easier and faster. The Eclipse JDT is the IDE that I use but Netbeans, IntelliJ IDEA and Emacs all offer excellent Java development environments. One of the things that I really like about the Java IDE experience is the ease at which you can debug your code. With the GWT Eclipse and Firefox plugins, you can set a break point in your code, refresh your browser and be debugging within a few seconds. It&#8217;s pretty nice. </p>
<p>Of course GWT development is not without problems. One of the issues that I&#8217;ve run into is the gap between developing the code and deploying the code. I&#8217;ve been deploying the OnlineGlom code on a server about once a week and I always seem to spend a few hours trying to figure out why things aren&#8217;t working. To be fair, some of the problems I&#8217;ve encountered have been caused by the fact that java-libglom uses JNI which is harder to deploy as a servlet dependency than a pure Java dependency.</p>
<p>Other problems, however, have been caused by the fact that the GWT team doesn&#8217;t produce the GWT Maven plugin so issues crop up as new GWT versions are released. At times it feels like the GWT Eclipse plugin and the GWT Maven plugin are trying to stomp on each others configurations. I think I have most of the kinks worked out now but it has been frustrating at times. I would use the GWT Maven plugin again in my next GWT project but I would use it from the beginning of the project rather than converting the project to a GWT Maven project mid-development cycle like I did with OnlineGlom.</p>
<p>One other minor issue I have with GWT is that the documentation isn&#8217;t that great. At first glance there seems to be a lot of information on the website but the example code tends to be very simplistic and it&#8217;s not always clear how to flesh out the examples into more fully functional code. Thankfully GWT is open source so not only can I use the Eclipse auto completion feature to read the javadocs as I&#8217;m writing code, but the source navigation also helps &#8230; although I think my F3 key is going to wear out soon. <img src='http://www.bagu.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div id="attachment_504" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.bagu.org/blog/wp-content/uploads/2011/03/lake-bunyonyi-kabale-uganda.jpg"><img src="http://www.bagu.org/blog/wp-content/uploads/2011/03/lake-bunyonyi-kabale-uganda-400x300.jpg" alt="Lake Bunyonyi, Kabale, Uganda" title="lake-bunyonyi-kabale-uganda" width="400" height="300" class="size-medium wp-image-504" /></a><p class="wp-caption-text">Lake Bunyonyi, Kabale, Uganda</p></div>
<p><strong>OnlineGlom</strong></p>
<p>Now that I&#8217;ve spent some time with <a href="http://www.glom.org">Glom</a>, I&#8217;m really impressed with it. It wasn&#8217;t immediately obvious to me how powerful an application it is but I&#8217;m now convinced. The examples included are a good showcase of the type of database application that can be created. And OnlineGlom has the potential to make things even more useful. I was getting my VAT filing in order last weekend, shuffling through folders, emails, invoices and receipts and thought that it might be a good idea to start using a glom database application to manage my freelance company. The only thing I would want to add is support for storing PDFs in the database so that I could save PDF receipts and digitally signed invoices. I think I&#8217;m going to file a feature request for this.</p>
<p>If you&#8217;re still with me, you probably want to see what I&#8217;ve been up to. Here are the example glom files displayed with OnlineGlom:</p>
<p><a href=" http://bagu.org:8080/OnlineGlomSmallBusinessExample/">http://bagu.org:8080/OnlineGlomSmallBusinessExample/</a><br />
<a href="http://bagu.org:8080/OnlineGlomLessonPlanner/">http://bagu.org:8080/OnlineGlomLessonPlanner/</a><br />
<a href="http://bagu.org:8080/OnlineGlomMusicCollection/">http://bagu.org:8080/OnlineGlomMusicCollection/</a><br />
<a href="http://bagu.org:8080/OnlineGlomProjectManagerExample/">http://bagu.org:8080/OnlineGlomProjectManagerExample/</a><br />
<a href="http://bagu.org:8080/OnlineGlomOpenismusFilmManager/">http://bagu.org:8080/OnlineGlomOpenismusFilmManager/</a></p>
<p>So far I have the glom list view mostly working in read-only mode. I haven&#8217;t worked on the aesthetics too much so there&#8217;s no styling and the layout is pretty simple. As a proof-of-concept, OnlineGlom has been successful and the task now is to turn what I&#8217;ve done into something more generally useful. In the short term, there are a few areas that need some attention:</p>
<ul>
<li>Make a release of java-libglom. We need to get java-libglom bindings packaged and included in distros. This will really ease the current pain of deploying the servlet. Murray has already been working on <a href="https://bugzilla.gnome.org/show_bug.cgi?id=644702">solving the nasty Python problem</a> we hit with the bindings. Once this problem is solved, we need to decide how we want to distribute the bindings: as a separate release?, included with libglom?, should we include the generated Java source code in the release or let distros generate the source at build time? etc.</li>
<li>Finish some of the TODOs for the list view. I don&#8217;t think the list view needs to be prefect just yet, but there are few TODOs that need some work.</li>
<li>Create an example selection UI. Having separate instances of OnlineGlom to show the examples and demos is not so desirable. I need to create a way for users to be able to select which example they would like to try out. </li>
<li>Implement the details view.</li>
<li>Implement session management. This is needed so that users can login.</li>
</ul>
<p>As you can see, there&#8217;s still a ways to go and I haven&#8217;t even mentioned inline editing. I&#8217;ll be working on this for a least the next month so keep your eyes peeled for more updates.</p>
<p>On an unrelated note, I&#8217;ve decided to rent a desk in a shared office in central Amsterdam, on Leidseplein to be exact. I&#8217;m hoping to get more exposure to Dutch and improve my productivity a bit by getting out of the house. If there are any Amsterdammers that want to meet up for lunch or a drink, drop me a line. Mijn Nederlands is niet zo goed maar ik begrijp en spreek een beetje. We kunnen in Engels praten als je mijn slechts Nederlands niet wil horen. <img src='http://www.bagu.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bagu.org/blog/2011/03/14/the-online-in-onlineglom/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>an update about Online Glom</title>
		<link>http://www.bagu.org/blog/2011/01/25/an-update-about-online-glom/</link>
		<comments>http://www.bagu.org/blog/2011/01/25/an-update-about-online-glom/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 13:04:00 +0000</pubDate>
		<dc:creator>Ben Konrath</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Glom]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.bagu.org/blog/?p=470</guid>
		<description><![CDATA[I haven&#8217;t managed to keep up with my blogging about Online Glom but hopefully I can try to remedy the situation with this post. I ended spending more time than I had planned working on the Java bindings to libglom &#8230; <a href="http://www.bagu.org/blog/2011/01/25/an-update-about-online-glom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t managed to keep up with my blogging about Online Glom but hopefully I can try to remedy the situation with this post.</p>
<p>I ended spending more time than I had planned working on the <a href="http://gitorious.org/online-glom/java-libglom">Java bindings to libglom</a> but things are in good shape now. A few more classes and methods will need to be wrapped as development Online Glom progresses but I think most of the hard work is done.</p>
<div id="attachment_471" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.bagu.org/blog/wp-content/uploads/2011/01/bikes-in-snow-amsterdam-december-2010.jpg"><img src="http://www.bagu.org/blog/wp-content/uploads/2011/01/bikes-in-snow-amsterdam-december-2010-400x300.jpg" alt="bikes with snow, Amsterdam, December 2010" title="bikes-in-snow-amsterdam-december-2010" width="400" height="300" class="size-medium wp-image-471" /></a><p class="wp-caption-text">bikes with snow, Amsterdam, December 2010</p></div>
<p>It was interesting experience using some of the more obscure features of <a href="http://www.swig.org/">Swig</a>. A couple of times, when I was stuck trying to decipher the <a href="http://www.swig.org/Doc2.0/SWIGDocumentation.html">Swig documentation</a>, I had some dark thoughts about writing the bindings by hand. But I&#8217;m glad I managed to pull myself out of those pits and stay on track with Swig. There&#8217;s no way I would have been able to come up with same amount of code coverage in the same time without using Swig. </p>
<p>Here&#8217;s one of the features of Swig that makes it very powerful. Libglom, along with many C++ libraries and programs, uses a custom reference counting smart pointer. Swig has support for the <a href="http://www.boost.org/doc/libs/1_45_0/libs/smart_ptr/shared_ptr.htm">Boost::shared_ptr</a> smart pointer but since libglom uses a custom smart pointer, I wasn&#8217;t able to use this feature directly. I initially wrapped the libglom smart pointer with these lines in the java-libglom interface file:<br />
<code><br />
%include &lt;libglom/sharedptr.h&gt;<br />
%include &lt;libglom/data_structure/field.h&gt;<br />
%template(ShardPtrField) Glom::sharedptr&lt;Field&gt;;<br />
</code><br />
This produced a Field class and a SharedPtrField class. The Field class maintained the C++ object heirarchy on the Java side of things but I couldn&#8217;t use it because libglom uses the Field class exclusively through the shared pointer. Even worse, using a wrapped cast_dynamic class in Java would go something like this code snippet from <a href="http://gitorious.org/online-glom/java-libglom/blobs/master/src/examples/org/glom/libglom/examples/ExampleDocumentLoad.java">ExampleDocumentLoad</a>:<br />
<code><br />
SharedPtrLayoutGroup group = SharedPtrLayoutGroup.cast_dynamic(layout_item);<br />
if (LayoutGroup.getCPtr(group.__deref__()) != 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;printLayoutGroup(group, indent + "  ");<br />
}<br />
</code><br />
Obviously not what we want. Thankfully it was pretty easy to modify the support for the boost::shard_ptr to make it work with the Glom::sharedptr. A quick <a href="http://thread.gmane.org/gmane.comp.programming.swig/16719">post to the swig mailing list</a> confirmed the correct way to solve the problem and I was up and running in a couple of hours. That same code snippet from above now looks like this:<br />
<code><br />
LayoutGroup group = LayoutGroup.cast_dynamic(layoutItem);<br />
if (group != null) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;printLayoutGroup(group, indent + "  ");<br />
}<br />
</code><br />
It&#8217;s not perfect yet because we&#8217;re still using a method for casting when we should be using the built in Java casting mechanism but it&#8217;s a big improvement. </p>
<p>I&#8217;m going make a separate blog post about the <a href="https://code.google.com/webtoolkit/">GWT</a> side of Online Glom so stay tuned. I have been checking the GWT code into this repository if anybody wants to check it out:</p>
<p><a href="http://gitorious.org/online-glom/gwt-glom">http://gitorious.org/online-glom/gwt-glom</a></p>
<p>I&#8217;m going to be at <a href="http://www.fosdem.org/2011/">FOSDEM</a> this year and I would happy to chat about this work with whoever is interested. I&#8217;m looking forward to seeing the keynotes and checking out some of the <a href="http://fosdem.org/2011/schedule/track/free_java_devroom">Free Java talks</a>. And, of course, picking up my <a href="http://live.gnome.org/Brussels2011/Attendees">GNOME tee</a> <img src='http://www.bagu.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bagu.org/blog/2011/01/25/an-update-about-online-glom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ka-torchi!</title>
		<link>http://www.bagu.org/blog/2010/04/29/ka-torchi/</link>
		<comments>http://www.bagu.org/blog/2010/04/29/ka-torchi/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 06:04:46 +0000</pubDate>
		<dc:creator>Ben Konrath</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mobile phones]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uganda]]></category>

		<guid isPermaLink="false">http://www.bagu.org/blog/?p=290</guid>
		<description><![CDATA[The Nokia 1200 and companion 1208 are good examples of technology that have been designed with the conditions of developing countries in mind. These phones both include an easily accessible flashlight (torch in British English), a long battery life and &#8230; <a href="http://www.bagu.org/blog/2010/04/29/ka-torchi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_291" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.bagu.org/blog/wp-content/uploads/2010/04/ka-torchi.jpg"><img src="http://www.bagu.org/blog/wp-content/uploads/2010/04/ka-torchi-400x300.jpg" alt="" title="ka-torchi" width="400" height="300" class="size-medium wp-image-291" /></a><p class="wp-caption-text">Billboard advertising the Nokia 1200 phone in the Kampala Taxi Park.</p></div>
<p>The <a href="http://europe.nokia.com/support/product-support/nokia-1200">Nokia 1200</a> and companion <a href="http://europe.nokia.com/find-products/devices/nokia-1208">1208</a> are good examples of technology that have been designed with the conditions of developing countries in mind. These phones both include an easily accessible flashlight (torch in British English), a long battery life and dust-proof buttons &#8211; all great features for dealing with unreliable power and unpaved streets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bagu.org/blog/2010/04/29/ka-torchi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dealing with unreliable power in Uganda</title>
		<link>http://www.bagu.org/blog/2009/03/25/dealing-with-unreliable-power-in-uganda/</link>
		<comments>http://www.bagu.org/blog/2009/03/25/dealing-with-unreliable-power-in-uganda/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 14:30:29 +0000</pubDate>
		<dc:creator>Ben Konrath</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uganda]]></category>

		<guid isPermaLink="false">http://www.bagu.org/blog/?p=33</guid>
		<description><![CDATA[Rural Uganda is infamous for unreliable power. Through the month of February 2008, power was on for about 40% of the time in Kabale. We would literally run to the power outlets when power came back so that we could &#8230; <a href="http://www.bagu.org/blog/2009/03/25/dealing-with-unreliable-power-in-uganda/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Rural Uganda is infamous for unreliable power. Through the month of February 2008, power was on for about 40% of the time in Kabale. We would literally run to the power outlets when power came back so that we could charge our phones and laptops. If we really needed to get work done, we were forced to have an extended lunch at the Litte Ritz, the only restaurant in Kabale that had a generator. And there was usually some contention for the available outlets.</p>
<p>I got a little annoyed by this so I had a fellow volunteer bring me an auto adaptor for my laptop from Canada which would allow me to run the laptop from a car battery.</p>
<div id="attachment_217" class="wp-caption aligncenter" style="width: 261px"><a href="http://www.bagu.org/blog/wp-content/uploads/2009/03/battery-charger-and-phone.jpg"><img src="http://www.bagu.org/blog/wp-content/uploads/2009/03/battery-charger-and-phone-251x300.jpg" alt="battery, charger and modem" title="battery-charger-and-phone" width="251" height="300" class="size-medium wp-image-217" /></a><p class="wp-caption-text">battery, charger and modem</p></div>
<p>I was able to rent a battery and home-made charger from Osman, one of the local mobile phone techs, for about 30 USD / month. Osman made me a connector for the laptop adaptor and for my fixed wireless terminal so I could use the internet when power was out. I could get full speed,  about 16 Kb/s, when power was out because most of the internet cafes didn&#8217;t have generators. Once I had this setup, I was kinda happy when power was out &#8211; at least during the day <img src='http://www.bagu.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div id="attachment_218" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.bagu.org/blog/wp-content/uploads/2009/03/workspace-uganda.jpg"><img src="http://www.bagu.org/blog/wp-content/uploads/2009/03/workspace-uganda-300x225.jpg" alt="workspace in Uganda" title="workspace-uganda" width="300" height="225" class="size-medium wp-image-218" /></a><p class="wp-caption-text">workspace in Uganda</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bagu.org/blog/2009/03/25/dealing-with-unreliable-power-in-uganda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

