<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Tips for rich client development</title> <atom:link href="http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/feed/" rel="self" type="application/rss+xml" /><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/</link> <description>The official blog of Mindscape</description> <lastBuildDate>Sun, 05 Sep 2010 10:07:39 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: Ivan Towlson</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-37115</link> <dc:creator>Ivan Towlson</dc:creator> <pubDate>Tue, 19 Jan 2010 02:53:57 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-37115</guid> <description>Just to add to JD&#039;s info: LightSpeed-generated DTOs are partial classes so you can add the LockVersion to the DTO if you want.  In this case you will need to implement your own mechanism to copy the value from the entity to the DTO; you can do this by implementing the partial methods declared in the generated DTO classes.</description> <content:encoded><![CDATA[<p>Just to add to JD&#8217;s info: LightSpeed-generated DTOs are partial classes so you can add the LockVersion to the DTO if you want.  In this case you will need to implement your own mechanism to copy the value from the entity to the DTO; you can do this by implementing the partial methods declared in the generated DTO classes.</p> ]]></content:encoded> </item> <item><title>By: John-Daniel Trask</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-37114</link> <dc:creator>John-Daniel Trask</dc:creator> <pubDate>Tue, 19 Jan 2010 02:49:47 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-37114</guid> <description>Hi Colin,You are correct - the LockVersion is tested if it exists and throws an optimistic concurrency exception if it does not match.Regarding the change tracking in LightSpeed 3.0, this can improve things but only if you&#039;re using an entity directly, not a DTO. We don&#039;t serialize change tracking details with the DTO&#039;s we generate so the best way to check when using DTO&#039;s is to hold two copies. If you had a LightSpeed Entity you could check the change tracker to see what has changed. LightSpeed 3.0 has not changed how you would check the changes when using DTOs.I hope that makes sense and answers your question - if I have missed something then please let me know :-)John-Daniel Trask</description> <content:encoded><![CDATA[<p>Hi Colin,</p><p>You are correct &#8211; the LockVersion is tested if it exists and throws an optimistic concurrency exception if it does not match.</p><p>Regarding the change tracking in LightSpeed 3.0, this can improve things but only if you&#8217;re using an entity directly, not a DTO. We don&#8217;t serialize change tracking details with the DTO&#8217;s we generate so the best way to check when using DTO&#8217;s is to hold two copies. If you had a LightSpeed Entity you could check the change tracker to see what has changed. LightSpeed 3.0 has not changed how you would check the changes when using DTOs.</p><p>I hope that makes sense and answers your question &#8211; if I have missed something then please let me know :-)</p><p>John-Daniel Trask</p> ]]></content:encoded> </item> <item><title>By: Colin Basterfield</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-37106</link> <dc:creator>Colin Basterfield</dc:creator> <pubDate>Mon, 18 Jan 2010 22:35:37 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-37106</guid> <description>Hi,I&#039;ve only just downloaded LightSpeed, so forgive my naivety. ;-)I was reading in What&#039;s new in V3 and saw that you seem to have implemented a &#039;Fowler&#039; style version number pattern which works simply by adding a LockVersion property to each domain entity.  I assume that this gets incremented each time a successful update takes place, but within that there is a check to see if the LockVersion is the same as it is in the object being persisted?  If it doesn&#039;t then the OptimisticConcurrencyException is raised and us as the developer deals with it in an appropriate fashion.In terms of the &#039;original&#039; state of the entity I&#039;m thinking simply get two copies of the dto on and then compare for any user changes in the current UOW but you mentioned above that &quot;The way we’re currently exposing the change tracking is to use a simple record per property that holds property names and their old + new values. This is built against an entity which is why you would need to currently replicate existing property values if it would be an issue to reconcile against the database version.&quot;Could you explain a bit about this please and how version 3 may have changed in that sense?Regards
Colin</description> <content:encoded><![CDATA[<p>Hi,</p><p>I&#8217;ve only just downloaded LightSpeed, so forgive my naivety. ;-)</p><p>I was reading in What&#8217;s new in V3 and saw that you seem to have implemented a &#8216;Fowler&#8217; style version number pattern which works simply by adding a LockVersion property to each domain entity.  I assume that this gets incremented each time a successful update takes place, but within that there is a check to see if the LockVersion is the same as it is in the object being persisted?  If it doesn&#8217;t then the OptimisticConcurrencyException is raised and us as the developer deals with it in an appropriate fashion.</p><p>In terms of the &#8216;original&#8217; state of the entity I&#8217;m thinking simply get two copies of the dto on and then compare for any user changes in the current UOW but you mentioned above that &#8220;The way we’re currently exposing the change tracking is to use a simple record per property that holds property names and their old + new values. This is built against an entity which is why you would need to currently replicate existing property values if it would be an issue to reconcile against the database version.&#8221;</p><p>Could you explain a bit about this please and how version 3 may have changed in that sense?</p><p>Regards<br
/> Colin</p> ]]></content:encoded> </item> <item><title>By: Ivan Towlson</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-34509</link> <dc:creator>Ivan Towlson</dc:creator> <pubDate>Wed, 16 Sep 2009 20:34:38 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-34509</guid> <description>Hi Paul,You might want to google around for &quot;windows forms mvc&quot; for some general samples and advice -- obviously not LightSpeed specific but I get the impression that at this stage you&#039;re more trying to get your head around the pattern.  http://stackoverflow.com/questions/654722/implementing-mvc-with-windows-forms seemed a reasonably good collection of links and resources.  In particular you should check out the references to Model-View-Presenter (MVP) as an alternative to MVC.However... I understand why you are reluctant to tackle WPF, but do bear in mind that Windows Forms is basically at the end of the road.  It hasn&#039;t been enhanced in the last 3 years and that&#039;s not about to change.  This wouldn&#039;t be such a consideration if you could take your MVC/MVP experience gained on WinForms to WPF, but WPF works best with a different architecture known as Model-View-ViewModel (worst architecture name ever).  You&#039;re in a tricky situation where you rightly don&#039;t want to have to learn a new UI framework and a new architecture all in one go; but if you learn a new architecture on your existing UI framework, you may not be able to take that knowledge forward, and you&#039;ll end up having to learn the new framework and new architecture all in one go anyway at some later date.That said, the MVC pattern remains very relevant and elegant in the Web environment, so it&#039;s certainly not wasteful to spend time mastering it.  (And for Web work you will definitely be wanting to grok MVC not MVP, as the modern version of the ASP.NET framework has gone the controller route not the presenter route.)</description> <content:encoded><![CDATA[<p>Hi Paul,</p><p>You might want to google around for &#8220;windows forms mvc&#8221; for some general samples and advice &#8212; obviously not LightSpeed specific but I get the impression that at this stage you&#8217;re more trying to get your head around the pattern. <a
href="http://stackoverflow.com/questions/654722/implementing-mvc-with-windows-forms" rel="nofollow">http://stackoverflow.com/questions/654722/implementing-mvc-with-windows-forms</a> seemed a reasonably good collection of links and resources.  In particular you should check out the references to Model-View-Presenter (MVP) as an alternative to MVC.</p><p>However&#8230; I understand why you are reluctant to tackle WPF, but do bear in mind that Windows Forms is basically at the end of the road.  It hasn&#8217;t been enhanced in the last 3 years and that&#8217;s not about to change.  This wouldn&#8217;t be such a consideration if you could take your MVC/MVP experience gained on WinForms to WPF, but WPF works best with a different architecture known as Model-View-ViewModel (worst architecture name ever).  You&#8217;re in a tricky situation where you rightly don&#8217;t want to have to learn a new UI framework and a new architecture all in one go; but if you learn a new architecture on your existing UI framework, you may not be able to take that knowledge forward, and you&#8217;ll end up having to learn the new framework and new architecture all in one go anyway at some later date.</p><p>That said, the MVC pattern remains very relevant and elegant in the Web environment, so it&#8217;s certainly not wasteful to spend time mastering it.  (And for Web work you will definitely be wanting to grok MVC not MVP, as the modern version of the ASP.NET framework has gone the controller route not the presenter route.)</p> ]]></content:encoded> </item> <item><title>By: Pablo InNZ</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-34385</link> <dc:creator>Pablo InNZ</dc:creator> <pubDate>Thu, 10 Sep 2009 05:04:56 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-34385</guid> <description>Hi JD,
I&#039;m about to start delving in to MVC with Winforms as a learning exercise (in C# 3.5) and re-writing an old application so that there is something at the end of it rather than a bunch of trial code. Do you have, or can you point me in the direction of any concrete code examples on using MVC and winforms ? I don&#039;t really want to take on WPF as well at this stage if possible.
If you&#039;ve got any example code knocking around that uses Lightspeed, all the better !
Cheers
Paul</description> <content:encoded><![CDATA[<p>Hi JD,<br
/> I&#8217;m about to start delving in to MVC with Winforms as a learning exercise (in C# 3.5) and re-writing an old application so that there is something at the end of it rather than a bunch of trial code. Do you have, or can you point me in the direction of any concrete code examples on using MVC and winforms ? I don&#8217;t really want to take on WPF as well at this stage if possible.<br
/> If you&#8217;ve got any example code knocking around that uses Lightspeed, all the better !<br
/> Cheers<br
/> Paul</p> ]]></content:encoded> </item> <item><title>By: John-Daniel Trask</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-34227</link> <dc:creator>John-Daniel Trask</dc:creator> <pubDate>Wed, 02 Sep 2009 03:44:32 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-34227</guid> <description>Hi Marko,Sorry for the slow reply! You&#039;re correct about needing to hold a copy of the orginal values yourself if you wanted to reconcile with the entity as it stood when you created the DTO from it.It seems we have two issues here:1. Only tell me the changes that the user has made against original values - not against what is currently in the database.The way we&#039;re currently exposing the change tracking is to use a simple record per property that holds property names and their old + new values. This is built against an entity which is why you would need to currently replicate existing property values if it would be an issue to reconcile against the database version.You could certainly create two DTO&#039;s and hold original values with one. You could also update the templates for the DTO generation to build an Original*PropertyName* field per property. I&#039;m not suggesting this is the best idea, just sharing a way to reduce DTO classes.2. Reconcile the changes for concurrency violationsCurrently we are not offering functionality to do this however the exposure of the change tracking will allow developers to reconcile themselves. So far however general feedback is that most applications deal with concurrency issues in their own way. We would want to help with common case scenarios - which is similar to what L2S is offering from what you&#039;re saying.We&#039;re pretty busy with LightSpeed 3.0 so post 3.0 we&#039;ll look at a Refresh() capability.Thank you for your feedback Marko :-)</description> <content:encoded><![CDATA[<p>Hi Marko,</p><p>Sorry for the slow reply! You&#8217;re correct about needing to hold a copy of the orginal values yourself if you wanted to reconcile with the entity as it stood when you created the DTO from it.</p><p>It seems we have two issues here:</p><p>1. Only tell me the changes that the user has made against original values &#8211; not against what is currently in the database.</p><p>The way we&#8217;re currently exposing the change tracking is to use a simple record per property that holds property names and their old + new values. This is built against an entity which is why you would need to currently replicate existing property values if it would be an issue to reconcile against the database version.</p><p>You could certainly create two DTO&#8217;s and hold original values with one. You could also update the templates for the DTO generation to build an Original*PropertyName* field per property. I&#8217;m not suggesting this is the best idea, just sharing a way to reduce DTO classes.</p><p>2. Reconcile the changes for concurrency violations</p><p>Currently we are not offering functionality to do this however the exposure of the change tracking will allow developers to reconcile themselves. So far however general feedback is that most applications deal with concurrency issues in their own way. We would want to help with common case scenarios &#8211; which is similar to what L2S is offering from what you&#8217;re saying.</p><p>We&#8217;re pretty busy with LightSpeed 3.0 so post 3.0 we&#8217;ll look at a Refresh() capability.</p><p>Thank you for your feedback Marko :-)</p> ]]></content:encoded> </item> <item><title>By: Marko</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-34106</link> <dc:creator>Marko</dc:creator> <pubDate>Mon, 24 Aug 2009 08:30:35 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-34106</guid> <description>Hi JD,I&#039;m trying to make a point about the moment of using CopyTo method with DTO and getting that report of changes.I am expecting model entities will be responsible for change tracking, which means they can be detached and Uow disposed like in the article.But, if I have a stateless application server and DTOs, after receiving back DTO I have to recreate the entity and use CopyTo method. I will then get a report about changes compared to the current entity copy from the database (I expect a refetch from DB will occur at that process).
I will not get the same report &quot;client modified values&quot; which I would get if I hold on to the original entity which was fetched when client requested start of editing.Of course, report will not be the same if somebody else changed the record in DB in the meantime, and yes, this is concurrency violation territory. But, for resolving concurrency violation I would be better of if I have the correct information which properties is the client request actually trying to modify (for resolving concurrency I would want to use the rule like LINQ&#039;s RefreshMode.KeepChanges - &quot;forces the refresh method to keep the current value that has been changed, but updates the other values with the database values&quot;).So, to cope with that situation in a stateless environment you&#039;re suggesting, it looks to me I would need the client to keep a copy of originally fetched values (which I guess means an extra DTO with original values). Or use a stateful application server.I hope I was a bit more clear now. If I&#039;m missing something, let me know.</description> <content:encoded><![CDATA[<p>Hi JD,</p><p>I&#8217;m trying to make a point about the moment of using CopyTo method with DTO and getting that report of changes.</p><p>I am expecting model entities will be responsible for change tracking, which means they can be detached and Uow disposed like in the article.</p><p>But, if I have a stateless application server and DTOs, after receiving back DTO I have to recreate the entity and use CopyTo method. I will then get a report about changes compared to the current entity copy from the database (I expect a refetch from DB will occur at that process).<br
/> I will not get the same report &#8220;client modified values&#8221; which I would get if I hold on to the original entity which was fetched when client requested start of editing.</p><p>Of course, report will not be the same if somebody else changed the record in DB in the meantime, and yes, this is concurrency violation territory. But, for resolving concurrency violation I would be better of if I have the correct information which properties is the client request actually trying to modify (for resolving concurrency I would want to use the rule like LINQ&#8217;s RefreshMode.KeepChanges &#8211; &#8220;forces the refresh method to keep the current value that has been changed, but updates the other values with the database values&#8221;).</p><p>So, to cope with that situation in a stateless environment you&#8217;re suggesting, it looks to me I would need the client to keep a copy of originally fetched values (which I guess means an extra DTO with original values). Or use a stateful application server.</p><p>I hope I was a bit more clear now. If I&#8217;m missing something, let me know.</p> ]]></content:encoded> </item> <item><title>By: John-Daniel Trask</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-34099</link> <dc:creator>John-Daniel Trask</dc:creator> <pubDate>Sun, 23 Aug 2009 23:26:45 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-34099</guid> <description>Hi Marko,I&#039;m not 100% sure what you&#039;re asking here so I will assume you&#039;re wondering how change tracking would work in a distributed environment?With LightSpeed generating the DTO&#039;s and Entities, you would simply send your DTO down the line and then when it is returned (with or without changes) you can use the CopyTo extension method that LightSpeed generates to apply any changes.The act of applying the changes means that the change tracking in LS3 will then be able to report what changes have been made.The is no provision in LS3 for providing change tracking on the client side for DTOs - you simply send the DTO back and let the server side manage the change tracking.If you wish to do change tracking on the client side (perhaps to test if you should bother sending a DTO back to the server) you would need to apply your own code to test for changes that may have been made to the DTO.I hope that helps but please let me know if I&#039;ve missed the point of your question.Cheers.</description> <content:encoded><![CDATA[<p>Hi Marko,</p><p>I&#8217;m not 100% sure what you&#8217;re asking here so I will assume you&#8217;re wondering how change tracking would work in a distributed environment?</p><p>With LightSpeed generating the DTO&#8217;s and Entities, you would simply send your DTO down the line and then when it is returned (with or without changes) you can use the CopyTo extension method that LightSpeed generates to apply any changes.</p><p>The act of applying the changes means that the change tracking in LS3 will then be able to report what changes have been made.</p><p>The is no provision in LS3 for providing change tracking on the client side for DTOs &#8211; you simply send the DTO back and let the server side manage the change tracking.</p><p>If you wish to do change tracking on the client side (perhaps to test if you should bother sending a DTO back to the server) you would need to apply your own code to test for changes that may have been made to the DTO.</p><p>I hope that helps but please let me know if I&#8217;ve missed the point of your question.</p><p>Cheers.</p> ]]></content:encoded> </item> <item><title>By: Marko</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-34028</link> <dc:creator>Marko</dc:creator> <pubDate>Thu, 20 Aug 2009 07:10:48 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-34028</guid> <description>Question. I have WCF between client and application server, which means model entities will not be sent to the client, but rather their respective simple DTOs (Data Transfer Objects).
How to avoid stateful environment if I want to use entity change tracking which you are preparing for Lightspeed 3? You&#039;re expecting client to manage two copies of DTOs - one with originaly fetched values and one with edited values?</description> <content:encoded><![CDATA[<p>Question. I have WCF between client and application server, which means model entities will not be sent to the client, but rather their respective simple DTOs (Data Transfer Objects).<br
/> How to avoid stateful environment if I want to use entity change tracking which you are preparing for Lightspeed 3? You&#8217;re expecting client to manage two copies of DTOs &#8211; one with originaly fetched values and one with edited values?</p> ]]></content:encoded> </item> <item><title>By: DotNetShoutout</title><link>http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/comment-page-1/#comment-34027</link> <dc:creator>DotNetShoutout</dc:creator> <pubDate>Thu, 20 Aug 2009 05:28:15 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=871#comment-34027</guid> <description>&lt;strong&gt;Tips for rich client development...&lt;/strong&gt;Thank you for submitting this cool story - Trackback from DotNetShoutout...</description> <content:encoded><![CDATA[<p><strong>Tips for rich client development&#8230;</strong></p><p>Thank you for submitting this cool story &#8211; Trackback from DotNetShoutout&#8230;</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (request URI is rejected)

Served from: www.mindscape.co.nz @ 2010-09-08 02:40:13 -->