Home » Archives for Mihai Andronache

Author Archives: Mihai Andronache

Mihai is an experienced Java and JavaEE developer. His main interests are: clean OOP, code maintainability and testing. He is the creator of http://comdor.co and http://charles.amihaiemil.com"

The Almighty Service Layer

Some time ago, I wrote a post in which I basically said that MVC and other similar programming patterns are more the work of a puppet master rather than the one of an engineer. I also said many times throughout this blog that using get/set and “Service” classes causes your application to grow uncontrollably until it becomes such a mess ...

Read More »

Class JavaDocs Should Be Mandatory in OOP

I’ll admit, the title is a bit of a lie. I actually believe JavaDocs are necessary everywhere: methods, attributes and classes. But let’s focus on classes for now. I should also mention that this idea applies to all object-oriented programming languages. I suppose there must be an equivalent to JavaDocs in most languages. There are many different opinions about the ...

Read More »

Clientside Search With ElasticLunr.js

Any blog or documentation website needs Search functionality. You can achieve this in many ways, and most likely a server-side solution will be chosen. However, if you don’t want to deal with any backend, you can implement it all on the clientside, thanks to lunr.js. I first discovered Lunr.js a few years ago, but I didn’t use it since I ...

Read More »

Self-Protecting Projects

I was once attenting a presentation on the topic “Front-End Development”. The talk was held by a senior developer who, at some point, started bragging about the cool conventions he and his team were using in their projects, particularly naming and structure of their CSS files. Then, he also mentioned something about their JavaScript conventions. At the end of the ...

Read More »

Hide It All!

In an earlier post, I wrote the following words: in an object-oriented codebase the kit should be as discrete as possible. The more you use the development kit, the less object-oriented your code really is or your abstractions are not the best they can be.. I feel the need to elaborate this point, since it is quite strong and that ...

Read More »

Polymorphic Input/Output Data

When developing any kind of code interface, whether it is an elegant object oriented package or one of those ugly “Service” classes that we are so accustomed to, it is obvious that it should be as extensible as possible and require as little maintenance as possible. This applies, of course, to the input and output parameters (returned types), especially if ...

Read More »

Apache Payara: Let’s Encrypt

java-interview-questions-answers

Some time ago, I wrote a small tutorial on how you can generate Let’s Encrypt SSL certificates and install them on your Glassfish Java EE Platform. That trick worked wonders for me but having to manually renew and reinstall the certificates every three months became quite annoying. I did a little research and, same as the first tutorial, this one ...

Read More »

Builder As A (Fail-Fast) State Machine

This is an idea that came to me a few weeks ago while designing a “Generator” class that had to send the input to an encapsulated Writer. It was, in fact, the Builder pattern. However, the rules were a bit more complex, the user had to call the add...() methods in a certain way, for the output to be generated ...

Read More »

An Extension To TellDontAsk

More than five years go, Martin Fowler pinpointed one of the biggest problems in Object-Oriented Programming in his famous TellDontAsk article. In his writing, he reminded programmers that they should trust their objects with performing the work for them, rather than asking the objects to provide the data that they would later work with themselves. This is something that I ...

Read More »