Posts

Showing posts from May, 2014

What's wrong with JavaServerFaces

Image
When we click on the “homepage” link of the JSF entry in Maven Repository we are forwarded (from http://java.sun.com/javaee/javaserverfaces/ - I thought that company died long ago, but Oracle doesn’t bother fixing links) to http://www.oracle.com/technetwork/java/index.html which currently showcases a picutre of a young man in front of the computer and we are told he is probabaly working with JSF & PrimeFaces (PrimeFaces is “a popular JavaServer Faces (JSF) UI framework” that is also used in my project, I hope I’ll get to cover that too). Now, to me, he doesn’t look like he is happily working on something interesting but rather trying hard to finally get-that-bloody-thing to work (already in the exhaustion/resigning phase – “damn, why doesn’t it work!? :(“). This is comes close to how I feel about the series of tools I am writing about here (1). So let’s get started tinkering about this web framework. The website ( Get Started subpage) uses a two nice gray color sh

What's wrong with Maven

In the project I have to work on mentioned in the last post, there are of course other technologies and tools used besides Hibernate that I have to learn (I do not come from a Java programming background so most of these are (though not conceptually) relatively new to me). One of them is the buildtool Maven. Let’s see what flaws we can find with Maven: It’s ironic how their philosophy is “don’t repeat yourself” yet they use xml for the configuration where up to half of the filesize comes from repeating words for the closing tags (yes I know that’s not what they mean ). They make users to define custom “properties” with custom tags. Within a pom.xml file you can write: <properties> <myfaces.version>2.1.12</myfaces.version> <mojarra.version>2.1.23</mojarra.version> <myweirdpropertythatiwillnotuse>42</myweirdpropertythatiwillnotuse> </properties> where myfaces.version etc. is the name of the property I want to define.

Why Hibernate is a disaster

I am forced to work with this Java Object Relational Mapping “solution” (a collection of functions, annotations and configuration hell to try to fit the round peg of object oriented programming into the square hole of relational databases) for the next 4 months (2 already done - luckily). And I really have not much to say in its favor. Read http://empire-db.apache.org/empiredb/hibernate.htm : The use of annotations and strings to provide information is a bad choice. The former because it cannot be modified or easily read at runtime (only through awkward interfaces), the latter because it is only checked at runtime, which means never for the 90% of the code that are run 10% of the time (don’t comment with “well you need unit tests”). The developers of Hibernate have never heard of the Law of Demeter. session.buildLockRequest().setLockMode(LockMode.PESSIMISTIC_WRITE).setTimeOut(1000 * 60).lock(entity); They used method chaining (the “builder pattern”) extensively. http://stackov