databinding in ExtJS sucks

For some of our Web2.0 projects we are using ExtJS [1] as the client side “framework”.

ExtJS applications look very nice, but if you check what’s going on below the surface, one is has some doubts about its “enterprise grade”.

One of ExtJS’s major problems is that most of the time data binding is only one way (from server to the browser) but not the way back.

Usually data binding consists of a number of steps:

  1. both server and client have to agree on a common “language” that describes the data they want to exchange (typically XML along with XSD or just plain JSON)
  2. the client (=ExtJS) calls some service on the server
  3. the server sends the data in the predefined format
  4. the client typically puts the received data into so called “Stores”. Such a store contains records, each of them representing something like a “row” as found in “traditional” relational databases
  5. the client displays certain UI elements (a textfield, dropdowns, …) that are linked to the data received previously
  6. if the user now changes some of the data displayed, it would seem logical that the data in the store is updated according to the users changes – but that is not so. There is no (easy) way back into the store, where the original data is located.

That is one of the reasons, why we are not developing new applications using ExtJS anymore but smartclient [2] instead, but that’s another story 🙂

However, for existing applications we still need to find new and “fascinating” workarounds to achieve what we need …

[1] http://www.extjs.com/
[2] http://www.smartclient.com/

Spread the love

4
Leave a Reply

avatar
4 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Anonymoustheseljers Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
jers
Guest

listeners:{
change:function(box){
box.getStore().commitChanges();
}
}

Whats so hard about that?

thesel
Guest

your example does not work for the “typical” scenario, where you have the dropdown populated by some basic data and don’t want to change the base data store upon selection change, but the “real” data store. The same applies for Editor Grids: imagine you have one “real” data store and one form constisting of various textfields and some editor grids. You cannot bind the editor grids to a partition of the “real” data store, instead you have to create seperate stores containing the wanted partitions and synchronize them back into the main store upon change. And that is just weird.… Read more »

Anonymous
Guest
Anonymous

Data binding from server to client then back to server from a ExtJS client can also be done with Ext.Ajax take a look at the documentation.

Anonymous
Guest
Anonymous

One reason. The others are “another story”.

The one reason is that “it doesn’t seem logical”.

Hmm.

Post Navigation