Click here to Skip to main content
15,921,622 members
Home / Discussions / C#
   

C#

 
GeneralRe: Self Updating Application #$%@ Pin
Steve Messer25-Mar-07 13:00
Steve Messer25-Mar-07 13:00 
AnswerRe: Self Updating Application #$%@ Pin
Patrick Etc.25-Mar-07 12:52
Patrick Etc.25-Mar-07 12:52 
GeneralRe: Self Updating Application #$%@ Pin
Steve Messer25-Mar-07 13:01
Steve Messer25-Mar-07 13:01 
GeneralRe: Self Updating Application #$%@ Pin
Steve Messer29-Mar-07 5:00
Steve Messer29-Mar-07 5:00 
QuestionHow to use openFileDialog control Pin
mezo_2225-Mar-07 6:01
mezo_2225-Mar-07 6:01 
AnswerRe: How to use openFileDialog control Pin
Stefan Troschuetz25-Mar-07 7:09
Stefan Troschuetz25-Mar-07 7:09 
AnswerRe: How to use openFileDialog control Pin
Keshav V. Kamat25-Mar-07 17:08
Keshav V. Kamat25-Mar-07 17:08 
QuestionQuestion on Architecture of a Attribute Based CRUD operations Pin
jubilanttiger25-Mar-07 5:34
jubilanttiger25-Mar-07 5:34 
Hi,
I am in the process of building business objects for a database driven application. Most of the entities in the application have a single column primary key (identity value) for each object of its type. For e.g. the Report object, would contain reportId as its primary key column in the database. Most of the entities would contain common Methods like, GetItem, GetItems, Delete, Create and Update.

With the above similarity of CRUD (insert, select, update, delete) operations in my entities, I am following a Attribute based programming model to handle these CRUD operations. I have one common object "BusinessObject". All my business object inherit from this "BusinessObject". The "BusinessObject" would be able to handle all the CRUD operations - GetItem, GetItems, Delete, Create and Update, as long as the child objects inherit from the "BusinessObject" and provide some functionality and methods in them which the "BusinessObject" would need. For e.g., Report class would inherit from BusinessObject. Report class would provide a ConstructItem method that would build the items from the dataset supplied from the BusinessObject.

Protected class BusinessObject
{
Static T GetItem<t>()
{
T instance;
MethodInfo method = T.GetMethod(“ConstructItem”);
Instance = method.invoke(null, dataset) as T;
Return instance;
}
}

Public class Report:BusinessObject
{
Public Report(…)
{}

[Persistent (“paramName”, “DBType.Int32”)]
Int id;

Static Report ConstructItem(Dataset ds)
{
Report r
//Build the report object from the instance
Return r;
}
}

But, I am noticing with this pattern that the all my objects would get tightly coupled with "BusinessObject". The advantage is that there is lot lesser code and the individual objects need not worry about the mundane activities and rather focus on the business calculations. But the disadvantage is, if say a few months down the lane, if we happen to make any updates to the "BusinessObject" then the change would affect all objects which can be a very huge change and might affect all objects. This could become a testing and dev nightmare.

What do you think...

Thanks
Questionplease! I need code upload video Pin
Member 209456125-Mar-07 4:55
Member 209456125-Mar-07 4:55 
AnswerRe: please! I need code upload video Pin
Wayne Phipps25-Mar-07 6:40
Wayne Phipps25-Mar-07 6:40 
Questionhelp!!! Pin
Member 209456125-Mar-07 4:52
Member 209456125-Mar-07 4:52 
AnswerRe: help!!! Pin
MoustafaS25-Mar-07 5:56
MoustafaS25-Mar-07 5:56 
QuestionDataGridView Pin
OlaMohammed25-Mar-07 3:11
OlaMohammed25-Mar-07 3:11 
AnswerRe: DataGridView Pin
Christian Graus25-Mar-07 3:46
protectorChristian Graus25-Mar-07 3:46 
AnswerRe: DataGridView Pin
Keshav V. Kamat25-Mar-07 17:11
Keshav V. Kamat25-Mar-07 17:11 
Questionhow to import a music file Pin
parth sharma25-Mar-07 2:40
parth sharma25-Mar-07 2:40 
AnswerRe: how to import a music file Pin
Christian Graus25-Mar-07 3:04
protectorChristian Graus25-Mar-07 3:04 
Questioncustom object update issue Pin
Tauseef A25-Mar-07 2:01
Tauseef A25-Mar-07 2:01 
AnswerRe: custom object update issue Pin
Christian Graus25-Mar-07 3:05
protectorChristian Graus25-Mar-07 3:05 
GeneralRe: custom object update issue Pin
Tauseef A25-Mar-07 5:39
Tauseef A25-Mar-07 5:39 
QuestionUsing Word document Pin
Amr M. K.25-Mar-07 0:13
Amr M. K.25-Mar-07 0:13 
AnswerRe: Using Word document Pin
kubben25-Mar-07 2:10
kubben25-Mar-07 2:10 
Questionhow to restrict the ClickEvent of a Button Pin
pashitech24-Mar-07 22:50
pashitech24-Mar-07 22:50 
AnswerRe: how to restrict the ClickEvent of a Button Pin
The ANZAC24-Mar-07 23:24
The ANZAC24-Mar-07 23:24 
AnswerRe: how to restrict the ClickEvent of a Button Pin
CPallini24-Mar-07 23:55
mveCPallini24-Mar-07 23:55 

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.