Posted by: Andrei Neculau | 20071010

ExtJS:AutoGrid

Wiki: http://extjs.com/learn/Extension:AutoGrid

Scenario: the extension loads the configuration for a grid’s ColumnModel (CM) from the server. Upon request, it is server-side built and AJAX sent.

But lets consider this: why would you want that to take place?

I can only think of two reasons and two reasons only: when you are having some sort of CMS and you let admins build the grid for normal users, or if you have your grid built exactly after the DB table’s configuration (building something similar to phpMyAdmin maybe?!)

Other than that, presentation should be built client-wise. I mean, wasn’t this that a large community of web-coders want to have? To split data from presentation?

Well, does that go hand in hand with building grid’s CM configuration (presentation) with client-side code? I’m sure that many do that already, but that’s not the way to go. If you can write the grid’s configuration in JS, the same way you do it in PHP, then go for JS.

You also need to take into consideration that having the grid’s CM config built client-side will imply a new connection for each grid - not good.

But, for when you really need it, THUMBS UP, Joris Aerts! :)

Tags: , ,

Leave a response

Your response:

Categories