Recently, I’ve started to play with the Ext JS JavaScript framework. I must admit that my JavaScript skills were not the best. I’m not a big fan of JavaScript. To me, they have taken a 4th generation language and made it very, very complicated. I mean how many lines do I really need to open a file? Ext JS follows on that thread. to make matters worse, it is an open source framework which means that documentation is sparse and the prevailing attitude is that frustration, diving into the deep end when learning to swim, and blunt, condescending, and partially non-helpful answers run amok.
The learning curve on Ext JS is very steep, but it’s worth it–I think. I’ve been fighting with it for about two to three weeks and I think I’m beginning to understand things. To, the creator’s credit, there are examples and the forums do contain helpful information, but some more samples in the API documentation would go a long, long way. Heck, it took me several hours to get a SimpleStore created. The problem lies, I think, in that the samples are fine, but limited. When you go to fit the example you find that it doesn’t fit you’re scenario and so you try to extend the scenario. Since there’s no theoretical explanations on some of this stuff, one’s left to figure it out on their own. Perhaps there is an explanation, but I haven’t found it. Perhaps it’s basic java knowledge that they expect you to know. In that case, even a simple explanation would have gone a long way.
For example, getting a basic grid started is, IMHO, unduly complicated. I can create an HTML table trivially–the tags make sense. Actually, setting up a grid itself is fairly easy. However, to populate it with data you need to connect it to a data store. OK, that seems like a good idea. So, when you create a data store you also need to create a reader. I’m still not certain what a data reader actually is or why the added complication of a reader is a good thing. It seems to me, at this stage in my learning, that the column model is in fact a reader and so I have doubly abstracted something with little gain. There are other aspects that still puzzle me. I get that a store is an abstract container of data and that a grid is the physical representation of that store. One of my problems comes in the form of the sorting and ordering of the data. to my mind any sorting and ordering of the data (after the initial load) would occur on the physical representation. So if I load data, sort the data, and then want to iterate over all cells in order of their new representation, I do not look to the grid, but to the store. This seems odd to me.
Perhaps it will start making sense to me. Perhaps not. All in all, though, I have to say that the framework produces some nice output that works very well. When making rich Web 2.0 apps, the framework seems to be very nice. I’m not entirely sure that it will break me from server-based applications, but it will be a worthwhile endeavor to learn.