Symfony

Symfony

BACKEND

Framework PHP full-stack do SensioLabs phát triển cung cấp kiến trúc module dựa trên component tái sử dụng. Mẫu thiết kế vững chắc (MVC, Dependency Injection), hệ thống bundle mở rộng, Doctrine ORM mạnh mẽ và hệ sinh thái phong phú để xây dựng ứng dụng web có khả năng mở rộng và bảo trì.

Bạn sẽ học được gì

PHP hiện đại với typing nghiêm ngặt, PHP 8+ attribute và PSR-4 autoloading

Kiến trúc MVC với controller, route và Twig template engine

Dependency Injection native với autowiring và cấu hình YAML/XML/PHP

Doctrine ORM với entity, repository, migration và DQL

Bundle tái sử dụng cho tính module và tổ chức code

Symfony Console cho lệnh CLI và script tự động

Security component cho xác thực, phân quyền và firewall

Form component với validation, bảo vệ CSRF và theming

Messenger component cho async/queue với transport (RabbitMQ, Redis)

Kiểm thử toàn diện (PHPUnit, test chức năng, Panther cho E2E)

Chủ đề chính cần nắm vững

Những khái niệm quan trọng nhất để hiểu công nghệ này và thành công trong phỏng vấn

1

PHP: namespace, PSR-4 autoloading, trait, interface, typing nghiêm ngặt PHP 8+

2

Kiến trúc Symfony: HttpKernel, chu trình Request/Response, event, kernel listener

3

Controller: routing, annotation/attribute, tham số request, kiểu response

4

Routing: YAML/annotation/attribute, tham số route, requirement, prefix

5

Dependency Injection: service, autowiring, service container, compiler pass

6

Doctrine ORM: entity, annotation/attribute, association (@OneToMany, @ManyToOne)

7

Doctrine repository: truy vấn tùy chỉnh, QueryBuilder, DQL (Doctrine Query Language)

8

Migration: DoctrineMigrationsBundle, versioning, migration up/down

9

Twig: cú pháp template, filter, function, kế thừa (extends, block), include

10

Form: FormType, form builder, ràng buộc validation, kiểu form tùy chỉnh

11

Validation: annotation ràng buộc (@NotBlank, @Email), validator tùy chỉnh, group

12

Bảo mật: authentication provider, voter, firewall, phân cấp role, nhớ đăng nhập

13

Event: EventDispatcher, event subscriber, kernel event (request, response, exception)

14

Serializer: normalization, denormalization, group, normalizer tùy chỉnh, format (JSON, XML)

15

Messenger: message handler, transport, xử lý async, chiến lược thử lại

16

Console: lệnh (lớp Command), input/output, helper, thanh tiến trình

17

HTTP Client: component HttpClient, request, xác thực, cơ chế thử lại

18

Cache: cache pool, cache tag, adapter (Redis, APCu, Filesystem)

19

Bundle: cấu trúc bundle, extension class, cấu hình, bundle bên thứ ba

20

Kiểm thử: PHPUnit, WebTestCase, test chức năng, fixture, mock

21

Hiệu suất: profiler, chiến lược cache, lazy loading, opcache, PHP 8 preloading

22

API Platform: REST/GraphQL API trên Symfony, serialization, filter, phân trang

23

Triển khai: Symfony CLI, biến môi trường (.env), Docker, composer optimize