System News
Java Champion Offers Developers Expert Perspective on Java EE
'Just Write the Code that Makes Sense'
April 7, 2010,
Volume 146, Issue 1

Using Java for all programming needs is similar to using a Phillips screwdriver on all screws

-- Yakov Fain
 

In yet another installment of her series on Java Champions, Janice J. Heiss interviews Yakov Fain, long-term toiler in the enterprise technology vineyards and Managing Director at Farata Systems, which sells consulting services specializing in the development of enterprise rich Internet applications that utilize Adobe Flex on the client and Java EE on the server side. At Farata, Fain's duties include offering sales support without sales, which he does by producing technical materials, writing blogs, speaking at technical conferences, conducting trainings, mentoring client teams, managing offshore developers, and participating in development and promotion of open-source products.

Among the first topics Heiss asked about were Java enterprise solutions, on which Fain said that, "Using Java for all programming needs is similar to using a Phillips screwdriver on all screws." In other words, he is not averse to using proprietary software when the need arises. And, on the subject of writing code in Java, he recommends, "Just write the code that makes sense. Not everything that makes sense has a named design pattern [e.g., MVC]."

He followed that suggestion with the assertion that, "If hacked-up code produces great results, apply it without worrying whether another developer will have problems understanding it."

Further, he suggested that Java EE needs to be simpler than it has become, noting that Java EE developers spend an inordinate amount of time configuring Java beans and annotating code. In Fain's view, a good Java EE developer must first of all know Java really well and be able to avoid wasting time configuring XML files. Later in the interview, he noted that learning Java syntax is not the hardest part. Rather, finding the most efficient ways of building applications using Java can be challenging.

By way of simplifying Java EE, Fain told Heiss would dispense with everything but servlet containers with transactional support and Java Messaging Service in the spec. This, he contended, would work for the majority of the enterprise applications and would make Java EE simpler.

Fain's views of project management, not surprisingly, also favor simplifying things when possible, which means designing large projects around a number of small self-contained modules developed and tested by small teams. It should then be possible, he continued to use a light-weight test harness to ensure that module A works properly and accepts the required input and generates the expected output. "If each of these small modules (a.k.a. black boxes) is ready, bringing them together under one roof should be a trivial task. Having large and distributed teams working on a monolithic application is counter-productive," he asserted.

Looking toward the future, Fain sees Java playing a big role in the cloud, where he expects it to remain the number one choice in building robust server-side tiers utilized in the cloud.

Is there a Java class you could not live without, Heiss asked Fain, and yes, there was: Thread. "This is where the power of Java resides. There are books written about Java threads, which give you super power and flexibility when it comes to building highly-available, scalable, and responsive applications capable of processing thousands of concurrent requests of various types."

Heiss considerately asked Fain, veteran developer that he is, for any advice he might offer to a young graduate preparing for his first interview. He had several suggestions:

  • Join open-source Java projects while still an undergraduate

  • Arrange as many technical interviews as possible, ideally including some outside your geographical area. And then analyze your mistakes after each interview that didn't result in a hire.

  • Listen, don't talk as "this will lower your chances of saying something stupid."

  • Research some technical areas in the Java space and make a point of bringing them up in the interview.

  • Finally, create the opportunity to develop a project that uses using different server side Java technologies for some entity in your community.

Fain also had some recommended reading that he shared in response to Heiss's question:

  • Second, "Joel on Software" by Joel Spolsky, helpful reading, Fain insists, no matter what programming language a reader uses.

  • Third, "Thinking in Java" by Bruce Eckel

  • Fourth, "Head First Design Patterns" by Elisabeth and Eric Freeman, Kathy Sierra, and Bert Bates, writers who have managed to turn the sleeping-pill-topic into a fun read with code samples in Java, Fain said.

  • Fifth, "SQL for Smarties" by Joe Celko, a book that has lots of tips and tricks on how to communicate with your relational DBMS.

  • Sixth, "Java Concurrency in Practice" by Brian Goetz, Joshua Bloch, et al., a first-rate book on Java internals and one that will teach you everything you need to know to design highly-available and well-performing Java applications, according to Fain.

Fain also recommends subscribing to Dr. Heinz Kabutz's Java Specialist newsletter.

Heiss recalled one final piece of advice Fain had offered to developers back in 2009, when he blogged, "The ultimate goal of any software vendor is... to make sure that their software runs on iPhone. The time will come when the entire J2EE stack with EJB will run on iPhone."

Fain explained that it was really a joke, given that he was suggesting the emergence of a new phase of enterprise software engineering in which a smart mobile device will become the primary computer. "Every vendor of desktop software should prepare to provide an application with similar functionality on iPhone, Blackberry, Windows ME, Nokia, Droid and other smart phones."

He concluded his comment with the observation that, "Ten years from now, an application running on a smart phone talking to a cloud will be the norm. The horse power of smart phones will keep increasing, but software developers will need to return to the eighties mentality: write efficient code that doesn't require much memory and goes easy on CPU, plus a new requirement -- it doesn't drain the batteries."

More Information

Yakov Fain's blog

JSR 315: Java Servlet 3.0 Specification

Java EE at a Glance

James Gosling on Oracle, Java EE 6 and More

Sun Java Wireless Client Pre-integrated with Brew Mobile Platform [...read more...]

Keywords:

fullsource
 

Other articles in the Developer section of Volume 146, Issue 1:
  • Java Champion Offers Developers Expert Perspective on Java EE (this article)

See all archived articles in the Developer section.



News and Solutions for Users of Solaris, Java and Oracle's Sun hardware products
Just the news you need, none of what you don't – 42,000+ Members – 24,000+ Articles Published since 1998