Skip to content

acx-eduard-panin/salesforce-design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salesforce Design Patterns

This repository includes an examples of patterns realisation in Apex.

Factory Method

The factory method is just a method, it can be overridden in a subclass, whereas the abstract factory is an object that has multiple factory methods on it.

Examples:

Builder

The builder pattern is used to instantiate an object of a complex class using the step-by-step approach and return a constructed object at once. Allows creating different products based on the same process.

Examples:

Interpreter

Interpreter pattern is used to define a grammatical representation for a language and provides an interpreter to deal with this syntax.

  • This pattern is used in SOQL parsing, symbol processing engine etc.
  • This pattern performs upon a hierarchy of expressions. Each expression here is a terminal or non-terminal.
  • The tree contains the expressions to be evaluated and is usually generated by a parser. The parser itself is not a part of the interpreter pattern.

Examples:

Singleton

The singleton design pattern restricts the instantiation of a class to only one object.

  • This pattern is used in SOQL parsing, symbol processing engine etc.
  • This pattern performs upon a hierarchy of expressions. Each expression here is a terminal or non-terminal.
  • The tree contains the expressions to be evaluated and is usually generated by a parser. The parser itself is not a part of the interpreter pattern.

Examples:

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages