#sony #lighting #zero #go
You dont use all 9 Lighting Patterns in your creative work!
Source: The 9 types of portrait lighting photographers need to know-whether they're on location or in studio https://www.youtube.com/watch?v=c7gpFQwtF68
Most lighting patterns are for fancy flash photographers ;) or not?
You don't use all OOP design patterns in Golang either ...
https://github.com/DovAmir/awesome-design-patterns
Popular design patterns in Go include:
Singleton: Ensures a class has only one instance and provides a global point of access to it. In Go, this can be implemented using package-level variables and sync package for thread safety.
Factory Method: Defines an interface for creating an object but lets subclasses decide which class to instantiate. In Go, this can be done using interfaces and struct types.
Builder: Separates the construction of a complex object from its representation, allowing the same construction process to create different representations. In Go, this can be implemented with a struct and a series of methods that progressively build up the final object.
Prototype: Creates new objects by copying an existing object, known as the prototype. In Go, this can be implemented using member wise cloning.
Adapter: Allows incompatible interfaces to work together. It involves a wrapper that converts one interface to another. In Go, this can be achieved by defining an interface and creating a struct that implements this interface.
Decorator: Adds new functionality to an object dynamically without altering its structure. This can be achieved in Go through embedding and method overriding.
Observer: Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. Go's channels and goroutines make this pattern easier to implement.
Strategy: Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it. In Go, this can be implemented using interfaces.
Command: Encapsulates a request as an object, thereby allowing for parameterization of clients with different requests, queue or log requests, and support undoable operations. This is often implemented in Go using interface and struct types.
State: Allows an object to alter its behavior when its internal state changes. The object will appear to change its class. This is typically implemented in Go using interfaces and struct types.
These patterns are not unique to Go and can be found in various programming languages, but their implementation in Go is often influenced by the language's features like interfaces, goroutines, channels, and the lack of inheritance.
Noted attempts to brings OOP thinking in Go
And yee ... dont forget SOLID in Golang context Golang https://dave.cheney.net/2016/08/20/solid-go-design