January 30th, 2011 | Uncategorized | Comments Off
Solution from previous post http://milanche.blog.com/2011/01/100-pure-xaml-no-code-behind/ , we split to two part Server and Client :
This Read Service execute one method from many repository service, like FindAll, FindByName etc. And we move DataProvider from client to server, for extensibility :
Read service act as excutor of commands from client, standard from repository services implementation for example
Each service, has base class for infrastucture code, for example on ouput set we serialize data with default serializer from Unity configuration
On client side we build one generic data provider for reading data from read service on server side
And this data provider, use like Server side Unity to deserialize output from server side. In this example, we use JSON serializer
(I used code and example from http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2010/08/22/using-c-4.0-and-dynamic-to-parse-json.aspx for JSON to Dynamic)
And with this code, we dont need on client side Model
And Views on Client side look now
We added Collection View Source to supprot features like sorting, grouping ..
Happy Codding, in next article we will use EF CTP 5 Code First Development => No SQL
Part 1 – No no code behind http://milanche.blog.com/2011/01/100-pure-xaml-no-code-behind/
Tell me what you think?
Download Full Source Code, just remove .doc extension, Pure XAML Part 2.rar
More Details @