first_page

Flippant remarks about “Knowing” Java

The opinion here is that it is misleading and a waste of time to ask an experienced C# programmer, “Do you know Java?” What is useful and educational is the question, ‘Do you know the Java Bean?’

The first question is a matter of syntax and is trivial compared to the complicated world of Java Beans. There are two types of Java Beans known to me: the Java Bean and the Enterprise JavaBean (EJB) of J2EE. What may seem strange to a .NET developer is how Sun Microsystems and its affiliates depend on convention rather than the implementation of interfaces. This means that Sun and friends go far beyond the relatively soft spoken Microsoft “Patterns and Practices” and ‘demand’ that you write code according to a specification. This ‘demand’ is implied in the fact that your code will not work (easily) in any popular application server. So you can “know” Java all you want: not knowing the relevant convention means that your code will not work in the server/framework du jour.

The Java community revolts against the EJB regime with The Spring Framework. This is one of the latest frameworks of the day. It goes a long way to eliminate the complexity that made J2EE solutions notorious. Spring represents a fighting retreat back to the Java Bean, considered a “Plain Old Java Object” (POJO)—but even these humble ones are more complex than ‘Plain Old .Net Objects’ (the Java Bean convention is a bunch of getMember() and setMember() methods while C# has the get and set keywords). Another strange one to a .NET developer is that Java solutions depend on the underlying operating system for almost nothing. This means that in Java you have to bring almost everything—everything means that transaction processing, concurrency control, events using Java Message Service, naming and directory services (JNDI), security (JCE and JAAS) are stacked on top of your operating system. Since there is no single framework you have to “mash up” your own out of several. Most Java people would say that this heavy lifting and a few gigabytes of RAM is a small price to pay for “freedom.” .NET people expect that “managed” services such as these come baked into Windows. Mono people may have even better ideas…

rasx()