Code on the Beach

Back to Sessions

Encapsulating Complex UI Logic with Presentation Models

"When can I click this button?" "Well, you can always click it if you're an admin, or a manager can click it in the morning, but not if it's a Monday, unless it's not raining outside, and everyone can click it on Sundays, unless it's the second Sunday of the month, or third if there are five Sundays." Sounds ridiculous, right? We've all written software that has convoluted business rules on when or how to show something to the user. All too often, this logic ends up in the view, or even duplicated in multiple views. In this session, we'll go over using a presentation model and other strategies to help make complex UI logic more testable, maintainable and reusable.

Friday 3:30 PM - 4:30 PM

C Atlantica C