<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-637539524632952000</id><updated>2011-11-27T15:39:36.981-08:00</updated><category term='bea'/><category term='external'/><category term='tools'/><category term='algorithms'/><category term='tex'/><category term='software'/><category term='spring'/><category term='resources'/><category term='patterns'/><category term='latex'/><title type='text'>CKKL's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ckkloverdos.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ckkloverdos.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Christos KK Loverdos</name><uri>http://www.blogger.com/profile/14708765707523586272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://ckkloverdos.com/img/ckkl4.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-637539524632952000.post-5244643743824662982</id><published>2007-10-08T07:37:00.001-07:00</published><updated>2007-10-08T07:56:24.512-07:00</updated><title type='text'>Bye Bye Blogger</title><content type='html'>At last, I have moved my blog to my own domain.&lt;br /&gt;Please find it at &lt;a href="http://blog.ckkloverdos.com"&gt;http://blog.ckkloverdos.com&lt;/a&gt;.&lt;br /&gt;The relevant feed is at &lt;a href="http://blog.ckkloverdos.com/feed/"&gt;http://blog.ckkloverdos.com/feed/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/637539524632952000-5244643743824662982?l=ckkloverdos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/5244643743824662982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/5244643743824662982'/><link rel='alternate' type='text/html' href='http://ckkloverdos.blogspot.com/2007/10/bye-bye-blogger.html' title='Bye Bye Blogger'/><author><name>Christos KK Loverdos</name><uri>http://www.blogger.com/profile/14708765707523586272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://ckkloverdos.com/img/ckkl4.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-637539524632952000.post-7439670923509712856</id><published>2007-07-16T01:15:00.001-07:00</published><updated>2007-07-20T03:19:00.287-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='resources'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>On Handling Dependent Resources - The Ensure/Create/Test Pattern</title><content type='html'>&lt;div style="text-align: justify;"&gt;Recently, I had to restructure some resource handling code. The case that I had some resources A, B, C, ... and each one depended on some other in order either to be created or to function properly. So I had to devise a way to handle the dependencies and make sure that whenever I used a resource, all its dependencies are met.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I will use a simplistic example to make things clearer. Let's say we have resource A, which depends on resource B, which in turn depends on resource C. A is created using B and B is created using C. Our code always uses A directly, so we need to make sure that B and C have been created before using A.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;My second approach to the solution is a lazy, bottom-up one. Before using A, I need to &lt;span style="font-style: italic;"&gt;ensure &lt;/span&gt;that it is functioning correctly and of course lazily &lt;span style="font-style: italic;"&gt;create &lt;/span&gt;it at some point. Also, I assume that we can always have some test functionality to make sure that A is "alive". For example, for a DB connection we can always issue some &lt;span style="font-style: italic;"&gt;test &lt;/span&gt;SQL statement (&lt;span style="font-family:courier new;"&gt;select 1 from dual&lt;/span&gt; is common among Oracle developers). In the previous statements, please notice my italics on the three notions: &lt;span style="font-style: italic;"&gt;ensure&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;create&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;test&lt;/span&gt;. So here are my findings:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Client code that uses A:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ensure(A)&lt;br /&gt;  ...do something with A...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The backbone routines:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def ensure(A):&lt;br /&gt;  if A is null:&lt;br /&gt;    create(A)&lt;br /&gt;  test(A)&lt;br /&gt;&lt;br /&gt;def create(A):&lt;br /&gt;  dispose(A)&lt;br /&gt;  ensure(B)&lt;br /&gt;  B.create(A)&lt;br /&gt;&lt;br /&gt;def test(A):&lt;br /&gt;  ...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Notice that I am also using one more routine, namely &lt;span style="font-style: italic;"&gt;dispose&lt;/span&gt;. Its role is to safely dispose a resource, meaning that it takes care that the resource is not null, it properly handles exceptions and so on. Of course, as you can understand, there are a lot more details for a production-ready code and the routines admit variations...Also, in the generic case, we may have a graph of dependencies...&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This is how I came to the programming pattern, for which I just chose the name in the title. As I wrote above, this is my second approach. The first was a top-down one . But I am not going to give it here....&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/637539524632952000-7439670923509712856?l=ckkloverdos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/7439670923509712856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/7439670923509712856'/><link rel='alternate' type='text/html' href='http://ckkloverdos.blogspot.com/2007/07/on-handling-dependent-resources.html' title='On Handling Dependent Resources - The Ensure/Create/Test Pattern'/><author><name>Christos KK Loverdos</name><uri>http://www.blogger.com/profile/14708765707523586272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://ckkloverdos.com/img/ckkl4.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-637539524632952000.post-2479197550745714957</id><published>2007-05-09T10:52:00.000-07:00</published><updated>2007-05-09T11:03:31.758-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='tex'/><title type='text'>On tools [mytex]</title><content type='html'>I have always been fond of tools that makes life easier....&lt;br /&gt;&lt;br /&gt;I recently needed to recompile one of my papers in Greek and &lt;a href="http://ckkloverdos.com/software/mytex"&gt;mytex&lt;/a&gt; did - once more - its job perfectly well.&lt;br /&gt;&lt;br /&gt;I made it during my stay at the &lt;a href="http://www.ekt.gr"&gt;National Hellenic Documentation Center&lt;/a&gt; in order to handle masses of LaTeX-based (!!!) documentation I had produced there.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ckkloverdos.com/software/mytex"&gt;mytex&lt;/a&gt; helps one with the parsing of LaTeX files written in mixed greek and english. It can automatically insert proper babel commands for the language switches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/637539524632952000-2479197550745714957?l=ckkloverdos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/2479197550745714957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/2479197550745714957'/><link rel='alternate' type='text/html' href='http://ckkloverdos.blogspot.com/2007/05/on-tools-mytex.html' title='On tools [mytex]'/><author><name>Christos KK Loverdos</name><uri>http://www.blogger.com/profile/14708765707523586272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://ckkloverdos.com/img/ckkl4.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-637539524632952000.post-7951552476911560389</id><published>2007-05-09T08:03:00.000-07:00</published><updated>2007-05-09T11:08:30.496-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='external'/><category scheme='http://www.blogger.com/atom/ns#' term='bea'/><title type='text'>Spring 2.0.1 and BEA WebLogic Server 9.2 Integration</title><content type='html'>&lt;p&gt;Spring brings the power of POJOs to BEA's server&lt;/p&gt;&lt;p&gt;&lt;a href="http://dev2dev.bea.com/pub/a/2007/04/spring-2-weblogic-server-9-integration.html"&gt;Spring 2.0.1 and BEA WebLogic Server 9.2 Integration&lt;/a&gt; by Andy Piper and Eric Hsiao, Rod Johnson, Chris Wall -- WebLogic Server 9.2 provides a platform for enhanced management, ease-of-use and scalability of Java applications. The Spring Framework enables a simpler, POJO based, approach to Java EE development without sacrificing the power of the platform. This article describes the synergy of these two systems, and introduces the Spring on WebLogic kit.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/637539524632952000-7951552476911560389?l=ckkloverdos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/7951552476911560389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/7951552476911560389'/><link rel='alternate' type='text/html' href='http://ckkloverdos.blogspot.com/2007/05/spring-201-and-bea-weblogic-server-92.html' title='Spring 2.0.1 and BEA WebLogic Server 9.2 Integration'/><author><name>Christos KK Loverdos</name><uri>http://www.blogger.com/profile/14708765707523586272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://ckkloverdos.com/img/ckkl4.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-637539524632952000.post-3050299640571074362</id><published>2007-05-03T07:50:00.000-07:00</published><updated>2007-05-04T00:10:56.181-07:00</updated><title type='text'>First Post</title><content type='html'>Just for historical reasons...&lt;br /&gt;&lt;br /&gt;More will come soon. For the moment, take a look at my space: &lt;a href="http://ckkloverdos.com"&gt;http://ckkloverdos.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/637539524632952000-3050299640571074362?l=ckkloverdos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ckkloverdos.blogspot.com/feeds/3050299640571074362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=637539524632952000&amp;postID=3050299640571074362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/3050299640571074362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637539524632952000/posts/default/3050299640571074362'/><link rel='alternate' type='text/html' href='http://ckkloverdos.blogspot.com/2007/05/first-post.html' title='First Post'/><author><name>Christos KK Loverdos</name><uri>http://www.blogger.com/profile/14708765707523586272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://ckkloverdos.com/img/ckkl4.jpg'/></author><thr:total>0</thr:total></entry></feed>
