Open MarkiyanMatsekh opened 12 years ago
I recommend using test-driven development, i.e. - after declaring post data model, view model and action method in controller - don't start implementing the logic. First write few tests, as you expect your controller to work, and then write the functionality until all tests are passed. nonetheless, this approach is hardly applicable for model binding and validating funcitonality, even tough, you can try to.
Make the basic implementation of our main business operation - querying institutions. Of course, implementation will change several times, so develop it in a flexible way, without spikes=)
It should be implemented as an action of controller, which reacts only to GET requests.
At this moment, let this action method process such information
that's it - after passing the data to the view - responsibilities of the controlelr are over. you can create some basic view only for developing/debugging purposes, dont waste time for design.
About model - create subfolders in Models fodler, with View Model and Post Data Model examples, and there create a folder with a name of the controller, and a file with a name of an action, to which the model refers. These conventions will help us orientate in the future Also, if possible - try to provide some basic unit tests for querying functionality(follow the example in iAmOpen.Tests)