Re: View layer implementation
- From: "mp" <nospam@xxxxxxxxxx>
- Date: Sat, 8 Jan 2011 19:11:49 -0600
"Big Steel" <fake@xxxxxxxx> wrote in message
news:almarsoft.8461828712395487781@xxxxxxxxxxxxxxxxxxxxxxxxxx
On Fri, 7 Jan 2011 19:44:54 -0600, "mp" <nospam@xxxxxxxxxx> wrote:[...]>
another silly newbie question(s):doing with
So I have a view/presenter/business layers setup
(i have a service layer too, but not sure what i'm supposed to be
that...at least in this example)
The service layer
If this is a Windows desktop solution and it is not a multi user
application, then you don't need the service layer. You can have the BLL
directly call the DAL.
ok in my current project I don't need the service layer...I have just been
trying to 'copy' the mvp project layout you linked me to recently (obviously
i don't understand what i'm doing)...the other responders have pointed out I
shouldn't have separate projects and that all these 3 pieces are in one
layer...the sample project had 4 projects and called them different
layers(iirc)
[...]
The Interface should be for the entire form.
but is it correct that the interface is defined in the presenter?
All the controls on the
form are represented in the IView.
are the controls represented as properties?
[...]
[...]//a button in the view raises an event[...]
private void btnLoadPortfolio_Click(object sender, EventArgs e)
It seems ok from what I can see.
The get/set should be in the IView for the control.
sorry i'm not understanding....
if i have a form with a button and a datagridview
what would that code look like?
The get/set for the control would be in the Interface of the form.
At the UI form in its Interface, the get/set will point to a control on
the form. If mpListview in the name of a control on the form, the get
(mpListview) and the set (mpListview) = value will be used. The
impListview is getting and sitting the control mpListview on the form.
In the presenter.......
var ctrl = mview.impListview ..... the get
mview.impListview.Datasource = p ... the set
mpListview is an object,
meaning the presenter doesn't know *what kind of* object?
only the form knows it's own actual controls, right?
so lets say i have 3 different forms
one displays in a textbox, one displays in a listview, and one displays in a
DataGridView
they could each implement the same interface
and the interface would have a definition for, lets say, "DisplayObject"
and the presenter won't know or care what kind of display object it's
talking to...just that there's an interface and properties it sets
??? am I totally off track here...i'm feeling very lost after the last batch
of responses I've gotten...
thanks for hanging in with my beginner ignorance
Mark
.
- Follow-Ups:
- Re: View layer implementation
- From: Steel
- Re: View layer implementation
- References:
- View layer implementation
- From: mp
- Re: View layer implementation
- From: Big Steel
- View layer implementation
- Prev by Date: Re: I changed a portion of my code from serial to parallel - And it takes longer
- Next by Date: Re: View layer implementation
- Previous by thread: Re: View layer implementation
- Next by thread: Re: View layer implementation
- Index(es):
Relevant Pages
|