<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 
	xmlns:admin="http://webns.net/mvcb/" 
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/" 
	xmlns:atom="http://www.w3.org/2005/Atom">
	
	<channel>
	
		<title>Countdown to Ext JS 4: Anatomy of a Model</title>
		<link>http://www.sencha.com/blog/ext-js-4-anatomy-of-a-model</link>
		<description>If you follow Ext JS, chances are you already know that we have a brand new data package for Ext JS 4. The new data package builds on existing principles while adding a huge number of new capabilities. Follow along as Ed Spencer reveals more about this powerful feature of Ext JS 4.</description>
		<dc:language>en-us</dc:language>
		<dc:creator>ed@sencha.com</dc:creator>
		<dc:rights>Copyright 2011</dc:rights>
		<dc:date>2011-02-08T18:57:00+00:00</dc:date>
		<admin:generatorAgent rdf:resource="http://expressionengine.com/" />
		<atom:link href="http://www.sencha.com/blog/comments-rss/743" rel="self" type="application/rss+xml" />
  
		
  
		<item>
      <title>Comment by xml editor</title>
      <description>I agree with alex, the proxy issue is a real pain and it would be far easier to implement direct models.</description>
      <content:encoded><![CDATA[<p>I agree with alex, the proxy issue is a real pain and it would be far easier to implement direct models.</p>]]></content:encoded>
      <pubDate>Tue, 13 Sep 2011 10:52 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:27024#date:10:52</guid>
    </item>
  
		<item>
      <title>Comment by Craig</title>
      <description>I do like removing the store from the picture, but then the question pops: for something like a grid panel or docked items (toolbar etc) &#45; they all require a store, therefore exception is thrown and no data displays (granted I am brand new to extjs all together&#8230; been a JQuery guy for some time now, so this may be a silly question) so&#8230; how do we deal with that?</description>
      <content:encoded><![CDATA[<p>I do like removing the store from the picture, but then the question pops: for something like a grid panel or docked items (toolbar etc) - they all require a store, therefore exception is thrown and no data displays (granted I am brand new to extjs all together&#8230; been a JQuery guy for some time now, so this may be a silly question) so&#8230; how do we deal with that?</p>]]></content:encoded>
      <pubDate>Tue, 16 Aug 2011 22:26 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:25397#date:22:26</guid>
    </item>
  
		<item>
      <title>Comment by Peter</title>
      <description>Regarding User data model, when I call User.load(&#8216;123&#8217;,&#123;..&#125;), any idea I got the request like /users/123?_dc=12345788&amp;amp;id=123 rather than /users/123 ? How to remove parameter &#8220;id=123&#8221;?

Thanks,
Peter</description>
      <content:encoded><![CDATA[<p>Regarding User data model, when I call User.load(&#8216;123&#8217;,&#123;..&#125;), any idea I got the request like /users/123?_dc=12345788&amp;id=123 rather than /users/123 ? How to remove parameter &#8220;id=123&#8221;?</p>

<p>Thanks,<br />
Peter</p>]]></content:encoded>
      <pubDate>Tue, 26 Jul 2011 19:41 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:24554#date:19:41</guid>
    </item>
  
		<item>
      <title>Comment by Real Chan</title>
      <description>my data is xml file&#8230;</description>
      <content:encoded><![CDATA[<p>my data is xml file&#8230;</p>]]></content:encoded>
      <pubDate>Mon, 25 Jul 2011 07:35 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:24487#date:07:35</guid>
    </item>
  
		<item>
      <title>Comment by Real Chan</title>
      <description>I’ve got the same concerns as ‘Christiaan’ above.
&#8220;
In your example where you regModel User, you say hasMany: ‘Orders’ (plural). I dont see anything called Orders. I see a model called order (singular).
What’s the meaning of a hasMany property referring to something that does not exist in the example? The Sencha Touch API docs shows this (which makes more sense)
hasMany: &#123;model: ‘Product’, name: ‘products’&#125;
&#8220;
I want to know how do you deal with them.</description>
      <content:encoded><![CDATA[<p> I’ve got the same concerns as ‘Christiaan’ above.<br />
&#8220;<br />
In your example where you regModel User, you say hasMany: ‘Orders’ (plural). I dont see anything called Orders. I see a model called order (singular).<br />
What’s the meaning of a hasMany property referring to something that does not exist in the example? The Sencha Touch API docs shows this (which makes more sense)<br />
hasMany: &#123;model: ‘Product’, name: ‘products’&#125;<br />
&#8220;<br />
I want to know how do you deal with them.</p>]]></content:encoded>
      <pubDate>Mon, 25 Jul 2011 07:13 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:24482#date:07:13</guid>
    </item>
  
		<item>
      <title>Comment by Jay</title>
      <description>Can I use string as id? I noticed the documentation for model said it is strictly for number:
load( Number id, Object config ) : void STATIC</description>
      <content:encoded><![CDATA[<p>Can I use string as id? I noticed the documentation for model said it is strictly for number:<br />
load( Number id, Object config ) : void STATIC</p>]]></content:encoded>
      <pubDate>Thu, 30 Jun 2011 08:22 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:23643#date:08:22</guid>
    </item>
  
		<item>
      <title>Comment by agenzie di modelle</title>
      <description>WOW ! This blog Looking soo  great. Again,I love this post very much. I am aggre with you. This is your hopeful post.&amp;nbsp;  I’ve got the same concerns as ‘cmwalolo’ above. Being able to call just the “users” (to show a list of user data only) vs having to load “users” + “orders” + “order items”.... well, that raises some major concerns on my part. Why shuffle data around from server to client that might not be needed?
Regards,&amp;nbsp;  &amp;nbsp; Thans for shering.</description>
      <content:encoded><![CDATA[<p>WOW ! This blog Looking soo  great. Again,I love this post very much. I am aggre with you. This is your hopeful post.&nbsp;  I’ve got the same concerns as ‘cmwalolo’ above. Being able to call just the “users” (to show a list of user data only) vs having to load “users” + “orders” + “order items”.... well, that raises some major concerns on my part. Why shuffle data around from server to client that might not be needed?<br />
Regards,&nbsp;  &nbsp; Thans for shering.</p>]]></content:encoded>
      <pubDate>Sat, 07 May 2011 11:51 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:20740#date:11:51</guid>
    </item>
  
		<item>
      <title>Comment by Andreas</title>
      <description>... and it happened again, just 2 hours after my last comment. 20 new unread items in the sencha feed, all pretty familiar. *sigh*</description>
      <content:encoded><![CDATA[<p>... and it happened again, just 2 hours after my last comment. 20 new unread items in the sencha feed, all pretty familiar. *sigh*</p>]]></content:encoded>
      <pubDate>Sat, 19 Feb 2011 09:50 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17523#date:09:50</guid>
    </item>
  
		<item>
      <title>Comment by Andreas</title>
      <description>@David Kaneda: Thanks, it happened again just today, so there still seems to be a problem with the RSS feed.</description>
      <content:encoded><![CDATA[<p>@David Kaneda: Thanks, it happened again just today, so there still seems to be a problem with the RSS feed.</p>]]></content:encoded>
      <pubDate>Fri, 18 Feb 2011 23:55 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17509#date:23:55</guid>
    </item>
  
		<item>
      <title>Comment by Patrick Fraley</title>
      <description>When I see this I get tears in my eyes, tears of joy.&amp;nbsp; My brain is already planing the marriage of these models with mongodb ...

You guys never cease to amaze me, every version of ext you delivered I though, awesome, can&#8217;t get better then this ...&amp;nbsp; And then the next version appears on the horizon &amp;nbsp; Keep up the good work ...

Looking forward to playing around with this ...</description>
      <content:encoded><![CDATA[<p>When I see this I get tears in my eyes, tears of joy.&nbsp; My brain is already planing the marriage of these models with mongodb ...</p>

<p>You guys never cease to amaze me, every version of ext you delivered I though, awesome, can&#8217;t get better then this ...&nbsp; And then the next version appears on the horizon <img src="/images/smileys/smile.gif" width="19" height="19" alt="smile" style="border:0;" />&nbsp; Keep up the good work ...</p>

<p>Looking forward to playing around with this ...</p>]]></content:encoded>
      <pubDate>Fri, 18 Feb 2011 10:51 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17471#date:10:51</guid>
    </item>
  
		<item>
      <title>Comment by AP</title>
      <description>Looks like some great stuff. The only question I have is: will you also have a HasAndBelongsToMany relationship, where both Models can have associations to many of the other model? If this will not be there directly, will it be extensible enough for us to &#8220;add&#8221; it in?</description>
      <content:encoded><![CDATA[<p>Looks like some great stuff. The only question I have is: will you also have a HasAndBelongsToMany relationship, where both Models can have associations to many of the other model? If this will not be there directly, will it be extensible enough for us to &#8220;add&#8221; it in?</p>]]></content:encoded>
      <pubDate>Wed, 16 Feb 2011 05:06 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17348#date:05:06</guid>
    </item>
  
		<item>
      <title>Comment by David Kaneda</title>
      <description>@Dmitry, @Mike, @Andreas — Very sorry for the troubles guys. We&#8217;ve had a few issues about the feeds pointed out since launch, and I get the feeling it reloads the feed each time we change the template. I don&#8217;t believe this will continue through new posts, but will keep a close eye on it.</description>
      <content:encoded><![CDATA[<p>@Dmitry, @Mike, @Andreas — Very sorry for the troubles guys. We&#8217;ve had a few issues about the feeds pointed out since launch, and I get the feeling it reloads the feed each time we change the template. I don&#8217;t believe this will continue through new posts, but will keep a close eye on it.</p>]]></content:encoded>
      <pubDate>Thu, 10 Feb 2011 09:30 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17170#date:09:30</guid>
    </item>
  
		<item>
      <title>Comment by Alexey</title>
      <description>I think current models are too coupled with proxies. In my application I use persistence.js and implementing custom proxy for it is real pain.

Also it is very bad that controls, such as DataView require to use ext store. In my case it would be much simplier to use my persistence.js models directly.</description>
      <content:encoded><![CDATA[<p>I think current models are too coupled with proxies. In my application I use persistence.js and implementing custom proxy for it is real pain.</p>

<p>Also it is very bad that controls, such as DataView require to use ext store. In my case it would be much simplier to use my persistence.js models directly.</p>]]></content:encoded>
      <pubDate>Thu, 10 Feb 2011 06:58 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17160#date:06:58</guid>
    </item>
  
		<item>
      <title>Comment by Alexey</title>
      <description>Does belongTo association supported inside XTemplate? Could you provide some simple example.</description>
      <content:encoded><![CDATA[<p>Does belongTo association supported inside XTemplate? Could you provide some simple example.</p>]]></content:encoded>
      <pubDate>Thu, 10 Feb 2011 06:52 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17159#date:06:52</guid>
    </item>
  
		<item>
      <title>Comment by Alexey</title>
      <description>Do HTML 5 LocalStorage supports Associations?</description>
      <content:encoded><![CDATA[<p>Do HTML 5 LocalStorage supports Associations?</p>]]></content:encoded>
      <pubDate>Thu, 10 Feb 2011 06:48 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17158#date:06:48</guid>
    </item>
  
		<item>
      <title>Comment by ibnesayeed</title>
      <description>According to Microformat RESTful URL documentation given in the post, URLs should have an extension attached to them to convey the desired response format (no extension defaults to HTML).

proxy: &#123;
&amp;nbsp; type: &#8216;rest&#8217;,
&amp;nbsp; url : &#8216;/users&#8217;,
&amp;nbsp; reader: &#8216;json&#8217;
&#125;

For example, above configuration should generate following URLs.

GET /users.json
GET /users/1.json
POST /users/1.json[?_method=PUT/DELETE]

Similarly, if reader is configured for XML, then URLs should contain &#8220;.xml&#8221; suffix instead of .json.

Will ExtJS 4 support this convention automatically (or may be a configuration for this pattern?)

I am concerned about this, mainly because I use Ruby on Rails with ExtJS. And I configure my Rails application to respond in HTML, JSON and XML all three formats. HTML for SEO purposes, JSON to serve my ExtJS application and XML for cross&#45;site web services.</description>
      <content:encoded><![CDATA[<p>According to Microformat RESTful URL documentation given in the post, URLs should have an extension attached to them to convey the desired response format (no extension defaults to HTML).</p>

<p>proxy: &#123;<br />
&nbsp; type: &#8216;rest&#8217;,<br />
&nbsp; url : &#8216;/users&#8217;,<br />
&nbsp; reader: &#8216;json&#8217;<br />
&#125;</p>

<p>For example, above configuration should generate following URLs.</p>

<p>GET /users.json<br />
GET /users/1.json<br />
POST /users/1.json[?_method=PUT/DELETE]</p>

<p>Similarly, if reader is configured for XML, then URLs should contain &#8220;.xml&#8221; suffix instead of .json.</p>

<p>Will ExtJS 4 support this convention automatically (or may be a configuration for this pattern?)</p>

<p>I am concerned about this, mainly because I use Ruby on Rails with ExtJS. And I configure my Rails application to respond in HTML, JSON and XML all three formats. HTML for SEO purposes, JSON to serve my ExtJS application and XML for cross-site web services.</p>]]></content:encoded>
      <pubDate>Thu, 10 Feb 2011 06:47 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17157#date:06:47</guid>
    </item>
  
		<item>
      <title>Comment by Andreas</title>
      <description>Yeah, the regular flooding with all recent posts on Sencha blog is starting to get on my nerves, too.</description>
      <content:encoded><![CDATA[<p>Yeah, the regular flooding with all recent posts on Sencha blog is starting to get on my nerves, too.</p>]]></content:encoded>
      <pubDate>Thu, 10 Feb 2011 06:44 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17156#date:06:44</guid>
    </item>
  
		<item>
      <title>Comment by Mike</title>
      <description>I second the RSS comment.&amp;nbsp; I don&#8217;t want to unsubscribe, but may need to if I keep getting the entire feed history on every new post (using google reader)</description>
      <content:encoded><![CDATA[<p>I second the RSS comment.&nbsp; I don&#8217;t want to unsubscribe, but may need to if I keep getting the entire feed history on every new post (using google reader)</p>]]></content:encoded>
      <pubDate>Wed, 09 Feb 2011 21:57 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17120#date:21:57</guid>
    </item>
  
		<item>
      <title>Comment by Dmitry</title>
      <description>Please fix your RSS, it floods my reader for a week already after each new post! And please, put a link on a news title.</description>
      <content:encoded><![CDATA[<p>Please fix your RSS, it floods my reader for a week already after each new post! And please, put a link on a news title.</p>]]></content:encoded>
      <pubDate>Wed, 09 Feb 2011 20:34 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17117#date:20:34</guid>
    </item>
  
		<item>
      <title>Comment by Andrew Peacock</title>
      <description>Hi,
Looking great. Again, I&#8217;ve got the same concerns as &#8216;cmwalolo&#8217; above. Being able to call just the &#8220;users&#8221; (to show a list of user data only) vs having to load &#8220;users&#8221; + &#8220;orders&#8221; + &#8220;order items&#8221;.... well, that raises some major concerns on my part. Why shuffle data around from server to client that might not be needed?
Regards,
Andy</description>
      <content:encoded><![CDATA[<p>Hi,<br />
Looking great. Again, I&#8217;ve got the same concerns as &#8216;cmwalolo&#8217; above. Being able to call just the &#8220;users&#8221; (to show a list of user data only) vs having to load &#8220;users&#8221; + &#8220;orders&#8221; + &#8220;order items&#8221;.... well, that raises some major concerns on my part. Why shuffle data around from server to client that might not be needed?<br />
Regards,<br />
Andy</p>]]></content:encoded>
      <pubDate>Wed, 09 Feb 2011 12:59 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17104#date:12:59</guid>
    </item>
  
		<item>
      <title>Comment by Nicolas BUI</title>
      <description>@Francesco, @cmwalolo In the example, it seem that is not &#8220;in demand&#8221; at all. Instead, you have to provided the associated data directly in the base request.

&#8220;On demand&#8221; or &#8220;lazy load&#8221; can be done but difficult to implement and would required many  callback to be chained.</description>
      <content:encoded><![CDATA[<p>@Francesco, @cmwalolo In the example, it seem that is not &#8220;in demand&#8221; at all. Instead, you have to provided the associated data directly in the base request.</p>

<p>&#8220;On demand&#8221; or &#8220;lazy load&#8221; can be done but difficult to implement and would required many  callback to be chained.</p>]]></content:encoded>
      <pubDate>Wed, 09 Feb 2011 09:04 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17101#date:09:04</guid>
    </item>
  
		<item>
      <title>Comment by Martijn</title>
      <description>What I do not see is ext.direct support in sencha touch how about extjs 4 and direct?
I love the approach of ext.direct&#8230;.</description>
      <content:encoded><![CDATA[<p>What I do not see is ext.direct support in sencha touch how about extjs 4 and direct?<br />
I love the approach of ext.direct&#8230;.</p>]]></content:encoded>
      <pubDate>Wed, 09 Feb 2011 08:50 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17100#date:08:50</guid>
    </item>
  
		<item>
      <title>Comment by Francesco</title>
      <description>I have the same doubt as comment #2</description>
      <content:encoded><![CDATA[<p>I have the same doubt as comment #2</p>]]></content:encoded>
      <pubDate>Wed, 09 Feb 2011 07:27 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17099#date:07:27</guid>
    </item>
  
		<item>
      <title>Comment by Nicolas BUI</title>
      <description>It sound cool, but i would like to see real world usage  When will we able to have an preview or beta release ?

Best regards and hang on !</description>
      <content:encoded><![CDATA[<p>It sound cool, but i would like to see real world usage <img src="/images/smileys/smile.gif" width="19" height="19" alt="smile" style="border:0;" /> When will we able to have an preview or beta release ?</p>

<p>Best regards and hang on !</p>]]></content:encoded>
      <pubDate>Wed, 09 Feb 2011 00:07 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17089#date:00:07</guid>
    </item>
  
		<item>
      <title>Comment by John Thompson</title>
      <description>Looks pretty cool &#45; can&#8217;t wait to try it out!</description>
      <content:encoded><![CDATA[<p>Looks pretty cool - can&#8217;t wait to try it out!</p>]]></content:encoded>
      <pubDate>Tue, 08 Feb 2011 23:24 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17087#date:23:24</guid>
    </item>
  
		<item>
      <title>Comment by daiei27</title>
      <description>P.S.&amp;nbsp; Thanks for these great blog entries.</description>
      <content:encoded><![CDATA[<p>P.S.&nbsp; Thanks for these great blog entries.</p>]]></content:encoded>
      <pubDate>Mon, 31 Jan 2011 20:06 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17075#date:20:06</guid>
    </item>
  
		<item>
      <title>Comment by daiei27</title>
      <description>No wishlist here.&amp;nbsp; Just wanna say I welcome the improvements and I know you&#8217;re working hard to add more all the time.

Can&#8217;t wait to try version 4 whenever it comes out!</description>
      <content:encoded><![CDATA[<p>No wishlist here.&nbsp; Just wanna say I welcome the improvements and I know you&#8217;re working hard to add more all the time.</p>

<p>Can&#8217;t wait to try version 4 whenever it comes out!</p>]]></content:encoded>
      <pubDate>Mon, 31 Jan 2011 04:05 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17084#date:04:05</guid>
    </item>
  
		<item>
      <title>Comment by Dmitriy Pashkevich</title>
      <description>1) From the example above it seems that the convert function for a field is called automatically because of the line &#8216;console.log(abe.get(&#8216;height&#8217;)); //logs 193 (inches converted to centimeters)&#8217;. Is this true or there&#8217;s an error in this example?

2) I second Christiaan&#8217;s question about hasMany with plural word as value. Maybe this is resolved automatically because there&#8217;s backward reference belongsTo in the Order model? And not specifying belongsTo in your example would break things?

3) Are the validations defined for a model only invoked manually or I can configure so that the validation is automatically performed, say, on &#8216;save&#8217; action (similarly to form submit)?</description>
      <content:encoded><![CDATA[<p>1) From the example above it seems that the convert function for a field is called automatically because of the line &#8216;console.log(abe.get(&#8216;height&#8217;)); //logs 193 (inches converted to centimeters)&#8217;. Is this true or there&#8217;s an error in this example?</p>

<p>2) I second Christiaan&#8217;s question about hasMany with plural word as value. Maybe this is resolved automatically because there&#8217;s backward reference belongsTo in the Order model? And not specifying belongsTo in your example would break things?</p>

<p>3) Are the validations defined for a model only invoked manually or I can configure so that the validation is automatically performed, say, on &#8216;save&#8217; action (similarly to form submit)?</p>]]></content:encoded>
      <pubDate>Thu, 27 Jan 2011 00:23 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17083#date:00:23</guid>
    </item>
  
		<item>
      <title>Comment by Alexander Hartmaier</title>
      <description>I hope it will be also able to deal with mightHave relationships (when the foreign key column is allowed to be null).</description>
      <content:encoded><![CDATA[<p>I hope it will be also able to deal with mightHave relationships (when the foreign key column is allowed to be null).</p>]]></content:encoded>
      <pubDate>Wed, 26 Jan 2011 15:50 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17082#date:15:50</guid>
    </item>
  
		<item>
      <title>Comment by Christiaan</title>
      <description>In your example where you regModel User, you say hasMany: &#8216;Orders&#8217; (plural). I dont see anything called Orders. I see a model called order (singular). 

What&#8217;s the meaning of a hasMany property referring to something that does not exist in the example? The Sencha Touch API docs shows this (which makes more sense)
hasMany: &#123;model: &#8216;Product&#8217;, name: &#8216;products&#8217;&#125;</description>
      <content:encoded><![CDATA[<p>In your example where you regModel User, you say hasMany: &#8216;Orders&#8217; (plural). I dont see anything called Orders. I see a model called order (singular). </p>

<p>What&#8217;s the meaning of a hasMany property referring to something that does not exist in the example? The Sencha Touch API docs shows this (which makes more sense)<br />
hasMany: &#123;model: &#8216;Product&#8217;, name: &#8216;products&#8217;&#125;</p>]]></content:encoded>
      <pubDate>Wed, 26 Jan 2011 12:28 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17081#date:12:28</guid>
    </item>
  
		<item>
      <title>Comment by Dimitris</title>
      <description>I second question (2) from Alex.
One of the most complex validations I&#8217;ve ever had to work with and one of the trickiest to get right is field inter&#45;dependent validation. Let me give you a few examples:
1) Either field A or B is mandatory.
2) Neither A or B is mandatory, but if C is filled, one of them needs to be filled too.
etc.
Of course, most of the times you end up writing a custom function for these validations, but I&#8217;d like to see a framework that handles these in an elegant and consistent manner.</description>
      <content:encoded><![CDATA[<p>I second question (2) from Alex.<br />
One of the most complex validations I&#8217;ve ever had to work with and one of the trickiest to get right is field inter-dependent validation. Let me give you a few examples:<br />
1) Either field A or B is mandatory.<br />
2) Neither A or B is mandatory, but if C is filled, one of them needs to be filled too.<br />
etc.<br />
Of course, most of the times you end up writing a custom function for these validations, but I&#8217;d like to see a framework that handles these in an elegant and consistent manner.</p>]]></content:encoded>
      <pubDate>Wed, 26 Jan 2011 11:42 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17080#date:11:42</guid>
    </item>
  
		<item>
      <title>Comment by John Dunlap</title>
      <description>Looks awesome! You guys are definitely headed in the right direction here. However, I do have some comments that I would hope you would take as constructive criticism and not an effort to belittle your efforts because I can assure you that is not my intention!!! 

Having said that, I&#8217;m wondering the same thing as cmwalolo. 

Your new data package reminds me a lot of the JPA(Java Persistence API) which is a good thing in my book. However, JPA allows you to declaratively set the fetch type that you want to use to query an association. You set FetchType.LAZY on an association so that relationships between entities are not queried unless the data is actually needed or FetchType.EAGER on the association to immediately query all associated entities. It&#8217;s actually pretty important from a performance standpoint. You can bring the server to its knees pretty easily if you have a lot of entities with FetchType.EAGER associations to other entities because you end up unwittingly pulling large chunks of the database into memory with a single method call. The examples above remind me of FetchType.EAGER and I am worried that this could result in pulling a lot of data across the wire that your application may or may not have needed.

Again, I appreciate your work, your work looks awesome, and I think you&#8217;re headed in the right direction!

Cheers!
&#45;John</description>
      <content:encoded><![CDATA[<p>Looks awesome! You guys are definitely headed in the right direction here. However, I do have some comments that I would hope you would take as constructive criticism and not an effort to belittle your efforts because I can assure you that is not my intention!!! </p>

<p>Having said that, I&#8217;m wondering the same thing as cmwalolo. </p>

<p>Your new data package reminds me a lot of the JPA(Java Persistence API) which is a good thing in my book. However, JPA allows you to declaratively set the fetch type that you want to use to query an association. You set FetchType.LAZY on an association so that relationships between entities are not queried unless the data is actually needed or FetchType.EAGER on the association to immediately query all associated entities. It&#8217;s actually pretty important from a performance standpoint. You can bring the server to its knees pretty easily if you have a lot of entities with FetchType.EAGER associations to other entities because you end up unwittingly pulling large chunks of the database into memory with a single method call. The examples above remind me of FetchType.EAGER and I am worried that this could result in pulling a lot of data across the wire that your application may or may not have needed.</p>

<p>Again, I appreciate your work, your work looks awesome, and I think you&#8217;re headed in the right direction!</p>

<p>Cheers!<br />
-John</p>]]></content:encoded>
      <pubDate>Wed, 26 Jan 2011 11:33 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17079#date:11:33</guid>
    </item>
  
		<item>
      <title>Comment by Alex</title>
      <description>1. Is there a reason why validations are a separate property of the model, rather than part of the field definition itself (like the conversion functions)?&amp;nbsp; If the validation is tied to a single field, it just feels like it would be more natural as part of that field&#8217;s definition.

2. Can you do multi&#45;field validations?&amp;nbsp; i.e. the valid value of field B depends on the value of field A.</description>
      <content:encoded><![CDATA[<p>1. Is there a reason why validations are a separate property of the model, rather than part of the field definition itself (like the conversion functions)?&nbsp; If the validation is tied to a single field, it just feels like it would be more natural as part of that field&#8217;s definition.</p>

<p>2. Can you do multi-field validations?&nbsp; i.e. the valid value of field B depends on the value of field A.</p>]]></content:encoded>
      <pubDate>Wed, 26 Jan 2011 11:16 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17078#date:11:16</guid>
    </item>
  
		<item>
      <title>Comment by cmwalolo</title>
      <description>Does the data model get the children (only on demand) using the REST functionality as in this example ?

GET /user/123/order/1

GET /user/123/order/1/orderitems or

GET /order/1/orderitems</description>
      <content:encoded><![CDATA[<p>Does the data model get the children (only on demand) using the REST functionality as in this example ?</p>

<p>GET /user/123/order/1</p>

<p>GET /user/123/order/1/orderitems or</p>

<p>GET /order/1/orderitems</p>]]></content:encoded>
      <pubDate>Wed, 26 Jan 2011 10:58 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17077#date:10:58</guid>
    </item>
  
		<item>
      <title>Comment by Jay Garcia</title>
      <description>Have you guys done performance tests w/ the new association modeling?</description>
      <content:encoded><![CDATA[<p>Have you guys done performance tests w/ the new association modeling?</p>]]></content:encoded>
      <pubDate>Wed, 26 Jan 2011 10:41 GMT</pubDate>
      <guid isPermaLink="false">http://www.sencha.com/blog//ext-js-4-anatomy-of-a-model#id:17076#date:10:41</guid>
    </item>
  
		
	</channel>
</rss>