5 Comments
Jul 27, 2022Liked by Stephen Rees-Carter

I'm curious about...

> Depending on your app, you'll be passing the numeric IDs through the browser when dealing with related items on forms, etc.

I never pass the numeric ID in forms. The ID of the thing to be updated is in the URL...

```

public function update(ThingToBeUpdated $thingToBeUpdated): RedirectResponse

{

// Happy stuff happening

}

```

Is that what you meant?

Expand full comment
Jul 25, 2022Liked by Stephen Rees-Carter

I've become accustomed to never exposing this data in the first place, by maintaining a UUID for routes along with the regular ID for any internal stuff like relationships and cascades.

/path/96dcd361-d42c-4241-b6ed-931d7b24b80d

vs...

/path/3456

I'm always wondering if this is overkill, but it does seem to have the benefit of simplifying the return code combined with the leak prevention.

I question this paradigm all the time. After all, what is the benefit of having two pieces of identifying information? My rational is that the integer ID serves the purpose of traditional database management while the uuid is explicitly for cosmetic presentation only. This leads into a conversation about unifying the identifying information by having one indexed uuid instead of a uuid and an id. Then my brain starts to hurt and I just go with the way I'm comfortable with. :)

What are your thoughts on the uuid paradigm?

Expand full comment