I have entered into an existing project that is all about maintaining nested data structures. You have companies which are assigend to accounts, and contacts and notes and... basically the usual bunch of 1:1, 1..n, n:m Database relations, stored in mysql or postgres, wrapped by Doctrine.
Of course, every node comes with the usual set of metadata, that needs validation in terms of type (number, text, ...) and semantically (email, url, 'enums' like status, type, currency).
More specifically what I stepped into I would describe (also from previous experience) as typical ExtJS hell. Does this sound familiar to anyone?
- a typical single URL-Application: No history, no meaningful specific bookmarks, oh and dare you pressing the back button...
- tabbed browsing is impossible (the not so rare use case of looking at Customer A, while entering something meaningful into Account or Customer B side-by-side)
- you have that typical navigation tree on the left, the stuff on the right is called in by Ajax. Data, but also a lot of executable java code.
- a strong "MS Office feel": CSS sprites are far, far way, simple pullDowns and multiple-Choice buttons need effort to be 'dressed down' to be usable.
- Not to mention all the clobbered div-s as opossed to few clean, semantically meaningful tags
From previous experience I would LOVE to switch this to a straight REST-ful API, stuff is actually done between page request, the URl gives it to you just as it should look:
And make the whole think jQuery-based, where I gain more control. That brings me to my general question: Do I miss a middle layer?
Trouble: I wonder, how to fill certain gaps (that other 'Converts' are likely to encounter, too, hence I dare to ask such broad question):
what plugins would be good for (editable) tables? Including resizable, sortable comments? I know about jQueryUI and jQueryTools but I don't think that alone fits the bill. I need a really good table/grid think, probably with backend routines that fit.
*Generally speaking, I feel, that I miss a middle layer between ORM and UI if I tinker with data structures, can I bring some automatism like "Here's my data structure, including types and validation rules, (oh, and the exisiting/default data) now build the form from it" Since this might vary from customer to customer, is another reason to not complete hardcode this to much.
Also the Ext-JS-ish store functionaliy of only sending back fields that truly changed would be worthwhile. As is recognizing dirty-ness (aka the need to confirm 'save/cancel' on dialog closing).*
- Very valuable would be generic mechanisms of "tentativene sub-Dialogs", e.g. Windows Screensaver do: So going into a Menu, from there to a submenu, saying ok on sub-dialog, then cancel on main ==> cancels the whole thing, nothing stored. In other words: Storing a few hierarchical data sets flexibly in the Session would be good. And pushing them into the DB (by repetive, generic means) when I got the actual "OK".
Any good pointers for me the table-editing part in the frontend and/or the data-structure middle part?
Thank you, Danke, Merci, Mille grazie, Xie xie!