<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Techno Lemming</title>
	<atom:link href="http://lemnik.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lemnik.wordpress.com</link>
	<description>it's all rather confusing really...</description>
	<pubDate>Fri, 04 Jul 2008 08:11:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>GWT RPC is (?:called) Aynchronous for a reason</title>
		<link>http://lemnik.wordpress.com/2008/07/04/gwt-rpc-is-called-aynchronous-for-a-reason/</link>
		<comments>http://lemnik.wordpress.com/2008/07/04/gwt-rpc-is-called-aynchronous-for-a-reason/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 08:03:33 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/2008/07/04/gwt-rpc-is-called-aynchronous-for-a-reason/</guid>
		<description><![CDATA[GWT RPC is totally asynchronous. You have no option to implement a synchronous call to the server. Many people find passing a callback to every remote method in order to receive the return value frustrating, and the fact that it returns immediately decidedly strange.
For those new to GWT, here&#8217;s a description of GWT RPC in [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>GWT RPC is totally asynchronous. You have no option to implement a synchronous call to the server. Many people find passing a callback to every remote method in order to receive the return value frustrating, and the fact that it returns immediately decidedly strange.</p>
<p>For those new to GWT, here&#8217;s a description of GWT RPC in pure Java terms. Read the code carefully and things will make a lot more sense.</p>
<p>First the definition of the service. Think of this like an RMI service interface.</p>
<pre name="code" class="java">
public interface MyService extends RemoteService {
 public String getText();
}
</pre>
<p>This is the interface the GWT client (Javascript) side of things will be using. The reason GWT makes you use this interface in because on the client side we need to call the method, and then receive the response some-time in the future. You can think of an AsyncCallback as an EventListener, when the server sends the response back, you get an event containing the success or failure data.</p>
<pre name="code" class="java">
public interface MyServiceAsync {
 public void getText(AsyncCallback&lt;String&gt; callback);
}
</pre>
<p>Now our Servlet is the implementation of the MyServer interface. You can think of this like the implementation of an RMI service or an EJB. The reason you extend RemoveServiceServlet is two-fold: (1) You need an HTTP path that the client can send data to. (2) Rather than forcing you to decode GWT&#8217;s flavour of Serialization and invoke the methods by hand, RemoteServiceServlet does it all for you (so all you do is implement the actual methods).</p>
<p>An important note here. This code runs on the server, under a real Java VM. It&#8217;s not compiled by GWT, it&#8217;s not even looked at in fact. You can use any classes here (surprisingly, this is something that catches a lot of people out).</p>
<pre name="code" class="java">
public class MyServiceImpl extends RemoveServiceServlet implements MyService {
 public String getText() {
  return &quot;Hello World&quot;;
 }
}
</pre>
<p>Now for our implementation on the client side. This is <span style="font-weight:bold;">not</span> how you would code this method call in GWT, this is a normal Java representation of what happens.</p>
<pre name="code" class="java">
public void onModuleLoad() {
 // This is a purely local representation of what
 // GWT.create(MyService.class) would do for you
 MyServiceAsync async = new MyServiceAsync() {
  // Our pretend implementation. In real GWT,
  // this object would be on the other side of the network
  MyServiceImpl impl = new MyServiceImpl();

  public void getText(final AsyncCallback&lt;String&gt; callback) {
   // When this method gets called, we spawn a
   // Thread to make the call to the server.
   // In JavaScript the call is often put in a queue,
   // by the browser and executed in a pool.
   // However, whichever way things happen the
   // method call returns immediately and does
   // not wait for the server to respond.

   Thread runner = new Thread() {
    public void run() {
     try {
      // Once we have the content, pass it
      // to the AsynCallback we were given.

      callback.onSuccess(impl.getText());
     } catch(Exception error) {
      // If an Exception occurs (unlikely in our
      // little example here), we pass it to the
      // AsyncCallback to deal with.

      callback.onFailure(error);
     }
    }
   };

   // Start our Thread and return.
   runner.start();
  }
 };

 final Label label = new Label(&quot;Foo&quot;);
 asyn.getText(new AsyncCallback&lt;String&gt;() {
  public void onSuccess(String message) {
   label.setText(message);
  }

  public void onFailure(Throwable error) {
   Window.alert(error.getMessage());
  }
 });

 label.setText(&quot;Bar&quot;);
}
</pre>
<p>So you can see from the example above that &#8220;Bar&#8221; may appear on the label, but it&#8217;s not likely. Far more likely is &#8220;Hello World&#8221; coming from our &#8220;server&#8221;.</p>
<p>There are a good reasons why GWT only allows for this sort of call.</p>
<ol>
<li>JavaScript has no threading model in place. It&#8217;s impossible to Object.wait() for something to Object.notify() you, which would be exactly how you would implement this sort of invocation in normal Java (if only under the hood)</li>
<li>Anyone who has used Swing extensively will know that doing lots of work in the event-dispatch-thread is a disaster. It stops repaints from happening, the application is basically unusable until you&#8217;re &#8220;event&#8221; in complete.In order to get around race-conditions and such multi-threading problems, JavaScript is all executed from within the browser event-queue. So if we sent a request to the server synchronously, the user wouldn&#8217;t even be able to open the file menu until the server gave us a response. &#8220;But I&#8217;m in a LAN&#8221; I&#8217;ve heard some say. GWT&#8217;s RPC mechanism is built for general consumption. Lazy Developers + Synchronous Calls + Open Internet is a recipe for disaster (and a lot of complaints on the mailing-lists), and the GWT devs know it.</li>
</ol>
<p>Asynchronous RPC with callbacks can be considered a small price to pay for an amazing amount of power. Personally I see it as even more power, as is breaks your code into smaller modules. I often have a single AsyncCallback class handling many different invocations from the server. Using this technique helps make your code smaller to deploy, and easier to maintain.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/124/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/124/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=124&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2008/07/04/gwt-rpc-is-called-aynchronous-for-a-reason/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;m looking for my gloves</title>
		<link>http://lemnik.wordpress.com/2008/07/02/im-looking-for-my-gloves/</link>
		<comments>http://lemnik.wordpress.com/2008/07/02/im-looking-for-my-gloves/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 14:04:33 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Arb]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/?p=122</guid>
		<description><![CDATA[I want to go shoot some photo&#8217;s, but it&#8217;s cold.
If anyone sees my gloves, please let me know where they are.
Thanks.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I want to go shoot some photo&#8217;s, but it&#8217;s cold.</p>
<p>If anyone sees my gloves, please let me know where they are.</p>
<p>Thanks.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/122/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/122/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=122&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2008/07/02/im-looking-for-my-gloves/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>GWT and the Java Runtime Environment</title>
		<link>http://lemnik.wordpress.com/2008/06/09/gwt-and-the-java-runtime-environment/</link>
		<comments>http://lemnik.wordpress.com/2008/06/09/gwt-and-the-java-runtime-environment/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 09:28:27 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[GWT]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/2008/06/09/gwt-and-the-java-runtime-environment-2/</guid>
		<description><![CDATA[As anyone who has coded with GWT will know, it includes some basic &#8220;emulation&#8221; of a few of the core JRE classes. The classes included are from: java.lang, java.util, java.io; and as of 1.5 java.sql (just the date related classes).
The reason it&#8217;s called emulation is that most of these classes back onto JavaScript types and [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As anyone who has coded with GWT will know, it includes some basic &#8220;emulation&#8221; of a few of the core JRE classes. The classes included are from: <tt>java.lang</tt>, <tt>java.util</tt>, <tt>java.io</tt>; and as of 1.5 <tt>java.sql</tt> (just the date related classes).</p>
<p>The reason it&#8217;s called emulation is that most of these classes back onto JavaScript types and structures using JSNI, and so are not entirely written in Java. Some of them also deliberately violate the contracts of their normal Java peers. For example, <tt>ArrayList</tt> has a constructor that takes an initial capacity. In JavaScript an Array object automatically resizes itself, so there is no gain in trying to pre-allocate the capacity. So GWT&#8217;s version of <tt>ArrayList</tt> ignores this parameter.</p>
<p>If you go and look at the list of supported JRE classes, you&#8217;ll notice many normal JRE classes missing. You&#8217;ll also notice many classes in GWT (under the <tt>com.google.gwt.*</tt> packages) that least fit the same role as a missing JRE class. For example: GWT has no <tt>java.util.Random</tt> class; it does however include the <tt>com.google.gwt.user.client.Random</tt> class. GWT&#8217;s Random class looks nothing like the JRE version, all it&#8217;s methods are static (<tt>nextBoolean</tt>, <tt>nextDouble</tt> and <tt>nextInt</tt>), and it has no constructors.</p>
<p>Why doesn&#8217;t GWT include the <tt>java.util.Random</tt> class, but instead has it&#8217;s own <tt>Random</tt> class? <tt>java.util.Random</tt> supports a specified seed and is based on a specified Pseudo Random Number algorithm (therefore any two instances with the same seed will produce the same sequence of numbers). However, JavaScript&#8217;s random number generation doesn&#8217;t. In order to keep code-size down (and speed up) GWT&#8217;s Random number generator backs directly onto the JavaScript <tt>Math.random()</tt> function, which has no way to provide a seed, and you don&#8217;t know for sure what the backing algorithm will be.</p>
<p><span style="font-weight:bold;">In short</span>: the JRE emulation in GWT provides a small set of commonly used classes that map well to JavaScript structures. For those JRE classes that don&#8217;t map well, or are less likely to be used in a client-side web application (think <tt>MessageDigest</tt>, or <tt>UUID</tt>), GWT doesn&#8217;t provide an alternative.</p>
<p><span style="font-weight:bold;">The Advert (or &#8216;In Conclusion&#8217;)</span>: Because there are many useful classes in standard Java that are not in GWT, I&#8217;ve started implementing GWT friendly versions of several (ie: <tt>java.util.Random</tt>, <tt>java.util.UUID</tt>, <tt>java.security.MessageDigest</tt>). Once they are more complete I will be releasing them under an Apache style license. Several of these classes will include <span style="font-style:italic;">multiple implementations</span> with different goals (the default being to keep the size down). You&#8217;ll be able to select alternative implementations by using GWT module properties.</p>
<p><span style="font-weight:bold;">Watch this space for more info.</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/119/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/119/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=119&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2008/06/09/gwt-and-the-java-runtime-environment/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>Exceptions and static initializers</title>
		<link>http://lemnik.wordpress.com/2008/06/03/exceptions-and-static-initializers/</link>
		<comments>http://lemnik.wordpress.com/2008/06/03/exceptions-and-static-initializers/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 14:33:59 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/?p=117</guid>
		<description><![CDATA[A common problem in Java is Exceptions in static initializers. What on earth do you do with them? This has been discussed a bit on my local JUG recently, and here&#8217;s a bit of a summary.
Common solutions:

Wrap the Exception in an ExceptionInInitializerError and re-throw it

This causes the entire class to be marked as &#8220;errored&#8221;, as [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A common problem in Java is Exceptions in static initializers. What on earth do you do with them? This has been discussed a bit on my local JUG recently, and here&#8217;s a bit of a summary.</p>
<p>Common solutions:</p>
<ul>
<li>Wrap the Exception in an ExceptionInInitializerError and re-throw it
<ul>
<li>This causes the entire class to be marked as &#8220;errored&#8221;, as though it didn&#8217;t validate</li>
<li>Any further use of the class will result in a NoClassDefFoundException, which can be confusing</li>
</ul>
</li>
<li>Log the Exception and continue as normal
<ul>
<li>If the log levels are set to high, nobody will ever see the Exception</li>
<li>Some Loggers get configured to drop stack traces</li>
<li>Sometimes the normal execution of code <strong>should</strong> stop
<ul>
<li>Someone configured something badly</li>
<li>The database is not running</li>
</ul>
</li>
</ul>
</li>
<li>Both of the above is a common pattern as well, and is generally considered &#8220;best practice&#8221;</li>
</ul>
<p>One solution mentioned is to lazy-instantiate the static fields in the class. This is a nice idea, but has a few flaws:</p>
<ol>
<li>A synchronized block is needed, where static initializers are inherently very thread-safe</li>
<li>It incurs an additional expense in methods that will be using these fields</li>
<li>In the case of a singleton, it&#8217;s likely that the first method that will be called will cause the &#8220;lazy&#8221; code to run. Since classes are generally lazy-instantiated by the VM, a static initializer would achieve the same thing.</li>
</ol>
<p>My solution was this one:</p>
<pre name="code" class="java">

public class StaticInitializerExample {
 private static final Wrapper WRAPPER = createWrapper();

 private static abstract class Wrapper {
  private abstract StaticInitializerExample get();
 }

 private static Wrapper createWrapper() {
  try {
   final StaticInitializerExample c =
     new StaticInitializerExample();

   return new Wrapper() {
    public StaticInitializerExample get() {
     return c;
    }
   };
  } catch(final Exception e) {
    return new Wrapper() {
     public StaticInitializerExample get() {
      throw new RuntimeException(e);
     }
    };
  }
 }

 public static StaticInitializerExample getInstance() {
  return WRAPPER.get();
 }

 private StaticInitializerExample() throws Exception {
  // do code that could throw an exception
 }
}
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/117/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/117/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=117&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2008/06/03/exceptions-and-static-initializers/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>Posing an EoD SQL Question</title>
		<link>http://lemnik.wordpress.com/2008/02/15/posing-an-eod-sql-question/</link>
		<comments>http://lemnik.wordpress.com/2008/02/15/posing-an-eod-sql-question/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 12:14:39 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<category><![CDATA[EJB]]></category>

		<category><![CDATA[JDBC]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[eodsql]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/?p=116</guid>
		<description><![CDATA[So here&#8217;s the question (and first post in a very long time):
Who would like to see EoD SQL opened up even more?
EoD SQL at the moment is open-source, but even an open-source project is in a way: closed. To add new functionality to EoD SQL you need to climb into the source code. So here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So here&#8217;s the question (and first post in a very long time):</p>
<p>Who would like to see EoD SQL opened up even more?</p>
<p>EoD SQL at the moment is open-source, but even an open-source project is in a way: closed. To add new functionality to EoD SQL you need to climb into the source code. So here&#8217;s the idea:</p>
<p>A new MethodImplementationFactory interface that you can implement to provide functionality for a single type of method that could exist in a Query interface. It would look something like this:</p>
<pre name="code" class="java">

public interface MethodImplementationFactory {
    public Class&lt;? extends Annotation&gt; getAnnotationType();

    public void validate(Method method) throws InvalidQueryException, InvalidDataTypeException;

    public MethodImplementation create(QueryImplementation implementation, Method method);
}
</pre>
<p>The MethodImplementation itself will be an interface (in a way) a lot like <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/InvocationHandler.html" target="_blank">java.lang.reflect.Invocationhandler</a>, as it will be the object called to fulfil a method invocation on the <tt>implementation</tt> object. The MethodImplementation will be provided with plenty of support methods for handling Connection objects correctly and so on, making development of new method implementations much easier.</p>
<p><b>Why make this change?</b></p>
<p>This change would allow for easy development of new Annotation instructions, for example: @BatchUpdate or @Call (both requested features). The new instructions could be mixed in with existing annotations such as @Select and @Update without any additional code.</p>
<p><b>Any thoughts on this? Comments are welcome!<br />
</b></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/116/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/116/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=116&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2008/02/15/posing-an-eod-sql-question/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>EoD SQL 1.1 Released</title>
		<link>http://lemnik.wordpress.com/2008/01/15/eod-sql-11-released/</link>
		<comments>http://lemnik.wordpress.com/2008/01/15/eod-sql-11-released/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 12:33:01 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<category><![CDATA[JDBC]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[eodsql]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/2008/01/15/eod-sql-11-released/</guid>
		<description><![CDATA[EoD SQL 1.1 was released this morning. There are no major new features, but it&#8217;s well worth the download.
Included in the release:

Updatable DataSet objects
GeneratedKeys.RETURNED_KEYS_FIRST_COLUMN to work around a bug in Derby, or improve performance
SPI query-generators (only available under Java 6)
Improved DataSet documentation
Lots of internal cleaning up
Several small bug fixes

       [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="https://eodsql.dev.java.net/" target="_blank">EoD SQL 1.1</a> was released this morning. There are no major new features, but it&#8217;s well worth <a href="https://eodsql.dev.java.net/servlets/ProjectDocumentList?folderID=8364&amp;expandFolder=8364&amp;folderID=0" target="_blank">the download</a>.</p>
<p>Included in the release:</p>
<ul>
<li>Updatable DataSet objects</li>
<li>GeneratedKeys.RETURNED_KEYS_FIRST_COLUMN to work around a bug in Derby, or improve performance</li>
<li>SPI query-generators (only available under Java 6)</li>
<li>Improved DataSet documentation</li>
<li>Lots of internal cleaning up</li>
<li>Several small bug fixes</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/115/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/115/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=115&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2008/01/15/eod-sql-11-released/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>Feature Requests for EoD SQL</title>
		<link>http://lemnik.wordpress.com/2007/12/10/feature-requests-for-eod-sql/</link>
		<comments>http://lemnik.wordpress.com/2007/12/10/feature-requests-for-eod-sql/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 11:01:20 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<category><![CDATA[JDBC]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Thoughts]]></category>

		<category><![CDATA[eodsql]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/2007/12/10/feature-requests-for-eod-sql/</guid>
		<description><![CDATA[I&#8217;ve had a few (ie: 2) requests and inquiries for new features on EoD SQL. Here is the list so far:

The optional ability to use JDBC batch functionality (optional because not all drivers support it)
A way to use stored procedures from your query interface (probably a new annotation)

I will be working on these features soon [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve had a few (ie: 2) requests and inquiries for new features on EoD SQL. Here is the list so far:</p>
<ol>
<li>The optional ability to use JDBC batch functionality (optional because not all drivers support it)</li>
<li>A way to use stored procedures from your query interface (probably a new annotation)</li>
</ol>
<p>I will be working on these features soon (hopefully), although I&#8217;d like some input on the first one. How should this be implemented? You don&#8217;t want to force batching on a specific query. One option I thought of is a new &#8220;BatchUpdate&#8221; return type:</p>
<pre name="code" class="java">

public interface MyQuery extends BaseQuery {
    @Update(sql=&quot;INSERT INTO users (name, password) VALUES(?{1.name}, ?{1.hashedPassword})&quot;,keys=GeneratedKeys.RETURNED_KEYS_COLUMNS_SPECIFIED)
    public BatchUpdate&lt;User&gt; createUser(User user);
}
</pre>
<p>Which you could then use as:</p>
<pre name="code" class="java">

MyQuery query = QueryTool.getQuery(MyQuery.class);
BatchUpdate&lt;Update&gt; update = query.createUser(null);
query = update.getQuery();

for(User u : users) {
    query.createUser(u);
}

query = update.commit();
</pre>
<p>getQuery() acts a bit like a &#8220;Stack.push()&#8221; operation, while commit() acts like the &#8220;pop()&#8221;. There are loads of other possibilities on implementation here. Haven&#8217;t really gone into how the keys will work here, but you can imagine. <em><strong>Let me know what you think!</strong></em></p>
<p>If you have a feature request, or if you are using EoD SQL for anything: comment! I&#8217;m always looking for feedback.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/114/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/114/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=114&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2007/12/10/feature-requests-for-eod-sql/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>Why GWT is here to stay</title>
		<link>http://lemnik.wordpress.com/2007/12/04/why-gwt-is-here-to-stay/</link>
		<comments>http://lemnik.wordpress.com/2007/12/04/why-gwt-is-here-to-stay/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 08:10:10 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Thoughts]]></category>

		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/2007/12/04/why-gwt-is-here-to-stay/</guid>
		<description><![CDATA[I&#8217;ve been developing with plain JavaScript for several years now, long before the AJAX craze started (when my spell-checker posted a hidden iframe back to the server and such). Why would I be an advocate of GWT when I&#8217;ve written web-apps that include over 10&#8242;000 lines of JavaScript? Lets think of this a slightly different [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been developing with plain JavaScript for several years now, long before the AJAX craze started (when my spell-checker posted a hidden iframe back to the server and such). Why would I be an advocate of GWT when I&#8217;ve written web-apps that include over 10&#8242;000 lines of JavaScript? Lets think of this a slightly different way: <em>Why wouldn&#8217;t I be an advocate of GWT when I&#8217;ve had to <strong>maintain</strong> 10&#8242;000 lines of JavaScript</em>?</p>
<p>Some of the common misconceptions about GWT:</p>
<ul>
<li>GWT is for people who don&#8217;t want to or can&#8217;t code JavaScript</li>
<li>GWT is only there to hide browser differences (and there are plenty of JavaScript API&#8217;s that do this)</li>
<li>GWT produces bloated JavaScript files</li>
<li>GWT doesn&#8217;t let a graphic designer produce the User Interface</li>
<li>GWT takes away the raw power of JavaScript</li>
<li>GWT is a plain Java to JavaScript compiler</li>
</ul>
<p>I see these complaints everywhere. Those who make them are mostly PHP developers, or people who have never worked on a commercial browser based system that requires large amounts of JavaScript.</p>
<p>At this point, let me say something about GWT that I don&#8217;t see explicitly said often enough:</p>
<p><strong>GWT is a Web <em>Application</em> framework!</strong></p>
<p>GWT&#8217;s space is not in putting an auto-completing text-input on an otherwise fairly static HTML page. There are plenty of JavaScript API&#8217;s that will do that for you. GWT is not &#8220;Swing for the browser&#8221; either! GWT is more like the Java Desktop Application Framework, or the Netbeans Platform. GWT is not about simply building a user-interface, it&#8217;s about reducing the load on your server.</p>
<p>A serious flaw in web frameworks like Struts or WebWork is the amount of data they store in the session. The unfortunate fact is that storing data in your session is very expensive for your server cluster. It&#8217;s fine running on a single machine; or if you have very intelligent load balancers, however: running on a larger cluster, or trying to handle tens-of-thousands of simultaneous users becomes really hard.</p>
<p><em>Why is the session expensive?</em></p>
<p>In Java you have wonderful Serialization of objects. References are correctly rebuilt when loading a serialized object and so on. Using an HttpSession in a clustered environment however, means that every object in the Session is re-written across the network at the end of every request. Why not just the objects that have changed?  The answer is simple: how do you know which have changed?</p>
<p>Struts for example stores all of the Action objects in the Session. Thats potentially a lot of objects to store, and move around between servers. How does this relate to GWT though? In GWT you can place your &#8220;index&#8221; page behind a standard Filter or a &lt;security&gt; mapping in your Web XML to handle the login of your users, and have GWT work through a service style system, where your servers act in a stateless manor. This drastically reduces the load on your servers, since they no longer need to hold session data in memory <em>or </em>synchronize it with the other servers at the end of each request. In fact, the GWT application can cache the resulting data on the users browser instead of in the Session!</p>
<p><strong>But what about my Graphic Designer?</strong></p>
<p>When developing a desktop application, you generally have a user interface designer working with you (if you don&#8217;t, go hire one). Like I&#8217;ve already said: GWT is for building applications that happen to run inside a web browser. If you are building a web site, you should probably look at a different technology (though keep GWT in mind all the same). A user interface designer is often not a developer, and so can&#8217;t actually write the user interface.</p>
<p>The other side of this argument is: <em><strong>what is your web designer doing writing your HTML?!?!?!</strong></em> In my experience,the web designer produces an <em>image</em> (often in PhotoShop) of the look &amp; feel for the site, and then provides you with the graphical elements you need as you write the HTML for the site. Having a web designer produce HTML is <em>always</em> a bad idea, no matter how much they know about it. If nothing else: HTML limits their creativity.</p>
<p><strong>But I know plenty of JavaScript, why hide it behind Java?</strong></p>
<p>A note to those with this argument:</p>
<ul>
<li><em>Get off your high horse and get back to work</em></li>
</ul>
<p>JavaScript is a very powerful language, GWT is not hiding it away behind Java. If you need to code JavaScript in your GWT application: use JSNI, thats what it&#8217;s there for. The problem with AJAX is <em>not</em> JavaScript, it&#8217;s the way it&#8217;s implemented across different browsers. You eventually wind up with loads of &#8220;if(browser == IE)&#8221; and such all the way through your JavaScript. I won&#8217;t even bother to mention the nightmare that is passing events in JavaScript. GWT neatly deals with all of that for you, <em>without any browser checks in the produced code </em>(well, there is one to decide which version of the application to load).</p>
<p><strong>Summary</strong></p>
<p>GWT does not cripple you by having you code Java, it empowers you to do more with less code. The amount of code produced is often smaller than the pure JavaScript API&#8217;s that hide browser differences. It&#8217;s also a lot easier to work with.</p>
<p><em> You spend more time working on your application logic and less time re-inventing the wheel.</em></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/113/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/113/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=113&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2007/12/04/why-gwt-is-here-to-stay/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>Development on EoD SQL Continues</title>
		<link>http://lemnik.wordpress.com/2007/11/22/development-on-eod-sql-continues/</link>
		<comments>http://lemnik.wordpress.com/2007/11/22/development-on-eod-sql-continues/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 09:52:23 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/2007/11/22/development-on-eod-sql-continues/</guid>
		<description><![CDATA[A few days ago I released EoD SQL 1.0, and moved the project to Java.net. So now that 1.0 is out the door, where to next? There are several developments that will be taking place in EoD SQL land, and I&#8217;m looking for:

People interested in developing on the codebase
Input!

Bug Reports
Feature Requests
Ideas
What do you use EoD [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A few days ago I released <a href="https://eodsql.dev.java.net/" target="_blank">EoD SQL 1.0</a>, and moved the project to Java.net. So now that 1.0 is out the door, where to next? There are several developments that will be taking place in EoD SQL land, and I&#8217;m looking for:</p>
<ul>
<li>People interested in developing on the codebase</li>
<li>Input!
<ul>
<li>Bug Reports</li>
<li>Feature Requests</li>
<li>Ideas</li>
<li>What do you use EoD SQL for?</li>
</ul>
</li>
</ul>
<p>As of now, the next set of developments on EoD SQL include:</p>
<ol>
<li>Writable DataSet objects</li>
<li>Internal optimizations
<ol>
<li>Reuse PreparedStatements</li>
</ol>
</li>
<li>Batch Processing (using the JDBC addBatch() methods)
<ol>
<li>This will be an optional operation in order to cater for JDBC drivers that don&#8217;t support batches</li>
</ol>
</li>
<li>Custom QueryFactory objects
<ol>
<li>Based on the ServliceLoader class</li>
<li>Only available for Java 1.6 or higher</li>
<li>Those running 1.5 will not be able to use Custom QueryFactories</li>
<li>Will be the base for an EoD SQL Query compiler</li>
</ol>
</li>
</ol>
<p>Let me know what you think of the upcoming feature set, what other features would you like to see, and if you&#8217;re interested in working on the EoD SQL project.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/112/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/112/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=112&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2007/11/22/development-on-eod-sql-continues/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows; Linux and Memory</title>
		<link>http://lemnik.wordpress.com/2007/11/21/windows-linux-and-memory/</link>
		<comments>http://lemnik.wordpress.com/2007/11/21/windows-linux-and-memory/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 07:44:12 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Vista]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://lemnik.wordpress.com/2007/11/21/windows-linux-and-memory/</guid>
		<description><![CDATA[You often hear how much Linux like memory, and how much it eats up compared to Windows. It&#8217;s true! Linux eats into your memory, no matter how much you have, you never seem to have any free for applications to run in! I recently read an article where the author was complaining how Firefox ate [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You often hear how much Linux like memory, and how much it eats up compared to Windows. It&#8217;s true! Linux eats into your memory, no matter how much you have, you never seem to have any free for applications to run in! I recently read an article where the author was complaining how Firefox ate into his memory under Vista. The sad fact of it is:</p>
<p><strong>While Linux appears to eat more of your memory, it manages it much better than Windows does.</strong></p>
<p>I have Firefox open right now, I have 10 tabs open with graphics intensive web sites. Firefox is claiming 200Mb of my precious memory&#8230; or is it? Actually no: real size in memory 90Mb.</p>
<p>The current list of the most memory intensive applications I&#8217;m running, and their &#8220;supposed&#8221; memory usage:</p>
<ul>
<li>Java (Netbeans) 600Mb</li>
<li>Xorg 380Mb</li>
<li>Firefox 200Mb</li>
<li>Thunderbird 130Mb</li>
<li>Amarok 120Mb</li>
<li>Kwin (KDE) 120Mb</li>
</ul>
<p>Now considering I only have 1.5Gb of memory in this machine that 50Mb to much, and considering there are a total of 120 processes running, I haven&#8217;t even started to cover the list. Now as any knowledgeable person will tell you, Linux is using some of the hard-drive and pretending that it&#8217;s memory, but since a hard-drive is slow, my computer will be running awfully slow.</p>
<p><strong>Wrong!</strong> Yes, a disk is much much <em>much</em> slower than memory (especially a laptop drive like this one). However, my computer is running very very fast. Why? Linux&#8217;s memory manager notes what parts of memory are used frequently, and what parts are seldom accessed. This means that the parts that are used frequently stay in real memory, and the stuff no-one is using gets stored on the disk.</p>
<p><strong>Translation</strong>: Linux will run much faster, and keeps things in memory in such a way as to speed things up! Under Windows, more free memory is better, under Linux it&#8217;s the opposite! Less free memory is better, since it means Linux is doing it&#8217;s job better.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lemnik.wordpress.com/111/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lemnik.wordpress.com/111/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lemnik.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lemnik.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lemnik.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lemnik.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lemnik.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lemnik.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lemnik.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lemnik.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lemnik.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lemnik.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lemnik.wordpress.com&blog=291115&post=111&subd=lemnik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lemnik.wordpress.com/2007/11/21/windows-linux-and-memory/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/lemnik-128.jpg" medium="image">
			<media:title type="html">lemnik</media:title>
		</media:content>
	</item>
	</channel>
</rss>