2

In our application we have different pages like Employee List, Product List, Voting List, FAQ list.

Is it good approach to have different Views to display the List mentioned above

OR

can we create a dynamic table (with one View) that displays the List based on the input type

2

Just make sure you don't make a view that has logic in it to determine what kind of data you are dealing with.

You can have one view that shows generic data, but you need to make sure that your Employee List, FAQ, etc... use the same data template. Or you can transform your different templates in a common model and render that common model in your single view. The transforming function will have to be in the Foundation layer since your Employee List feature can't talk directly to another feature.

My recommendation is that should keep your employee list view in your employee feature. And your FAQ list in you FAQ. Its clean, its simple and again you don't want determinative logic in your view for processing different types of data.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.