Click here to Skip to main content
15,908,013 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: I/O Port Pattern Pin
led mike7-Nov-07 8:13
led mike7-Nov-07 8:13 
GeneralRe: I/O Port Pattern Pin
Ju@ncho8-Nov-07 1:53
Ju@ncho8-Nov-07 1:53 
GeneralRe: I/O Port Pattern Pin
led mike8-Nov-07 5:18
led mike8-Nov-07 5:18 
GeneralRe: I/O Port Pattern Pin
VarunSharma4319-Nov-07 20:17
professionalVarunSharma4319-Nov-07 20:17 
QuestionMFC design help for MSVS Binary Editor like program Pin
mvs_pgrmr6-Nov-07 13:42
mvs_pgrmr6-Nov-07 13:42 
AnswerRe: MFC design help for MSVS Binary Editor like program Pin
led mike7-Nov-07 4:51
led mike7-Nov-07 4:51 
GeneralRe: MFC design help for MSVS Binary Editor like program Pin
mvs_pgrmr7-Nov-07 5:14
mvs_pgrmr7-Nov-07 5:14 
QuestionDesign Patterns Pin
kjosh6-Nov-07 8:54
kjosh6-Nov-07 8:54 
In our application our atchitect created the Business classes with following structures containing Data Access Layer, Business Layer, Business Entities Layer, Presentation Layer.

Business Entities Class
public class PersonFormData
{
#region Fileds

private int id;
private string name;
#endregion

#region Properties
public int ID
{
get
{
return id;
}
set
{
id = value;
}
}
#endregion

#region constructors
public PersonFormData()
{
//
// TODO: Add constructor logic here
//
}
public PersonFormData(int pid, string pname)
{
id = pid;
name = pname;
}
#endregion

Business classes
//This class is the Person business class
public class PersonForm
{
#region Fields

private readonly PersonFormData formDataObject;
#endregion

#region Constructors

public PersonForm()
{

}
public PersonForm(PersonFormData formDataObject)
{
this.formDataObject = formDataObject;
}

#endregion

#region SaveForm

protected override bool SaveForm()
{
//Calling the Data Access Layer methods
PersonFormDataAcess.UpdatePersonForm(formDataObject);
}

#endregion

// This class provides static "factory" methods that create instances of Forms
Public static class FormFactory
{
public static PersonForm CreateEmptyPerson()
{
// Observe that the no-argument Chapter41ContractForm constructor creates all of the form's
// related business objects.
return new PersonForm();
}
public static PersonForm LoadPerson()
{
PersonFormData formDataObject= PersonFormDataAcess.LoadPersonForm(Params);
PersonForm result=new PersonForm(formdataObject);
return result;

}
}


Data Access Layer methods
//This is the Data Access Layer class
public static class PersonFormDataAcess
{
public static UpdatePersonForm(PersonFormData formDataObject)
{
//Calling the stored procedures here;
//Accesing the business entities object fields to pass values to database.
formDataObject.ID;

}
public static LoadPersonForm(Params)
{
PersonFormData formDataObject= new PersonFormData();
//Call stored Procedure to load person data from the database
//Putting retrieved data into the PersonFormData object
}
}


//From the Presentation layer

//Creating the Person business class object.
PersonForm personFormObject = FormFactory.CreateEmptyPerson();


Here my question is he is following the which design patterns?
AnswerRe: Design Patterns Pin
Maximilien6-Nov-07 9:55
Maximilien6-Nov-07 9:55 
GeneralRe: Design Patterns Pin
kjosh6-Nov-07 10:27
kjosh6-Nov-07 10:27 
GeneralRe: Design Patterns Pin
led mike6-Nov-07 10:46
led mike6-Nov-07 10:46 
GeneralRe: Design Patterns Pin
Andrew Selivanov23-Nov-07 5:31
Andrew Selivanov23-Nov-07 5:31 
AnswerRe: Design Patterns Pin
ekynox7-Nov-07 9:42
ekynox7-Nov-07 9:42 
QuestionAn application that will get the updates from server automatically Pin
payback5-Nov-07 17:23
payback5-Nov-07 17:23 
AnswerRe: An application that will get the updates from server automatically Pin
Mark Churchill5-Nov-07 21:51
Mark Churchill5-Nov-07 21:51 
AnswerRe: An application that will get the updates from server automatically Pin
Vasudevan Deepak Kumar5-Nov-07 22:07
Vasudevan Deepak Kumar5-Nov-07 22:07 
AnswerRe: An application that will get the updates from server automatically Pin
Michael Sync5-Nov-07 22:20
Michael Sync5-Nov-07 22:20 
GeneralRe: An application that will get the updates from server automatically Pin
Mark Churchill9-Nov-07 18:49
Mark Churchill9-Nov-07 18:49 
GeneralRe: An application that will get the updates from server automatically Pin
Michael Sync9-Nov-07 19:50
Michael Sync9-Nov-07 19:50 
GeneralRe: An application that will get the updates from server automatically Pin
Mark Churchill11-Nov-07 13:00
Mark Churchill11-Nov-07 13:00 
QuestionCommunicating between plug-ins... Pin
martin_hughes2-Nov-07 7:30
martin_hughes2-Nov-07 7:30 
AnswerRe: Communicating between plug-ins... Pin
led mike2-Nov-07 11:14
led mike2-Nov-07 11:14 
AnswerRe: Communicating between plug-ins... Pin
Cedric Moonen4-Nov-07 21:30
Cedric Moonen4-Nov-07 21:30 
GeneralCsv File Compare Pin
Brady Kelly31-Oct-07 23:14
Brady Kelly31-Oct-07 23:14 
GeneralRe: Csv File Compare Pin
led mike2-Nov-07 11:11
led mike2-Nov-07 11:11 

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.