Book Image

Force.com Enterprise Architecture

By : Andrew Fawcett
Book Image

Force.com Enterprise Architecture

By: Andrew Fawcett

Overview of this book

Table of Contents (20 chapters)
Force.com Enterprise Architecture
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Where is Apex used?


The following table lists the types of execution contexts the Apex code can run from and considerations with respect to security and state management. While a description of how to implement each of these is outside the scope of this book, some aspects such as batch Apex are discussed in more detail in a later chapter when considering data volumes.

Execution context

Security

State management

Anonymous Apex

Sharing is enforced by default, unless disabled by applying the without sharing keyword to the enclosing class.

CRUD and FLS are enforced by default, but only against the code entered directly into the Execute Anonymous window. The code will fail to compile if the user does not have access to the objects or fields referenced.

Note that the checking is only performed by the platform at compilation time; if the code calls a pre-existing Apex class, there is no enforcement within this class and any other class it calls.

See Note 2.

Apex Controller action method

...