Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
https://refactoring.guru/design-pat...
this sums it up rather nicely. I used to use it as a cheatsheet before I learned them well enough.
struct: adapter, composite, decorator, facade, proxy
behav.: CoR (filters), command (Actor), iterator (duh), observer, strategy, visitor
these are the ones I use mostly (from the two categories you mentioned)
Struct - are basically wrappers of some sort. The "sort" part defines which pattern it is. Looka t the class/fn name, if it mentions a pattern name - you already know what and how it does and where to look further.
Behav. - it's how you organize your work units, state, how you will be accessing them in your code
Examples? Oh boi... I'd let you sneak a peek into my projects if I legally could :) These patterns are... everywhere. Makes maintenance and adoption of the codebase quite easy (think: tens of milions+ LoC kind of projects) -
retoor4505h@netikras they're just as cool as any other pattern :) No reason to box them in certain category. I'm just a creator :)
Related Rants
I'm going to have to learn about patterns in programming.
Structural and behavioural ones.
I know of several, but I'd love to hear some real-life use cases from y'all, if y'all don't mind.
rant
question
patterns