<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Adobe DevNet publishes my blueprint for Flex apps</title>
	<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Thu, 21 Aug 2008 15:16:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Tom Lee</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1402</link>
		<dc:creator>Tom Lee</dc:creator>
		<pubDate>Fri, 25 May 2007 00:33:35 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1402</guid>
		<description>Joe, thanks - your idea about grouping like parameters together rather than having a 1-to-1 relationship between Operations and Parameters makes a great deal of sense.  I think it'll be easier to understand in the long run.  Thanks again for the tips, and keep writing - this blog is one of the best Flex blogs going, in my book.</description>
		<content:encoded><![CDATA[<p>Joe, thanks - your idea about grouping like parameters together rather than having a 1-to-1 relationship between Operations and Parameters makes a great deal of sense.  I think it&#8217;ll be easier to understand in the long run.  Thanks again for the tips, and keep writing - this blog is one of the best Flex blogs going, in my book.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1401</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 24 May 2007 15:16:49 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1401</guid>
		<description>Joe, thanks for the response. I hope you don't mind a follow-up. I think I am confused by the Session.as: it dispatches a "selectedVideoChange" event which does not seem to have any listeners. Meanwhile, yes, I believe the Bindings are amiss somewhere which begs another question: Any recommended techniques for debugging them? The problem I often have is that when a binding is set is different than when you expect to see results from it so it can be hard to debug any problems.</description>
		<content:encoded><![CDATA[<p>Joe, thanks for the response. I hope you don&#8217;t mind a follow-up. I think I am confused by the Session.as: it dispatches a &#8220;selectedVideoChange&#8221; event which does not seem to have any listeners. Meanwhile, yes, I believe the Bindings are amiss somewhere which begs another question: Any recommended techniques for debugging them? The problem I often have is that when a binding is set is different than when you expect to see results from it so it can be hard to debug any problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1400</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Thu, 24 May 2007 14:44:23 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1400</guid>
		<description>Mark -- without seeing your source code, it's hard to say why this doesn't work, but there's nothing in the architecture that would rule it out.  It's probably some minor problem with how your bindings are set up.  As long as VideoCommentary's 'video' property gets set to a Video, it should work since it has no idea where that object comes from.</description>
		<content:encoded><![CDATA[<p>Mark &#8212; without seeing your source code, it&#8217;s hard to say why this doesn&#8217;t work, but there&#8217;s nothing in the architecture that would rule it out.  It&#8217;s probably some minor problem with how your bindings are set up.  As long as VideoCommentary&#8217;s &#8216;video&#8217; property gets set to a Video, it should work since it has no idea where that object comes from.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1399</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Thu, 24 May 2007 14:37:51 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1399</guid>
		<description>Tom: more on the Parameter question -- I don't think a pattern is *ever* bad merely because one came up with it oneself, providing that it's easy to understand and easy to justify and document.

What I find here (now that you explained it in more detail) is that you have simply factored out some objects: strongly related sets of values that make sense to package up and send to the server as a single object.  I think of these as Model objects of a sort.  They are not all that different from model objects that travel in the other direction, sent from the client to the server.

So there's nothing especially exotic going on here, other than the fact that you call these factored-out objects "parameters" and make them 1-to-1 with the set of operations.  Such refactoring is a natural way to simplify any complex API with recurring subsets of parameters.  I think if you focus on just rolling up the values that always occur together into named classes, rather than always having a single XYZParameters subclass for each XYZOperation, you'll have a more natural and intuitive Service interface.  At that point, one might name than "XYZInfo" objects or something of that nature.</description>
		<content:encoded><![CDATA[<p>Tom: more on the Parameter question &#8212; I don&#8217;t think a pattern is *ever* bad merely because one came up with it oneself, providing that it&#8217;s easy to understand and easy to justify and document.</p>
<p>What I find here (now that you explained it in more detail) is that you have simply factored out some objects: strongly related sets of values that make sense to package up and send to the server as a single object.  I think of these as Model objects of a sort.  They are not all that different from model objects that travel in the other direction, sent from the client to the server.</p>
<p>So there&#8217;s nothing especially exotic going on here, other than the fact that you call these factored-out objects &#8220;parameters&#8221; and make them 1-to-1 with the set of operations.  Such refactoring is a natural way to simplify any complex API with recurring subsets of parameters.  I think if you focus on just rolling up the values that always occur together into named classes, rather than always having a single XYZParameters subclass for each XYZOperation, you&#8217;ll have a more natural and intuitive Service interface.  At that point, one might name than &#8220;XYZInfo&#8221; objects or something of that nature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1398</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 24 May 2007 13:09:55 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1398</guid>
		<description>Joe, I've really enjoyed working with ReviewTube and trying to get my arms around MVCS. However, I have struggled with one thing: I'm trying to break the UI into different "windows" and it's proven harder than I suspect it should be. For example, I split the MainView.mxml into two separate MXML components - one w/ VideoCommentary and one with VideoBrowser. The result is VideoCommentary does not "see" a selected video and I really cannot figure out why.

Can you help??

(For reference, I am trying to put ReviewTube  components into MDI windows like those used by Christophe Coenraets.)</description>
		<content:encoded><![CDATA[<p>Joe, I&#8217;ve really enjoyed working with ReviewTube and trying to get my arms around MVCS. However, I have struggled with one thing: I&#8217;m trying to break the UI into different &#8220;windows&#8221; and it&#8217;s proven harder than I suspect it should be. For example, I split the MainView.mxml into two separate MXML components - one w/ VideoCommentary and one with VideoBrowser. The result is VideoCommentary does not &#8220;see&#8221; a selected video and I really cannot figure out why.</p>
<p>Can you help??</p>
<p>(For reference, I am trying to put ReviewTube  components into MDI windows like those used by Christophe Coenraets.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Lee</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1397</link>
		<dc:creator>Tom Lee</dc:creator>
		<pubDate>Wed, 23 May 2007 16:08:13 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1397</guid>
		<description>Joe,
Thanks for your response.  Actually, my Parameter objects are public - I think I need to explain them a little more fully.  The reason these Parameter objects came about is that the web service calls are so verbose: each requires around 10 parameters, many of which are the same (username, password, security token, etc).  I found myself typing the same argument lists over and over again (in the service, service interface, and operation objects).  As I said before, each Parameter object inherits from a base class.  What I failed to mention before is that this base class contains the 'stock' parameters and initializes them with data from the Model.  So, for example:

public class OperationParams{
private var username:String = Config.instance.currentSession.currentUser.Username;

// Username
		public function get Username():String{
			return this.username;
		}

		public function set Username(v:String):void{
			this.username = v;
		}
}

(I'm using getter/setters because they can be overridden by a subclass if need be.)  This way, any time a Parameter object is instantiated, it is automatically prepopulated with those common values.  The Parameter object is actually instantiated in the Controller, populated with the remaining (non-common) values, and passed into the Service method (which passes it into the operation it returns).

This doesn't feel right because I came up with it myself, as opposed to implementing a known good interaction pattern.  Is there something I'm misunderstanding in your MVCS architecture that would make the need for Parameter objects irrelevant?  Or is there another interaction pattern that you feel would better serve the purpose?

Thanks again for your indulgence.</description>
		<content:encoded><![CDATA[<p>Joe,<br />
Thanks for your response.  Actually, my Parameter objects are public - I think I need to explain them a little more fully.  The reason these Parameter objects came about is that the web service calls are so verbose: each requires around 10 parameters, many of which are the same (username, password, security token, etc).  I found myself typing the same argument lists over and over again (in the service, service interface, and operation objects).  As I said before, each Parameter object inherits from a base class.  What I failed to mention before is that this base class contains the &#8217;stock&#8217; parameters and initializes them with data from the Model.  So, for example:</p>
<p>public class OperationParams{<br />
private var username:String = Config.instance.currentSession.currentUser.Username;</p>
<p>// Username<br />
		public function get Username():String{<br />
			return this.username;<br />
		}</p>
<p>		public function set Username(v:String):void{<br />
			this.username = v;<br />
		}<br />
}</p>
<p>(I&#8217;m using getter/setters because they can be overridden by a subclass if need be.)  This way, any time a Parameter object is instantiated, it is automatically prepopulated with those common values.  The Parameter object is actually instantiated in the Controller, populated with the remaining (non-common) values, and passed into the Service method (which passes it into the operation it returns).</p>
<p>This doesn&#8217;t feel right because I came up with it myself, as opposed to implementing a known good interaction pattern.  Is there something I&#8217;m misunderstanding in your MVCS architecture that would make the need for Parameter objects irrelevant?  Or is there another interaction pattern that you feel would better serve the purpose?</p>
<p>Thanks again for your indulgence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1396</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Wed, 23 May 2007 13:38:22 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1396</guid>
		<description>Tom,

Thanks for the great comments.

(I also took a look at your blog and responded to a much earlier comment you made about the question of why there isn't a unitary Model object somewhere.  Briefly, the answer is -- there certainly can be such an object and in many cases it's a good idea, but for the particular case of ReviewTube it doesn't seem to make sense to me.)

1/ About the Parameter objects, I assume those are internal to the Service/Operation part of the architecture and don't make it into the Service interface that the rest of the app calls.  If they are indeed internal, then it sounds like a fine solution to your problem -- presumably you have various stock parameters for your HTTP requests and this gives you a way to encapsulate their structure.  If they are exposed as a public data type, then the app developer has to pass a FooBarParameter object into each Service method, which seems like a big nuisance if the parameter is just a String, an int, or whatever.

2/ Questions about ViewStates and things like them come up a lot because they fall into a gray area.  When is a ViewState a separate model-like object and not just some property of some view somewhere?  My feeling is that a persistent ViewState is a perfectly legitimate *kind* of model, but not the same model-with-a-capital-M that represents the semantic data for the application.  The fact that it gets persisted is a very good argument for separating it from the actual view components themselves.  I certainly would want to keep ViewStates in a separate object, possibly living in the Controller (since the controller presumably plays some role in applying these states to the view).

Hope this helps!</description>
		<content:encoded><![CDATA[<p>Tom,</p>
<p>Thanks for the great comments.</p>
<p>(I also took a look at your blog and responded to a much earlier comment you made about the question of why there isn&#8217;t a unitary Model object somewhere.  Briefly, the answer is &#8212; there certainly can be such an object and in many cases it&#8217;s a good idea, but for the particular case of ReviewTube it doesn&#8217;t seem to make sense to me.)</p>
<p>1/ About the Parameter objects, I assume those are internal to the Service/Operation part of the architecture and don&#8217;t make it into the Service interface that the rest of the app calls.  If they are indeed internal, then it sounds like a fine solution to your problem &#8212; presumably you have various stock parameters for your HTTP requests and this gives you a way to encapsulate their structure.  If they are exposed as a public data type, then the app developer has to pass a FooBarParameter object into each Service method, which seems like a big nuisance if the parameter is just a String, an int, or whatever.</p>
<p>2/ Questions about ViewStates and things like them come up a lot because they fall into a gray area.  When is a ViewState a separate model-like object and not just some property of some view somewhere?  My feeling is that a persistent ViewState is a perfectly legitimate *kind* of model, but not the same model-with-a-capital-M that represents the semantic data for the application.  The fact that it gets persisted is a very good argument for separating it from the actual view components themselves.  I certainly would want to keep ViewStates in a separate object, possibly living in the Controller (since the controller presumably plays some role in applying these states to the view).</p>
<p>Hope this helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Lee</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1395</link>
		<dc:creator>Tom Lee</dc:creator>
		<pubDate>Wed, 23 May 2007 02:11:28 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1395</guid>
		<description>I've been working through the process of architecting an application based on MVCS, and I thought I'd share some thoughts I had along the way.  Forgive me if I get a bit long-winded, and please let me know if it sounds like I'm misunderstanding something fundamental.

First, I found it useful to create a set of Parameter objects to be passed into the Operations - this way, each parameter is strongly typed, and it is this parameter object which is passed through the Service object, into the Operation (simplifying the method signatures).  The Parameter objects all inherit from the same base class, which has a toSimpleObject method which returns an object containing name/value pairs (HTTPService requires a simple object - strongly typed objects won't work).  In my case, each web service call required around 10 parameters, so changes in the web services became more difficult to manage.  If the parameters of a web service changed, I had to update them in the service interface, the service object, and the operation object.  With a Parameter object, the changes are in one location only.  Now to decide where to put the darn things - do they belong in the Services packages, the Operations package, or are they more properly part of the Model?

Secondly, I'm thinking a "ViewState" object would be a useful addition to the architecture.  It would store any view object's properties that you might wish to save for later restoration, but that don't really belong in the model.  For example, you might have a preferences PopUp dialog with some comboboxes whose selected indexes you'd like to persist each time the PopUp is shown.  For some reason it doesn't feel right to put those kinds of things in the Model, but maybe that's exactly where they belong...?  Care to comment?

Thanks a lot for your article.  It has taken me a giant step forward!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been working through the process of architecting an application based on MVCS, and I thought I&#8217;d share some thoughts I had along the way.  Forgive me if I get a bit long-winded, and please let me know if it sounds like I&#8217;m misunderstanding something fundamental.</p>
<p>First, I found it useful to create a set of Parameter objects to be passed into the Operations - this way, each parameter is strongly typed, and it is this parameter object which is passed through the Service object, into the Operation (simplifying the method signatures).  The Parameter objects all inherit from the same base class, which has a toSimpleObject method which returns an object containing name/value pairs (HTTPService requires a simple object - strongly typed objects won&#8217;t work).  In my case, each web service call required around 10 parameters, so changes in the web services became more difficult to manage.  If the parameters of a web service changed, I had to update them in the service interface, the service object, and the operation object.  With a Parameter object, the changes are in one location only.  Now to decide where to put the darn things - do they belong in the Services packages, the Operations package, or are they more properly part of the Model?</p>
<p>Secondly, I&#8217;m thinking a &#8220;ViewState&#8221; object would be a useful addition to the architecture.  It would store any view object&#8217;s properties that you might wish to save for later restoration, but that don&#8217;t really belong in the model.  For example, you might have a preferences PopUp dialog with some comboboxes whose selected indexes you&#8217;d like to persist each time the PopUp is shown.  For some reason it doesn&#8217;t feel right to put those kinds of things in the Model, but maybe that&#8217;s exactly where they belong&#8230;?  Care to comment?</p>
<p>Thanks a lot for your article.  It has taken me a giant step forward!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1394</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Wed, 07 Mar 2007 02:39:50 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1394</guid>
		<description>Kevin, the idea is that the view calls the Controller, say, getRecentVideos(), and immediately makes use of the returned empty model, either binding to its Bindable properties or (if it's a collection) using it as a dataProvider to some component.  Either way, the result is that the view is now listening to change events coming off that data model, which will eventually occur once the data comes back.

If you download the ReviewTube source and check out the details, I think it'll be reasonably clear.</description>
		<content:encoded><![CDATA[<p>Kevin, the idea is that the view calls the Controller, say, getRecentVideos(), and immediately makes use of the returned empty model, either binding to its Bindable properties or (if it&#8217;s a collection) using it as a dataProvider to some component.  Either way, the result is that the view is now listening to change events coming off that data model, which will eventually occur once the data comes back.</p>
<p>If you download the ReviewTube source and check out the details, I think it&#8217;ll be reasonably clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevin</title>
		<link>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1393</link>
		<dc:creator>kevin</dc:creator>
		<pubDate>Tue, 06 Mar 2007 23:58:37 +0000</pubDate>
		<guid>http://www.joeberkovitz.com/blog/2006/12/29/dev-net-blueprint-article/#comment-1393</guid>
		<description>We started using your MVCS architecture to build an application using RemoteObject instead of HTTPService.  We’ve been able to return data from the operation successfully, but we don’t see how our data model is bound back to the view.  We see in your example where you return the empty dataProvider to a view (Controller-&#38;gt;getRecentVideos()), but we don’t see how the model and view are bound together (Controller-&#38;gt;loadReviewComments()).  Hopefully that makes sense!  Thanks in advance, and killer article.</description>
		<content:encoded><![CDATA[<p>We started using your MVCS architecture to build an application using RemoteObject instead of HTTPService.  We’ve been able to return data from the operation successfully, but we don’t see how our data model is bound back to the view.  We see in your example where you return the empty dataProvider to a view (Controller-&#38;gt;getRecentVideos()), but we don’t see how the model and view are bound together (Controller-&#38;gt;loadReviewComments()).  Hopefully that makes sense!  Thanks in advance, and killer article.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
