I am learning about OO design, and want to mentally visualize how can I use OO when creating a user interface? .
Can anyone share an example from past experience where you have used OO to design a user interface?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on what you mean by OO UI.
In the more popular modern languages such as Java, C#, and VB .NET everything is an object. So just by using something as simple as a TextBox control, you’re inherently using OO design within a UI.
However, if you’re talking at a more screen/code OO design, there are patterns you can look into such as the Model View and Model View ViewModel patterns which are used to separate the UI and the logic.
At my current job, we are using the Model View ViewModel pattern. This pattern’s main benefit is it allows the UI to know nothing about the code behind and vice versa. So you can change the UI design without needing to change the logic.
I would provide links but a simple Google Search of those topics will bring up plenty of articles.
You can also use Inheritance to extend UI controls. For example, if you wanted to create a custom validation textbox for Social Security Number, you could extend the TextBox class and go to town on it.