SenchaCon Day1: Ext 4 Architecture

Ed Spencer gives a talk on the Ext 4 architecture and focuses on the data package integration in this release.

It used to be you had to configure a proxy, reader and writer.  Now you define a store that has a model and proxy (with reader/writer underneath).  Models define fields, associations, validations, proxy and any other biz logic you need for it to perform its functions.  Stores use the model.

Example use Ext.regModel to define the model, “fields” to define the fields, and “hasMany” (and “belongsTo” to complete the relationship) to set-up the associations. Additionally, you can define validations and proxy which is pretty slick.  Once you have the model, you can define this in a store and create a callback function to traverse the items in the model.  Further, you can use this same model in a template to render this in a dataView.

Store now includes sorters and filters that can become “MixedCollections”.  This allows you to add/remove them any time. Ext.util.Sorter and Ext.util.Filter and perform these tasks anywhere in the application.

ExtJS4 extends proxies to include RestProxy on the server-side and WebStorageProxy and WebSqlProxy on the client-side. The latter two will manage this in persistent local storage.  WebSqlProxy allows for full relational access to the data. mediates between a store and a proxy for CRUD operations. allows you to combine operations into a single request.

Paging is improved  and provided by the store directly in ExtJS4.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s