Click here to Skip to main content
12,627,681 members (32,432 online)

Design and Architecture

 
QuestionWeb services theory Pin
Bytescream3-Dec-12 11:24
memberBytescream3-Dec-12 11:24 
AnswerRe: Web services theory Pin
Raj Champaneriya3-Dec-12 19:41
memberRaj Champaneriya3-Dec-12 19:41 
AnswerRe: Web services theory Pin
jschell4-Dec-12 9:17
memberjschell4-Dec-12 9:17 
QuestionConsuming perl webservice in .Net Pin
ernestohari1-Dec-12 23:38
memberernestohari1-Dec-12 23:38 
AnswerRe: Consuming perl webservice in .Net Pin
Eddy Vluggen2-Dec-12 3:57
memberEddy Vluggen2-Dec-12 3:57 
QuestionThoughts on Authorization in a Hierarchical User Structure. Pin
Brady Kelly1-Dec-12 2:56
memberBrady Kelly1-Dec-12 2:56 
AnswerRe: Thoughts on Authorization in a Hierarchical User Structure. Pin
Eddy Vluggen2-Dec-12 3:56
memberEddy Vluggen2-Dec-12 3:56 
GeneralRe: Thoughts on Authorization in a Hierarchical User Structure. Pin
Brady Kelly2-Dec-12 4:06
memberBrady Kelly2-Dec-12 4:06 
GeneralRe: Thoughts on Authorization in a Hierarchical User Structure. Pin
Eddy Vluggen2-Dec-12 4:34
memberEddy Vluggen2-Dec-12 4:34 
QuestionA MEF Question - Refering base classes without adding reference to a dll. Pin
John T.Emmatty29-Nov-12 23:25
memberJohn T.Emmatty29-Nov-12 23:25 
AnswerRe: A MEF Question - Refering base classes without adding reference to a dll. Pin
Eddy Vluggen1-Dec-12 6:30
memberEddy Vluggen1-Dec-12 6:30 
QuestionHand Gesture Recognition System Pin
Member 916988728-Nov-12 4:00
memberMember 916988728-Nov-12 4:00 
AnswerRe: Hand Gesture Recognition System Pin
Eddy Vluggen1-Dec-12 6:27
memberEddy Vluggen1-Dec-12 6:27 
QuestionMoving code from a Window/UserControl to outside in order to make it reusable! Pin
Rags151227-Nov-12 7:48
memberRags151227-Nov-12 7:48 
Hi,

I have a usercontrol in my WPF application, and there is a code behind file suppose EmployeeEditor.xaml.cs which has some code to modify.
For e.g;
I have a Employee as defined below

Class Employee
{
public string Name {get; set;}
public uint Id {get; set;}
}

I have a UserControl to edit the Employee information which has EmployeeEditor.xaml and EmployeeEditor.xaml.cs

There are methods in EmployeeEditor class to modify the list of employee
- AddEmployee()
- RemoveEmployee()
- RenameEmployee()

These methods has business logic to update the information in the data object/database.

The life of EmployeeEditor class is till the user control is displayed and it dies on closing it.

I wanted to move above methods outside this class, so that they can be used elsewhere in a functionality such as Undo/Redo which will create/delete an employee using AddEmployee/RemoveEmployee methods.

One solution is to move those methods to a helper which i don't feel to be appropiate as I need to pass all the dependencies of AddEmployee() method as a parameter.
Other solution can be to create a separate class to which will perform all the operations and keep the dependencies.

Please let me know if this problem fits into any design pattern and what could be the better solution?

