-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Extensions for the fflib-apex-common Library. Introducing many advanced features on top of the Apex Enterprise Patterns
The complete picture
+------------+ +----------------+ +------------+ +----------------+ +------------+ +-----------------------+ | Controller | | TriggerHandler | | Batch Apex | | Scheduled Apex | | WebService | | Inbound Email Handler | +------------+ +----------------+ +------------+ +----------------+ +------------+ +-----------------------+ | | | | | | | | V V | | | | +-----------------+ | | +----------------+-------------->| Service |<--------------+-------------------+ +-----------------+ ^ ^ | | | | +-----------------------------------+ | +---------------------------------+ | | | | +------------+ | +--------------+ | | | Domain |<--------------+-------------->| Selector | | | +------------+ +--------------+ | V V +---------------+ +--------------------+ | Factory Class | | SObject UnitOfWork | +---------------+ +--------------------+ +-----------+ +-----------+ +------------+ +-----------+ | Constants | | Logger | | UnitOfWork | | Factories | +-----------+ +-----------+ +------------+ +-----------+
Core Layers | Entry Points | Supporting Layers |
---|---|---|
Controllers |
Constants |
Concern | Core design principles |
---|---|
Service |
|
Domain |
|
Selectors |
|
Controller |
|
Scheduled Apex |
|
-
Application Factories based on interface structure
-
Primitive domains when and how to use them
-
A common criteria based filter for Domains and Selector
-
Queued Actions / Apex Events
A replacement for the scheduled actions of process builder flows, as it is difficult to update flows with scheduled actions. This feature contains a queue object with actions and scheduled jobs to execute the actions when they are scheduled. Events are used to tell the application that the given action should be performed.
See the Events documentation for a full description -
Selector Architecture
The selector will be redesigned to that its not coupled to a database. In this new architecture the selector will retrieve data from wherever it is stored. It should not be the concern of a service class calling the selector to know where the data is coming from. This new architecture should allow for getting the data from the list below.
The queries should also be able to roll-over. Like when the requested record is not in memory, then the next selector in line should be called as the record might be in the Platform cache. If it is still not found the record can be queried from a database.-
In memory from previous queries (Identity Map Design Pattern)
-
A Platform Cache
-
The Database
-
External WebService
-
-
UUID generator
sfdx-source | +-- force-app or {NameSpacePrefix} | +-- main | | | +-- default | | | | | +-- classes | | | Application.cls | | | | | +-- constants | | | AccountLabels.cls | | | AccountNames.cls | | | | | +-- controllers | | | AccountListViewController.cls | | | | | +-- domains | | | | Accounts.cls | | | | | | | +-- interfaces | | | IAccounts.cls | | | | | +-- factories | | | AccountFactory.cls | | | | | +-- selectors | | | | AccountsSelector.cls | | | | | | | +-- interfaces | | | IAccountsSelector.cls | | | | | +-- services | | | | AccountsServices.cls | | | | AccountsServicesImp.cls | | | | | | | +-- interfaces | | | IAccountsServices.cls | | | | | +-- triggerActions | | | | | +-- Account | | | TA_Account_CopyCountryToContacts.cls | | | TA_Account_RecalculateRating.cls | | +-- Contact | | | | | ... | | | +-- test | | | +-- apex | +-- classes | | | +-- domains | | AccountsTest.cls | | | +-- service | | AccountsServiceTest.cls | | | +-- triggerHandlers | | AccountTriggerHandlerTest.cls | +-- Feature SFX | +-- main | | | +-- classes | | | +-- domains | | | ... | +-- test | ...
We are pleased to announce that the fflib-apex-extensions Project is accepting donations in the privacy-oriented cryptocurrency Monero (XMR) at the following address:
8BMsQrdLiBvKaP87GFMPE9Wa1US79ygcp3b9kwoDq1iBW9JEYbcgpDS3hMp2p7ePWiCEKg2fdTucUbpNTtGbnvCCQZTMSu1
Thank you for your donations!