{"id":574,"date":"2009-03-22T16:52:59","date_gmt":"2009-03-22T23:52:59","guid":{"rendered":"http:\/\/gregbaker.ca\/blog\/?p=574"},"modified":"2009-03-23T17:14:53","modified_gmt":"2009-03-24T00:14:53","slug":"everything-thats-wrong-with-java","status":"publish","type":"post","link":"http:\/\/gregbaker.ca\/blog\/2009\/03\/22\/everything-thats-wrong-with-java\/","title":{"rendered":"Everything that&#8217;s wrong with Java"},"content":{"rendered":"<p>I&#8217;m in the process of learning the <a href=\"http:\/\/www.springsource.org\/\">Java Spring<\/a> web framework (motto: there&#8217;s nothing another XML configuration file can&#8217;t fix).  This has turned out to be a bit of an exercise in frustration: I have always had trouble dealing with Java tech because of their jargon-filled docs.  Actually, it&#8217;s not even the jargon <i>per se<\/i>, it&#8217;s that the jargon is all Java-specific.<\/p>\n<p>An example: the term &#8220;servlet container&#8221;.  A &#8220;servlet container&#8221; is a web server that can run a servlet.  That&#8217;s all.  There&#8217;s no need for a new term: just say &#8220;web server that can run a servlet&#8221; or even &#8220;servlet implementation&#8221; and you&#8217;ve removed a whole layer of jargon that people have to learn.<\/p>\n<p>As I was exploring Hibernate (which can integrate with Spring) today, I went to the <a href=\"http:\/\/www.hibernate.org\/\">Hibernate home page<\/a> and realized I had another example of why I hate the Java ecosystem.  Their front page contains this description of what Hibernate is:<\/p>\n<blockquote><p>Hibernate is a powerful, high performance object\/relational persistence and query service. Hibernate lets you develop persistent classes following object-oriented idiom &#8211; including association, inheritance, polymorphism, composition, and collections.<\/p><\/blockquote>\n<p>Well&hellip; I suppose that&#8217;s pretty informative if you&#8217;re willing to parse through the overly-dense sentence structure and already know how the Java world uses all those terms. And, the page contains this diagram:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregbaker.ca\/blog\/wp-content\/uploads\/2009\/03\/hibernate_stacks.gif\" alt=\"hibernate_stacks\" title=\"hibernate_stacks\" width=\"579\" height=\"199\" \/><\/p>\n<p>Riiiiight. That totally clears things up.  Perfect for first-time visitors.<\/p>\n<p>Now, compare a similar (but admittedly less-powerful) Python technology: the <a href=\"http:\/\/www.sqlobject.org\/\">home page for SQLObject<\/a>.  They have this description:<\/p>\n<blockquote><p>SQLObject is a popular <em>Object Relational Manager<\/em> for providing an object interface to your database, with tables as classes, rows as instances, and columns as attributes.<\/p><\/blockquote>\n<p>I&#8217;d be hard-pressed to come up with a more clear and concise description of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Object-relational_mapping\">ORM<\/a> than that.  It&#8217;s followed by a dozen-line code example of how to work with SQLObject in Python which more-or-less demonstrates exactly what the tool does, how it does it, and what it can be used for.<\/p>\n<p>Basically, the message I get from the Hibernate front page: &#8220;boy, this sure looks <a href=\"http:\/\/lesscode.org\/2006\/03\/26\/its-enterprisey\/\">enterprisey<\/a>&#8220;.  From SQLObject: &#8220;oh, I see what this tool is for&#8221;.<\/p>\n<p>Just to be a little constructive, let me take a shot at rewriting the Hibernate intro:<\/p>\n<blockquote><p>Hibernate is a powerful <em>Object-Relational Mapper<\/em> for Java: it lets you save object instances as rows in a relational database, and retrieve them later.  Hibernate supports most object-oriented programming techniques, including association, inheritance, polymorphism, composition, and collections.<\/p><\/blockquote>\n<p>Okay, that&#8217;s off my chest.  Bring on the Java fanboys&hellip;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m in the process of learning the Java Spring web framework (motto: there&#8217;s nothing another XML configuration file can&#8217;t fix). This has turned out to be a bit of an exercise in frustration: I have always had trouble dealing with Java tech because of their jargon-filled docs. Actually, it&#8217;s not even the jargon per se, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,10,12],"tags":[],"class_list":["post-574","post","type-post","status-publish","format-standard","hentry","category-teaching","category-tech","category-work"],"_links":{"self":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/comments?post=574"}],"version-history":[{"count":9,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":584,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/574\/revisions\/584"}],"wp:attachment":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}