Please log in to watch this conference skillscast.
Looking at a software from the point of view of its unit tests often provides great insights on the architecture and the point of frictions.
A common issue in unit tests is the overuse of mocks and stubs. This most often caused by a design where objects have too many responsibilities and/or dependencies, and side effects. The components of such a system are hard to test, hence the need for mocks.
In contrast with such objects, code that uses concepts from the functional programming world such as immutability and pure functions is easier and safer to test.
Such functional code can be used to write highly testable and easy to work with application, with the help of functional reactive programming frameworks like ReactiveCocoa or RxSwift. This is the concept of “functional core, reactive shell”.
Software written in such way might look unconventional, and has a bit of a learning curve. The talk is to show that the advantages it brings make it a viable choice.
YOU MAY ALSO LIKE: