My own wishlist for the future of Datatables
My own wishlist for the future of Datatables
I noticed a few cool things about the JqueryUI grid mockups on this page:
http://jqueryui.pbworks.com/GridTable
I'd love to see Datatables beat them to the punch, so that a separate plugin is not needed by the jqueryui team. Or perhaps, to see Datatables included by default in JqueryUI (although, I'm not sure if the jqueryui team has ever included an existing widget into the code instead of writing one from scratch).
The features I'd like to see fall into the category of `Actions` or perhaps `CRUD` statements: create/new, update/edit, and delete/remove.
Here is a picture of the features specifically:
http://lh4.ggpht.com/_ovoDcbMIoYs/S5rdzMRp5gI/AAAAAAAAAgQ/0RTtPtp1IfE/s512/wishlist_datatables_from_jqueryui_grid.png
I add (about 80% of the time) some sort of CRUD command for each row in the Datatables. So I'd like a uniform, consistent, easy way of displaying these commands.
Perhaps if there was a way of setting the actions in an associative array setting such as (overlook my poor syntax) just another setting on initialization:
[code]
http://jqueryui.pbworks.com/GridTable
I'd love to see Datatables beat them to the punch, so that a separate plugin is not needed by the jqueryui team. Or perhaps, to see Datatables included by default in JqueryUI (although, I'm not sure if the jqueryui team has ever included an existing widget into the code instead of writing one from scratch).
The features I'd like to see fall into the category of `Actions` or perhaps `CRUD` statements: create/new, update/edit, and delete/remove.
Here is a picture of the features specifically:
http://lh4.ggpht.com/_ovoDcbMIoYs/S5rdzMRp5gI/AAAAAAAAAgQ/0RTtPtp1IfE/s512/wishlist_datatables_from_jqueryui_grid.png
I add (about 80% of the time) some sort of CRUD command for each row in the Datatables. So I'd like a uniform, consistent, easy way of displaying these commands.
Perhaps if there was a way of setting the actions in an associative array setting such as (overlook my poor syntax) just another setting on initialization:
[code]
This discussion has been closed.
Replies
Absolutely not rude at all - I want to actively encourage suggestions and ideas for future DataTables development, so we can all bash the ideas around in the forum a bit ad hopefully make DataTables more useful to the community a s a whole ( see for example the 1.7 plans thread: http://datatables.net/forums/comments.php?DiscussionID=1486 ). So thanks for your post - it is very welcome indeed!
I do like some of the mock ups on the jQuery UI wiki - I'm sure that at some point they will write their own component and deploy that as part of jQuery UI. Possibly a bit of a shame, given that DataTables and other grid software provides almost everything they are looking for in features - it would be great if they actively engaged with the plug-in authors. The DataTables code is not very "jQuery like" and doesn't use any widgets etc. Perhaps the 2.0.0 (whenever it happens - it would be great if it were done with the jQuery community involved) would be a bit more "friendly" for them, but I don't know to be honest.
So regarding your CRUD suggestion - the main reason that I've not included something like this already is that you could ask 10 developers to each create a CRUD application using DataTables, and you'd probably get 10 different implementations, with different UI interactions. For example, the 'delete' could be checkboxes with a single button at the bottom/top of the table, or one button for each row, or click row to select and then delete etc. Indeed you even mention that you've for a modal popup. As such I'm not keen on enforcing one particular method for uses of DataTables. Adding and editing rows would have a similar number of options (lightboxes spring to mind, new windows and so on).
As such, what I'm very keen to do is provide all the tools that are needed to create a CRUD application, but not to provide the actually adding / editing and deleting function (the server-side interaction is going to be unique for every application as well!).
If there is anything that DataTables could help with to make CRUD easier, that would be a great thing to implement. For example, what would your 'actionButtons.edit' button do? Would it just add an image (which could simply be in the table's HTML?) and then add an event to do some kind of editing, and submission of the edited data? There are a lot of options there :-)
Regards,
Allan
Perhaps the jQueryUI team is on the path towards creating their own grid widget. Even so, it will take years before their widget catches up to the features of Datatables, and by that time Datatables will have evolved into somewhere better! Ah well.
***
I would be happy seeing an `Allan` CRUD solution to Datatables. Something which (obviously) is not mandatory, but is something you *prefer*. That way, we can choose to use Allan-CRUD, or implement our own custom CRUD.
I like using a new page (instead of modal or lightbox) for editing a record. I use PHP MVC (I prefer CodeIgniter) most of the time, and having a new page for editing and a new page for creating-new-record is very simple, and straightforward.
But if Allan-CRUD involves using lightboxes for Edit/Insert/Delete, then I would consider it very carefully, because it would provide a consistent UI experience for my users.
***
By the way, I use Datatables on about 10 projects now. Here is one project:
http://websiteadvertisingnetwork.com/pub/product_embed_codes/7580
The admin area contains many more pages which use Datatables. Datatables has become essentially a standard part of my projects.
1. Yup - hopefully we can stay one step ahead of the game with DataTables :-). Yet another reason why contributions (ideas, plug-ins, support, code - whatever) are so warmly welcomed!
2. Heh "Allan-CRUD". It sounds wrong - but I see what you are getting at :-). It would indeed be great to have a couple of well designed and created demos (i.e. demos which have been thought about rather than bashed together like much of my code) which show of CRUD applications with DataTables. Lightbox, KeyTable and row editing string to mind...
What I think I would like to do is concentrate on the 1.7 release first and then can look at something like this. Rather hope that 1.7.x will be the last in the 1.x series - but I've thought that since about 1.5 :-).
3. Great stuff - thanks for the link. It is always very interesting to see how DataTables is being used, and it is great to know that it is proving to be useful.
Regards,
Allan
http://www.trirand.com/blog/
and here
http://dev.iceburg.net/jquery/tableEditor/demo.php