Prerequisites
First of all, I would strongly recommend an in-depth reading on the topic of Design Patterns. Here is a good starting point. This article has other really good references on the same topic, which covers different aspects at different level of detail.
So, let's do a quick overview about design patterns. You may skip this part should you know about this already.
- What is a Design Pattern? A Design Pattern is a generalized, verified, well-tested solution to well-known problems during software development. Adapter is a popular example for solving the problem of multiple database providers (MS-SQL, MySQL, DB2, Oracle...)
- I know JavaScript and PHP, do I need to know about Design Patterns? Design Patterns are not language specific. You can apply the adapter design pattern using either PHP or Java. There are a few differences (e.g. syntax and runtime...), however, the same elements of the design pattern will appear.
- What benefits do I get? Design Pattern is about identifying common problems and the optimal solutions. A good knowledge about design patterns helps you stay in-line with the community of people like you (software engineers, front-end developers and the likes) so that you don't have to reinvent the wheels! Try it, just google for the word singleton and you will see what I mean.