3 articles Pattern & Best Practice

Dates, DateTime, Timezone and the DB

TL;DR Summary Java Type DB Type Description SAVE Long NUMBER Just using a long as milliseconds, between the current time and midnight, January 1, 1970 UTC is the most secure way. SAVE Instant NUMBER Using in Java an Instant and converting it into a NUMBER to save it in the DB will also avoid any…

JavaScript Module Pattern or Just Private Variables

JavaScript is a wonderful language to get thinks fundamentally wrong from the start. As so where are many patters around to help us to avoid some of these challenges ;-). The module pattern is one of the most known and used. It helps us to create private variables or better to avoid side effects in…

Strong IDs

In some projects you may encounter the so called „strong id pattern“. What is it? Strong IDs are simply wrapped primitive or simple types into classes. Just remember what we did in Java before the Enum come around. We had just Strings or Numbers in the code which we used to assign well known values…