I have another programmer who is trying to explain why the user interface component should not be a data structure either.
For example, let's say that you get a data structure that contains a set of records from the "database", and you want to display this set of records in the user interface component in your application.
According to this programmer (who will remain nameless, he is young, and I teach him ...), we must subclass the data structure into a class that will draw the user interface component in our application !!!!!!
Thus, according to this logic, the record set should control the user interface pattern.
****** Head Desk *****
I know that it’s wrong to request a set of records to do it myself, because if you want to display the same data structure on more than one type of component in the user interface, you will have a real mess at your fingertips; You will need to extend another class for each user interface component that you visualize from the base class of your recordset;
I am well aware of the "cleanliness" of the MVC template (and by this I mean that you do not confuse your data (Model) with your user interface (view) or actions that take place on the data (Controller more or less ... it’s good that the API should not really cope with this ... and the Controller should just make as few calls as possible, telling what presentation to render)) But this is certainly much cleaner than using data structures to display user interface components!
Is there any other advice I could send besides the example above? I understand that when you first study OOP, you go through a “stage” where you just want to expand everything.
, , ... ... Jeff.
, ? , ?