<?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; GNOME</title>
	<atom:link href="http://www.bagu.org/blog/tag/gnome/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>Online Glom update</title>
		<link>http://www.bagu.org/blog/2011/12/16/online-glom-update/</link>
		<comments>http://www.bagu.org/blog/2011/12/16/online-glom-update/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 13:34:38 +0000</pubDate>
		<dc:creator>Ben Konrath</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Glom]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://www.bagu.org/blog/?p=595</guid>
		<description><![CDATA[I&#8217;ve finished up my freelance gig with Openismus and I thought it would be a good time to post an update about Online Glom. I&#8217;ve been posting weekly status reports to the Glom mailing list but, in retrospect, I probably &#8230; <a href="http://www.bagu.org/blog/2011/12/16/online-glom-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finished up my freelance gig with <a href="http://www.openismus.com/">Openismus</a> and I thought it would be a good time to post an update about Online Glom. I&#8217;ve been posting <a href="http://markmail.org/search/?q=%22Online+Glom+status%22+list%3Aorg.gnome.glom-devel-list">weekly status reports</a> to the Glom mailing list but, in retrospect, I probably should have posted here a little more often. But, I&#8217;m posting here now so if you haven&#8217;t checked out Online Glom yet, now&#8217;s your chance:<br />
<a href="http://onlineglom.openismus.com/OnlineGlom/"></p>
<p>http://onlineglom.openismus.com/OnlineGlom/</a></p>
<p>I&#8217;ve made so much progress since my last post that I can&#8217;t list everything. Probably the two most important improvements are that the style from the mockups has been fully integrated and the details view is now working.<br />
<a href="http://www.bagu.org/blog/wp-content/uploads/2011/12/online-glom-details-view.png"><img src="http://www.bagu.org/blog/wp-content/uploads/2011/12/online-glom-details-view.png" alt="The Online Glom Details view page." title="online-glom-details-view" width="974" height="1274" class="alignright size-full wp-image-596" /></a></p>
<p>I&#8217;ve spent a lot of time over the last few weeks ironing out visual and interaction kinks in both the list and details views. I&#8217;m pretty happy with how things are working now. I&#8217;ve also reworked the main Glom document selection page which looks much better than the previous version.<br />
<a href="http://www.bagu.org/blog/wp-content/uploads/2011/12/online-glom-document-selection.png"><img src="http://www.bagu.org/blog/wp-content/uploads/2011/12/online-glom-document-selection.png" alt="The Online Glom Document selection page." title="online-glom-document-selection" width="917" height="741" class="alignright size-full wp-image-598" /></a>I&#8217;ll leave list view for people to checkout on their own.</p>
<p>I sort of wish I had posted a few screenshots from earlier versions so that it would be easy to compare. But you can just take my word for it &#8211; the current version is a huge improvement. <img src='http://www.bagu.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The Online Glom project isn&#8217;t going to end because my engagement with Openismus has finished. <a href="http://murrayc.com/">Murray Cumming</a> is planning take over as lead developer and I expect he&#8217;ll post updates as things progress.</p>
<p>I should note that Murray has deployed an instance of Online Glom to work through the Openismus infrastructure. I&#8217;ve added a redirect so that links pointing to <a href="http://bagu.org:8080/OnlineGlom">http://bagu.org:8080/OnlineGlom</a> will be transparently passed on to <a href="http://onlineglom.openismus.com/OnlineGlom/">http://onlineglom.openismus.com/OnlineGlom/</a>.</p>
<p>As for what&#8217;s next for me, my plan is to work on a couple of personal projects while I look for a new opportunity. I&#8217;m not sure exactly where my search will lead, but I&#8217;m looking forward to whatever new challenges my next projects present.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bagu.org/blog/2011/12/16/online-glom-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Online Glom architecture</title>
		<link>http://www.bagu.org/blog/2011/05/27/online-glom-architecture/</link>
		<comments>http://www.bagu.org/blog/2011/05/27/online-glom-architecture/#comments</comments>
		<pubDate>Fri, 27 May 2011 14:24:25 +0000</pubDate>
		<dc:creator>Ben Konrath</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Glom]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GWT]]></category>

		<guid isPermaLink="false">http://www.bagu.org/blog/?p=524</guid>
		<description><![CDATA[I realize that I&#8217;ve been a little quiet about things but I&#8217;m still working on OnlineGlom for Openismus. I just finished moving Online Glom to the Model-View-Presenter (MVP) design pattern that the GWT developers recommend and thought it would be &#8230; <a href="http://www.bagu.org/blog/2011/05/27/online-glom-architecture/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I realize that I&#8217;ve been a little quiet about things but I&#8217;m still working on OnlineGlom for Openismus. I just finished moving Online Glom to the Model-View-Presenter (MVP) design pattern that the GWT developers recommend and thought it would be useful to document how things work to make it easier for other people to jump in.</p>
<p>This is going to be a pretty long post, so if you just want to try the latest Online Glom, it&#8217;s here:</p>
<p><a href="http://bagu.org:8080/OnlineGlom/">http://bagu.org:8080/OnlineGlom/</a></p>
<p>And if you want to build it, you can find the instructions here:</p>
<p><a href="http://www.glom.org/wiki/index.php?title=Development/OnlineGlom">http://www.glom.org/wiki/index.php?title=Development/OnlineGlom</a></p>
<p>If you have any questions, I&#8217;m on IRC most days &#8211; server: irc.gimp.org, channel: #openismus, nick: bkonrath.</p>
<p><strong>Introduction to MVP</strong></p>
<p><img src="http://www.bagu.org/blog/wp-content/uploads/2011/05/mvp.png" alt="diagram of the MVP pattern" title="mvp" width="303" height="559" class="alignleft size-full wp-image-551" />The <strong>Model</strong> objects in Online Glom are simple Data Transfer Objects (DTO) designed to optimize retrieving data from the server with the least number of requests. By GWT convention, these DTOs are in the org.glom.web.shared package.</p>
<p>The <strong>Presenter</strong> is where most of the work happens. Presenters are called Activities in the GWT 2.1 MVP framework and are started when a user navigates to a given Place (a bookmarkable URL in GWT terms). The start() method of an Activity is where we can request data from the server or listen for events on the event bus. We&#8217;ll use the results from the server or information from the event bus to display information in the Views. We can also use this information to change to new Places (bookmarkable URLs) and add fancy view transitions.</p>
<p><strong>Views</strong> in the MVP pattern are simple and reusable. The idea is to create as much of the UI as possible when the View is created and only change small parts of the View on successive loads. This minimizes expensive DOM operations which helps keep the UI &#8220;snappy&#8221;. The main parts of the View are created in the constructor and the Activity can get data from the View (e.g. &#8216;String getSelectedTable()&#8217; ) or set data in the View (e.g. &#8216;void setName(String name)&#8217; ). I put a dashed arrow from the View to the Presenter in the MVP diagram because there are some situations where it makes sense for the View to change to a new Place by calling the Presenter&#8217;s goTo() method.</p>
<p>That covers the basics of the MVP design pattern. Unfortunately <a href="https://code.google.com/webtoolkit/doc/2.3/DevGuideMvpActivitiesAndPlaces.html">the official documentation about the MVP framework in GWT</a> is not that great. Besides glossing over some major issues when developing even semi-complex applications, it also lacks simple diagrams which would really help explain things. For a better take on all of this GWT architecture stuff, I recommend a bunch of excellent blog posts by Thomas Broyer:</p>
<p><a href="http://tbroyer.posterous.com/gwt-21-places">http://tbroyer.posterous.com/gwt-21-places</a><br />
<a href="http://tbroyer.posterous.com/gwt-21-places-part-ii">http://tbroyer.posterous.com/gwt-21-places-part-ii</a><br />
<a href="http://tbroyer.posterous.com/gwt-21-activities">http://tbroyer.posterous.com/gwt-21-activities</a><br />
<a href="http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni#!/">http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni#!/</a></p>
<p><img src="http://www.bagu.org/blog/wp-content/uploads/2011/05/online-glom-overview.png" alt="diagram of Online Glom layouts" width="250" height="665" class="alignright size-full wp-image-573" /><strong>The Online Glom Layout</strong></p>
<p>Ok, now&#8217;s the time to clone <a href="https://gitorious.org/online-glom/gwt-glom">the code</a> and open some classes in your favourite editor.</p>
<p>In keeping with the documentation style that Thomas Broyer uses in his second blog post about GWT 2.1 Activities, I made a few diagrams to illustrate how the layout in Online Glom is currently setup. A LayoutPanel is used to hold all of the Display areas which are swapped in or out depending on which Place the user is at.</p>
<p>Each Display area has an Activity Mapper that creates a new Activity or returns a reference to an existing Activity depending which Place it has received from the Activity Manager. The DocumentSelectionActivityMapper and the DataActivityMapper return new Activities whereas the TableSelectionActivityMapper returns a reference to a TableSelectionActivity that has already been created. This allows the ListBox to keep the table name when the user navigates to the DetailsPlace. The same logic applies when the user returns to the ListPlace. The ListActivity might be changed to work more like the TableSelectionActivity but for now a new ListActivity is created whenever the user loads the ListPlace.</p>
<p><strong>Further Reading</strong></p>
<p>If you&#8217;re really interested in learning more about GWT architecture, I highly recommend Ray Ryan&#8217;s Best Practices for Architecting GWT App from Google I/O 2009:</p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/PDuhR18-EdM?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/PDuhR18-EdM?version=3" type="application/x-shockwave-flash" width="640" height="505" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The video is a bit dated because it was filmed before the GWT 2.1 MVP framework, but it&#8217;s still worth a watch (or listen).</p>
<p>I also found this deck of slides by David Chandler useful:</p>
<p><a href=" http://www.slideshare.net/turbomanage/whats-new-in-gwt-22">http://www.slideshare.net/turbomanage/whats-new-in-gwt-22</a></p>
<p>Checkout pages 45, 47 and 48. Sorry, I can&#8217;t link directly to those pages or find the accompanying talk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bagu.org/blog/2011/05/27/online-glom-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
	</channel>
</rss>

