https://github.com/derafu/backbone
The Architectural Spine for PHP Libraries
https://github.com/derafu/backbone
php php-library php-library-template
Last synced: about 1 year ago
JSON representation
The Architectural Spine for PHP Libraries
- Host: GitHub
- URL: https://github.com/derafu/backbone
- Owner: derafu
- License: mit
- Created: 2025-03-07T06:40:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-08T03:48:50.000Z (about 1 year ago)
- Last Synced: 2025-03-08T04:04:33.783Z (about 1 year ago)
- Topics: php, php-library, php-library-template
- Language: PHP
- Homepage: https://derafu.org/backbone/
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Derafu: Backbone - The Architectural Spine for PHP Libraries






Derafu Backbone is a lightweight architectural framework that provides a consistent structure for building modular, maintainable PHP libraries.
## Features
- **Hierarchical Organization**: Clear structure with Packages, Components, and Workers.
- **Separation of Concerns**: Jobs for atomic operations, Handlers for orchestration, Strategies for implementation variants.
- **Attribute-Based Discovery**: Use PHP 8 attributes instead of rigid namespace conventions.
- **Extensible Architecture**: Designed to grow with your application.
## Key Benefits
- **Consistent Structure**: Standardized approach to organizing domain logic.
- **Reduced Complexity**: Clear responsibilities for each architectural element.
- **Improved Testability**: Isolated components are easier to test.
- **Enhanced Collaboration**: Common vocabulary and patterns for development teams.
- **Flexible Implementation**: Adapt to different domains without changing the core architecture.
## Installation
```bash
composer require derafu/backbone
```
## Quick Example
```php
#[Package(name: 'billing')]
class BillingPackage extends AbstractPackage implements PackageInterface
{
// Package implementation.
}
#[Component(name: 'document', package: 'billing')]
class DocumentComponent extends AbstractComponent implements ComponentInterface
{
// Component implementation.
}
#[Worker(name: 'renderer', component: 'document', package: 'billing')]
class RendererWorker extends AbstractWorker implements WorkerInterface
{
// Worker implementation.
}
```
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
## License
This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).