I hope you’ve had a fun week coding. As it’s really nearly Christmas I’m in full scale geek mode over a present I know I’m getting. I’ve been looking forward to reading this for ages, and I’m also excited about reading a paperback. It still sucks if you drop it in the bath, but at least you don’t risk electrocuting yourself like if you drop your tablet.
I’ve been experimenting with Elixir (the language used by the Phoenix Framework) over the past few months and I love it. Apparently it’s very similar to Ruby, which I never gelled with, but there’s so much more to it than that. If you are at all interested in learning Functional Programming, I cannot recommend Elixir highly enough. A couple of nice resources to check out are:
But that doesn’t mean I’m stopping with PHP. Far from it. PHP7.1 is proving really nice, and my codebases are starting to see a liberal use of return types, nullable types, and more.
There’s some really cool new things in Symfony 3 that will be covered over the next few weeks, and there’s a really cool thing that’s been in since early days on Symfony 2 that may help make your code base more modular. Stay tuned for those.
This week we covered logging out (in a fashion) from our React front end:
There’s a bit more to it than this as we shall see once we add in a few more pages to our app, but as a starting point, it’s good enough.
Then we added a Bootstrap 4 (alpha :)) NavBar to our project:
We added in some of that ‘classic’ React style ternary to display our username and a logout button if available, or just the log in button if not. Though the code to implement this is trivial, it’s only trivial because we’ve done a bunch of the hard work before hand (via Redux / Sagas).
BTW – did you know ‘Sign In’ is probably better to use than ‘Log In’ – obligatory StackOverflow link.
Finally, we tidied up the project:
With using a boilerplate, we gain a load of things we do want, but a few that we don’t. The benefits of initially having these files around as examples far outweighs the downsides of having to spend a bit of time deleting them in the future.
We’re going to be using Jest. It’s CV friendly 🙂
Before I go, could I ask you to reply and let me know of any conference / meet up group / user group talk – that you can find on YouTube (or similar) – that you would recommend a watch?
I’ve been watching a bunch of them recently (follow along on Twitter if you’d like to know which) and my mind seems to go blank whenever I need to think of one to watch next. I’d love a few recommendations.
I hope you have a very merry Christmas. I’ll be back before New Years, but if you don’t catch the mail before then, a happy new year to you also 🙂