Which maintains a reference to a concrete sObject object?

Which maintains a reference to a concrete sObject object?

State pattern is one of the behavioral design pattern. It maintains references to concrete state object which may be used to define current state of object. State: Defines interface for declaring what each concrete state should do.

What are sObjects in Salesforce?

Sobjects are standard or custom objects that stores record data in the force.com database. There is also SObject datatype in apex that is the programmatic representation of these SObjects. Developers referes to SObject and their fields by their API names.

What is meant by concrete object?

A concrete object is a real, physical object. A concrete noun is a noun that refers to a physical object rather than to a quality or idea.

How are concrete objects related to abstract objects?

Abstract object theory is a discipline that studies the nature and role of abstract objects. It holds that properties can be related to objects in two ways: through exemplification and through encoding. Concrete objects exemplify their properties while abstract objects merely encode them.

Can a code object be dependent on another concrete object?

The DIP is even simpler; a code object should never be dependent upon another concrete object, but instead on an abstraction. Case in point, by using “new” and a public constructor, you are coupling the calling code to a specific construction method of a specific concrete class.

Why should I use factory class instead of direct object construction?

Case in point, by using “new” and a public constructor, you are coupling the calling code to a specific construction method of a specific concrete class. Your code now has to know that a class MyFooObject exists, and has a constructor that takes a string and an int.

Which is better to think concretely or abstractly?

Thinking concretely isn’t a bad thinking strategy. In some cases, focusing on a concrete idea is the best way to resolve a problem. When abstract ideas are introduced into the equation, it’s important for a concrete thinker to spend time considering these ideas and being open to them.