C
C
copal2016-04-26 18:37:46
Java
copal, 2016-04-26 18:37:46

What is the logic of a component?

I want to warn you right away that I chose the java and c# languages ​​\u200b\u200bbecause I consider them the strongest in terms of OOP.
Imagine that there is a text field, let it be abstract, as this will not interfere with the drawing of the picture, which has the name TextField. You can write to this field and it will send events change. And so I wanted to make a regular component called Input, which will create an instance from its "womb" TextField, subscribe it to the event changeand use it to save the input data to .. where? Let there be property. And after saving, this component will send an event inputChange.
Now the question is - is the property into which the data is written fromTextFielda model from mvc, that is, is this a property or let it not be a property, but the most common object that will have a property text, will it be the business logic of a model from mvc?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Night, 2016-04-26
@maxtm

The text property will simply be a text property. It's not business logic, it's just a property (or object).
It has nothing to do with MVC here.

D
Dmitry Eremin, 2016-04-26
@EreminD

In my opinion, yes - it can be called a model. Perhaps even necessary
What is the business logic? No processing rules, nothing - just passing data from the view to the model - there is no BL

V
VZVZ, 2016-04-26
@VZVZ

Can. A Model is a store of data associated with a View.
But where is the Controller? And what for is it in the desktop application? In web it is clear, each Action is a URL, each URL corresponds to a page or another server response (View + Model), everything is logical. And in the desktop what will be Actions? Window? So they are accessible from the entry point and further from each other, and not from the outside, like a URL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question