Puzzling

Ray
Ray

The user account thing we just made. It's like a jigsaw puzzle. Different parts, that fit together to make the whole thing.

Aye, that's true. A DB table, a login form and processing for it, logout, code to only allow access to pages to people with the right roles.

Adela
Adela

The pieces had to work together. Like, the access check code used session variables, that were created by the login program, that used role information from the database, that was comma separated, so the login program has to know that... lots of connections.

That's right. The pieces depend on the other pieces preparing data in the right way.

Ethan
Ethan

OK, but with everything depending on everything else, how did you know where to start?

Hmm, good question.

TBH, I didn't have to think it through that much. I've done this sort of thing before. I've learned patterns that come in handy again, and again. That's part of expertise, having patterns in your head meat, that you pluck out as needed.

The pattern catalog lists patterns you've learned. When you write your own apps, use the patterns. It'll save you a lot of time. Not only in initial design, but in debugging and maintenance as well.