Follow Us

Embarassing ExtJS Ext.util.JSON.decode() method not properly implemented

An article by Robert

ExtJS.util.JSON.decode() is very useful when analyzing responses from your Ext.Ajax.request() calls - which are usually correctly formatted JSON responses.

But, if you ever come across an incorrectly formatted JSON string, the Ext.util.JSON.decode() method will raise an ugly syntax error. Checking the documentation, this is what it is suppose to do, unless the "safe" option is set to true. Funny, there is no "safe" option to set, so you will always get a syntax error.

Read more: Embarassing ExtJS Ext.util.JSON.decode() method not properly implemented

ExtJS PagingMemoryProxy Filter

An article by Robert

The ExtJS PagingMemoryProxy extension is very good to use it when you want to load data in a component and handle it locally, using javascript. I see others using it when they have to load small amounts of data (less than 15KB), or when the data really takes a lot of resources from MySql to be assembled on each pagination and it's easier to have all the data at once and then perform different operations with it on client computer. On the other hand, the PagingMemoryProxy extensions takes quite some memory resources on the client side and since it loads all the data at once, is not recommended for large amounts of data.

There are quite a few versions of PagingMemoryProxy on the Internet, and the one from Sencha forums is not updated.

Read more: ExtJS PagingMemoryProxy Filter

ExtJS - problems with external filters on grids

an article by Robert

ExtJS grids offer us a wide range of native features and possibilities. Filtering by values of some columns is one of them. Although unintuitive, this method has its limitations - it applies only to the values of the store - meaning our filtering criteria has to be a column in the grid.

extjs filter

An interesting problem appears when we try to apply an external filter over the grid's store. Say we have a users grid (first name, last name, id, level and domain) and we want to apply a filter from a combo-box by the level of the employee.

Read more: ExtJS - problems with external filters on grids

Use Namespaces to organize your ExtJS code

In today’s modern web applications it is typical to include many libraries, widgets and snippets of code from many different sources. You must be mindful that other developers may be interacting with your code simply by both sets of code being included on the same page. It is not a safe assumption that you have the entire global namespace at your disposal.

Read more: Use Namespaces to organize your ExtJS code