Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
QuestionRe: Run with the windows Pin
Knowledgestudent9-Mar-08 11:13
Knowledgestudent9-Mar-08 11:13 
QuestionSystemParametersInfo SPI_SETWORKAREA Pin
chrsarly045-Mar-08 8:48
chrsarly045-Mar-08 8:48 
GeneralApplication Issue with Access and ReportViewer Pin
rwinte5-Mar-08 8:40
rwinte5-Mar-08 8:40 
GeneralMVP Pattern Pin
Quang Tran Minh5-Mar-08 6:29
Quang Tran Minh5-Mar-08 6:29 
GeneralRe: MVP Pattern Pin
led mike5-Mar-08 6:38
led mike5-Mar-08 6:38 
GeneralRe: MVP Pattern [modified] Pin
papadimitriou5-Mar-08 8:47
papadimitriou5-Mar-08 8:47 
GeneralRe: MVP Pattern Pin
led mike5-Mar-08 8:56
led mike5-Mar-08 8:56 
GeneralRe: MVP Pattern Pin
Quang Tran Minh5-Mar-08 11:11
Quang Tran Minh5-Mar-08 11:11 
Hi led mike and papadimitriou,
thanks for your reply. In fact I've read many available papers, tutorials about MVP patter include some of your suggested ones. My question goes directly to this particular project.
The root of the project structure tree is the project itself. The root has a list of sub items that are either a working package that can in turns has a list of sub items (working package or work item) or a work item (leaf node). In my implementation, composite pattern is used to model this:

class abstract ProjectElement
class Project: ProjectElement
{
List<projectelement> subItems;
}

class Package: Project
{
List<projectelement> subItems;
}

class WorkItem: Project
{

}

inspirated from some articles about Presenter first method by mean of thinking in "When"Smile | :) , my thoughts are:

- When the user opens a project, he sees the projecture structure => aha MVP triad ProjectStructureView-ProjectStructurePresenter-ProjectStructureModel

- When the user clicks on an item (which can be either project, package or workitem like explained above) an editor dialog is displayed showing the detailed information of the currently selected node (again project, package or workitem). The user can edit / change these information => MVP triad: ProjectElementEditorView-ProjectElementEditorPresenter-ProjectElementEditorModel. I am stuck at this point: the ProjectElementEditor is an abstract concept (abstract class) which can be either project, package or workitem. My question would be:

Does the MVP triad ProjectElementEditorView-ProjectElementEditorPresenter-ProjectElementEditorModel make sence? Then the ProjectElementEditorPresenter would has an generic interface to a ProjectElementEditorView (which can be either Project general information editor, package information editor or workitem information editor) or should I define for each type of view a MVP triad like:

ProjectGeneralInfoEditorView - ProjectGeneralInfoEditorPresenter-ProjectGeneralInfoEditorModel
PackageInfoEditorView - PackageEditorPresenter-PackageEditorModel
WorkItemEditorView - WorkItemEditorPresenter-WorkItemEditorModel

Hope it makes the problem clearer Smile | :)
GeneralRe: MVP Pattern Pin
led mike5-Mar-08 11:18
led mike5-Mar-08 11:18 
QuestionAvoid duplicates in adding records in MySQL db Pin
baranils5-Mar-08 5:56
baranils5-Mar-08 5:56 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
led mike5-Mar-08 6:02
led mike5-Mar-08 6:02 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
baranils5-Mar-08 6:31
baranils5-Mar-08 6:31 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
led mike5-Mar-08 6:42
led mike5-Mar-08 6:42 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
#realJSOP6-Mar-08 6:11
mve#realJSOP6-Mar-08 6:11 
QuestionHow to read a file from Ftp Pin
kibromg5-Mar-08 5:14
kibromg5-Mar-08 5:14 
AnswerRe: How to read a file from Ftp Pin
Anthony Mushrow5-Mar-08 5:59
professionalAnthony Mushrow5-Mar-08 5:59 
GeneralRe: How to read a file from Ftp Pin
kibromg6-Mar-08 1:49
kibromg6-Mar-08 1:49 
GeneralRe: How to read a file from Ftp Pin
Anthony Mushrow6-Mar-08 6:59
professionalAnthony Mushrow6-Mar-08 6:59 
QuestionHow to make control reflect changes was maded on his datasource Pin
El'Cachubrey5-Mar-08 4:54
El'Cachubrey5-Mar-08 4:54 
AnswerRe: How to make control reflect changes was maded on his datasource Pin
led mike5-Mar-08 4:59
led mike5-Mar-08 4:59 
QuestionEfficient Xml reading? Pin
Lutosław5-Mar-08 4:28
Lutosław5-Mar-08 4:28 
AnswerNo Reflection Pin
Lutosław5-Mar-08 4:46
Lutosław5-Mar-08 4:46 
AnswerRe: Efficient Xml reading? Pin
led mike5-Mar-08 5:01
led mike5-Mar-08 5:01 
GeneralRe: Efficient Xml reading? Pin
Lutosław5-Mar-08 6:32
Lutosław5-Mar-08 6:32 
GeneralRe: Efficient Xml reading? Pin
led mike5-Mar-08 6:47
led mike5-Mar-08 6:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.