c# - design a usercontrol for different scenario -
now working on registration system, there 3 different scenario users' personal information (name, address e.g.) 1. prepopulate data table1 2. prepopulate data table2 3. empty new user
i trying make personal information usercontrol these 3 situation, in case guess need switch determine table go. question worth this? because not sure if client add more scenario in future. thanks
yes, in general it's idea follow dry (don't repeat yourself) principle. if you're going present same user interface in 2 (or more) places should attempt code/design once , reuse it.
even if presented 1 data source though should attempt decouple presentation model , business logic.
it makes code maintenance , testing easier.
Comments
Post a Comment