First of all, apologies if somebody thinks it is not the appropriate place to post this announcement, but I do think it is relevant here.
I’d like to share with the dry community a small library I developed: web_pipe.
I’m not going to dig into the details here because you can find them in its
README, but the overview is that it is a rack application builder through a pipe of operations on an immutable struct that can be halted at any step. In simple terms, it is also a web controller decoupled from the web routing process.
You can see that the way to use it is very similar to the taste that
dry-rb proposes. Mainly, it resembles to
dry-transaction, and uses design principles like IoC Container and DI, functional objects, etc. It also uses internally some of
dry-rb libraries. The immutable struct is a
dry-initializer are used under the hood.
The reason why I developed it is because I missed a layer for the web request/response cycle with
dry-rb design concepts in mind, as
hanami-controller, even they are great, have different approaches.
web_pipe would integrate very easily with
dry-view, and my idea with it would be to use alongside
hanami-router in an alternative stack to
Keep in mind that the library is at its very early stage. It has everything you need to build a rack application, but not some conveniences to make it more straightforward. I’ll be adding them as extensions, along with other improvements like caching.
I don’t know whether the
dry-rb team would be interested in having this project under its organization. For my side, I’d be more than happy, because it would give me more motivation to keep it forward. For now, the library is only available in Github, and I’ll wait for your feedback on this before pushing to rubygems. If you like it, we could rename it to
dry-controller. If not, no worries, I’ll push it to rubygems with its actual name, or we can also leave it for a further stage.