Dependencies: Must deploy ApexMocks before deploying this library
<img alt="Deploy to Salesforce" src="https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/src/main/webapp/resources/img/deploy.png">
enforceCRUD
and enforceFLS
flags on fflib_SObjectSelector
should be considered deprecated and the constructors that take dataAccess
arguments should be used instead. Additionally, the introduction of fflib_SObjectUnitOfWork.UserModeDML
provides an IDML
implementation that supports USER_MODE
or SYSTEM_MODE
. fflib_SObjectUnitOfWork.SimpleDML
(the default IDML
implementation) should be considered deprecated. There are measurable performance benefits to using SYSTEM_MODE
and USER_MODE
(Apex CPU usage reduction). Additionally, the use of explicit USER_MODE
and SYSTEM_MODE
overrides the with sharing
and without sharing
class declaration and makes the expected behavior of DML and SOQL easier to understand.git log --follow
from the command line or refer to this tag of the codebase prior to conversion.fflib_SObjectDomain.onValidate()
and fflib_SObjectDomain.onValidate(Map<Id, SObject> existingRecords)
methods where called during an on after update trigger event. From this point on the onValidate()
method will only be called during on after insert. If you still require the orignal behaviour add the line Configuration.enableOldOnUpdateValidateBehaviour();
into your constructor.Is derived from the Dreamforce 2012 presentation on Apex Enterprise Patterns and progresses the patterns further with a more general ongoing home for them. It also adds some form of namespace qualification from the previous version. So that classes are grouped together more easily in the IDE's and packages. Below you can find comprehensive articles and videos on the use of these patterns. There is also a working sample application illustrating the patterns here.
Design patterns are an invaluable tool for developers and architects looking to build enterprise solutions. Here are presented some tried and tested enterprise application engineering patterns that have been used in other platforms and languages. We will discuss and illustrate how patterns such as Data Mapper, Service Layer, Unit of Work and of course Model View Controller can be applied to Force.com. Applying these patterns can help manage governed resources (such as DML) better, encourage better separation-of-concerns in your logic and enforce Force.com coding best practices.
Related Webinars
Related Book
Other Related Blogs