PDA

View Full Version : I am very frustrated with ExtJS...especially the documentation



alucard001
18 Mar 2009, 8:04 PM
Hi all.

First of all, sorry for my bad attitude on the coming message, but I am really really frustrated and disappointed with both learning ExtJS & using the documentation.

I am a PHP programer and usually use jQuery for my web project. I am a newbie in ExtJS and know little about this. Recently my job required me to use ExtJS as standard of JS library to do some drag & drop thing.

I therefore want to quickly pick up this and immediately dive into ExtJS documentation, forum and the book - Learning ExtJS (Talking about Ext 2.x). However...I found that ExtJS is VERY VERY HARD TO UNDERSTAND, especially the documentation and lack of examples.

Yes, I know that there is an example sections and I indeed read that, poor me I cannot understand that and often when I finished reading a "Tutorial", I ask myself "So what? How can this help to solve my problem???"

For example, my frustration start something like this: I read "Learning ExtJS" Drag & Drop section. At the first part talking about "Drop data", I came across with such function, indeed, I think this is a very basic function:



// dropNodeData-drop node data object
// source-drag zone which contained the dragged element
// event-the drag drop event
// dragNodeData-drag source data object
// this-destination drop zone
function drop(dropNodeData, source, event, dragNodeData) {
var dragged = source.dragData.ddel;
var sourceContainer = source.el.dom;
var destinationContainer = this.getEl();
sourceContainer.removeChild(dragged);
destinationContainer.appendChild(dragged);
return true;
}


"source" is dragsource object, I know that, but what is source.dragData.ddel????? I therefore go to Ext2.2.1 immediately to find what is inside dragsource object (Ext.dd.DragSource), guess what? THERE IS NOTHING CALLED "dragData"! Instead I got a function called getDragData(). Again, "So what? does it return an object which will contain ddel?"

How about "ddel"? My "Guess" is that it stands for "DragDropElement". Ok, I typed: ddel in doc, guess again? NOTHING SHOW!

Ok, so who can tell me WHY the "source" can acess "dragData.ddel;" ??? I can tell you that I also cannot find anything about that in parent class.

Let me give you the answer. I can find the dragdata.ddel inside a .js file, this is inside a comment. But the whole point is, how can you expect someone to dig into the source code and find what he/she wants? If everyone needs to read the source code, who need documentation?

By the way, the source code of Ext.dd.DragSource is NOT AVAILABLE.

http://www.extjs.com/deploy/dev/src/DragSource.js

And there are many other similar situation (I want to find something, but it does not appear in documentation).

Actually, I really want to request that, each & every methods/properties in documentation should have a short example on how to use it, just like PHP or jQuery. Although jQuery is not the best, but at least, I can understand:

- what will be available to a function called (Don't let me guess what is 'e', 't', even though I know that 'e' is for 'eventObject', don't assume that we know)
- what CAN BE returned
- the expected result

And of course, show me what this method can do for us!

I think, programmer just wants to know, what can be put inside, what can be expected, and if we 'copy and paste' this code to test, it JUST WORKS!

Again, sorry for my very bad attitudes towards both the community and ExtJS team, I just want ExtJS developer to know that, many many many times I feel extremely frustrated and unclear when I cannot find any method/properties in your documentation, which I expect it should.

evant
18 Mar 2009, 9:07 PM
In this specific example, it seems as though the docs have been misplaced, you'll see that

http://extjs.com/deploy/dev/docs/?class=Ext.dd.DragZone&member=getDragData actually contains the information you'll need. It should probably be moved up one level in the class hierarchy.

The source for ALL of Ext is freely available in the download, it's also online, we don't keep every single source file in the root:

http://extjs.com/deploy/dev/source/dd/DragSource.js

The documentation isn't perfect, however it's being constantly improved, there are usually at least a couple of changes to it each day, so your comments pointing out these issues are useful.

alien3d
18 Mar 2009, 9:25 PM
1.I create a program using 1 version.It's great and it's dam easy to manipulate to
php program.But starting 2.0 .Dam messy to redevelop again and difficult to manipulate as
what i'm thinking now.

Psss. Just waiting for 3.0 version and then buy the license.Like the way drag and drop and focus more on backend processing. :D:D

