The talk by David Breahna, Administrator, GovPredict, Chisinau/Moldova at Online Ruby Wine, 04.04.2020.
Description: I'll be talking about a set of dry-rb libraries, and the way they can help you write clear, flexible, and more maintainable Ruby code.
At the top of the list stays dry-validation, it helps moving your Form Objects to the next level. The powerful DSL it comes with, lets you define schemas and validation rules outside of the typical models, which can later be used literally everywhere.
The second tool I would love to mention is dry-transaction and how its business transaction DSL helped GovPredict achieve an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses.
The concept behind is “Railway Oriented Programming”, which jumps between Failure and Success monads
Next conference [ Ссылка ]
Follow us [ Ссылка ]
Ещё видео!