mardi 23 décembre 2014

MVVM questions

Hello all,

I've been using extjs for projects since the time it was a wrapper for the yahoo library. I liked version 3 it was feeling solid(at least to me), then v4 came out(out of nowhere) and it was sluggish (again IMO), it bring the MVC stuff, but it was not really useful for a large or even medium project. One would end up with 4000 lines of global controller file, I end up adopting the pattern partially and still using v3 practices to accomplish the goal. Now v5 is out, even 5.1, again out of the blue, there are still number of problems with the v4 branch... anyway this is not the subject here, just typing thoughts, sorry.


Back to the subject. The examples are cool, framework is doing most of the work(cool), then you realize that your customers is not going to just click on grid row and clap hands when form is populated. In a normal scenario one would have to be able to populate complex interface with data coming from the grid row(record), talking about fields, number of grids(associations), ui changes and etc.


In the past I used to do form.loadRecord(record) and this was doing fine job, now the bind stuff works but not entirely, for example radiogroup requires hack in order to load. Now I have a store that holds records with associations, models are correct, server sends the data properly, but I cannot find a way to display the child data in another grid. IMO there is something wrong with the MVVM implementation and there is STILL something wrong with the data package.


To visualize the scenario:

Grid A, Model A, model is holding Customers with 'association' Contacts

Component B holding Form and Grid B(contact)


I managed to get to the point of two-way data binding between Grid A and the Form,

however is currently beyond me how to display the Contacts in Grid B.


I am sure that there is a way, however I want to kindly ask the people sitting behind sencha to put some more advanced examples online. Extjs is not like jquery that every second site is using to do couple of simple things on a webpage, thus showing how-to's like 'click the row and the form will change' while introducing a whole new architecture is not enough, we need to get at least couple of more complex scenarios like: when I click on a grid row a number of things needs to happen: form populated, grid loaded, conditional UI changes and etc. Otherwise all this MVVM implementation is like apple maps to me, just a WOW stuff, but at the end one would pull directions from google because he would want to go from point A to point B and don't care of the airplane view of NY that apple maps offer. You get my point.






MVVM questions

Aucun commentaire:

Enregistrer un commentaire