I’ll keep this space updated with thoughts and notes on the presentations from Dot All 2022.
Day 1 #
The first day of Dot All is two full-day workshops: There won’t be any coverage here for these sessions.
Schedule Day 1
Day 2 #
Schedule Day 2
It’s a sunny, chilly morning here in Brooklyn and attendees are gathering in a courtyard outside the venue for coffee and breakfast before the conference starts at 9 AM EDT.
State of Craft
Brandon Kelly will kick of the conference with his talk on, well, the state of Craft CMS. Maybe we’ll see something new?
- Team Update
- 17 team members at P&T
- Brian Hanson, and August Miller are the newest team members
- Iwana — starting soon to work on Craft CMS
- Sales, profits, revenue continue to grow
- Revenue driven by Craft CMS and Commerce
- Craft 4, Commerce 4
- big releases, first major releases in 4 years
- 60% of new installs running on Craft 4
- 46% of actively-updated installs are running Craft 4
- 87% of most popular plugins already available for Craft 4. They are happy with this % considering the number of plugins that needed to be updated.
- Features in 4 Review
- Inactive users, built for Commerce. User accounts that don’t have user and password.
- Addresses — native address fields to simplify the complexity of address fields in Commerce
- Condition Builder — Brandon reviewed this feature and where it’s available
- Relational fields can also use the condition builder
- Commerce uses condition builder, too, in various locations like shipping conditions etc.
- Unified Element Editor
- gives plugins a really easy way to have a element editor interface (“the standard editing experience”
- Accessbility
- they are on track to reach WCAG AA 2.1 compliance
- Lupe, the accessibility engineer, did a comprehensive audit and found over 500 issues that needed to be addressed.
- they have made a ton of progress and are now over halfway done
- they releases a Craft CMS Accessiblity Conformance Report, which is is available at craftcms.com/accessibility/report
- Plugin Store
- they launched a new plugin store before Craft 4 release
- redesigned
- separation between Craft 3 and 4 plugins
- sidebar with plugin vital signs
- New plugin:Shopify plugin
- they’re launching a new first-party plugin soon to support Shopify (editor: smart move! Shopify is huge!)
- syncs down all Shopify products into Craft install, read only view of those products
- related entries to the products
- simple but they hope it’s effective at connecting Craft to Shopify
Craft Cloud update
- They announced Craft Cloud 3 years ago in Montréal as “headless Craft as a Service” with a lot of limitations built in. They wanted to complete with SaaS headless only options (like Contentful). They got feedback from the community that they were building the wrong product.
- They threw it all out and started over.
Tenets of Craft Cloud
- Simplicity; you shouldn’t have to worry about server specs, CPU etc. Or other devops concerns.
- Security
- Speec & Scalability
- Envrionmental Responsibility
Tech Specs
They are still working on it. “We’re getting there.” They plan to launch within the next year.
Craft Console update
- they announced it last year at the virual Dot All
- it was just comps in Figma but now it’s real
- replacement for Craft ID (customer portal)
- added Organizations (work like Github orgs)
- Organizations will have Plugin Store Listings and Partner Profiles
- Brandon is giving a quick walk-thru of the changes with Console
Craft Console is coming later this year.
Craft CMS update
- they’ve been busy since Craft 4 released earlier this year.
- they’re putting the finishing touches on Craft 4.3
- Brandon is walking through some of the changes in Craft 4
- New filtering support in the Craft Plugin Store
- Date condition rule has some presets in addition to the range.
- It has been over 11 years since Brandon and Brad started working on Craft CMS. At the time ExpressionEngine was considered one of the best CMSes for content modeling/content authoring.
- June 2013 — Craft 1.0 — element type API, live preview, custom fields, entries, global sets
- July 2013 — 1.1
- September 2013 — Section types and entry types
- November 2013 — Matrix fields — the original vision for Craft coming together
- AFter 2.0, everything sine then has more focused on authoring experience (AX) and developer experience (DX) but they have not made a single change to content modeling since 2.0
Craft 5
- the biggest leap foward in content modeling features since Matrix was added in 1.3
“Entries everywhere”
- an idea they’ve been noodling on for a few years
- Categories become Entries
- Tags become Entries
- Global Sets become Entries
- Unified content view
- map out IA view of your website
- “entry” doesn’t show up, they just call it content
- fully customize the content modeling and authoring experience
- it is slide-out driven, so when you click on something a slideout opens up
- Multiple entry authors
- Decoupled Entry Types
- entry types will be their own global concept. when you edit a section, you choose the entry types instead of creating them.
- you can reuse the entry types
- Entry portability
- you can move entries from one section to another
- Scheduled Drafts
- multiple drafts? create “Releases” so the content goes live together
Nested Matrix
- Some plugins have filled the gap of similar functionality (Neo and Supertable)
- Challenges: performance and authoring experience
- Performance challenges
- Brandon goes through the element saves required for a complex nested matrix block and the performance challenges with it
- multi-sites really make it complicated — could be over 2700 saves for 10 sites
- But they’ve been working on making the saving more performant.
- Delta saves inroduced in 3.4
- 3.7 those delta saves were made recursive
- but that didn’t really help with perfoemance of a potential nested Matrix because of revisions
- Craft 4 has a feature called “shared block custody” — no longer a 1:1 mapping of the matrix block and the element that saves it.
- the result is that saving is much faster — one row of new data vs an entire element saved. The same thing applies to revisions, too.
- But how do they fix the authoring experience?
- Brandon makes fun of the wildly complex page builders that people build (editor: agree)
- they think the solution for nested matrix is the slide out UI but the save button pattern doesn’t fit
- New field type
- INCEPTION FIELDS
- like address fields, but for nested entries
- Cards + Slideouts UI pattern
- Entry types (already decoupled in Craft 5)
- Entry portability
- Releases
Implementing component-driven design systems with Craft + Fractal
by Dalton Rooney, Raygun
- Dalton gave the history of his work and how he camet o the idea of building component-driven design systems and a way of working together between dev and design
- A model that provides different levels of access into the project to the right people at the right time.
- Brand guidelines => Style Guide & Pattern Library => Component Library => Production Application
- This work came out of the need to collaborate with more team members, get feedback earlier in the design process
- Why did they choose Fractal?
- framework agnostic
- flexible structure
- scriptable, well-documented, easy to integrate
- Craft CMS examples already exist
- Anatomy of component (in Fractal)
- organized into hiearchical folders
- a template (twig) and context (js)
- styles and scripts
- variants (context-defined)
- docs or other assets
- Fractal Workflow
- a node application installed as a peer dep in the repo
- all front-end components are developed and tested in Fractal
- use Hygen to scaffold new components
- Laravel Mix to compile all scss and js from the Fractal folder but any build tool will work; Fractal doesn’t care
- Fractal task that exports all components to the Craft template folder and generates a
components-maps.json
file. - Craft
fractal-folder
plugin (private)
- Craft’s template hooks connects Fractal to Craft CMS
- Context is pareped in a custom PHP module and injected into the entry template with a template hook.
- The template includes the Fractal template
What they like about this setup:
- encourages reusable components
- remove logic fromt he templates
- decouple front-end from CMS
- get input from stakeholders earlier in the process
- self-documenting, can share with clients
what they don’t like about the setup:
- everyting is rendered with twig.js but it’s not the same as twig.php
- no logic in the template, no Craft CMS flavored Twig functions allowed
- full integration requires correpsonding PHP modules
- Fractal app is in maintenance mode, not actively developed
See also:
Craft in K8s
by Matt Gray, Servd.host
- K8s => Kubernetes
- enterprise adoption of K8s is about 75% among enterpise companies
- 400% increase in K8s postings
- Why care about this for Craft CMS?
- dozens of companies offering managed kubernetes now
- best practices
- enviroment stored config
- external backing services
- build, release, run
- stateless processes
- port binding
- disposability
- log event streams
- 2019 Docker started to become adopted for packaging and running applications
- Nitro used, DDEV uses it
- Everything started to get containerized
- Why is K8s so popular?
- it acts as an abstraction over server resources
- scheduling
- networking
- storage
- resources
- scaling
- deployments
The pieces of K8s (and Craft)
- Containers
- K8s organizes containers.
- Make sure we are using containers within our Craft project. We export them as “images” (a blueprint for a container) so they’re availabel to K8s
- PHP, nginx, Craft CMS
- split out processes into multiple containers — allow K8s to do the things it does best
- Ephermal File Systems
- containers have their own filesystems
- Containers restart often
- Each time, their filesystem resets to tmatch teh state
- Anything we write to the file system at run-time will be lost, unless we prepare for it.
- plugins can be a challenge — make sure they don’t write anything to the file system that will cause problems if those written files go away.
cpresources
- This is an assumption that Craft/Yii does make…that both PHP and ngnix are using the same filesystem and can share
cpresources
files. - this is a problem in K8s because there are two sep file systems in two sep containers
- wrap everything in a “pod” — a K8s concept that allows everything to stay together and be grouped together
- Logs
- ephermal filsystems means that the file systems don’t last long, so log files might go away!
- instead of saving logs as files, we can use stdout and stderr K8s will collect and organize them
CRAFT_STREAM_LOG=TRUE
— Craft 4 will send logs to stdout and stderr instead of writing to the file system. If using Craft 3, you’ll need to implement your own override for this.
- Sessions and Cache
- Craft’s default cach and session handles use the filesystem
- can hurt performance if cache has to be regenerated too often
- solution: use Redis — easy to deploy to K8s, very easy to configure in Craft
- Image resizing
- processing images using ImageMagick or GD requires a lot of memory
- save yourself a headache and just use an external service: Imgix, Serverless Sharp
A Practical Guide to HTML “Over the Wire”
by John D. Wells
- MPA — multi-page application
- what is good at?
- SEO; serves HTML
- not complex, no complicated stack to deal with
- speed Not so good?
- UI fidelity
- SPA — Single-Page Application
- SEO? Not so good
- Complexity? Very complex from design; build tool required, API required, etc.
- Speed? it can vary depending on the implementation — intiial payload can be very big
- UI Fidelity? excellent
- What about having the best of both worlds?
- Something that is good with SEO out of the box wihtout trying,
- something that is fast,
- not that complex or within developer’s control,
- and good enough UI fidelity
- HDA — Hypermedia-Driven Application
- coined by the creator of HTMX
- interacts with the server
- responds with HTML instead of JSON
- HTMX — evolution of Intercooler (js library)
- author is trying to improve the HTML spec. Theory is that HTML when it was first created was incomplete; no PUTs, go GETs, no way to talk to a server without a GET request or PUT request via form and other code.
- Unpoly
- Hennig Koch
- “unobstrusive JS framework for server-side web applications”
- it is trying to pogresively enhance an MPA
- Hotwire
- evolution of turbolinks
- by Basecamp/Hey team
- other adjacent tooling
- Hyperscript
- Alpine.js
- Sprig — Ben Croker, Craft CMS Plugin, built on HTMX
- TailwindCSS
Craft Command Line Magic
by Michael Rog
Slides for the talk
- Craft’s native CLI tool
- a host of utilites for maintaining and working with your Craft installation
- building your own CLI commands
- use case examples
Rescue situations when you need to use the command line
./craft users/set-password
./craft users/create --email --password --admin
Development commands
./craft resave/entries --set=myField --if-empty --to
bulk update entries- check Michael’s slides and the official Craft docs for more examples
Prodcution
Building your own custom CLI commands
start slides here
#### Use Case Examples start slides here
Managing Craft at Scale
by Mark Huot
- should be called Learning from Mark’s Mistakes
- what is scale? where are today -> getting bigger, more traffic; whether smaller site or bigger site
- Big Site, Bigger Risk
- Mark’s example of a client site that gets a lot of traffic, this time unexpected: getting hit with a lot of bots
- Small Site, Big Reward
- brick n mortar sales => online during pandemic
- scaling issues can happen to anyone; small sites big site everything in between
- it’s all about being prepared to scale!
Keep Craft Updated
- the longer you put it off the harder the upgrade gets
- eventually you’ll have update for a security update or feature update and the updates only get harder the longer you wait.
- you also get performance updates in Crarft 3.7.x because so many were added (and, of course, in Craft 4)
- two ways to update:
- update in the control panel <- scary!
- command line version through a standard development and deployment process
- don’t forget to keep all plugins updated at the same time that you update Craft
Disable devMode
- use the user-specific Development settings instead, so you still get to see them as a logged-in user
- Yii Debug toolbar — Mark’s favorite view is the Timeline view
- the worst thing you can do is “guessing and checking” Instead start with the timeline view of Yii debug toolbar and methodiclaly find your starting point
- you can also do this via the database queries tab in the Yii Debug Toolbar. Find the slowest query and see what you can do to address that first.
- MySQL explain view in Yi Debug Toolbar — use the “rows” column to identify slow or inefficient queries. The more rows MySQL is looking through and not returning isn’t optimal.
Relationships
- “one of the best features of Craft”
- they are flexible because they’re two directional (source, target)
- but they can be hard to scale properly without some adjustments. How?
- Switch your relationships and make it related to the target element
{targetElement: category}
<- be more explicit about the type of relationship since this category is only this type of relationship. Mark does this by default to get a faster JOIN.- eager-load all the things using
with
in the element query to get around the N+1 issue
content table
- try to limit the number of columns in the
content
table- don’t create ALL THE FIELDS — each new field is a new column, is a longer search etc.
Hire a DBA for a week
- if you’re realling having issues, hire a DBA for a week and get project-specific information for how to improve the database.
- Mark uses the Preparse field a lot to help save on JOINs and other expensive queries. The data is stored in the field on-save versus querying dynamically.
- Preparse Field
- “mind your database”
Day 3 #
Schedule Day 3
Creating Empathy Through Collaboration
by Sarah Carr
- What is empathy?
- Why does it matter?
- How do I use it?
Important notes from Sarah:
- don’t be someone# you’re not
- she doesn’t want to tell you how to do your job
- be deliberate about your interactions with others
What is empathy?
- The ability to understand and share the feelings of another.
- read their behavior
- imagine their POV
- understand stressor or struggles
- cognitive: knowing how someone is feeling and what tye might be thinking
- Emotional: phuysicaly feeling a sensation along with another person
- compassionate: moving beyond connection and understanding to take action — donating to charity/helping others
- Brené Brown quote: “We need to disple the myth that emapthy “walking in someone elses’s show” Rather than walking your shoes, I need to learn how to listen to the story you tell about what it’s like to walk in your shoes and believe you even what it doesn’t may my experiences.”
Why does it matter?
- Working with people can be overwhelming
- different personalities
- varied life xperiences
- unique ways of working
- communcations styles
- cogniitve abilities
- remote work
- mixed availability
- family needs
- slack and zoom eqtiutte
- time zones
- empahy improves team performance
- shared understanding unites toward a shared goal
- better equip your tema to handle stressors and unknowns
- smoother, and more clear communication
- increased producityivy
- happier people, happier clients
How do we use it?
Assume Good intentions
- Don’t jump to conclusions
- Example: a team member is suddenly unproductive, output is different than before
- remember this is uncharacteristic, not like them
- give the benefit fo the doubt
- offer support to begin a conversation
- Example: the eager junior developer
- added a new feature into the branch without telling anyone, which introduce a lot of issues/merge conflicts
- “We judge ourselves by our intentions and others by their behavior” –Stephen Covey
- assume they meant well — observe before you judge, keep an open mind, check in with them
- don’t scold, but do educate
- encourage them to channel their energy through proper processes
Roll with the Punches
- embrace flexibility
- Example: short notice PTO by a key team member mid-project
- empathetic responses: not all vacations are vacations, burnout can come quickly, maintaing work/life balance can be tricky
- build in flexibility from the start
- meet people where they are — what flexibility means to you might mean something totally different to someone else on your team.
- take time for yourself
Everyone is Human
- example: deploying broken code — a developer deployed broken broken code into a production environment. The code passed QA, but the wrong package was pulled in, and production was down for an hour. The client is extremely upset.
- empathetic response
- mistakes hapen; this won’t be the last
- keep your cool – blame and argument won’t bring production back up
- address the immediate need, then discuss prevention
- You are not your work
- Keep your cool
- It’s a two-way street
Final thought: “When we understand each other better, we can create things together we never could have alone.”
Bending the Craft Control Panel
by John Henry Donovan
- “we put as much effort into the authoing experience as the front-end of your website” — what John Henry tells clients
- contemplate the client’s long-term solution rather than the fast sell
- Static message translation
- customize table columns
- unicode works in layout tabs — number the tabs in the field layout so authors know the order of entering content
- tabs can be admin only
- write clear field instructions
- you can hide the field instructions via module and field in user account
- use conditions where necessary
- Plugins:
- Recap
- bend the client, then bend the control panel
- customize the control panel to meet the client’s business logic
Mind the Gap – What’s left behind when we bulid for the cutting edge?
by Shawna O’Neal
- As developers, we always get the newest devices but the global user base isn’t buying into annual upgrade.
- Google “Chrome User” Study
- from Chrome installations from a group of countries around the world
- their findings are from Windows, Android and ChromeOS
- Android devices globally vary widely
- ZA devices typically have 1 GB RAM
- US devices typically have 2 GB RAM but also hightest % of 10GB or more
- not everyone is goign to be on a fast enough device to handle big js payloads and processing
- 13 tabs uses in Chrome uses over 3 GB of memory
- but Chrome itself only needs 128 MB to run, the rest is our websites needing a lot of resources
- Digital Divide
- the growing gap between people who have access to computers and internet and those who do not
- 1 in 10 US households don’t access access to a computer
- mobile device access is considered a luxury
- internet was developed unevenly across the globe
- geography limits infrastructure
- JavaScript
- client-side rendering is a burden on devices with less capabilities
- rapdily increasing download sizes for initial JS payload
- secular standarizations —
Using Entries and Relationships as your content builder system
by Justin Holt
- the typical apporoaches to content editing in Craft are:
- static fields
- straightforward and simple, control the content to match the page
- hard to scale, rigid, not bespoke. Requires a developer to add new content flexibility
- matrix fields or Neo
- predictability and flexibility
- Performance hits happen in large content sets.
- Vizy fields
- maximizes flexibility
- UI can get condusing to editors. Large content sets can be unwiedly
- live demo of site with a lot (i mean, A lot) of Matrix blocks
- demo’ing holtsdogs: https://holtsdogs.com
- everything on the site is using the schema approach
- view only user available in the Discord so you can see how the site is configured
- Plugins that can help/improve the experience
- Best practices
- strict component entry naming
- abtract, but not too abstract
Pixel & Tonic Q&A
I’m moderating this discussion, so I will not be able to take notes in real-time.