I am creating a Asp.Net MVC application that is targeted for small rugged handhelds that are used in our warehouse. Because the screens are small we end up with a lot of processes where we take the user through several screens of entering information before we actually act on the information. For example if they want to create inventory we will have one screen that asks them for location and item number information, a second screen that ask for lot tracking information, and then a third screen that asks for quantity information. After they hit enter on the third screen we will take all the information and create a inventory transaction.
I am struggling with how to correctly structure this with models and validation. I want to provide validation information to the user at each screen. Here are the approaches that I have tried:
-- Have one model and view for the entire process. Each screen is a DIV in the view and I use JavaScript to hide and display the DIV's. I created custom Validation Attributes that I use on properties in the model to provide validation. I then use JQuery remote validation to do the validation cliet side, so I make sure the fields on the current DIV are valid before switching to the next DIV. The problem I am having with this approach is that the handheld devices are not real powerful and do not have the best web browser, so the remote validation ends up being unreliable.
-- Have a different view for each page, and have a different model for each page. Again I use the custom Validation Attributes to do the validation. This approach works well except that I end up with a ton of different models that are fairly similar.
-- Have different views for each page and have one model that is used across all pages. For this method I cannot use the Validation Attributes for validation because if I made quantity (the field on the last page) required on the model then it would throw a error saying it was required on the first page. So I end up having to do my validation in my controller which I do not like.
I feel that each of these three approaches that I have come up with have significant issues. Is there a better way of handling this?