PHPackages                             pmjones/adr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. pmjones/adr

ActiveLibrary[Framework](/categories/framework)

pmjones/adr
===========

An alternative to MVC for server-side applications.

6799[1 issues](https://github.com/pmjones/adr-example/issues)PHP

Since Jan 19Pushed 8y ago8 watchersCompare

[ Source](https://github.com/pmjones/adr-example)[ Packagist](https://packagist.org/packages/pmjones/adr)[ RSS](/packages/pmjones-adr/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

*Action Domain Responder* Example
=================================

[](#action-domain-responder-example)

This example shows an [*Action Domain Responder*](http://pmjones.io/adr) user interface subsystem, with the corresponding domain logic and data source elements, for a naive blogging system.

This is not a running example, in the sense that it cannot be dropped onto a web server and begin operating properly.

However, there is a full test suite in the `tests/` directory. (These are more properly considred integration rather than unit tests, but they will do for the purpose of this example.) Issue `composer install` followed by `./vendor/bin/phpunit` to run the tests.

There is no authentication, authorization, or session mechanism included. While necessary in a real system, they would increase the complexity of the example and make it more difficult to discern the separation of concerns.

*Action*
--------

[](#action)

The *Action* classes depend on 3rd-party HTTP Request and Response interfaces.

Each *Action* picks apart the incoming request to pass individual typehinted *Domain* method arguments. A differently-constructed *Domain* might require a different input signature, such as a data transfer object or a catch-all array of all possible request values.

*Domain*
--------

[](#domain)

The base *ApplicationService* class protects all the "real" service methods behind the magic `__call()` method. This allows the service to implement some functionality common to all the service methods, such as exception handling, though it does get in the way of IDE auto-completion.

The *BlogService* methods return a domain *Payload* that wraps the domain results and includes a status indicator. This standardizes the domain return signature, makes the *BlogResponder* work much more readable.

The domain logic uses a *Data Mapper* for data source interactions (*BlogMapper* et al.).

*Responder*
-----------

[](#responder)

Each *Responder* calls a method corresponding to the domain *Payload* status to build the HTTP Response.

The base *Responder* class depends on a 3rd-party HTTP Request interface and Response object.

The base *BlogResponder* class depends on a 3rd-party PHP-based *Template View* system. The templates are located in `resources/templates/blog/`.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25754?v=4)[Paul M. Jones](/maintainers/pmjones)[@pmjones](https://github.com/pmjones)

### Embed Badge

![Health badge](/badges/pmjones-adr/health.svg)

```
[![Health](https://phpackages.com/badges/pmjones-adr/health.svg)](https://phpackages.com/packages/pmjones-adr)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
