~~~~~~~~~~~~~~~~~~~~~~
~~ theresa & tobias ~~
~~~~~~~~~~~~~~~~~~~~~~
Our blog subtitle goes here!

Whacko Spring Backend One

by: theresa
tech humour

The year 2025. Thanks to a team of fearless investigative journalists, the public is acquainted with the gruesome initiation ritual newly hired developers at a Berlin start-up had to undergo in order to earn full employee status: after a reasonably chummy welcome party (including copious amounts of booze and considerable negligible amounts of sexual molestation) they awake in an empty room (each on their own of course, to render the situation reasonably claustrophobic). It looks like the ones you see in the movies: no windows, sound-proof, basically a carpeted cubic trap, with a glaring neon bulb on the ceiling and no furniture except a desk, a chair and … a Lenovo ThinkPad adorned with lots of stickers betraying a leftist political orientation. A Slack message pops up on the screen: “Dear newbie! All the rumours you may have heard about our despicable company culture are true. True company membership is not easily attained. You will only be released and accepted into our team if you solve this task: build a web back-end for a Slack-like messaging service using Java and the Spring Framework!”

GASP! What is the pitiful contestant to do? Certainly this must be a joke! WHO USES JAVA??? WHO USES THE SPRING FRAMEWORK???!?!? Aren’t these technologies of the 90ies? This is not what I have moved to Berlin for! I could have stayed in Wuppertal! Alas, no mercy. It is the ultimate prank. Gulp! It will have to be done. Once attained, a much-coveted job at this unicorn start-up can never be given up, not even if it requires reading Java ist auch eine Insel! And so, the journey begins.

Luckily, a soft-hearted person has recently been promoted to tech team lead. She feels sorry for the candidate and clandestinely sends some additional information - a recommended sequence of steps to execute in order to complete the challenge.

  1. Implement the required entities (chat channels, messages, users, whathaveyou) as POJOs (standing for pedophile ornithologists jumping ominously, eh, Plain Old Java Objects) and provide them with JPA annotations (these enable the mapping of the aforementioned POJOs onto MySQL tables).
  2. Create a REST Controller based on the API documentation.
  3. Be sure to fully implement and test each method before extending functionality!
  4. Which parameters are required by which method? Choose the appropriate body objects, response codes, query parameters and annotations.
  5. Create the required Spring Data Repositories plus dedicated database queries if necessary.
  6. Connect the repositories with the controller and test them.
  7. Finally, implement pagination and authentication.

Our little aspirant feels encouraged by this more than welcome aid. Also, a few ideas pop up. Can’t I just use Kotlin? Isn’t this an opportunity to use docker, a technology my much-respected friend T. is crazy about? Stay tuned for the chronicles of despair progress to follow!