Home - Programming - Server Side Java

Intro

I'm starting a project and I thought I'd document parts of it as I go along. So this isn't a treatise on server side Java so much as a rebuttal by example.

See, I once worked for a company that asked me and two other developers to start building the next generation of their flagship product. They wanted web services with a browser-based user interface, and it fell to the three of us to decide on the technologic and architectural direction. I came to the meeting expecting to walk back out with a charter to build a set of SOAP services implemented using Java.

Fortunately, one of guys suggested I look into REST. That turned out to be a huge pivotal moment, and the services layer I produced was elegant and easy to consume. Thank goodness for that, because the other major decision that came out of those meetings was, in my humble but experienced opinion, a disaster.

These other two developers -- good friends and respected colleagues -- actually sat across the table from me and supported using Embarcadero's Delphi (it's a Delphi shop) over switching to Java and using off-the-shelf technologies. For context, this discussion was about 6 years ago. Their argument? "Java is dead."

I know, right?! I'll give you a couple of minutes to finish laughing, clean the coffee off your screen, and compose yourself...

Because I was voted down, I had to use Delphi Pascal to roll my own REST services, cross-database persistence layer with data dictionary and SQL generation, and the tools and test suites for each. Keep in mind this was 6 years ago. The REST facility and JSON library in Delphi was utterly broken, so badly that no one was using them and Embarcadero didn't bother to bring them up during conferences, so I couldn't rely on those. It took quite a while and, when viewed from a company perspective, very expensive in terms of time and money. Don't get me wrong, I'm supremely proud of the product that we built, but that time could have been spent somewhere else.

Add to that the fact that Delphi developers are an increasingly rare breed, whereas, thanks to Java's huge (and still growing) market share, you can't walk down a busy sidewalk of a major city swinging your arms without hitting a Java programmer. They are spending more on developers and can't ever get enough of them because of that fateful decision.

After developing the REST services and the business object framework, I kind of hit a wall. There weren't any other fun projects at the company. I was leery of relying on Delphi for anything anymore because *that* is a dying system, and frankly at my age I thought it best to try to move into management. To be fair, the company tried to throw me a bone, but there weren't any real management positions to speak of that were available, and eventually we parted ways. Which turned out great for me. I'm still doing what I love, and making a good living at it.

So this project is my way of showing that, yes, the development would have been faster, more functional, and would have supported more operating systems. I mean, hell, if you do it right you can run a JVM with J2EE containers on an Android cell phone or a Raspberry Pi. It scales easily, and moving it to a Linux instance on cloud services is trivial.

August 1st, 2016: Setup

After thrashing around a bit doing some research, I decided to go with a development environment that I'm not entirely experienced with but am comfortable in. On a Windows 10 laptop, I installed VMWare 12 (which those developers also said was a dead product... smh...) and created a Mint VM. I dropped in the latest Eclipse and Tomcat 9, and started up a project using JAX-RS for REST support and JPA as the persistence framework. Most of the startup headache came from getting Eclipse to debug in Tomcat. Which still isn't working... But it compiles the WAR file and drops it in the right location, and Tomcat picks it up, so there's that. Minus the setup, it took me about 30 minutes to create my first REST service persisting customer data.

To compare and contrast, it took 6 months to get the basic framework and tool chain for the Delphi REST services stabilized and capable of performing the same function.

More to come...


Todd Grigsby