Click here to Skip to main content
15,899,634 members
Home / Discussions / C#
   

C#

 
GeneralRe: why they don't show up Pin
Luc Pattyn20-Sep-10 15:36
sitebuilderLuc Pattyn20-Sep-10 15:36 
GeneralRe: why they don't show up [modified] Pin
neverpleat20-Sep-10 17:17
neverpleat20-Sep-10 17:17 
AnswerRe: why they don't show up Pin
Abhinav S20-Sep-10 18:17
Abhinav S20-Sep-10 18:17 
AnswerRe: why they don't show up Pin
phil.o21-Sep-10 0:08
professionalphil.o21-Sep-10 0:08 
Questionwhere to manage my picture box control Pin
Member 745530620-Sep-10 10:53
Member 745530620-Sep-10 10:53 
AnswerRe: where to manage my picture box control [modified] Pin
Luc Pattyn20-Sep-10 11:38
sitebuilderLuc Pattyn20-Sep-10 11:38 
QuestionWPF Database Wrapping Pin
eddieangel20-Sep-10 6:25
eddieangel20-Sep-10 6:25 
AnswerRe: WPF Database Wrapping Pin
Chris Trelawny-Ross20-Sep-10 9:19
Chris Trelawny-Ross20-Sep-10 9:19 
Design patterns that relate to the presentation of data - MVC/MVP/MVVM - are about understanding what behavior to put in which classes so as to make your application simpler, more reliable and easier to maintain / extend.

I recommend that you google "Separation of Concerns" to get some further insight into the value of making sure any given class is focused on implementing a well defined part of the behavior of your application. This may help you understand what the MVVM books are trying to get at.

Although MVVM and the other patterns separate out the 'model' they are not asking for "unnecessary wrapping." More, they are indicating that partitioning the code that knows how to get data into and out of a database from the code that cares about what the user is trying to do with that data is a valuable thing to do.

Take a look at Linq-to-Sql, and/or the Entity Framework. Both can be used to implement the model - they provide comprehensive implementations of the CRUD operations. So you should not have to write any wrappers, nor implement your own Save, Delete, etc. methods. Guessing at what you're reading, I imagine that the book(s) is/are suggesting that you create a model that encapsulates ("abstracts away" - or - hides the details behind a simple API / interface) the work required to do the database I/O, exposing a simple API to the controller / View Model. Even if you choose to stick with DataSets, looking at how Linq-to-Sql and the Entity Framework do things will probably be instructive and useful.

HTH,
Chris

PS

Regarding INotifyPropertyChanged - it is an interface that indicates that the class implements a PropertyChanged event. Other classes can subscribe to the event to be notified when (and what) properties change. This is often used in data binding - which is a whole other topic of interest and value when building user interfaces. I recommend, when you're reading about INotifyPropertyChanged, that you also read about IEditableObject and IBindingList - which are also common in binding data objects to UI elements.
GeneralRe: WPF Database Wrapping Pin
eddieangel20-Sep-10 10:49
eddieangel20-Sep-10 10:49 
AnswerRe: WPF Database Wrapping Pin
Patrick Fox20-Sep-10 9:24
Patrick Fox20-Sep-10 9:24 
QuestionA question on SOAP and web services Pin
Dewald20-Sep-10 4:04
Dewald20-Sep-10 4:04 
AnswerRe: A question on SOAP and web services Pin
Pete O'Hanlon20-Sep-10 4:54
mvePete O'Hanlon20-Sep-10 4:54 
AnswerRe: A question on SOAP and web services Pin
T M Gray20-Sep-10 11:47
T M Gray20-Sep-10 11:47 
QuestionHow to find all the rectangle in point collection ? Pin
Yanshof20-Sep-10 2:50
Yanshof20-Sep-10 2:50 
AnswerRe: How to find all the rectangle in point collection ? Pin
DaveyM6920-Sep-10 4:07
professionalDaveyM6920-Sep-10 4:07 
Questionprocess.start and sc delete servicename Pin
tomorrow_ft20-Sep-10 0:53
tomorrow_ft20-Sep-10 0:53 
AnswerRe: process.start and sc delete servicename Pin
tomorrow_ft20-Sep-10 1:06
tomorrow_ft20-Sep-10 1:06 
AnswerRe: process.start and sc delete servicename Pin
Pete O'Hanlon20-Sep-10 1:09
mvePete O'Hanlon20-Sep-10 1:09 
QuestionC# Seeing Through Objects Pin
C.CoderCreator19-Sep-10 20:49
C.CoderCreator19-Sep-10 20:49 
AnswerRe: C# Seeing Through Objects Pin
#realJSOP19-Sep-10 23:44
professional#realJSOP19-Sep-10 23:44 
GeneralRe: C# Seeing Through Objects Pin
C.CoderCreator19-Sep-10 23:58
C.CoderCreator19-Sep-10 23:58 
GeneralRe: C# Seeing Through Objects Pin
Dave Kreskowiak20-Sep-10 1:56
mveDave Kreskowiak20-Sep-10 1:56 
AnswerRe: C# Seeing Through Objects Pin
PIEBALDconsult20-Sep-10 3:12
mvePIEBALDconsult20-Sep-10 3:12 
QuestionReading a PDF File Pin
Anil Kumar.Arvapalli19-Sep-10 20:45
Anil Kumar.Arvapalli19-Sep-10 20:45 
AnswerRe: Reading a PDF File Pin
R. Giskard Reventlov19-Sep-10 20:49
R. Giskard Reventlov19-Sep-10 20:49 

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.