Skip to main content

Giới thiệu PHP Framework

PHP Framework là một PHP framework hiệu năng cao được xây dựng trên nền tảng Swoole, hỗ trợ đầy đủ các tính năng cần thiết để phát triển ứng dụng web hiện đại.

Tại sao chọn PHP Framework?

Hiệu năng cao với Swoole

Framework được xây dựng trên Swoole - một PHP extension mạnh mẽ hỗ trợ:

  • Coroutines: Xử lý bất đồng bộ hiệu quả như golang.
  • Connection Pooling: Tối ưu kết nối database, Redis, Http Client,...
  • Hot Reload: Tự động reload khi code thay đổi.
  • Websocket: Hỗ trợ WebSocket để phát triển ứng dụng real-time.

Kiến trúc Module hóa

Tổ chức code theo modules giúp:

  • Dễ bảo trì và mở rộng
  • Tái sử dụng code hiệu quả
  • Phân chia trách nhiệm rõ ràng

Tính năng đầy đủ

ComponentMô tả
ServerHTTP Server với Swoole
RouteRouting linh hoạt với attributes
DatabaseORM và Query Builder
ContainerDependency Injection
CacheRedis caching
JWTAuthentication với JWT
MessengerMessage Queue (RabbitMQ)
WebSocketReal-time communication
ValidatedDTOData Transfer Objects

Yêu cầu hệ thống

  • PHP >= 8.3
  • Swoole extension >= 5.0
  • MySQL >= 8.0
  • Redis >= 6.0

Cài đặt nhanh

# Clone project
git clone https://github.com/vietiso/vietiso-framework.git

# Cài đặt dependencies
composer install

# Copy environment
cp .env.example .env

# Khởi động server
composer start

Cấu trúc thư mục

project/
├── core/ # Framework core
│ ├── Auth/ # Authentication
│ ├── Cache/ # Caching
│ ├── Collection/ # Collections
│ ├── Config/ # Configuration
│ ├── Console/ # CLI Commands
│ ├── Container/ # DI Container
│ ├── Context/ # Request Context
│ ├── Coroutine/ # Coroutine utilities
│ ├── Database/ # ORM & Query Builder
│ ├── Event/ # Event Dispatcher
│ ├── Http/ # Request/Response
│ ├── HttpClient/ # HTTP Client
│ ├── JWT/ # JWT Authentication
│ ├── Log/ # Logging
│ ├── Mail/ # Email
│ ├── Messenger/ # Message Queue
│ ├── Middleware/ # HTTP Middleware
│ ├── Module/ # Module System
│ ├── Pool/ # Connection Pooling
│ ├── Redis/ # Redis Integration
│ ├── Route/ # Routing
│ ├── Server/ # HTTP Server
│ ├── Session/ # Session
│ ├── Support/ # Utilities
│ ├── Translation/ # i18n
│ ├── Twig/ # Template Engine
│ ├── ValidatedDTO/ # DTO Validation
│ └── Websocket/ # WebSocket
├── modules/ # Business modules
├── config/ # Configuration files
├── routes/ # Route definitions
└── resources/ # Views & Assets

Bước tiếp theo