The document introduces RFLIB, an open source library for Salesforce that provides three core features - a logging framework, trigger framework, and feature switches - to help debug code and configure application behavior. The logging framework allows logging across Apex, Aura, and LWC and provides real-time dashboards. The trigger framework makes triggers decoupled and configurable. Feature switches allow configuring app features through custom metadata. The library aims to help create clean, production-ready code with high operational supportability.
2. Hello!
My name is Johannes Fischer
Over 10 years of experience in
the Salesforce ecosystem.
Working as a consultant.
Developer at heart.
2Contact me @j_h_fischer
6. The library has 3 core features (and packages)
1. Logging Framework
2. Trigger Framework
3. Feature Switches
6
7. What problems do those solve?
Running Blind
Trying to
investigate an
issue with
nothing but a
user’s description
to start with.
Silos
Many libraries
work only in
isolation.
Integrating them
complicates the
upgrade path.
7
Backend Only
Many libraries
are built for
Apex. Aura and
LWC are left
behind.
Code Only
Libraries are
often built for
developers,
missing valuable
configuration
options.
8. 1. Logging in Salesforce
Creating full org transparency
10. Logging is a bit of an art
10
Creating an enriched
stacktrace of your code
● Cover as many code
paths as possible
● Combine log
statements
● Print important
variables
● Choose appropriate
log levels
11. How is RFLIB’s Logging Framework different?
▪ Full support for logging in LWC and Aura
▪ Collection of log statements
▪ Rich configuration through Custom Settings
▪ Utility classes such as rflib_HttpRequest
▪ Custom actions for Process Builder and Flow
Built using Platform Events, comes with real-time
dashboard and e-mail notifications.
11
13. Best practices for Apex
13
Creating a robust logging
structure just takes a few
steps:
● Use Factory to
instantiate batched
Logger
● Use try-catch for
action method
● Log generously
● Finalize by publishing
batched events
14. Best practices for Aura
14
Minimal boilerplate code
for maximum
transparency:
● Define the logger
component with
unique name
● Retrieve logger in
every controller and
helper function
● Log generously
15. Best practices for LWC
15
Minimal boilerplate code
for maximum
transparency:
● Create logger using
factory method
● Log generously
● Note the different
syntax for message
arguments
16. Follow logs in real-time
16
Everything you need to
start your investigation in
one simple UI
● Navigate using
pagination
● Filter using full text
search
● See user details for
every selected log
● Download log file
with a single click
● Change connection
mode when
needed
19. An experience for developers and admins
Fully Decoupled
Trigger handlers work
in isolation, which
makes testing a lot
easier.
Fully Configurable
Use Custom Metadata
activate/deactivate
triggers, define their
execution order, error
handling and more.
Fully Transparent
All classes of the
Trigger Framework
have logging included.
19
22. App Builder Friendly
Fully supported in Flow
Builder through Get
Records or Apex
Action. Use in
formulas, i.e.
Validation Rules
An experience for developers and admins
Fully Configurable
Use Custom Metadata
activate/deactivate
feature switches.
Supports hierarchical
configurations.
Use in Both Worlds
Easy access to validate
features switches in
Apex, Aura, and LWC.
22
24. Faster Development
Find more bugs, and faster, during development.
More Control
Configure and deploy your application’s behaviour.
Faster Prod Support
Know about problems before your users report them.
24
25. 25
Version 2.x is here !!!
Install using browser
RFLIB: https://login.salesforce.com/packaging/
installPackage.apexp?p0=04t3h000004jmoqAAA
RFLIB-FS: https://login.salesforce.com/packaging/
installPackage.apexp?p0=04t3h000004jmovAAA
RFLIB-TF: https://login.salesforce.com/packaging/
installPackage.apexp?p0=04t3h000004bcWpAAI
27. Credits
Special thanks to all the people who made and
released these awesome resources for free:
▪ Presentation template by SlidesCarnival
▪ Photographs by Unsplash & Pexels
▪ Icons by IconsDB
27