Animal
18 Mar 2009, 10:24 PM
Ah. The monthly "documentation is bad" thread.

Hmm. Compare the ease of use, and accessibility and navigability to say, the Google Maps "documentation".

You are aware that each method/config/property/event segment expands to offer more info?

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/expanded.jpg

Also, the DD docs have had some reauthoring for 3.0:

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/dragzone.jpg

Of course DD is one of the most difficult areas of the system. I've been using it since the yui-ext days, and I still take a while to get any new DD scheme going, and I still refer to the easily accessible source code.

Most other areas of the library are a piece of cake to understand compared to this, especially with the copious documentation available.

Have you seen the examples in your installation directory under examples/* ?

jay@moduscreate.com
19 Mar 2009, 3:07 AM
I always find it amusing when people complain about the Ext documentation, but have yet to provide anything superior in its competing space.

jay@moduscreate.com
19 Mar 2009, 5:16 AM
My Jaw dropped to see this:

http://developer.yahoo.com/yui/docs/index.html

Being used to the Ext documentation, seeing this was a little disappointing:

http://jqueryui.com/demos/

Animal
19 Mar 2009, 5:45 AM
yes, the YUI docs are technically complete and accurate. But the UI? Bleaugh!

I know YAHOO eat their own dogfood on their main site, and it does look great.

But their docs need to do the same thing!

vmorale4
19 Mar 2009, 6:03 AM
My Jaw dropped to see this:

http://developer.yahoo.com/yui/docs/index.html

Being used to the Ext documentation, seeing this was a little disappointing:

http://jqueryui.com/demos/

IMHO The YUI documentation might be ugly, but in terms of *content* it does a better job of helping newbie developers getting started. The YUI documentation is not just the API docs, but it also has an introductory page (with explanations) for *every* widget, i.e.:

Compare this:
http://developer.yahoo.com/yui/dragdrop/

To the two paragraph explanation and 3 lines of code given here:
http://extjs.com/deploy/dev/docs/?class=Ext.dd.DragDrop

Or the link @ Ext Manual (http://extjs.com/learn/Ext_Manual):
http://extjs.com/learn/Manual:Utilities:Drag_%26_Drop

It would be great if the API documentation of every widget had sort of an introductory page, either embedded in the API docs, or in a separate place (like YUI does). A prime candidate for the latter would be the Ext Manual

Animal
19 Mar 2009, 6:15 AM
Are you volunteering?;)

mabello
19 Mar 2009, 6:28 AM
IMHO the documentation is really good and with the examples folder and the use of the help forum you really have what it takes to use, understand and deliver good application with ext.
Of course, you need time and patience to learn how the framework works, no matter how good the documentation and the examples are.
The source files are there if you want to dig into the code to understand the details of what's going on under the hood.
I personally thank Nige in primis and the other guys for their hard work at the doc because it's really a great work and it is one of the great component which make Ext unique

jay@moduscreate.com
19 Mar 2009, 6:30 AM
I think my problem with the Yahoo documentation is the layout. That's why i say my jaw dropped.

Those examples pages deliver waaaaaaaaaaay too much at a single glance.

jay@moduscreate.com
19 Mar 2009, 6:34 AM
Another thing i favor Ext's documentation for is the ease of knowlege of what extends what. It was extremely easy to create this diagram for Ext JS in Action without touching an ounce of source code.

http://extjs.com/blog/wp-content/uploads/2009/03/extjs-in-action-component-tree.gif

VinylFox
19 Mar 2009, 6:57 AM
Personally, I think things are setup fine the way they are. Possibly the API ref could link to relevant examples (thoughts?), but I don't think the API ref should ever be a point to start the learning process.

The API ref needs to stay lean, needs to be used as a reference for checking what arguments are passed to what, the options for a particular config, etc. Its a place for developers already familiar with the library to go and look things up.

The SDK download has plenty of examples, organized by type - this is a huge resource to learn from. Exploratory learning is a great thing. Use FireBug, browse source code, mess with the examples. Concentrate young grasshopper.

PS. D&D is complex in any library.

vmorale4
19 Mar 2009, 7:14 AM
Are you volunteering?;)

Of course! I always log tickets in documentation bug tracker write comments in the documentation thread. ;)