Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Please Confirm My Understanding of WCF/WPF Structure

Tags:

wcf

wpf

I'm studying WCF and WPF. I've learned a lot by doing sample projects, but I'm having trouble putting everything together. It would help if I could paraphrase my understanding of proper WCF/WPF structure and invite others to confirm or correct my ideas. Here is a very broad description of how I expect my next project to work:

My persistent data will be stored in a SQL Server database. I will create a WCF Service Library which serves as an interface to the database, solving security issues and recasting the relational data into an object-oriented entity model. My application will read data through the WCF service into a memory structure which might be customized somewhat for the needs of my application, but will basically consist of one ObservableCollection for each of the entities in my data model. Because the data will be stored in ObservableCollections, I will be able to use event procedures to respond to data changes that trigger business processes. Simple user interface elements will bind directly to the collections. More sophisticated user interface elements, like a TreeView, will require another layer, called a PresentationModel or ViewModel. In the case of a TreeView, the TreeView will bind directly to the PresentationModel, and the PresentationModel will bind directly to the collections.

Have I described everything correctly?

-TC

like image 552
T.C. Avatar asked Nov 26 '10 07:11

T.C.


2 Answers

There is nothing technically wrong in what you wrote.

Things that feel off:

... solving security issues...

Scares me because it implies, to me at least, that you will have no security issues. I would have phrased it as

provideds a centralised system for authentication and authorisation to the data from all interfaces

like image 195
Robert MacLean Avatar answered Oct 01 '22 17:10

Robert MacLean


I would definately make use of the MVVM pattern, allow a ViewModel to expose your collections and properties that your UI binds too, you seem to have a grasp of that pattern from what you have described.

like image 40
BenjaminPaul Avatar answered Oct 01 '22 16:10

BenjaminPaul