Salesforce TrailheaDX Day 2 Material

Posted by

On Day 2 of TralheaDX, I was back at it early and the sessions did not disappoint.

How does salesforce build lightning web components?

API Design:
  • Name of web component should match web component standards — myComponent.html
  • Build javascript properties to your needs, do not overuse @track decorators and @api decorators. Only use decorators when you need the component to re-render on a change
  • Your web component should be readable and easily scalable. It is very important to think about the bigger picture and handing off a great product to the next developer
  • Watch out for Boolean traps: analyzing JavaScript methods and what the true and false parameters actually dictate to the intended functionality. There is a great article on this called The Pitfalls of Boolean Trap
  • Don’t use HTML global attributes: Be sure to use attributes that Salesforce provides and recommends to avoid any conflicts
  • Use consistent attributes with elements
  • Don’t use shortcuts with variable or attribute names
Enforce static analysis:
  • Static analysis is best described as a method of debugging by automatically examining source code before a program is run.
Unit Test Everything:
  • Everything should have its own unit test.
  • Place more focus on actually asserting that your code is working rather than how much coverage it has

Anatomy of a killer demo

Place focus on customer centric discovery. Ask yourself questions like:
  • What should you ask?
  • What are the challenges and goals?
  • Who are the users?
  • What is the day in the life of a user?
  • What have they tried in the past?
  • How many people are in the audience?
  • Who are they? What roles/functions?
  • Will they be in person or remote?
Tips and tricks to keep in mind:
  • Try to make the biggest impact and impression in the first demo
  • Tell a story: most effective way to merge meaning and emotions. You are selling a solution, not a product
  • Only build what you need. Don’t over complicate it and risk an unwanted bug in the middle of a demo
  • Minimize clicks
  • Remove all unused fields and buttons
  • Pre-populate fields and set defaults
  • Copy and paste…don’t type

Docker and You: Automate salesforce deployments on any CI tool using Docker

Docker containers
  • Cozy and consistent place for code to run
What is docker?
  • Containers – lightweight computing environment
  • Docker – open source tool for quickly creating predefined containers
  • dockerhub – repository containing millions of docker images
  • CI/CD – practices to ease and automate testing and deployments
  • CI Tools – tools to run automated jobs when a codebase changes
  • An open source tool for quickly and reliably creating pre-defined containers
  • Used for running production applications
  • CI/CD – moving things from development to production
  • create a development environment
Why should you care?
  • Best way to deploy easily and make orgs consistent
  • Docker is easiest way to get started with ci/cd
  • Docker is supported by almost every ci tool
  • You can easily make your own images
How do I use docker for CI/CD?
  • Create a new code repository
  • Create a bitbucket-pipelines.yml file
  • click pipelines in bitbucket
  • Name of a docker image to get started
Creating your own docker images?
  • Create a file called docker file
  • Create a docker image from that file
  • Publish
  • Its that easy!

Set yourself up for Architect Success

A good architect should always be:

  • Creative
  • Innovative
  • A bigger picture thinker
  • Always learning
  • A designer
  • A teacher
  • A fixer
  • A problem solver
  • Always learning

A good architect should always be thinking about:

  • Application design
  • Custom code
  • Sharing and visibility
  • Identity and access management
  • Integration
  • Mobile
  • Communities
  • Data architecture

Overall, I thought the conference had amazing sessions and the overall vibe was inspiring. I am looking forward to next year! Please let me know if you have any questions on the notes and I will be happy to help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s