
My Learning Journey: Factory Pattern, Encryption (AES), and PostgreSQL Database Design
Today was a really productive day in my project journey. I focused on understanding some important backend concepts that are actually used in real-world applications. I worked on three main areas: Factory Pattern (Design Pattern) Encryption (AES vs Hashing) PostgreSQL Database Design (DDL + Structure) I’ll explain everything in a simple and practical way based on what I learned. 🧠 1. Understanding Factory Pattern At first, I was confused about why we need a factory when we already have routers. But now it’s clear. What is Factory? Factory is just a helper function that creates the correct object based on input. Instead of writing multiple if-else conditions everywhere, we centralize object creation in one place. My Use Case In my project, I support multiple platforms like: Telegram Twitter Instagram Reddit Each platform has its own service class. Instead of doing this: if platform == " telegram " : service = TelegramService () elif platform == " twitter " : service = TwitterService ()
Continue reading on Dev.to Webdev
Opens in a new tab



