Just wondering if this module is still being maintained (it sure doesn't look like it :))?
I'm in the process of rebuilding most of a web application that currently uses Ext 2.2 and Drupal 6.x. The new version will still use D6 but will use Ext 4 instead of 2.2. At the moment the integration between Ext and Drupal is extremely limited and completely adhoc (the original app was custom built with PHP and Ext and then Drupal was tacked on at the last minute for "user management stuff"; some Drupal themed pages get loaded in iframes in Ext panels).
Thus I'm pretty keen on having a module to integrate Drupal and associated modules (eg Views) and Ext (v4). Of course people building new sites with Drupal and Ext are likely to use D7/8 and Ext4, so my case (D6 and Ext4) perhaps isn't so common. Perhaps it would be good to create an abstraction layer to handle different Ext versions (though I wouldn't have time do much on this). Also I'm not particularly sure what sort of integration I'm going to want other than say nodes (and CCK fields) <-> data models/records and Views <-> data stores (data stores and models were introduced in Ext4, data stores and models now back things like Trees and Grids and can pull data from a server via a reader "Proxy" in a similar JSON format to that used in Ext 2 (and I guess Ext 3).
In any case, I'll have a look at this module and see if I can modify it for my purposes in a generic fashion and post patches (or rewrites as the case may be).
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | ScreenShot145.jpg | 215.21 KB | pol |
| #4 | ext-20111014.tar_.gz | 36.83 KB | OliverColeman |
| #3 | ext.tar_.gz | 19.52 KB | OliverColeman |
Comments
Comment #1
OliverColeman commentedI just had a look at the status of Drupal 7 versions for some of the modules we're currently using and found that a lot of them are still in development or alpha stages (or not so usable beta stages), so we'll definitely be sticking with D6 for now, so perhaps D6 with Ext JS 4 isn't such an unlikely combination.
After thinking some more about other integration possibilities I thought it would be good to be able to use Ext as the layout manager (as this is one of its many strong points) and have a Drupal module that is something like Panels (or a plugin/modification of Panels) to specify (Ext) panel locations, properties and their content, as well as present an API something like modalframe does (or extend modalframe itself) to present windows (and/or modify modalframe_menu to use Ext)).
Would be good to know if anyone else is interested in similar functionality! Again, I plan on implementing something like the above some time soon (next few months).
Comment #2
OliverColeman commentedI've started working on a new Ext integration module (for D6 and Ext 4). My plans are below if anyone wants to provide suggestions, etc:
MVC
UI
Comment #3
OliverColeman commentedI've been beavering away at this for the last couple of weeks and attached is the result. It's not complete, only the MVC stuff has been implemented, and this should be considered pre-alpha. I'm posting this in the hopes that someone takes an interest and would like to make comments or help out.
The plans outlaid above have changed during implementation, mostly in regards to the UI for managing Models and Stores as I realised most of it was unnecessary and/or over-complicated things.
The current implementation provides:
* Loading of the Ext library and some basic settings.
* A hook-based API to allow other modules to specify Ext Model and Store definitions and code to support CRUD operations on them (although for Stores only the Retrieve operation is supported). There is also support for defining access/permission functions, and half the code required to allow server-side validation for Models. Using the definitions a JS file is generated that creates the Models and Stores in Ext on the client. The README.txt file details this API.
* A RESTful API for CRUD operations on Models and Retrieve operations on Stores. The Model and Store definitions in the generated JS file are automatically augmented with the appropriate Proxy definitions to communicate with the REST interface.
* Model definitions for nodes (one for each content type, including CCK fields) and users (including profile fields) and the supporting code for full CRUD operations on them via the REST interface. There is the beginnings of code to support comments, terms and files; using the existing code as an example it wouldn't take much to implement these. The node and user Model definitions automatically detect and generate definitions for relationships (known as associations in Ext) to other nodes and users (including via the CCK nodereference field), as well as most validations from standard node and user fields as well as CCK and profile fields (the code to handle server-side validation for PHP-generated "allowed values" lists for CCK fields is not yet implemented).
* Store definitions for Views (for each Views display). Additionally Models are generated for each View display that uses fields, however at the moment it is not possible to save instances of these Models (these is the beginnings of code for this, but it will require special handling for each type (nodes, users, comments, etc) to extract the save-able data from the field names that Views generates in its result objects.
Still to do are those things noted above as not yet implemented (although I don't know that I will have the time or inclination to implement all of them myself), as well as a UI for defining an Ext layout (perhaps this is a bit ambitious for now).
Comment #4
OliverColeman commentedHello, any out there?
Attached is the latest version of my rewrite. The code and API have been substantially modified since the last version I posted, I would now consider it alpha, rather than pre-alpha. :) I'm now pretty happy with the core Model and Store functionality (as well as with most of the Model and Store definitions provided) and don't expect this to change a whole lot.
For anyone interested, read the README.TXT in the base directory, it will make a lot of things clear and describes all the available hooks this new module provides. The file js/ext.test.js provides a very simple example of loading and saving some Model and Store data on the client-side.
I'm currently working on a tree Model and Store plugin, the model bit is mostly done, the store bit is still to be done. Then I'm planning on starting on the code to render Ext components into the page using the available Models and Stores.
EDIT: it's also my intention to provide integration with the Features module.
Comment #5
polIt seems to be a good start Oliver.
I always loved ExtJS without using into Drupal ! Let's see how it evolve ;-)
I think the first thing to do is to put your code on GIT, either on drupal.org either on GitHub, your call.
I've checked your code and I'm wondering if it's possible to use Services to provide CRUD functionnalities instead of rewriting them.
Comment #6
polThere is also a problem when trying to access to admin/build/ext/models, screenshot attached.
Comment #7
OliverColeman commentedHi Pol,
Thanks for the feedback. I'm in contact with apanag and have requested maintainership of this project, so hopefully the code will soon be posted as a new dev branch on this project.
I had a quick look around for modules providing REST functionality but didn't come across the Services module (only found unsuitable or unmaintained, not-very-useful modules), so thanks for the tip, it looks great.
I'll have a look into the error you found. The code is currently in a pretty large state of flux so errors like this will probably come and go for a while yet. ;) I'm working on the Model association definitions and loading nested Model instance data at the moment (it's broken in the latest posted code (was completely untested in fact)).
Cheers,
Oliver
Comment #8
OliverColeman commentedDiscussion for the rewritten module supporting Ext 4 has moved to #1316616: Roadmap for ext 2.0 (supporting Ext 4).
Comment #9
avpaderno