Andrew Welch · Reviews · #craftcms #craft-3 #beta

Published , updated · 5 min read ·


Please consider 🎗 sponsoring me 🎗 to keep writing articles like this.

Craft 3 Beta Executive Summary

Here’s an exec­u­tive sum­ma­ry of Craft 3 beta, a major new iter­a­tion of the Craft CMS platform

Craft Cms 3 Beta

Pix­el & Ton­ic released the first pub­lic beta of Craft 3 on Jan­u­ary 31st, 2017; it’s the lat­est iter­a­tion of the Craft CMS plat­form. I’ll briefly talk about some of the fea­tures that Craft 3 brings to the table, but the core of this arti­cle will address what I think you should be doing with Craft 3, depend­ing on who you are.

Craft 3 is avail­able for your down­load­ing plea­sure right now; it’s cur­rent­ly at 3.0.0b3 as of this writ­ing, but I expect rel­a­tive­ly fre­quent releas­es. Thank­ful­ly, due to Craft 3’s adop­tion of Com­pos­er to han­dle updat­ing & installing both Craft 3 and plu­g­ins for Craft 3, updat­ing is pret­ty easy.

Pix­el & Ton­ic has stat­ed that they expect a Gen­er­al Release in 6 – 9 months. The first ques­tion many peo­ple ask is Can I use it for a project now?” I’ll just crib P&T’s answer to this one:

Technically you could. We wouldn’t recommend it though. That’s what stable releases are for. Craft 3 Beta is a beta. There are many bugs. But it’s feature complete. So this is the point where we stop breaking things and start fixing them.

Link So What’s New?

The most all-encom­pass­ing change in Craft 3 is that it is rewrit­ten on top of Yii2, the high per­for­mance, com­po­nent-based frame­work that Craft uses. In addi­tion to the speed improve­ments from Yii2, P&T has also spent a whole lot of time opti­miz­ing Craft 3 as well.

So we’re look­ing at some sig­nif­i­cant per­for­mance improve­ments in terms of Time To First Byte (TTFB), query speed, but it also has been opti­mized to use less mem­o­ry. That means you can spend less on your VPS host­ing for Craft sites.

Craft 3 also boasts the new Mul­ti-Site capa­bil­i­ty, allow­ing you to run mul­ti­ple sis­ter-sites from a sin­gle Craft CMS install (with full local­iza­tion capa­bil­i­ties, which have also been enhanced for Craft 3).

There are a host of oth­er new fea­tures; check out the Craft 3 beta page for details. My favorite pet fea­ture is the fact that the new Image Edi­tor includes the abil­i­ty to pick Focal Points for images:

Craft 3 Focal Points

Craft 3 Focal Points

If you’ve read my Cre­at­ing Opti­mized Images in Craft CMS arti­cle, you know I’m big on using Focal Points as a way to make great-look­ing respon­sive images. Yay!

You can also read some more about the nuts & bolts changes in Craft 3 on the Craft 3 Docs page.

Link What should frontend developers do?

If you’re a fron­tend devel­op­er, I think you should con­sid­er Craft 3 in its cur­rent state as some­thing to look into on your downtime.

There will still be plen­ty of bugs; it cer­tain­ly isn’t some­thing you’re going to want to rush to start using. Cut­ting-edge soft­ware is one thing; bleed­ing-edge soft­ware is another. 

Bleeding Edge Software

There won’t be a whole lot of fron­tend changes that you’ll need to make to your web­sites to upgrade them from Craft 2 to Craft 3. Twig is still there as your fron­tend tem­plat­ing lan­guage, and there have been only a few minor changes you’ll need to keep in mind as fron­tend developers.

What I would sug­gest instead is that you take an exist­ing Craft site of yours, and go through the upgrad­ing from Craft 2 process so you can learn what is involved. Then when it’s time to sell your clients on pay­ing you to upgrade their web­site from Craft 2 to Craft 3, you’ll have a sol­id under­stand­ing of what is involved.