Thanks in advance!
AnswerRe: Moving code from a Window/UserControl to outside in order to make it reusable! Pin
Eddy Vluggen1-Dec-12 6:25
memberEddy Vluggen1-Dec-12 6:25 
GeneralRe: Moving code from a Window/UserControl to outside in order to make it reusable! Pin
Rags15129-Dec-12 5:46
memberRags15129-Dec-12 5:46 
Questionhow to show database table in a class diagram Pin
Qobacha24-Nov-12 23:49
memberQobacha24-Nov-12 23:49 
AnswerRe: how to show database table in a class diagram Pin
jschell25-Nov-12 6:05
memberjschell25-Nov-12 6:05 
AnswerRe: how to show database table in a class diagram Pin
manoranjan25-Nov-12 6:46
membermanoranjan25-Nov-12 6:46 
AnswerRe: how to show database table in a class diagram Pin
VishwaKL27-Nov-12 21:51
memberVishwaKL27-Nov-12 21:51 
GeneralFile Directories Pin
strrom78-Nov-12 18:03
memberstrrom78-Nov-12 18:03 
GeneralRe: File Directories Pin
Richard MacCutchan9-Nov-12 0:41
mvpRichard MacCutchan9-Nov-12 0:41 
GeneralRe: File Directories Pin
strrom79-Nov-12 19:08
memberstrrom79-Nov-12 19:08 
GeneralRe: File Directories Pin
Richard MacCutchan10-Nov-12 0:25
mvpRichard MacCutchan10-Nov-12 0:25 
QuestionUsing WCF and RESTFUL api in a legacy system Pin
Md. Marufuzzaman5-Nov-12 2:24
mentorMd. Marufuzzaman5-Nov-12 2:24 
AnswerRe: Using WCF and RESTFUL api in a legacy system Pin
Eddy Vluggen5-Nov-12 3:24
memberEddy Vluggen5-Nov-12 3:24 
GeneralRe: Using WCF and RESTFUL api in a legacy system Pin
Md. Marufuzzaman5-Nov-12 6:07
mentorMd. Marufuzzaman5-Nov-12 6:07 
GeneralRe: Using WCF and RESTFUL api in a legacy system Pin
Eddy Vluggen5-Nov-12 6:23
memberEddy Vluggen5-Nov-12 6:23 
GeneralRe: Using WCF and RESTFUL api in a legacy system Pin
Md. Marufuzzaman5-Nov-12 8:04
mentorMd. Marufuzzaman5-Nov-12 8:04 
GeneralRe: Using WCF and RESTFUL api in a legacy system Pin
Eddy Vluggen5-Nov-12 8:49
memberEddy Vluggen5-Nov-12 8:49 
GeneralRe: Using WCF and RESTFUL api in a legacy system Pin
Md. Marufuzzaman5-Nov-12 9:21
mentorMd. Marufuzzaman5-Nov-12 9:21 
QuestionCommunication mechanism Pin
rupeshkp7285-Nov-12 2:10
memberrupeshkp7285-Nov-12 2:10 
AnswerRe: Communication mechanism Pin
Abhinav S5-Nov-12 2:43
mvpAbhinav S5-Nov-12 2:43 
GeneralRe: Communication mechanism Pin
rupeshkp7285-Nov-12 2:46
memberrupeshkp7285-Nov-12 2:46 
GeneralRe: Communication mechanism Pin
Abhinav S5-Nov-12 2:51
mvpAbhinav S5-Nov-12 2:51 
AnswerRe: Communication mechanism Pin
H.Brydon29-Nov-12 10:52
memberH.Brydon29-Nov-12 10:52 
Questionwindows 8 desktop application Pin
Menelaos Vergis31-Oct-12 0:40
memberMenelaos Vergis31-Oct-12 0:40 
AnswerRe: windows 8 desktop application Pin
Eddy Vluggen31-Oct-12 1:38
memberEddy Vluggen31-Oct-12 1:38 
GeneralRe: windows 8 desktop application Pin
Egomedia3-Nov-12 20:32
groupEgomedia3-Nov-12 20:32 
GeneralRe: windows 8 desktop application Pin
Egomedia3-Nov-12 20:36
groupEgomedia3-Nov-12 20:36 
AnswerRe: windows 8 desktop application Pin
Pete O'Hanlon31-Oct-12 2:03
protectorPete O'Hanlon31-Oct-12 2:03 
GeneralRe: windows 8 desktop application Pin
Menelaos Vergis31-Oct-12 2:37
memberMenelaos Vergis31-Oct-12 2:37 
GeneralRe: windows 8 desktop application Pin
Pete O'Hanlon31-Oct-12 2:42
protectorPete O'Hanlon31-Oct-12 2:42 
GeneralRe: windows 8 desktop application Pin
Menelaos Vergis31-Oct-12 3:13
memberMenelaos Vergis31-Oct-12 3:13 
GeneralRe: windows 8 desktop application Pin
Pete O'Hanlon31-Oct-12 3:54
protectorPete O'Hanlon31-Oct-12 3:54 
QuestionInventory Control App. - Looking For Suggestions Pin
Matt U.30-Oct-12 9:36
memberMatt U.30-Oct-12 9:36 
AnswerRe: Inventory Control App. - Looking For Suggestions Pin
jschell30-Oct-12 11:16
memberjschell30-Oct-12 11:16 
GeneralRe: Inventory Control App. - Looking For Suggestions Pin
Matt U.31-Oct-12 2:54
memberMatt U.31-Oct-12 2:54 
GeneralRe: Inventory Control App. - Looking For Suggestions Pin
jschell31-Oct-12 9:49
memberjschell31-Oct-12 9:49 
GeneralRe: Inventory Control App. - Looking For Suggestions Pin
Matt U.31-Oct-12 10:01
memberMatt U.31-Oct-12 10:01 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 1 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid