<?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>Über Software &#187; java</title>
	<atom:link href="http://www.uebersoftware.com/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.uebersoftware.com</link>
	<description>Opinions and thoughts on Software and Technology.</description>
	<lastBuildDate>Thu, 29 Apr 2010 06:04:30 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Puzzles: Informative alternatives for Java developers</title>
		<link>http://www.uebersoftware.com/2010/04/puzzles-informative-alternatives-for-java-developers/</link>
		<comments>http://www.uebersoftware.com/2010/04/puzzles-informative-alternatives-for-java-developers/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 06:04:30 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Distractions]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=235</guid>
		<description><![CDATA[Reading in my currrent favorate time-beater book when commuting I stumbled across the following:
\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020
\u0063\u006c\u0061\u0073\u0073\u0020\u0055\u0067\u006c\u0079
\u007b\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020
\u0020\u0020\u0020\u0020\u0073\u0074\u0061\u0074\u0069\u0063
\u0076\u006f\u0069\u0064\u0020\u006d\u0061\u0069\u006e\u0028
\u0053\u0074\u0072\u0069\u006e\u0067\u005b\u005d\u0020\u0020
\u0020\u0020\u0020\u0020\u0061\u0072\u0067\u0073\u0029\u007b
\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074
\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0020
\u0022\u0048\u0065\u006c\u006c\u006f\u0020\u0077\u0022\u002b
\u0022\u006f\u0072\u006c\u0064\u0022\u0029\u003b\u007d\u007d
Guess what is this?*
Java Puzzles is one of these great book you can read when travelling short distances. It keeps you fit in the language basics and is fun to read. I also like the fact that being an  IT book for [...]]]></description>
			<content:encoded><![CDATA[<p>Reading in my currrent favorate time-beater book when commuting I stumbled across the following:</p>
<p>\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020<br />
\u0063\u006c\u0061\u0073\u0073\u0020\u0055\u0067\u006c\u0079<br />
\u007b\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020<br />
\u0020\u0020\u0020\u0020\u0073\u0074\u0061\u0074\u0069\u0063<br />
\u0076\u006f\u0069\u0064\u0020\u006d\u0061\u0069\u006e\u0028<br />
\u0053\u0074\u0072\u0069\u006e\u0067\u005b\u005d\u0020\u0020<br />
\u0020\u0020\u0020\u0020\u0061\u0072\u0067\u0073\u0029\u007b<br />
\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074<br />
\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0020<br />
\u0022\u0048\u0065\u006c\u006c\u006f\u0020\u0077\u0022\u002b<br />
\u0022\u006f\u0072\u006c\u0064\u0022\u0029\u003b\u007d\u007d</p>
<p>Guess what is this?*</p>
<p><a href="http://www.amazon.com/gp/product/032133678X?ie=UTF8&amp;tag=uebersoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=032133678X" target="_blank">Java Puzzles</a> is one of these great book you can read when travelling short distances. It keeps you fit in the language basics and is fun to read. I also like the fact that being an  IT book for once and doesn&#8217;t require a computer to work it through. This is from a <a href="http://www.amazon.com/gp/product/032133678X?ie=UTF8&amp;tag=uebersoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=032133678X" target="_blank">newer edition</a> of Java Puzzlers <a href="http://www.amazon.com/gp/product/032133678X?ie=UTF8&amp;tag=uebersoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=032133678X">Joshua Bloch and Neal Gafters book</a> on traps, pitfalls and corner cases in the Java programming language.</p>
<p>* A Java Hello world in Unicode, due to Java&#8217;s native Unicode support this is completely legal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2010/04/puzzles-informative-alternatives-for-java-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lessons learned trusting Code Generators</title>
		<link>http://www.uebersoftware.com/2009/10/lessons-learned-trusting-code-generators/</link>
		<comments>http://www.uebersoftware.com/2009/10/lessons-learned-trusting-code-generators/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 22:42:10 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[Code Generators]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[Netbeans]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=155</guid>
		<description><![CDATA[To give you a short answer beforehand: Do not do it! But let me tell you my experience:
I started using Jersey back in 2007 when it was at version 0.4. Netbeans however already had a plugin to get you started on the fast track by generating REST Webservices out of Entity Classes, which you can [...]]]></description>
			<content:encoded><![CDATA[<p>To give you a short answer beforehand: Do not do it! But let me tell you my experience:</p>
<p>I started using <a href="https://jersey.dev.java.net/">Jersey </a>back in 2007 when it was at version 0.4. Netbeans however already had a plugin to get you started on the fast track by generating REST Webservices out of Entity Classes, which you can also generate out of an existing db schema. At that time I was only starting learning JPA and was happy that the Netbeans Code Generators took care of most of my Entity Access Code. In retrospective I should have made the effort of learning everything JPA beforehand and not gradually as I worked along. Usually I actually would have done that, but the Code Generators tricked me into not doing it: It just seemed too simple to bother. </p>
<p>Here is what Netbeans generated to get an object by primary key:</p>
<p><code><br />
Foo result = (Foo )service.createQuery("Select e from Foo e where e.id = :id").setParameter("id", id).getSingleResult();<br />
</code><br />
Compared to:<br />
<code><br />
Foo result = (Foo )service.find(Foo.class, id);<br />
</code></p>
<p>Problem with first approach besides being the obvious bloathed version: this will likely not be an easy cache hit wheras the second method, depending on your persistence provider will likely go a direct way to find the object within an identity map in the second level cache. </p>
<p>No big deal you might say just change the Query to a Finder method. Unfortunately its not just done with this because the getSingleResult also throws an unchecked NotFoundException when the Entity was not found, opposed to returning null in the finder method. In the generated code this exception was catched, wrapped and rethrown as a checked one. Nice so in some parts of my code was building logic upon those rethrown Exceptions when an entity was not found. So changing the way to retrieve an object had a long tail unfortunately.</p>
<p>Besides that the bigger problem is the design of an efficient and effective object domain model. I am speaking about fetch definitions, caching strategies, lazy / eager loading, and all that. At that time I was frankly just overloaded with a lot of other work beside the JPA stuff so I basically thought that the defaults that Netbeans generated might just work out well. Well no no no.</p>
<p>Another example are the Web Services Generators in Netbeans 6.7. As it turned out, the plugin developers have sometimes simplified-out methods as with the Facebook Service: There is no batching. You probably won&#8217;t write a Facebook application without using the batching support. </p>
<p>It feels to me that nowadays many IDE&#8217;s and tools come out with the message that they will do all the work for you. What you have to do is just some simple plumbing: enter an API key here, connect to your datebase there and you are done. My experience however is, even for a quick learning curve (and not learning by a bad example), it is better not to trust those generators in the first place and only use them if you can easily spot wrong code and correct such pieces yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2009/10/lessons-learned-trusting-code-generators/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Long development cycles of compiled languages &#8211; the real killer</title>
		<link>http://www.uebersoftware.com/2009/09/development-cycles-of-compiled-languages/</link>
		<comments>http://www.uebersoftware.com/2009/09/development-cycles-of-compiled-languages/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 13:24:20 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web2.0]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=83</guid>
		<description><![CDATA[Ever asked yourself what are the reasons for the rise of scripting  languages like PHP, Ruby, Groovy for web development in the last couple of years? Let&#8217;s take the concrete case of Java. Common critiques of the language and the API&#8217;s, and the J2EE/JEE frameworks were/are in a loose historical order:

performance &#8211; too slow: this [...]]]></description>
			<content:encoded><![CDATA[<p>Ever asked yourself what are the reasons for the rise of scripting  languages like PHP, Ruby, Groovy for web development in the last couple of years? Let&#8217;s take the concrete case of Java. Common critiques of the language and the API&#8217;s, and the J2EE/JEE frameworks were/are in a loose historical order:</p>
<ul>
<li>performance &#8211; too slow: this was quite a while ago. JVM&#8217;s are very fast nowadays</li>
<li>bloated: still true for some aspects. E.g. no closures (still..)</li>
<li>too complex &amp; heavyweight, meaning too many dependencies to setup and take care of. Especially for J2EE this was the case. JEE changed a lot here.</li>
</ul>
<p>The list could go on, but is mostly centered on those arguments which are however mostly referring older releases of the language and its libraries. Nowadays JEE is actually very lightweight, has a great set of tools that speed up app development and is lighening fast. With the advance of tooling support, common IDE&#8217;s  make it irrelevant if you have to generate setters and getters (bloated?) or not, and enable refactoring of code with a button click.</p>
<p>When you compare the (web)framework support between Java and interpreted scripting languages Java has learned a lot from past mistakes with J2EE 1.2-1.4.  CoC (Convention over Configuration), DRY (Don&#8217;t repeat yourself), Scaffolding, etc. can be found in Java frameworks just as in RoR. I don&#8217;t think that there&#8217;s a general winner &#8211; this really depends on the task and situation at hand.</p>
<p>Then there&#8217;s dynamic types vs. static types. There are pro and cons for both here, I prefer static typed to detect errors early at development time.</p>
<p>I claim that the real reason for the continued success of scripting languages are the faster development cycles. Especially there is no compilation, un- and redeployment needed. This speeds up development considerably and enables more trial and error coding if you feel like &#8211; though better do white-box testing.</p>
<p>Apart from that I cannot see any real advantage of interpreted languages today especially in compare to Java. The JVM is some of the most advanced piece of technology we have today: robust, scales, understood and has many mature implementations on all platforms.</p>
<p>What is your preferred language and why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2009/09/development-cycles-of-compiled-languages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Discovered Quercus</title>
		<link>http://www.uebersoftware.com/2009/08/discovered-quercus/</link>
		<comments>http://www.uebersoftware.com/2009/08/discovered-quercus/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 21:27:54 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Scalability]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=55</guid>
		<description><![CDATA[Scalability, security, pooling, long lived connections , container services in general are all aspects where Java has a lot to offer. PHP on the other side is good for fast development cycles with a low maintenance infrastructure, request response orientend with not so much support for long lived connections, caching etc. 
On one of my [...]]]></description>
			<content:encoded><![CDATA[<p>Scalability, security, pooling, long lived connections , container services in general are all aspects where Java has a lot to offer. PHP on the other side is good for fast development cycles with a low maintenance infrastructure, request response orientend with not so much support for long lived connections, caching etc. </p>
<p>On one of my favorite <a href="http://highscalability.com">sites </a>on scaling you can find out all the tricks how popular SNS and web 2.0 sites overcame the drawbacks of using such a scripting language in the long term, which served them well at the start for a quick front-end result. Why drawbacks? I agree scripting languages are actually a <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">trend</a>, think of Groovy or RoR,  however for a solid backend with good session data handling, distributed caching, management tools, security etc. I would still prefer a compiled language, statically typed, sandboxed with security features, with all the API&#8217;s and services like Java has to offer &#8211; or maybe C#. </p>
<p>So thinking of todays Social Networking Applications, most require a lot of session data a combined solution: scripting in the front-end and the JVM/JEE in the backend would maybe a good solution. The backend might be a messaging layer or business logic layer with domain oriented architecture or something else. </p>
<p>There it comes the guys from Caucho Resin, an appserver I have used actually once for a University project long long time ago, have implemented the complete PHP language in Java! They call it <a href="http://quercus.caucho.com/">Quercus</a> and as of the time of this post its version 3.1. Quercus is deployed as a standard webapp and can be run on any JEE container. A Drupal installation <a href="http://www.workhabit.com/labs/resin-backed-php-drives-4x-performance-improvements-drupal">apparently benefited</a> from a 4x improvements over standard mod_php. However for a fair performance  comparison it has to be compared with op-code caches &#8211; i heard good things about XCache &#8211; (php code compiled and cached), which typically reduces server load and increases the speed of PHP code anywhere from 2-10 times. Also lighthttp maybe faster than apache.</p>
<p>Performance aside, more important to me is actually to test if I can <a href="http://juixe.com/techknow/index.php/2007/10/11/run-php-web-applications-on-the-java-platform/">integrate </a>my php app with my JEE apps and share a Persistence layer /ORM cache as well as clustering aspects with e.g. <a href="http://rifers.org/blogs/gbevin/2007/8/1/clustered_drupal_terracotta">Terracotta</a>. I will defenetly follow up on this with some results of this technology &#8220;mash-up&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2009/08/discovered-quercus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
