Level 5 exam — harder

Exam — fresh questions

5.1 · Recall

1. What are design patterns and the SOLID principles?

Patterns: validated recipes and shared vocabulary. SOLID: 5 principles (S, O, L, I, D).
5.1 · Application

2. Riad's SQL is mixed with HTML and every fix breaks something else. First move?

Repository + injection: centralised data, decoupled, testable code.
5.1 · Arbitration

3. Riad learns patterns and wants to apply them everywhere, even on a one-page script. Decision?

Judgment: over-engineering is a trap just like mess.
5.2 · Recall

4. What does OPcache do?

OPcache: no more recompiling on each request — a major almost-free gain in production.
5.2 · Application

5. Riad's shop crawls: the same catalogue queries keep hitting the database. First lever?

Cache + query optimisation: often the most profitable lever, guided by measurement.
5.2 · Application

6. Riad wants to optimise without missing the target. Which approach?

Golden rule: measure before optimising — never blind premature optimisation.
5.3 · Recall

7. What does a Docker container hold?

The container ships its environment: it runs identically everywhere.
5.3 · Application

8. Riad's app works on his machine but not on his colleague's (missing PDO extension). What does he do?

Dockerfile + build + run: same image, same behaviour — the end of “it works on my machine”.
5.3 · Application

9. Riad must bring up PHP + MySQL for a newcomer in one command. Which tool?

Compose describes the whole stack: immediate onboarding, reproducible identically.
5.4 · Application

10. Riad deploys his shop: where do the database password and secret key go?

Secrets out of code, the Dockerfile and Git — supplied by the environment.
5.4 · Arbitration

11. Riad is starting out and must get his showcase online fast. Which choice?

Simple to start (online fast); VPS for control when ready to take on maintenance.
5.4 · Arbitration

12. Before exposing real customer data, what must Riad do?

Sensitive data: IT-department validation, tested backups, checked offers, HTTPS and monitoring in place.
What's next?
Back to the guideGuide contents