Ulrich, please introduce yourself
I am a passionated software architect and developer with more than 17 years of experiences in different industries
and in implementation of mission critical software, that is reliable, performant and highly available.
Currently, I change from employed to self-employed as Java Freelancer and start the first project in June.
You can find me on my Personal website, XING, LinkedIn and GitHub.
I developed the project http://www.lottoritter.de with Christopher Schmidt. He is born in Hamburg/Germany and he is very fascinated by software development. He started with PHP/HTML/CSS in his early years, but later on he focused on JavaSE and JavaEE. He has many years of experience in software development, especially in Java projects.
Christoper can be found on XING, Twitter and GitHub.
What are you building with Java EE?
Christopher and me were building an OpenSource-JavaEE 8 project http://www.lottoritter.de.
On this platform, you can "play German Lotto" for fun. You don't spend any money (and unfortunately you cannot win any money :-)).
You register via eMail or OAuth (Google, Facebook, Instagram) and then you can 'buy' tickets with a dummy credit card
for Lotto 6aus49, EuroJackpot, GlücksSpirale and Keno. The drawings of the lottery are fetched via background processes.
You can found the source code here: https://github.com/Lottoritter/lottoritter-platform/
Why you started the project?
Can you share with us some geeky numbers like e.g. TX per seconds, heap sizes, thinnest WARs etc -- whatever Java EE devs might find interesting.
We did not make marketing, because this has more of a fun project without any profit thinking (we do not have
any advertising or web-trackers or whatever). The project is straightforward, so we have no "Microservice"-architecture,
but a simple WAR for deploying on the application server. That's it. So we don't have high load or many concurrent
transaction with which we can 'boast' about.
For us, it was more interesting to share the code, so that others can reference to it and see, how easy it is to structure the code (thanks to your BCE-package pattern ;-)) and get a project up and running.
How big is your WAR?
It is 26MB all inclusive (Java, additional libraries, HTML, images and so on). But 80% of the size are consumed by third-party-libraries such as OAuth, Primefaces, Database-Driver and their transitive dependencies. The size of the written Java code is around 1 MB (15k real lines of code).
Are you happy with Java EE so far? Is Java EE productive?
Yes, I am extremely happy. The "component" model with EJB and CDI in combination with the Boundary-Control-Entity (BCE)
package structure let you write clear business code. Ok, there are framework-classes like a Webfilter and
the identity stores for the Java security API (Soteria) and something else like that, but 90% of the code is
business related. So it is really productive. As I said before, we implemented this within 4 month in spare time.
Furthermore, it es very easy to introduce CI and to integrate everything to Amazon AWS Elastic Container Service or other platforms.
Perhaps JavaEE is not fancy, but the most business cases in general don't need fancy things. The goal is "make the project run". And it is not a good idea to make things unnecessary complicated. Java and the JavaEE APIs provide you with 90% of what you need to build the features of any general project. I like the smooth integration of the JavaEE-APIs, which is even better in Java EE 8 (see Soteria which is an incredible step forward in making Java security much easier to implement).
Which application servers, tools or IDEs are you using?
I use IntelliJ IDEA for sure ;-). The application runs on Payara 5, because it 'extends' from Glassfish, which is the
reference implementation of JavaEE, but Payara is updated frequently and so, it has always the current working
versions of the JavaEE-API implementation libraries.
MongoDB as database, because the document centric approach fits much better to the domain-driven-design/model and it makes implementation much simpler. In addition with MongoDB-Morphia as object-document-mapper, it is so easy to write clean code.
It is a standard Maven project, so the project can be build with the 'build pipeline' like
mvn clean install && docker build ... && docker run ....
You are using the Boundary Control Entity pattern to structure your applications. What were your experiences, challenges and findings so far?
Yes, I heard of this pattern for the first time in one of your screencasts about 5 years ago. It was so stupid simple, and that's
why I really like this pattern. I can structure the code for business aspects, so it is easy to get along with the code.
Furthermore, you can design your code exactly like the real world. Lottoritter for example has tickets, shoppingcart, drawings,
players and so on, and these business entities are exactly modelled/structured in the code and you find exactly these named packages
The only 'challenge' is, where to put classes with cross-cutting functionality. But with a bit of clear thinking, you always find a proper solution (in my opinion ;-)).
How important are standards for you? Does your application depend on application server specific APIs?
Standards are extremely important for me. They are clearly defined and you can trust on them. It is well documented,
you can read the official specification-documents and the documentation for the corresponding implementation. I don't
like surprises in software-projects and I want to be sure, that 'technical' things work as described. So standards let me sleep
a bit better ;-).
There are no dependencies on application specific APIs. So, as soon as other application servers fully support JavaEE 8 in the future, then this project could be run on other servers as well without changes.
I don't want to waste time dealing with technical problems, but I want to implement valuable business features, for customers and as well as for my personal projects.
Did you had the chance to chat with other attendees during the airhacks.com? If yes, what was the most interesting project / problem / situation in the workshops?
I attended the JavaEE Bootstrap and Effective JavaEE days in March 2013. These two days were really cool. It was interesting to listen to others, who have the same problems at work. Mainly, the acceptance for JavaEE was a main topic. Most managers/decision makers have the J2EE-patterns in mind, with local- and remote-interfaces and all the XML-stuff. But these days are over for years. It is interesting, that even in 2018 (for example, if you talk to Spring developers), they also think of JavaEE as how it was to the J2EE epoch. Many people don't know, that JavaEE has evolved to a real lightweight enterprise application platform.
Which Java EE APIs are you using in your products?
EJB (@Stateless) and CDI are the JavaEE APIs, which I cannot miss. They are the building blocks of the whole
application. You recorded a Youtube-Video some years ago about the metrics, which are exposed by every application
server since years. So I get these information for free when using EJBs.
Ulrich, thank you for the interview!
airhacks.fm the podcast:
Stay in touch: airhacks.news.