Newbie: Poor docs!! many examples, but none of them gives basic/setup and other info for a newbie.
Newbie: Poor docs!! many examples, but none of them gives basic/setup and other info for a newbie.
I am a newbie JQuery Datatables (and have some basic knowledge on JQuery) and having hard-time understanding the setup and required js files and dependencies; I see the documentation is missing in terms of how to consume JQuery and JQuery database (dependencies and how to setup them locally and so on); I have setup now (after trial and error from different examples over the web)
Most of the example use a '#example' table that is very rudimentary. Most real world application require pulling the data from the server and updating them in a grid and doing a lot of interactions. I would be wonderful to see a documentation that explains a setup for the real scenario.
I am going through sites after sites to see the same examples are regurgitated every where and the examples that seem to pull data from server they are not complete, it is just pieces of the example. The site just says the 'datatable' is easy / and easy and that is only part that is easy... (when writing documentation please write from a consumer point and not from software developer (your) point of view)
I am also not able to find a single documentation that tells me which files (js files) have to be consumed (at a bare minimum requirements and dependencies)
Is there a good incremental documentation/examples that shows installation, initial setup, examples for static and then server side so we can consume this as easily as possible (and that is how it should be I suppose).
Thanks.
Most of the example use a '#example' table that is very rudimentary. Most real world application require pulling the data from the server and updating them in a grid and doing a lot of interactions. I would be wonderful to see a documentation that explains a setup for the real scenario.
I am going through sites after sites to see the same examples are regurgitated every where and the examples that seem to pull data from server they are not complete, it is just pieces of the example. The site just says the 'datatable' is easy / and easy and that is only part that is easy... (when writing documentation please write from a consumer point and not from software developer (your) point of view)
I am also not able to find a single documentation that tells me which files (js files) have to be consumed (at a bare minimum requirements and dependencies)
Is there a good incremental documentation/examples that shows installation, initial setup, examples for static and then server side so we can consume this as easily as possible (and that is how it should be I suppose).
Thanks.
This discussion has been closed.
Replies
So what exactly is your problem? Can you not build on what you have set up?
I'm hoping that the new documentation will really help and I will hugely appreciate feedback then they are available. The forum takes up so much time at the moment that there isn't the time to do documentation and development as much as I would like. That's something that I need to address, with the current hope that better document will save everyone's time...
Having said that, I will always assume a base level of using jQuery and JavaScript. There are millions of books available to teach those, and writing the DataTables documentation alone is a mammoth task!
Allan
Knowing JQuery or JS is one thing.. For someone who is new to a framework it takes a lot of effort to understand things.. The documentation should be written from a consumer point of view...
Let me give an example of what I was talking about...
Your example of "Initialization Code" (I customized this and changed it to 'mytable' and other attributes...)
$(document).ready(function() {
$('#example').dataTable();
} );
This is good for basic example, but, which js to include, what files to download... This part was okay... Finally, I got this part working by looking at various blogs/sites etc (I made a few mistakes myself and that prolonged my issues as well).
Now, I am trying to make my table editable;
Initialisation code (Your example) -
$(document).ready(function() {
/* Init DataTables */
var oTable = $('#example').dataTable();
// Added this part into the code.. (not working)
/* Apply the jEditable handlers to the table */
$('td', oTable.fnGetNodes()).editable( '../examples_support/editable_ajax.php', {
...... more...h
I use this code, and my table does not become editable... how do I apply jeditable handler? how do I debug? where would I look.. what am I missing?... many other examples/sites/blogs later... I am still searching... because most other examples are regurgitation of the same examples you have given... And, there is one other example which calls a 'makeEditable', but, unfortunately, that talks about data manager plugin.. I don't know whether that is same API or different...
one other example talks about using the class value (".editable") obviously I know it is a css class object... but which one do I use "tr td" or ".editable" (may be both will work) but changing each time and trying different things without knowing concretely... ? I did change this and tried but still did not work... don't know what was the issue... (may be it is a simple step I missed, could be my mistake, but could not proceed further)
also many of your examples uses php... I had to work with Java/Struts/JSP etc... I actually know php so I was able to look and understand certain things which helped not all may know php...
My suggestion as a start would be please show a full example (entire source code in HTML/Javascript) for a basic grid, with static data (non-server side) and another one with server side processing (both editable and non-editable with all their dependencies). People can then customize the same to their target environment (jsp, php, ruby whichever)...
Hope this helps...
Thanks.
> This is good for basic example, but, which js to include, what files to download... This part was okay...
I've often been told the exact opposite! This part will, without doubt, be much easier in the new documentation, one way or another.
> I use this code, and my table does not become editable... how do I apply jeditable handler? how do I debug? where would I look.. what am I missing?... many other examples/sites/blogs later... I am still searching... because most other examples are regurgitation of the same examples you have given...
There are only two jEditable examples on this site I think (rehashed in the forums a lot probably), one with client-side processing and one with server-side. They are, I fully acknowledge incomplete. The new site will be using Editor ( https://editor.datatables.net ) as the editing component for DataTables, since I am able to fully support that software.
> And, there is one other example which calls a 'makeEditable', but, unfortunately, that talks about data manager plugin.. I don't know whether that is same API or different...
The `makeEditable` extension to DataTables is 3rd party (deprecated by its author) software, which shouldn't have any documentation what so ever on this site. It is mentioned in the forums a few times, but isn't something I can support.
> also many of your examples uses php... I had to work with Java/Struts/JSP etc... I actually know php so I was able to look and understand certain things which helped not all may know php...
Agreed! I have to use something though and don't want to hold development back by writing the same thing in 5 different languages. This also is something I need to figure out a way of resolving.
> My suggestion as a start would be please show a full example (entire source code in HTML/Javascript) for a basic grid, with static data (non-server side)
That basically is the plan. And then built it up from there.
Thanks for the feedback!
Regards,
Allan
The SQL used for DataTables server-side processing is used here: https://github.com/DataTables/DataTables/blob/master/examples/server_side/scripts/data.sql .
Or are we talking about editing? In which case: https://editor.datatables.net/tutorials/installing
Failing that - what can I improve?
Allan
http://code.google.com/p/jquery-datatables-in-line-editing/downloads/detail?name=CreativePathExample.zip&can=2&q=
It's a real basic working example that reads/write from a database. I got this up and running really quick. I wish I had stumbled on this earlier. It would have saved me a few days of work not to mention frustrations. It's exactly what I wished for, which was an example I could just plop into my www folder that includes a database I could just import.
Just follow the directions in readme.php. Only problem I encountered was an error when importing the sql file into mysql database in phpmyadmin was that it didn't recognize " latin1$$". This was easily solved by removing "DEFAULT CHARSET=latin1$$" from the file.