Trailblazer DX - 2022
Some notes on the sessions from the Trailblazer DX conference in San Fransisco, CA in April of 2022.
New Things in LWC
Light DOM
- Available in LWC OSS and available (now or soon) on the platform
- Ability to opt out of the shadow DOM rendering of the LWC
- Pros of Shadow DOM usage:
- Scoped styling, both to keep styles from leaking up or down
- Cons of Shadow DOM usage:
- Events don’t bubble up past the shadow root
- SSR for LWC is coming for the SFDC platform, but it’s already available for the LWC OSS
DevOps Center - Practical Use Cases
Took a lot of notes, split it out to another note: here
Building with CodeBuilder
- In-browser editor
- Looks to be built on Monaco / VS Code
- Features
- Full-featured IDE mainly configured for SFDC languages / frameworks
- Has access to all of the VS Code extensions that you’re used to in VS Code
- CLI: both
sfdxandsfvia the embedded terminal - SOQL Builder directly in the IDE
- Open Beta available in summer
- Distributed as a package in AppExchange
- When you launch CodeBuilder you have to choose a single org and point to your files (source control)
- Once your in CodeBuilder you can connect to multiple orgs, etc… it looks just like the org picker / auth flow that you use with the VS Code extensions
- Example workflow
- Pull in code from Source control (if you have it)
- Connect to org
- Work
- Deploy to org
- Deploy to source control
- Built on OSS
code-serverCode OSS
- Mulesoft is coming to CodeBuilder
- Some extensions other than SFDC might be supported, I’ll have to check
- Settings will sync based on your “user?”
- No intention to deprecate the Dev Console, but goal is to basically replace it with CodeBuilder
- Pricing?
- TBD, will be announced after the beta
DevOps Updates for Architects
- 4 Key metrics for DevOps success
- Deployment frequency up
- Lead time to change down
- Change failure rate down
- Time to restore due to failure down
- Features / Products coming down the pipe for DevOps
- CodeBuilder
sf- Unified CLI- Updates to how Profiles work for development and deployment
- Usability enhancements to the VS Code extensions
- Auth management
- Org Browser
- Enhanced Apex Tooling
- Updates to the CLI
- Reliability Enhancements
- Source Deploy / Retrieve library now open sourced / better
- Source Tracking updated / better
- Federated Dev model
- Functionality Enhancements
- Destructive Change Ops
- Manifest create command
- Embedded Release notes
- Usability Enhancements (
sf)- JSON Output standards
- Taxonomy standardization
- Reliability Enhancements
- Updates to the Extensions
- Manifest builder
- Conflict detection
- Salesforce Functions support
- Upgraded language support, replay debugger, and improvements for Anon Apex & Test files
- Enhancements to Environments
- Ability to create Scratch Orgs based on Production org licenses, features, etc…
- Scratch Org Shape - GA in Summer 22
- Scratch Org Snapshots
- Allows you to look at any Scratch Org and then use that as a starting point for creating other Scratch Orgs
- Sandboxes on Hyperforce
- Performance of cloning/refreshing/creating Sandboxes will be much much faster
- Ability to create Scratch Orgs based on Production org licenses, features, etc…
- Packaging Enhancements
- Shape in Unlocked Packages
- Push Upgrades API: auto-upgrade any unlocked packages installed in any org
- Create package versions based on the upcoming release
- Leverage Preview, and Previous to create pakage versions for (N+1) and N release
- Org-dependent Unlocked Packages
- Allows you to make a package dependent on unpackaged metadata. This will help us adopt unlocked packages much easier
- Manage access to Apex tests that run at Package Version Creation
- Surface duration of long-running package operations to developers
- DevOps Center: see notes from session I attended earlier
- Will GA with Org-based Development Models
Slack <> SFDC
- The Slack Apex SDK will allow for a much more robust interaction set, including responding to message events in Slack via Apex
- Can also send messages / creating channels / doing stuff in Slack based on SFDC automation
Introducing the SFDC GraphQL API
- Features
- GraphiQL support
- Field selection
- Resource Aggregation
- Schema Introspection
- oObject query ability
- Beta release coming this Summer
- UI API will be the first API to opt into this GraphQL
- This does support querying sObject records that are on the UI API allow list
- Standard and Custom Objects / fields are supported
- Only supports querying to begin with
- UI API will be the first API to opt into this GraphQL
- Querying
- Provides rich ordering, filtering (AND / OR / NOT), field selection, and nested / related object querying
- To provide feedback: https://sfdc.co/GraphQLIdeaExchange
- Blog: https://sfdc.co/GraphQLBlog
- LWC
- GraphQL wire adapters coming, likely in about a year
- Mutations
- Will be supported eventually, first iteration will be querying only
New gRPC Streaming API
Session Notes
- Event-based Architecture in Salesforce Options
- Legacy Event System
- Generic
- PushTopic
- Current & Pub Sub APIs
- Change Data Capture
- Platform Events
- Legacy Event System
- Can publish events from external apps to SFDC Event Bus via either the REST API or the Pub Sub API
- SFDC Event Bus is built on Kafka
- New off-core event bus has been developed to handle even larger load and scale, so that more folks can drive more and more event-driven architectures
- Event-based Functions are being developed (or already here?)
- New Pub Sub API Features
- Subscription flow control: When you have a subscriber, you can limit the number of events that you receive at a time
- Publish, Subscribe, and Get Schema: All in one API, rather than using separate APIs for them
- Real-time Publish Acknowledgements:
- Better language support than CometD: Can leverage all other benefits of gRPC for language support
- Works with the following event types
- High Volume Platform Events
- Change Data Capture Events
- Real Time Event Monitoring
- gRPC: The new underlying tech behind
- Created at Google
- Uses
protobufmessage format - 7-10x faster than REST
- Library Support for 11 different languages
- All through
Avrosupport and libraries
- All through
- Enables bidirectional streaming
- HTTP2
- CometD is no longer the best way to listen for events externally to Salesforce
- Pub Sub API does not support CometD
- GA coming in June
- Will be enabled in all production orgs
- Monitoring event subscribers:
- Streaming Monitor: AppExchange app that Phillipe built
Additional Notes for Me
- I need to learn more about
RPC,gRPC - I need to learn about
ChangeDataevents, as an alternative to Platform Events - I need to try building a new listener with this new tech rather than CometD
Slack’s New Development Platform
- Functions: Basically like invocable Apex that can be snapped together via Workflow builder
- There are going to partner-developed functions that you can leverage as well
- I guess you can build and distribute your own via a marketplace too?
- Building, running, and deploying all built on the new
slackCLI tool- Can allow for running locally for testing, including hot reloading
- Allows for templates that you can use to start your project from
slack varallows for secret management
- Running on the deno runtime
- Allows for automatic reading of
.envfiles - Function outputs are primitive, doesn’t support Objects as output