Friday, May 8, 2020

Full Stack Java Web App, Fact or Fiction?

An Agile tech coach's job is never done in a world where relatively few people can do eXtreme Practices such as TDD. Part of the job is entertainer (make training fun), part of the job is teacher (how the heck do I test this!), and part of the job is adoption (how to get my organization to support me doing this). So I'm faced with creating an enjoyable—no, exciting!—experience for training Java developers TDD.  So the formula for success looks like this:
  1. Useful modern technologies for mainstream workers
  2. Fun
  3. TDD
So perfect! I want to take my class on TDD through building a three tier web application, full stack, in Java: DB, micro services, web API.

But WAIT! Can one use Java to build a graphical user interface in the web browser?

Well it turns out you CAN.  However I had to sift through a lot of claims about "full stack Java" which sometimes means building TCP/IP clients for macro test automation. But come on! Nothing impresses the folks at the IT bar like showing off a build that actually works on a smart phone.

But I've got an additional "hangup." To me, modern technologies in the UI ought to be *reactive* (event driven), meaning, when an event happens on the server side, it updates the web clients.

So I went through RayGun's article on 17 popular Java frameworks, investigated them, and filtered the list down to three potential candidates.  See the following table.


So ladies and gentleman, full stack Java Web Apps are FACT!
  • There are actually THREE frameworks that will allow you to use Java to build a web application view!  (See "yes"s in the third column.)
But full stack reactive Java web apps need more investigation.
  • The big problem for me is that none of the reactive choices use Java to describe a view, with the exception of some branches of GWT.
If I care only about reactive and give-up on using Java to build the view, then there are three frameworks that would do the job. But that means bringing in TDD in Javascript (for functionality in the front end) into my Java class.

Next steps

It comes down to the practicality of TDD in one of the GWT branches that are reactive.  If it works, then I'm all good.  If it doesn't do reactive well or if it doesn't make sense to do TDD in GWT, then I move onto one of the other reactive alternatives.

I'll build some POC's and evaluate what will work for a Java TDD course that's fun and uses mainstream technologies.

No comments:

Post a Comment