Techniques and Patterns
Advanced techniques and patterns for production applications
Take your Glueful application to the next level with advanced patterns, testing strategies, and production best practices.
Topics
- Dependency Injection - the container, providers, the
services()DSL, factories, tags - Service Providers - the provider model and built-in providers
- Repositories - the repository pattern, UnitOfWork, DTOs
- Middleware - the pipeline, alias catalog, and PSR-15
- Configuration - environment-aware configuration
- Performance - optimization and monitoring
- Testing - unit, integration, and feature testing
What You'll Learn
Testing Strategies
- Writing unit and integration tests
- Testing HTTP endpoints and jobs
- Mocking dependencies
- Test organization
Configuration Management
- Environment-based configuration
- Secrets and sensitive data
- Configuration caching
- Multi-environment setups
Middleware Patterns
- Creating custom middleware
- Middleware ordering
- Global vs route-specific
- Performance optimization
Performance Optimization
- Query optimization
- Caching strategies
- Code profiling
- Horizontal scaling
Production Readiness
These guides help you:
- Build testable, maintainable code
- Optimize for performance
- Secure sensitive configuration
- Scale your application
Next Steps
Start with Testing to learn how to write reliable tests for your application.