Book Review / Overview: “EXT JS In Action” by Jesus Garcia

Review:

3_5of5stars

Ext JS by Sencha is a terrific JavaScript framework for building Rich Internet Applications (http://www.sencha.com/products/extjs/). I’ve been using Ext JS since version 1.x, and do some pretty advanced stuff with it, so this is not a newbie review. To their credit, Sencha has superior API documentation and samples, compared to some other JavaScript frameworks I’ve used. I love the framework. However, I absolutely can’t stand the Sencha developer forums. The search is terrible, and there have been far too many snarky or rude posters there, so when I need more advanced information or insight, it’s not terribly easy to find. That’s why I was glad to see a Manning book that covers the Ext JS framework with in-depth examples.

I think the author has some terrific examples and he goes over the materials in a very organized way. Since finishing the book a couple of weeks ago, I’ve already picked it up to refer to some of the examples as references. I would have liked to give it a higher rating, since for me it had a ton of good stuff and good value, but I think a newbie would be very overwhelmed with the material. There is so much stuff here, that it’s going to be difficult to grok without multiple readings, and trying the code samples. For instance, I’m aware of the power of Ext JS configuration shortcuts, but I think it’s really confusing for new users, when there are multiple ways to do the same thing.

I would recommend this book, but if you’re thinking of buying this you might want to wait, because Ext JS 4.0 was officially released today, and it looks like there might be enough changes that an update to this book would be called for. But, based on this book, I already plan to dig into “Sencha Touch in Action”, by this same author. I know he’ll do his homework, and have very detailed examples. I’m looking forward to it.

Chapter by Chapter overview:

Chapter 1 – As in most books that are generally about one technology, Chapter 1 is an introduction to the Ext JS framework. It was written against the 2.x framework, even though the 3.x framework has been out for over a year now, and the 4.x framework was released today. It introduces the 6 core parts of Ext JS: Ext JS core, UI components, web remoting, data services, drag and drop, and general utilities. It contains a brief description of what makes up each part and then finishes off with a hello world example.

Chapter 2 – This covers Ext.onReady, waiting until the browser DOM is ready before executing JavaScript; Ext.Element, how you can manipulate the dom node by node easily with the methods on Element; and Templates and XTemplates, techniques for using the template engine to easily create simple or complex html fragments that can be inserted into a page. This is a nice chapter, but some of the advanced XTemplate usage really is advanced.

Chapter 3 – This is an introduction to events, components and containers. It’s a good overview, but if you’re brand new to ExtJS, I think it can be a little overwhelming. I’m not sure events should have been introduced before components.

Chapter 4 – This chapter introduces you to the window component, the panel component, the TabPanel, and the MessageBox. There are some good examples here, but you really need to try this stuff to understand it.

Chapter 5 – This goes over the various layouts provided with Ext JS. This is a really useful chapter, as, although the Sencha demos show very nice examples of the various layouts, it’s good to have some explanation of when/why you’d use one over another. The diagram of the layout hierarchy is also incredibly useful. Layouts in Ext JS were always something I stumbled with, so even after years of using them, I’ve learned something in this chapter. In fact, the concepts are the same as with Ext GWT, and I need to work on an Ext GWT layout today, so I’ll have the book open while I work.

Chapter 6 – It’s all about the forms, from FormPanel to FieldSets to individual form fields, like text and number fields, and the data store backed combobox. There’s a little of everything in this chapter. It touches on ajax form submission, with success and failure callbacks, and with complex form layouts. There’s so much packed in this one chapter that it might take someone new to Ext JS a few readings and trying the examples to learn everything there is here.

Chapter 7 – This is the chapter that introduces and really covers the GridPanel. Since there is so much to a grid, there is an awful lot in this chapter. This is another chapter that you may need to pore over a few times if you’re new to Ext JS. Again, I think data stores and data proxies should have been broken out into a chapter of its own, before this one.

Chapter 8 – The EditorGridPanel is introduced in this chapter. It builds on the Store and GridPanel from the previous chapter to show how you can do “inline” editing in a grid on your page, and how you persist those values back to a server, either through use of the Ajax methods in Ext JS or through the use of a DataWriter. I haven’t used a DataWriter before, but I can see the power of it through the provided example.

Chapter 9 – This chapter works through a really great example of using DataView, ListView, XTemplate, and FormPanel to show selection and editing. It’s a lot to absorb, but really useful.

Chapter 1o – This is about the Ext JS support for charts: line, bar, pie and column. Ext JS charts are flash-based, use the 3rd party YUI charts under the hood and utilize an Ext JS DataStore for values. This is all interesting, and the charts look good, but Flash will not be acceptable for some projects, and Ext JS 4.0 has replaced the flash charts with pure JavaScript charts, so I did not go into depth in this chapter.

Chapter 11 – It’s all about TreePanels, widgets that display hierarchical data. This is a very nice concise chapter about how to use a TreePanel and how to add/edit/delete values in the TreePanel. I only wish the current TreePanel data access were more like grid access. In this chapter, I especially like how the author builds up the code starting with empty functions that are needed and then filling them in later.

Chapter 12 – This chapter covers menus, buttons, and toolbars. These are super easy to use in Ext JS, and this chapter describes them very well. I was even introduced to Ext.Action a useful abstraction for reusing menu and button configuration information. I’m also excited to see the layout changes for buttons and button groups, some of which weren’t possible under Ext JS 2.x.

Chapter 13 – “Drag-and-drop basics” – This is a really interesting chapter on drag and drop with Ext JS. It has a very nice concise example, but going through it and running it shows that coding drag/drop is not really intuitive in Ext JS. But it is very powerful. I hope to get the chance to use this in a real project.

Chapter 14 – This is about more advanced drag-and-drop. It contains examples of drag/drop with DataViews, GridPanels and TreePanels. This is another heavy source code chapter that I expect to need to review if I ever get the chance to implement drag/drop with Ext JS.

Chapter 15 – This covers Ext JS extensions and plug-ins. This covers the old and new patterns for Ext.extend(), and has a nice simple example of an extension which the author then converts to a plug-in.

Chapters 16 & 17 – I’m grouping these together, because they both cover application development techniques for creating an Ext JS application. They talk about layering the JavaScript, making use of inheritance for code reuse, and using appropriate namespaces. There’s discussion about keep application logic separate from ui logic, and using custom events to send and receive messages. Combined, these 2 chapters build an entire application with Ext JS, so there’s tons of code, but if you need to create an Ext JS application from scratch this can be a useful example.

Advertisements
This entry was posted in Book Reviews, Ext JS, JavaScript, Web Development. Bookmark the permalink.

One Response to Book Review / Overview: “EXT JS In Action” by Jesus Garcia

  1. Steve says:

    Great review. I just picked up the digital copy of this book. I just started playing ExtJS for the first time and I am trying to wrap my head around the grid. I have been reading about how version for adds new proxy support, but from what I am reading here, this book still seems to be a good primer for everything grid related.

    I would really love to see an updated version of the book specific to 4.0 by the same author. I am really impressed by his ability to break this complex topic down and make it understandable.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s