Obvi­ous­ly do the upgrade in local dev or in a stag­ing envi­ron­ment; and start to get your­self famil­iar with Craft 3. The good news is that from a fron­tend and UI per­spec­tive, not a whole lot has changed. And of course, if you find any issues, report them on the Craft 3 Issues page.

The bad news is that because there are not a whole lot of client-vis­i­ble new fea­tures in Craft 3, you may have your work cut out for you sell­ing your clients on upgrad­ing. How­ev­er, I think the per­for­mance opti­miza­tions and oth­er niceties in Craft 3 are com­pelling enough.

Addi­tion­al­ly, the best thing that you can do from a secu­ri­ty and main­tain­abil­i­ty point of view is to keep your soft­ware updat­ed. If you don’t have a sup­port con­tract or retain­er, you might con­sid­er broach­ing the discussion.

Not keeping your software up to date is akin to leaving a car to sit and rust in a field. You’ll have much better results if you do regular maintenance.

Pix­el & Ton­ic has men­tioned that after the Craft 3 Gen­er­al Release, they plan to sup­port Craft 2 with secu­ri­ty updates & bug fix­es for 1 year. So that might be some­thing you can use to sell Craft 3 to your clients as well.

The biggest thing you will like­ly be wait­ing on (in addi­tion to P&T shak­ing out all of the bugs) in the next 6 – 9 months is for plu­g­in devel­op­ers to migrate your favorite plu­g­ins to Craft 3.

Link What should plugin developers do?

If you’re a plu­g­in devel­op­er, the time is now to grab Craft 3, and start chip­ping away at your tech debt. Craft 3 beta is sta­ble enough for devel­op­ment use, and there is a lot that has changed in how plu­g­ins work.

Check out the So You Wan­na Make a Craft 3 Plu­g­in? arti­cle for an in-depth look at how to do it.

Plu­g­ins now can have first-class Yii2 com­po­nents, and many of the lay­ers of insu­la­tion pro­vid­ed by Craft 2 for plu­g­ins have been stripped away. This has been done both for per­for­mance rea­sons, and also for API consistency.

As Brandon Kelly has stated, “The training wheels are off”

So march on over to the Plu­g­in Devel­op­ment doc­u­men­ta­tion for Craft 3, and dive in. There is quite a bit to learn if you’re rel­a­tive­ly new to Yii or con­cepts like name­spaces in PHP, but it’s real­ly not so bad.

I have also found that the more I learn about Yii2, the small­er and more con­cise my code gets. It’s quite satisfying.

I would also sug­gest run­ning over to plug​in​fac​to​ry​.io and using it to gen­er­ate the scaf­fold­ing for your plu­g­ins. It can gen­er­ate plu­g­in scaf­fold­ing for both Craft CMS 2.5.x and Craft CMS 3.x (com­pat­i­ble with the Craft 3 beta). I use it as the basis for all of my plu­g­ins, just fill­ing in the bits that make my plu­g­in unique.

How­ev­er, if you just want to use it to gen­er­ate a plu­g­in to see how things work,” that’s fine too. It real­ly is an extreme­ly use­ful tool for cre­at­ing plu­g­ins for Craft CMS. I’m hor­ri­bly biased, but I made it to help save me from the busy­work of plu­g­in devel­op­ment. The code it gen­er­ates con­forms to P&T’s Cod­ing Guide­lines.

There’s also a mas­ter list of Plu­g­ins that have been port­ed to Craft 3 already that can serve as a resource to look at how some­one else solved a prob­lem you may be facing.

If you want to go fur­ther, check out the Con­tribut­ing to Craft CMS doc­u­ment if you have pull requests for core. And of course, if you find any issues, report them on the Craft 3 Issues page.

Get to it!

Link Yeeehaww!

I’m per­son­al­ly very excit­ed by Craft 3, pri­mar­i­ly because it’s offer­ing up an amaz­ing base for the long-term future of Craft CMS.

Hope­ful­ly you’ll get a chance to kick the tires, and will share my enthusiasm!