Applying flux as an architectural design pattern