Laracon 2018: Laravel Nova & Amazing Speakers
Posted on September 27, 2018 Mary Merritt
Full-Stack Testing Strategies
Samantha Geitz from TightenCo talked about now to do Vue testing using Jest. Jest is a test runner which allows you to test your Vue code and what it is outputting. You can assert things using matchers so you can set it to expect two things to equal a given value. So I expect 2 + 2 to equal 4 and if it does not, it throws me an error.
Another really cool thing about Jest is the ability to take snapshots of your rendered code output. Samantha built a quick demo of how to get Jest set up in a project. The demo project was a poll of “How to pronounced GIF or JIF?”. Needless to say there was a bit of an uproar as to which way to pronounce GIF (which is the right way). I have heard of Jest before, but Samantha did a great job demonstrating a basic outline of it and really showed how easy it was to set up and start testing.
Laravel Nova
This was the most anticipated talk of the whole conference. Taylor Otwell announced Laravel Nova as an admin panel for Laravel using Tailwind CSS for the styling! This was something the Laravel community was really wanting and needing. There are a few admin panels out there but nothing as straightforward or easily customizable as Nova.
Some of the features Nova includes are lenses, actions, actions on manytomany, metrics, custom fields, Scout search integration, authorization, and so much more! As Taylor started going through Nova, it just kept getting better and better and just when we all thought we were nearing the end, Taylor kept saying “Oh, and then you can also...”. The number of things you can do with Nova is amazing and within the last few months there has been tons of packages built for Nova. We’re excited to see how it develops and expands!
Patterns That Pay Off
Matt Stauffer talked about design patterns to keep your code organized and agile, so you don’t spend a lot of time reading others' code. Matt presented three patterns: Process, Architecture, (Re)Factoring. You need to be developing code that is easy to manage and agile so that it can be light and respond quickly if the project changes in the future. This can look different for each person, but if you stick to a pattern your life is better, as well as anyone who reads your code.
Learn CSS Grid
Wes Bos talked about CSS Grid, the newest display options for CSS – it is not a framework but an addition to the CSS language. It is supported by all of the newest versions of browsers and is backwards compatible by at least one, if not two, versions. Wes gave some really awesome tricks such as “repeat()”’ which allows you to write a large number of columns or rows that use the same grid layout.
One thing that we learned was that column percentages don’t add up to 100% because of the whole grid gap option. You can use it if in combination with auto “grid-template-columns: 80% auto;” I wrote a whole blog about CSS Grid from Wes Bos’s talk, so if you want to know more about CSS Grid you can view the blog here.