Whenever I show dev tools tricks in a video, I get lots of "I had no idea that was a thing!"
What are your favourite or most under-utilized dev tools tips?
There are so many nuggets in there, I'm sure I'm even missing some
@KhalifKairo Your marketing is pure genius—absolutely inspiring! 🔥
If you’re ever looking to simplify pricing for services like Jetman Global, whether it’s one-off payments, subscriptions, or custom models, Spectabill will make pricing effortless!. https://t.co/C7Kgaov4cp
Cheers!
Building for SaaS businesses!
How do you see revenue recognition evolving in SaaS businesses across Kenya and Africa, and what challenges or opportunities do you think companies face in adopting global standards?
https://t.co/wZu8lB57bc
At Afriq Silicon, we fuel growth for SaaS businesses.
Growth mode: ON. Let’s chat! https://t.co/hGfIu51g4w and we’ll bring the tools to skyrocket your business!
In partnership with Well-Led Care Ltd, we designed a user-centric platform that streamlines caregiver workflows, enhances medication management, and ensures compliance.
I couldn't understand Dependency Injection until I discovered this trick.
The 5 questions I ask myself before creating an object.
1. Is this object a service or a utility class?
Service classes contain important business logic.
Utility classes are stateless and have helper methods.
If it's a service, use DI to inject it instead.
2. Will I need to swap this implementation for another?
Using "new" creates tight coupling to a specific class.
This makes it hard to swap out implementations for testing or extended functionality.
Use interfaces and inject the dependency to make swapping implementations easier.
3. Does this object have external dependencies?
If the object has its dependencies, you're also coupling your class to its dependencies.
It's better to let a DI framework handle the instantiation and resolve all the dependencies.
4. Is the object for carrying data?
You don't need to inject objects that hold data (DTOs, POCOs, etc.)
If it's just a data carrier, using "new" is OK.
5. Is the object relevant within a limited scope?
You don't need to inject temporary collections or other transient state-holding objects.
In simple terms, always question the "new".
When do you use Dependency Injection?
CQRS = Separate read/write databases? Not so fast!
This isn't really what CQRS is about.
First, there was the CQS - Command-Query Separation principle.
Here's what CQS is:
- Commands change state, don't return data
- Queries don't change state, return data
- Queries should not have side effects
What? I can't return data from a command?!
Of course, you can - but the intent is different.
I'm not saying you shouldn't be pragmatic.
For example, you insert a new row into the database and return the ID of the word. Perfectly fine.
But what about CQRS?
CQRS stands for Command-Query Responsibility Segregation.
It's an evolution of CQS and works on the architecture level.
Whereas CQS works on the method (or class) level.
It separates the subsystem responsible for handling commands from the one responsible for handling queries.
In other words, you have a logical separation of reads and writes.
Here are a few benefits you get with CQRS:
- Complexity management
- Scalability
- Flexibility
- Security
How did we begin associating CQRS with separate read/write databases?
This happens when you take the logical separation of commands and queries and elevate it to physical separation.
There are many flavors of this approach:
- SQL + NoSQL
- Event sourcing + NoSQL
- SQL + Redis
And while it has its benefits, like improving your job security, too much complexity can hurt your project.
So start simple. You can do CQRS with one database.
Apply logical separation of commands and queries.
Only add further complexity (like eventual consistency) if you need to.
Tomorrow, I'll show 29,675+ engineers how to implement CQRS with MediatR.
📌 Join free here: https://t.co/xip45XpWuB
REPOST = Teach your audience about CQRS ♻️
@gabegreenberg@shashiwhocodes This is really encouraging, and I'm interested.
One thing about me, is that am very adaptive, fully focused on understanding your product and adding value to it.
Being looking for a role in a minute, check out my portfolio at https://t.co/hP5AXJU4Uq.
@amerix I believe it might be beneficial to share my portfolio, where I've honed my programming skills. You can find my profile at https://t.co/hP5AXJU4Uq.
All self-taught.
SOLID principle is one of the most important design principles in OOP languages like Java, Python, C#, etc.
Sadly, most of the programmers find it super difficult to understand.
Here's the simplest guide to understand SOLID principles: