Click here to Skip to main content
16,005,473 members
Home / Discussions / C#
   

C#

 
AnswerRe: Remoting in .net Pin
Shyam Bharath26-Nov-08 0:26
Shyam Bharath26-Nov-08 0:26 
JokeRe: Remoting in .net Pin
Thomas Weller26-Nov-08 0:30
Thomas Weller26-Nov-08 0:30 
GeneralRe: Remoting in .net Pin
Shyam Bharath26-Nov-08 0:35
Shyam Bharath26-Nov-08 0:35 
JokeRe: Remoting in .net Pin
Thomas Weller26-Nov-08 0:49
Thomas Weller26-Nov-08 0:49 
GeneralRe: Remoting in .net Pin
Shyam Bharath26-Nov-08 0:54
Shyam Bharath26-Nov-08 0:54 
QuestionPointer in C# Pin
Hamed Musavi25-Nov-08 22:26
Hamed Musavi25-Nov-08 22:26 
AnswerRe: Pointer in C# Pin
Thomas Weller25-Nov-08 22:41
Thomas Weller25-Nov-08 22:41 
GeneralRe: Pointer in C# Pin
Hamed Musavi25-Nov-08 23:06
Hamed Musavi25-Nov-08 23:06 
Thomas Weller wrote:
this neglects the whole idea of OO programming and encapsulation


True. Ironically enough I'm trying to solve a design issue using this method. I'm tired of the large amount of code behind each and every dialog or form due to interactions with controls inside a form. I decided to do this:

1. For each stored procedure of my database I have a set of data that needs to travel between layers of application, so I create an app that generates code for both stored proc and the data it needs or provides. Almost all procedures that work for each table have similar data, so I thought about a class that can hold all data related to each table or a specific task.

2. Most of the time, same data that a sp needs for saving or provides on loading will be shown in a form or gathered to be saved from a form.

3. Instead of using the form to control everything, when instantiating controls, what if I tell them where to store data. I have an instance of the class which is responsible for trnsfering data. It has one member variable for each control. I give access to members of this class to each control. Each control then saves user input in this class instead of holding a local state.

4. Now if I set an object for a button that's responsible for say saving data, I'll give that object my transfer class and it uses the sp class and gives it this transfer class.

5. Now if a new field has to be added later, all I need to do is to modify database and regenerate these classes. The application won't change. UI needs a new control and that control needs an instance of the transfer object or a pointer to it's own variable.

Now this maybe not a good way but it's my first attempt to decouple UI classes from a form. I have some new ideas right now that I'm typing these however that might solve previous issue as well.

Thanks for the help anyway. Smile | :)

"In the end it's a little boy expressing himself."    Yanni


GeneralRe: Pointer in C# Pin
Thomas Weller25-Nov-08 23:24
Thomas Weller25-Nov-08 23:24 
GeneralRe: Pointer in C# [modified] Pin
Hamed Musavi25-Nov-08 23:38
Hamed Musavi25-Nov-08 23:38 
GeneralRe: Pointer in C# Pin
#realJSOP25-Nov-08 23:18
professional#realJSOP25-Nov-08 23:18 
GeneralRe: Pointer in C# [modified] Pin
Thomas Weller25-Nov-08 23:45
Thomas Weller25-Nov-08 23:45 
GeneralRe: Pointer in C# Pin
Alan Balkany26-Nov-08 4:09
Alan Balkany26-Nov-08 4:09 
AnswerRe: Pointer in C# Pin
Christian Graus25-Nov-08 22:53
protectorChristian Graus25-Nov-08 22:53 
GeneralRe: Pointer in C# Pin
HosamAly25-Nov-08 23:58
HosamAly25-Nov-08 23:58 
GeneralRe: Pointer in C# Pin
Thomas Weller26-Nov-08 0:12
Thomas Weller26-Nov-08 0:12 
GeneralRe: Pointer in C# Pin
HosamAly26-Nov-08 0:29
HosamAly26-Nov-08 0:29 
GeneralRe: Pointer in C# Pin
N a v a n e e t h26-Nov-08 0:48
N a v a n e e t h26-Nov-08 0:48 
AnswerRe: Pointer in C# Pin
Simon P Stevens25-Nov-08 22:54
Simon P Stevens25-Nov-08 22:54 
GeneralRe: Pointer in C# Pin
Hamed Musavi25-Nov-08 23:13
Hamed Musavi25-Nov-08 23:13 
AnswerRe: Pointer in C# Pin
Shyam Bharath26-Nov-08 0:31
Shyam Bharath26-Nov-08 0:31 
GeneralRe: Pointer in C# Pin
Hamed Musavi26-Nov-08 0:46
Hamed Musavi26-Nov-08 0:46 
AnswerRe: Pointer in C# Pin
Alan Balkany26-Nov-08 4:15
Alan Balkany26-Nov-08 4:15 
Questionhelp... backup directory... any idea/class? Pin
leeoze25-Nov-08 21:41
leeoze25-Nov-08 21:41 
AnswerRe: help... backup directory... any idea/class? Pin
Christian Graus25-Nov-08 22:23
protectorChristian Graus25-Nov-08 22:23 

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.