Don’t clone your php objects, DeepCopy them

dcsg.me

Daniel Gomes, a developer at Teamleader, explains a potential problem when cloning object in PHP.

As you know, PHP has a well-known clone keyword that shallow copy all of the object’s properties. So under the hood what it does is to create a new Object with the exact same values of that object properties – unless you change its behavior by implementing the clone() function in your class.

Read more [dcsg.me]

Join thousands of developers

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

The Solo JavaScript Developer Challenging Google and Facebook

www.wired.com

Wired.com published a interesting piece on Even You and Vue. It also contains some quotes by Taylor Otwell, the creator of Laravel.

The big reason for Vue's success, developers who rely on it say, is its simplicity. More companies want to build web applications that, like Google Docs, feel as snappy as a native application. But few actually build applications as complex as Facebook’s or Google’s. What developers often really want is a framework for building small, interactive web apps. Angular can be overkill for simple applications, while React has a steep learning curve even for experienced developers. Vue applies a more "layered" approach to building a framework.

Read more [www.wired.com]

Reusing domain code

matthiasnoback.nl

Here's another excellent post by Matthias Noback.

Reuse-in-the-small is definitely possible. Reuse-in-the-large is deemed to be impossible, because no two problems/projects are alike, but practice proves otherwise. There are reusable components covering entire subdomains, which are nonetheless quite successful. The chance of success is bigger if such a reusable component is used to cover for a generic subdomain. Using an off-the-shelf solution in such a case helps you save development effort which can instead be redirected to the core domain.

Read more [matthiasnoback.nl]

Inside look at modern web browser

developers.google.com

Mariko Kosaka, an engineer at Google, started a beautifully illustrated series on how Chrome works behind the scenes.

In this 4-part blog series, we’ll look inside the Chrome browser from high-level architecture to the specifics of the rendering pipeline. If you ever wondered how the browser turns your code into a functional website, or you are unsure why a specific technique is suggested for performance improvements, this series is for you.

Read more [developers.google.com]

Removing jQuery from GitHub.com frontend

githubengineering.com

A couple of weeks ago GitHub removed the last usages of jQuery in their front end code. On their engineering blog that share why and how they removed it.

We have recently completed a milestone where we were able to drop jQuery as a dependency of the frontend code for GitHub.com. This marks the end of a gradual, years-long transition of increasingly decoupling from jQuery until we were able to completely remove the library. In this post, we will explain a bit of history of how we started depending on jQuery in the first place, how we realized when it was no longer needed, and point out that—instead of replacing it with another library or framework—we were able to achieve everything that we needed using standard browser APIs.

Read more [githubengineering.com]

Behind the scenes of Oh Dear!

www.indiehackers.com

In a post on IndieHackers my buddy Mattias Geniar shares the backstory behind our SaaS called Oh Dear!. He touches upon how we started out, how we use the cool stuff in the Laravel ecosystem, how we try to grow the service, what are future goals are and much more!

We both got fed up with existing tools that didn't fit our needs precisely. Most came close, but there was always something — whether settings or design choices — that we just didn't like. Being engineers, the obvious next step was to just build it ourselves! Oh Dear! launched in private beta earlier this year and has been running in production for a few months now. It's already generating over $1,500 per month.

Read more [www.indiehackers.com]

Replacing standard CLI tools with better ones

remysharp.com

Remy Sharp, a well known JavaScript developer, published a cool list of standard CLI tools replacements.

I'm not sure many web developers can get away without visiting the command line. As for me, I've been using the command line since 1997, first at university when I felt both super cool l33t-hacker and simultaneously utterly out of my depth. Over the years my command line habits have improved and I often search for smarter tools for the jobs I commonly do. With that said, here's my current list of improved CLI tools.

Read more [remysharp.com]

Improving our Laravel Nova CRM

nick-basile.com

Nick Basile, UX instructor at Lambda school, write a good practical tutorial on creating custom Nova actions.

In my last post, we started building a simple CRM using Laravel Nova. It was pretty complete when we left it, but I think we can add a few more features and explore the rest of what Nova has to offer. In this walkthrough, we'll take a look at how to use Nova's Actions and authorization.

Read more [nick-basile.com]

Eloquent MySQL views

stitcher.io

My colleague Brent explains how you can easily work with MySQL views in Laravel.

MySQL views are a way of storing queries on the database level, and producing virtual tables with them. In this post we'll look at why you want to use them and how they can be integrated in Laravel with Eloquent models.

Read more [stitcher.io]

Mo' models mo' problems

sebastiandedeyne.com

Here's another awesome blogpost by my collegue Seb. In this one he explains why you should and how you can create an explicit Vue component API.

When refactoring your UI to components, always keep in mind that props and events are your components public API. Just like when you're modelling your application's domain, try to keep things explicit. Props and events should be enough to tell the outside world everything it needs to know about a component's behavior.

Read more [sebastiandedeyne.com]

Why your form only needs one name field

uxmovement.com

Here are some good reasons why you shouldn't use a first name and last name field.

The structure of a name is not the same across cultures. Users who visit your site will consist of a broad range of people from different countries. Your name field should be culturally inclusive so that no one struggles to fill out your form. With most things in life two is better than one. But when it comes to name fields one is better than two.

Read more [uxmovement.com]

Leaders, stop being so nice all the time

m.signalvnoise.com

On Basecamp's Signal v. Noise blog Claire Lew warns about the dangers of wanting to be nice all the time.

Now I’m not advocating for us to be mean. Disrespectful or dismissive leaders help no one. Rather, I’m calling for us as leaders to loosen our grip on “being nice.” To stop wanting our team to like us all the time. To let go of the expectation that every single interaction with our team should feel good. ... When we’re preoccupied with seeming popular instead of fair, when we optimize for pleasant conversations instead of honest ones — we hurt our teams.

Read more [m.signalvnoise.com]