May 13, 2022 / Craft CMS
Why we are excited about Craft 4
Our thoughts on the Beta release of Craft 4.
As we may have shared a few times, we are steeped in the tradition of Craft CMS and this dates back to before it was even called Craft. We adopted it early and have even had some of our code included in the code base. In short - we are Craft geeks. Naturally then, when there is a new Beta release there is usually a high level of excitement. Imagine our elation then, when we discovered that both Craft 4 and Craft Commerce 4 releases had been aligned and released on the same day! The latest update brings a host of new features and benefits for developers and content managers alike, here are some of the highlights.
Craft 4 for developers
There are two pieces of new functionality that we, as developers, are especially looking forward to, these are collections and the improved user functionality.
Like many Craft developers, this has been on our wishlist for some time now and brings Laravel Collections directly into Craft with the ability to create much cleaner, more functional code that delivers better performance. We especially welcome the ability to create LazyCollections which will allow us to perform complicated transitions on huge collections without requiring excessive memory thus improving performance.
Other methods like #search() will allow us to search within a collection without any server side activity speeding up the process and reducing the infrastructure load. The advantages of collections will be especially beneficial for us as we tend to work on large, complicated projects so the ability to use collections to improve performance whilst still maintaining the functionality will be great.
Much of our work is in complicated e-commerce websites where, in earlier versions of Craft, customer and user data was held separately. In Craft 4 and Craft Commerce 4, both of these are brought together into one seamless experience. Something we very much welcome. This will allow us to create even better experiences where content and commerce experiences dovetail beautifully providing better user journeys and improved conversion rates.
The changes to how assets are handled in Craft 4 will see significant improvements. Volumes no longer have types or handle file operations directly, but rather are now assigned to a ‘filesystem’ which will handle the file operations. Image transforms will be able to take place on public filesystems for assets stored in a non-public filesystem.
Image “Alt” text is now built in, which just increases Craft’s accessibility prowess.
Craft 4 for content managers
The first thing that Craft users will notice is the work that the team at Pixel and Tonic has done to improve the performance of Craft 4. Craft 3 was no slouch, but Craft 4 has been further optimised to ensure that the control panel is faster to load and easier to use. Some of the heavy lifting activities like editing imagery are noticeably quicker which makes it a better experience for developers as well as content managers.
There are two pieces of functionality that we have been using for some time through plugins and custom code that are now native for the first time; conditional fields and element filtering. These make a huge difference to the flexibility of Craft without the concerns of update paths. More on both of those below:
Conditional fields bring the ability for really personalised experiences for the users of Craft. Field layout elements and tabs within Craft can now be set to be visible or editable when certain conditions are met. This is based on the element being edited and the logged in user who is doing the editing.
Built-in element filtering enables developers to create a much better user experience for website managers and content editors. Custom filters on entries will allow users to find and catalogue content more quickly within the control panel. It will be possible to filter content by author, a date range, tags, or other fields which will make it much easier for website managers to effectively keep their sites up to date.
Focal point adjustments
If the main image editing that you do within your Craft control panel is to adjust the focal point, then this change is going to be a game changer. No longer will you need to open the Imager Editor to change the focal point (although you will still be able to do it in Image Editor), you will now be able to edit the focal point of your image directly in the preview in the control panel saving you a significant amount of time!
Craft 4 for website visitors
Pixel and Tonic have described the emphasis of the changes in Craft 4 as being ‘on author experience, user management, and assets’ with no reference to the benefits for end users of the websites and webapps that we create. Although they are of course right, we think that the changes in Craft 4 have a much more tangible benefit for end users than that statement demonstrates. All of the developments in Craft 4 mean that the websites that we produce will be even easier to manage and faster, so should mean that websites are kept more up to date and have better user experience between content and commerce.
Craft 4 is a big step forward for Craft CMS and will go a long way to cement its position as the best content management system for developing bespoke websites and webapps. We are really excited about it, we'll be using it on our own internal projects and testing and starting to build new sites on it as soon as we are happy that any bugs have been tracked down and fixed. If you want to know how Craft 4 can help with your project, why not arrange a coffee either physical or virtual to discuss your project.