itsjoshbruce,
@itsjoshbruce@phpc.social avatar

Here's an interesting experiment that just popped in my head. Curious if there are examples of it in #SoftwareDevelopment, #WebDev, and #PHP specifically:

Has anyone ever written (and documented) an application wherein you only pass and receive messages?

function doSomething(RequestInterface $request): ResonposeInterface

That sort of thing.

I've seen folks use Arrays and individual arguments, of course.

zimzat,
@zimzat@mastodon.social avatar

@itsjoshbruce That sounds like a system built using CQRS or Event Sourcing.

m1ke,
@m1ke@phpc.social avatar
itsjoshbruce,
@itsjoshbruce@phpc.social avatar

@m1ke: Yes. Psr-15 would probably be the interface each definition implements.

I apologize if it seems I’m being vague, but I’m trying to avoid tainting replies with what’s building in my head.

The key is the whole app or framework is written that way. No argument lists, or arrays as argument list.

m1ke,
@m1ke@phpc.social avatar

@itsjoshbruce I can see that; essentially a DI container, a resolver (is there an appropriate psr for that?) and then everything else operates as middleware.

Slim is the nearest mature implementation I've seen of that paradigm

itsjoshbruce,
@itsjoshbruce@phpc.social avatar

@m1ke: I thought about revisiting Slim with your first response. lol

Glad to have it confirmed.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines