Developer ๐ Business Analyst ๐ Solution Architect
Still a developer at โค and spend a lot of my time building personal and client projects from home.
I've actually been looking at doing this. Not just for design patterns but for JavaScript in general. I read a lot and there's only so much information I can take in. I often know there is a concept out there or need a slight prompt. I believe cheat sheets are a great way to jog your memory. I found them especially useful back when I was learning new languages.
I think in this case there is a distinction between the patterns used within modules and then there's the patterns used to organise my projects & modules. In the cheat sheet it terms these are structural vs creational which is a great initial distinction to make!
Striving to become a master Go/Cloud developer; Father ๐จโ๐งโ๐ฆ; ๐ค/((Full Stack Web|Unity3D) + Developer)/g; Science supporter ๐ฉโ๐ฌ; https://coder.today
Yes there are many patterns and you only use them when starting a new project / system / module, impossible to remember them all.
Especially in JS where you can jog between multiple programming paradigms, our brain can be overloaded so cheatsheets are here to rescue us. From DRY/SOLID principles to JS module patterns it's good to make some wall posters from them.
Developer ๐ Business Analyst ๐ Solution Architect
Still a developer at โค and spend a lot of my time building personal and client projects from home.
Good point around the beginning of the project. I'm just starting out building a telegram bot which will use a lot of custom commands for authenticated users.
I've decided instead of doing my usual "write code - suffer pain - refactor" mantra I will plan out elements of the architecture.
As an example, since every message would be running through my application I expect a middleware pattern would be useful for logging, checking for authentication levels, spotting messages that contain commands and attaching a custom handler.
Once the message is picked up by the handler I could use a plugin based architecture as there are many commands that I would treat as custom hooks to be fired in response to the routed command.
Even having a rough implementation view at this level will help to structure my project. I can then begin delving into the creation patterns such as an InstantMessage class which creates a structure I can then utilise in my concrete classes which hold the detail of the commands.
Striving to become a master Go/Cloud developer; Father ๐จโ๐งโ๐ฆ; ๐ค/((Full Stack Web|Unity3D) + Developer)/g; Science supporter ๐ฉโ๐ฌ; https://coder.today
Developer ๐ Business Analyst ๐ Solution Architect
Still a developer at โค and spend a lot of my time building personal and client projects from home.
I've actually been looking at doing this. Not just for design patterns but for JavaScript in general. I read a lot and there's only so much information I can take in. I often know there is a concept out there or need a slight prompt. I believe cheat sheets are a great way to jog your memory. I found them especially useful back when I was learning new languages.
I think in this case there is a distinction between the patterns used within modules and then there's the patterns used to organise my projects & modules. In the cheat sheet it terms these are structural vs creational which is a great initial distinction to make!
Your post has actually got me on the hunt for some other cheat sheets github.com/addyosmani/essential-js...
Yes there are many patterns and you only use them when starting a new project / system / module, impossible to remember them all.
Especially in JS where you can jog between multiple programming paradigms, our brain can be overloaded so cheatsheets are here to rescue us. From DRY/SOLID principles to JS module patterns it's good to make some wall posters from them.
Good point around the beginning of the project. I'm just starting out building a telegram bot which will use a lot of custom commands for authenticated users.
I've decided instead of doing my usual "write code - suffer pain - refactor" mantra I will plan out elements of the architecture.
As an example, since every message would be running through my application I expect a middleware pattern would be useful for logging, checking for authentication levels, spotting messages that contain commands and attaching a custom handler.
Once the message is picked up by the handler I could use a plugin based architecture as there are many commands that I would treat as custom hooks to be fired in response to the routed command.
Even having a rough implementation view at this level will help to structure my project. I can then begin delving into the creation patterns such as an InstantMessage class which creates a structure I can then utilise in my concrete classes which hold the detail of the commands.
Offtopic - I made some bots in the last 2 years and I came across this generator that does something simple and beautiful
Thanks for this sounds like it will give me a nice framework to review and steal with pride.