Last month the team and I attended Laracon 2021, the official conference of Laravel. Sadly this was an online conference so we didn’t get the chance to fly across the Atlantic, but we had a great evening hosted by Sprechen at the Harbour Hotel in Southampton instead.
We are big fans of Laravel, the world’s most popular PHP framework. It’s the framework behind some our apps, including Alcohol Change UK, ICE and CL:AIRE.
We were looking forward to hearing what’s coming next for Laravel and learning something new! There were some great talks, so we thought we’d share a summary of our favourites and the best bits if you missed it.
The Laravel update – Taylor Otwell, CEO
Taylor is the founder of Laravel. He wrote the original code in 2011 and still does today.
The headlines from his talk:
- Laravel 9.0 will launch in January 2021 and with this release, they are moving to a one-year release cycle. This is good news, it will allow for safer upgrades, with new feature releases and bug fixes throughout the year. It will mean fewer breaking changes and reduces the risk for developers and their clients. It also coincides with Symfony who release in January too.
- Sadly no big spoilers on what will be in the next release but we know that there is a new version of Nova on its way and that they have completely redesigned the Forge UI.
- We also know that Queue monitoring in Laravel is coming. We’ve been using Horizon as Laravel didn’t support this functionality originally. But, we are keen to see what Laravel has to offer.
- Taylor is also working on a top-secret project called Beep, we don’t know any more than that but the good news is that it’ll be open source, so we’ll be able to see under the hood and how it’s been built.
Sign up to get helpful articles, case studies and the latest news straight to your inbox.
Bug fixing your career – Diana Scharf
This was my favourite talk of the conference. It was a chance to reflect on how you really feel about your role. Diana gave some brilliant ways to assess your happiness, which I am going to put into practice and am keen to see how the team feel too.
A couple of examples from the talk:
- The Monday feeling. How do you feel about work on a Sunday evening? Make a note about how you are feeling every week to get a good view on how you feel about work. If there are more negatives than positives then it might be time to chat to your manager and make a change.
- The dollar index. How does it feel when your pay check arrives? Is it a real reward for your work or it just ‘pain compensation’?
- Escape speed – If your boss told you that you didn’t need to work anymore (you still have a job and you still get paid, but you just don’t have to work), how fast do you walk away?
- The side project count. Many developers have a side hustle. It’s a great way to grow outside your day job and try something new. However, too many side hustles could indicate that your main role isn’t fulfilling enough.
I know I’m going to use some of these indicators for myself and recommend them to the team.
Diana ended the talk by saying:
Purpose pays the bills, not passion. Passion is dangerous. It can trap you.
Very true. It’s important to enjoy your work but not at the expense of pay, respect or integrity. Developing your career should be intentional and these tips are a really good place to start no matter your level.
The testing talks
There were a number of talks about automated testing which we all enjoyed. I could definitely write a whole article about testing, alone, but that’s one for another day! I’ve summarised some of the talks below and how we felt after them.
Why refactoring is the tool to write better code – Christoph Rumpel
Refactoring is something we strongly believe in and utilise at Rareloop. The premise of refactoring is that you write code that works first and foremost and then iterate and improve to get the best possible code. What do we mean by good code? Well, we believe good code should be:
- Simple
- Expressive
- Consistent (you shouldn’t be able to tell who wrote the code)
- Easy to change
This allows all our development team to work on any project and reduces the risk of a single point of failure. It also makes our jobs so much easier. Less time figuring things out and more time improving the codebase or adding new functionality.
We favour Test-Driven Development. This means that we write the test first, based on a specific requirement. Then develop to get that test to pass, writing the least amount of code to get the job done. Now we have a test and working feature, we can safely refactor. When refactoring, we use the “Red – Green – Refactor” approach, which means that we will write the test (Red), write the code to pass the test (Green) and then Refactor to improve on the 4 qualities of good code above, without ever changing the external behaviour. We will use a mixture of automated and manual testing to reduce the risk of bugs and issues. It is something that takes time to perfect within a team, but it’s a process that has worked well for us and our clients for years and sets the bar high for the quality of our code.
It was great to hear from Christoph who echoes our approach.
Asynchronous Laravel – Mohamed Said
This was the first talk of the evening and was a really good one to kick things off. The talk covered how you might run tasks concurrently.
Mohamed covered a few different methods, when you’d use them and when not to:
- Multi-processing – Processing work concurrently with new processes
- Multithreading – Processing work concurrently within the same process
- Co-routines – Not available within Laravel right currently
We use a lot of multi-processing at Rareloop, in order to keep interfaces fast while pushing work out to a queue (we typically use Redis) to process later.
Laravel Octane is the package from Laravel that allows you to carry out concurrent processing (multithreading). It uses Swoole and RoadRunner and allows you to run tasks concurrently within the same process. This approach is useful if you need the response back from the concurrent task (which you cannot do for multi-processing).
We plan to take a look at Octane and get a better understanding of the technical overhead involved and see if there are some good use cases for us and our clients.
–
The Laracon conference was a great chance for all of us to broaden our thinking and find out more about what’s coming next. Technology is always changing so it’s a fantastic opportunity to stay one step ahead.