Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.47 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.47 KB

Examples of patterns

Please take a look at the Client class for each pattern to see how it is used.

Note: The examples are without validation and should not be used as it is.

References

Principles

Remember, principles are not mandatory rules but guidelines.

Fail fast.
Do validation as early as possible.

One return statement
Only one return statement per function, multiple returns may be overlooked.

Less is more.
Remember to be explicit - Do not confuse it with shortened code which is not necessarily more readable.

Just in time.
Start small and transparent. Use patterns when requirements changes, to make it more maintainable. You do not have to begin with a pattern.

Using camelCase for abbreviations
Example: "XML Http Request" becomes "XmlHttpRequest" not "XMLHTMLRequest"