I am a dotnet newbie. After years of procedural coding, my company is moving on to the HOTTEST new trend i.e WINDOWS FORMS :)
Our Application is TabbedMDI. Basically we have a menu on the left and clicking an entry opens a new tab for CRUD. I have seen some MVP samples that have a couple of textboxes and it demonstrates moving the code behind to a Presenter class to make it TESTABLE! We have more complex logic than that.
I've heard Jeremy Miller talk about Presentation Patterns and Screen Activators and Screen Navigators etc. Sadly there are no Books on UI Patterns whereas there are tons of books on other patterns where they talk about inheriting from Animal class to have the cat Meow and a dog Bark.
So my question is this:
Let's say we are building tabbedMDI form dynamically based on information coming from somewhere like(XML, WEB SERVICE or in our case tables in database). After the form is created, there is a lot of logic whether the toolbar buttons are enabled/disabled; when and if we can navigate from tabpage to tabpage.
Navigation rules are different for the first page and other pages and so on. Validation involves not only what fields are shown on the form, but hidden fields. Some fields are validated against database and not simply being blank.
There are a lot of other requirements and for the sake of brevity I won't mention. THIS IS OUR FIRST PROJECT!!!
Where do I begin separating out the Navigation logic, Validation Logic, Tab activation logic?
Right now I have all that logic in the code behind because more often than not I need to have values from other form controls and/or underlying datasource to determine if switching tabs is allowed or whether I disable Toolbar buttons or I display error message etc.
I have seen SOLID with payrolls and employees. How can we apply that in UI design?
If someone has stumbled upon UI Pattern Blogs please point them out. I have gone through the 'Build your own CAB' series.