Posts

Hi there!

  Welcome to my professional blog! Or at least to an attempt of one. I've never written anything serious so please be forgiving :) Lately I've accumulated some experiences and things I'd love to share with other Java developers. I am a Poland based Lead Java Dev and Architect with more than 10 years of experience and I felt it would be nice to try something fresh and to start this blog. You can find me on LinkedIn and GitHub . Let's see where this new adventure will take me. I'm Writing this blog in english because english is a de-facto standard for any Java developer and I hope to gain more audience that way. I will try to make regular contributions to the blog, but I won't write something just for the sake of writing. I'll create stuff when I have something to share and, more importantly, when I have time to do it, so please be patient. Ok, that's that. Again - welcome to Kode Krunch. I hope you'll find something of interest here. P.S. T...

Trying out PHP after 7 years

 Introduction   This post will be weird for all of my usual readers. I'm a Lead Java Developer that's been writing about fun and clever things to do in Java ecosystem. What most of you probably don't know is that prior to working in Java, I was a Lead PHP Developer for quite a while. Yup. The PHP. The language that is so divisive, that on one hand, drives more than 75% of the entire Internet and, on the other hand, is considered by many to be a pathetic, ugly scripting language, no better than universally hated JavaScript.   The Premise 7 years ago, when I was finally parting ways with PHP to focus solely on Java, I was among the PHP haters. I was fed up with weird syntax and Object Model, inconsistent naming conventions, no static typing of any kind, structural programming legacy all around the place, scripting nature that meant having to execute everything from scratch (even if cached) for every Request, slow execution and the need of caching literally everything to be ...

PHP: Symfony Demo meets Modular, Microservice-ready Architecture - Part 2

TL;DR I've created a Symfony 6 based Application that can serve as an Enterprise Architecture reference for anyone who's planning to build Large Scale Applications with Symfony. It uses a similar 'Blog' theme as the official Symfony Demo and can be found here .  In the previous part of the Article I've taken on some theoretical foundations that led me to create this project in a form it exists.  In this part I'm going over the actual code and Module-level Architectural decisions.   Introduction OK, after long and possibly tedious theory in the first part, let's take a deep dive into the code. The second part of the Article is designed so that you can browse the code alongside reading it. Each section describes a real part of the Demo App code. I'm not going over the actual implementation of the Blog (which is simple enough for everyone interested to understand), focusing instead on the generic purpose of the code from the architectural standpoint. ...

PHP: Symfony Demo meets Modular, Microservice-ready Architecture - Part 1

TL;DR I've created a Symfony 6 based Application that can serve as an Enterprise Architecture reference for anyone who's planning to build Large Scale Applications with Symfony. It uses a similar 'Blog' theme as the official Symfony Demo and can be found here .  In this part of the Article I'm taking on some theoretical foundations that led me to create this project in a form it exists.  In the next part I'll go over the actual code and Module-level Architectural decisions. Introduction Symfony is one of the foundations of modern PHP development. It has been my absolute favorite tool of choice ever since I've discovered the wonders of using Frameworks. I know that there are lots of people that prefer Laravel, Zend or YII, but I am (and probably will bee forever and ever) a  die-hard Symfony fan. After almost 7 years of break from PHP development, I was able to just install the Skeleton App and start coding. I wanted to check out the current best practices ...

TDD: How to test something that doesn't exist

Introduction   Hello and welcome to the article that will focus on one of the most divisive and controversial methodologies in the Programmer's too box - Test Driven Development. This topic was sort of covered by me in my Scope Management in Java Architecture article. I'm returning to it however, because it is, from the looks of it, a wildly misunderstood technique, and it deserves its own article. Background In the beginning years of my professional career I wasn't writing any automated Tests.  I didn't know how to do it and, more importantly, I didn't know I was supposed to. I was under the impression that I should be wary of everything that's going on in my code base to the point that I would be able to make changes and refactor things without introducing bugs. I was very efficient in manually testing my Applications just by 'clicking through them' and I was certain that this was the right way to develop Software. I know now how naive I was, but I mu...

ORM Tips: Separating Business Logic and Data Logic

Image
 Introduction Welcome to another one of my database-centric articles. This time, although all examples will be written in Java, the topic at hand is so generic and universal, it can be applied to any programming language that utilizes any Database Abstraction library that can be called an ORM .  Be it Java with Hibernate, PHP with its Doctrine or Ruby with Active Record.  Modern Application Architecture has drifted away from layered Monoliths to more flexible and manageable micro-services that utilize Hexagonal approach. Even if you didn't jump into the micro-services train, the focus these days tends to be on good modularization, vertical slicing and defining proper Bounded Contexts and Aggregate Roots within the Business Domain of the developed Product. But does it mean, that a Service or a Module can just be a bag of poorly structured, interconnected Classes with no proper, repeatable and meaningful naming, packaging and responsibilities? Can we, even when using DDD, C...