You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It turns out to be much more complicated than that - MVC , MVP , MVVM hub: https: //habr.com/ru/post/215605/
If you believe the hubr, the author has it right, in MVC a model should not know (depend on) anything except its tasks.
Well, of course I have everything correctly stated )))). But MVC is not very demanding on discipline, which I personally particularly like
MQL is "well-skilled" in working with structures (copy constructor, working with files, working with SQLite).
Is it realistic to use the MVC template in such a way that the interaction is organised through some state/parameter structures? i.e. to pass these structures by reference. Or do we need another template?
It's very real. It is a good way. A remark in this direction was made above. But it is better to exchange references not to some structures, but to the components themselves. For example, a view may need access to a model. And the model can provide methods to access certain objects/structures or larger submodels. Just remember that the view should not change the model. Therefore, the access should be appropriate.
It's very real. It is a good way. The comment above was made in just that direction.
An example is needed
or better article.... just and server error handling can be done
example
or better yet, an article.... you can do just that and server error handling
Well, in principle you can ) Make the second part not on a primitive level, but on a real, working level. I will think about it. I don't want to create articles on the same place, they will laugh.
Make the second part not on a primitive level, but on a real, working level.
I think it would be practical for everyone.
and in order not to inflate the article into a hundred and fifty sections on error handling, I think it is enough to handle 1-2 server errors (order sending/closing ) and 1-2 terminal errors(getting current prices/timesframes?....).
Well, and using structures as much as possible is relevant to me, I suspect that both errors and saving EA state can be efficiently organised into a binary file using structures.
Did you read to the end? I wrote at the end about communication between components. And about access to global objects too. In this case, I consider the presented way acceptable, just for the understanding of the majority. And the way you suggest implies the same uncontrolled access to global objects, only from the side.
You apparently did not realise that I have already referred to your excuses in the article in my comment.
You teach most people how not to do things, not MVC or OOP. And the phrase highlighted in green only reflects your wrong understanding of how it should be implemented.
You apparently didn't realise that it was your excuses in the article that I was already referring to in my comment.
You teach the majority how not to do things, not MVC or OOP. And the phrase highlighted in green only reflects your wrong understanding of how it should be implemented.
Are you sure this is what is worth discussing in the comments of the article?
How much our forum likes this kind of expressions / advice, I am amazed )))). By the way, I served in those parts, it was half a day's walk to China )
Are you sure this is what is worth discussing in the comments of the article ?
why not ? take note, fix it in the next one.