1

Topic: MVP and MDI

MVP with one window of problems does not cause. And here with two in any way I will not invent, as it is better. A problem that for a document insertion it is necessary to have "pointer" on the document. And to the interface   "it is not necessary to know" about used technology GUI. Well that type - today , tomorrow . While it is necessary to do all in shape.... Though perhaps, just invented, what tell? The principal form speaks to the  "create a new window".  "speaks" to the interface  "create a new window", and in the answer receives  a new window.

2

Re: MVP and MDI

Hello, AlexNek, you wrote: AN> MVP with one window of problems does not cause. AN> and here with two in any way I will not invent, as it is better. AN> a problem that for a document insertion it is necessary to have "pointer" on the document. AN> and to the interface   "it is not necessary to know" about used technology GUI. Well that type - today , tomorrow . Means someone is necessary the third who it will know all. AN> while it is necessary to do all in shape. AN>... AN> though perhaps, just invented, what tell? AN> the principal form speaks to the  "create a new window". AN> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. If all is simple, quite suitable decision. I generally in mvp and mvvm use such approach: there is an auxiliary class which creation of forms and binding about all remaining is engaged, it it is possible as to connect to the ioc-container. Here the approximate code: public static class WindowService {//we register type of the form and . It is caused in the beginning of method Main for each class of the form public static void Register <TView, TPresenter> () {}//displays the form and returns its object. public stati TView Show <TPresenter, TView> () {}} public class PresenterBase {private IView _view; private Model _model; public PresenterBase () {_view = WindowService. Show <PresenterBase, IView> (); _model=new Model ();}} it is simple, a minimum when, it is possible  under any needs.

3

Re: MVP and MDI

Hello, Qulac, you wrote: Q> Hello, AlexNek, you wrote: AN>> MVP with one window of problems does not cause. AN>> and here with two in any way I will not invent, as it is better. AN>> a problem that for a document insertion it is necessary to have "pointer" on the document. AN>> and to the interface   "it is not necessary to know" about used technology GUI. Well that type - today , tomorrow . Q> Means someone is necessary the third who it will know all. It is possible also the third, but problems remain: whether the command of creation of a window will come in  or this third all will do itself. Or this the third it will be simple to process a command. What can know this "third"? AN>> While it is necessary to do all in shape. AN>>... AN>> though perhaps, just invented, what tell? AN>> the principal form speaks to the  "create a new window". AN>> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. Q> If all is simple, quite suitable decision. I generally in mvp and mvvm use such approach: there is an auxiliary class which creation of forms and binding about all remaining is engaged, it it is possible as to connect to the ioc-container. Here the approximate code: Q> Q> public static class WindowService Q> {Q>//we register type of the form and . It is caused in the beginning of method Main for each class of form Q> public static void Register <TView, TPresenter> () Q> {Q>} Q>//displays the form and returns its object. Q> public stati TView Show <TPresenter, TView> () {} Q>} [#] Q> public class PresenterBase Q> {Q> private IView _view; Q> private Model _model; Q> public PresenterBase () Q> {Q> _view = WindowService. Show <PresenterBase, IView> (); Q> _model=new Model (); Q>} Q>} Q> Q> it is simple, a code minimum, it is possible  under any needs. Generally then I have more than questions than answers. - What WindowService knows and "M" and "V" both "P" and "GUI"? - Paternal everyone  creates model? - Where there is a passage from types to ""? - If at me it is some documents with one  and  - what of them to show? Can is better mvcsharp  then?

4

Re: MVP and MDI

Hello, AlexNek, you wrote: AN> Hello, Qulac, you wrote: Q>> Hello, AlexNek, you wrote: AN>>> MVP with one window of problems does not cause. AN>>> and here with two in any way I will not invent, as it is better. AN>>> a problem that for a document insertion it is necessary to have "pointer" on the document. AN>>> and to the interface   "it is not necessary to know" about used technology GUI. Well that type - today , tomorrow . Q>> Means someone is necessary the third who it will know all. AN> it is possible also the third, but problems remain: whether the command of creation of a window will come in  or this third all will do itself. Or this the third it will be simple to process a command. AN> that can know this "third"? In my case the command will come in  a primary window, he will create  a nested window as this  a nested window incorporates to object of a window, look the code above. AN>>> While it is necessary to do all in shape. AN>>>... AN>>> though perhaps, just invented, what tell? AN>>> the principal form speaks to the  "create a new window". AN>>> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. Q>> if all is simple, quite suitable decision. I generally in mvp and mvvm use such approach: there is an auxiliary class which creation of forms and binding about all remaining is engaged, it it is possible as to connect to the ioc-container. Here the approximate code: Q>> Q>> public static class WindowService Q>> {Q>>//we register type of the form and . It is caused in the beginning of method Main for each class of form Q>> public static void Register <TView, TPresenter> () Q>> {Q>>} Q>>//displays the form and returns its object. Q>> public stati TView Show <TPresenter, TView> () {} Q>>} AN> [#] Q>> public class PresenterBase Q>> {Q>> private IView _view; Q>> private Model _model; Q>> public PresenterBase () Q>> {Q>> _view = WindowService. Show <PresenterBase, IView> (); Q>> _model=new Model (); Q>>} Q>>} Q>> Q>> it is simple, a code minimum, it is possible  under any needs. AN> generally then I have more than questions than answers. AN> - what WindowService knows and "M" and "V" both "P" and "GUI"? And why to it it not to know, what forbids? AN> - paternal everyone  creates model? Can and not create, it can do WindowService, and for simple dialog boxes it is possible to manage and without model. AN> - where there is a passage from types to ""? I cannot to write for you all code, think it after all elementarily. AN> - if at me it is some documents with one  and  - what of them to show? AN> Can is better mvcsharp  then? That I can not tell, it did not use.

5

Re: MVP and MDI

Hello, Qulac, you wrote: Q> Hello, AlexNek, you wrote: AN>> Hello, Qulac, you wrote: Q>>> Hello, AlexNek, you wrote: AN>>>> MVP with one window of problems does not cause. AN>>>> and here with two in any way I will not invent, as it is better. AN>>>> a problem that for a document insertion it is necessary to have "pointer" on the document. AN>>>> and to the interface   "it is not necessary to know" about used technology GUI. Well that type - today , tomorrow . Q>>> Means someone is necessary the third who it will know all. AN>> it is possible also the third, but problems remain: whether the command of creation of a window will come in  or this third all will do itself. Or this the third it will be simple to process a command. AN>> that can know this "third"? Q> In my case the command will come in  a primary window, he will create  a nested window as this  a nested window incorporates to object of a window, look the code above. How much I understood your code there everywhere dependences 1:1. Whence the nobility that this nested window should get to certain group of a primary window? It is now made on type  studios. Windows can be "below", "at the left", "on the right" and "documents". Thus,  I request of a primary window active  in each group if it is not present we create group "from zero" if is we add new to it. That is it is necessary to know specific  a primary window, specific  active  and specific  a new window. Otherwise all not to connect. AN>>>> while it is necessary to do all in shape. AN>>>>... AN>>>> though perhaps, just invented, what tell? AN>>>> the principal form speaks to the  "create a new window". AN>>>> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. Q>>> if all is simple, quite suitable decision. I generally in mvp and mvvm use such approach: there is an auxiliary class which creation of forms and binding about all remaining is engaged, it it is possible as to connect to the ioc-container. Here the approximate code: Q>>> Q>>> public static class WindowService Q>>> {Q>>>//we register type of the form and . It is caused in the beginning of method Main for each class of form Q>>> public static void Register <TView, TPresenter> () Q>>> {Q>>>} Q>>>//displays the form and returns its object. Q>>> public stati TView Show <TPresenter, TView> () {} Q>>>} AN>> [#] Q>>> public class PresenterBase Q>>> {Q>>> private IView _view; Q>>> private Model _model; Q>>> public PresenterBase () Q>>> {Q>>> _view = WindowService. Show <PresenterBase, IView> (); Q>>> _model=new Model (); Q>>>} Q>>>} Q>>> Q>>> it is simple, a code minimum, it is possible  under any needs. AN>> generally then I have more than questions than answers. AN>> - what WindowService knows and "M" and "V" both "P" and "GUI"? Q> And why it it not to know, what forbids? My religion forbids. Similar classes I name "monoliths" and I consider their very harmful. In due course they turn to present "monsters". Just here now also I am engaged on operation by cracking of next "monolith" on slices. AN>> - where there is a passage from types to ""? Q> I cannot to write for you all code, think it after all elementarily. Me not the code interests and "". If I set types for registration and types for Show specific  should happen inside on internal Map, and is exceptional 1:1." He will create  a nested window as this  a nested window incorporates to object of a window, look the code above. "As it to join with it  it is not clear. Therefore also there was a following question AN>> - If at me some documents with one  and  - what of them to show?

6

Re: MVP and MDI

AN>>> - where there is a passage from types to ""? Q>> I cannot to write for you all code, think it after all elementarily. AN> me not the code interests and "". So  in that also consists that if we want to create a type from , and  not  to know a holotype  should guarantee this operation with special object and all. I there wrote that " a file".

7

Re: MVP and MDI

Hello, AlexNek, you wrote: AN> the Principal form speaks to the  "create a new window". AN> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. Why simply not to start a new copy of application under the new document with all that it implies?

8

Re: MVP and MDI

Hello, Kernan, you wrote: K> Hello, AlexNek, you wrote: AN>> the Principal form speaks to the  "create a new window". AN>> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. K> why simply not to start a new copy of application under the new document with all that it implies? It that joke type? Otherwise it is absolutely not clear.

9

Re: MVP and MDI

Hello, AlexNek, you wrote: AN> Hello, Kernan, you wrote: K>> Hello, AlexNek, you wrote: AN>>> the Principal form speaks to the  "create a new window". AN>>> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. K>> why simply not to start a new copy of application under the new document with all that it implies? AN> it that joke type? Otherwise it is absolutely not clear. From  a hedgehog. I something about something the thought. Hammer, in general

10

Re: MVP and MDI

Hello, AlexNek, you wrote: AN> the Principal form speaks to the  "create a new window". AN> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. Here an error. The Command/ekshen speaks create a new window, she just and knows where it is, what to receive parameters what to create and what to return

11

Re: MVP and MDI

Hello, stenkil, you wrote: S> Hello, AlexNek, you wrote: AN>> the Principal form speaks to the  "create a new window". AN>> Prezenter "speaks" to the interface  "create a new window", and in the answer receives  a new window. S> Here an error. Where exactly and why? S> the Command/ekshen speaks create a new window, she just and knows where it is, what to receive parameters what to create and what to return the Window receives a command, the command is sent ,  decides what to send a command ,  executes a command is like normal MVP. Now your variant: the Window receives a command, the window executes a command - the standard circuit of "vermicelli". Or I that not so understood that?