What is a Pattern ?
Why to use Pattern in your Applications ?
It’s when you move beyond the simple & rough snippets of JQuery and started working on the more complex User Interactions then your code difficult to understand and it becomes messy sometimes to debug the Application.
Pattern provides solid approaches to solve issues in Software Development.
Like we said pattern is a reusable solution that can be adapted to suit our own needs hence this make the application more robust ever.
- If you are reusing the pattern so reusing patterns assists in preventing the minor issues that can cause the major problems in the Application Development Process.
- Patterns are generalised solutions to a problem.So the generalised approach means that regardless of the application ,so the Design pattern can be applied to improve the structure of our code.
- If you are reusing the code or solution so naturally it’s going to reduce the File size.
Pattern is a Template ?
Yes , Pattern are not the exact solution to some problem.It’s a template so the role of a pattern to provide the solution scheme.
The Rule Of Three :
Rule of three stands for the requirements for a pattern to be valid so there are at least three key areas that are referred to as the rule of three.
- Fitness of Purpose
- Object Literal Design Pattern
- Constructors With Prototypes
- The Revealing Module Pattern
- The Singleton Pattern
- Observer Pattern