danh2000
13 Jun 2007, 1:48 AM
Hi,
It's been said many times before, but I just want to take this oppotunity to say how great ExtJS is, and how much pleasure I am having working with it, and if anyone is interested, my little story of how I'm using this fantastic library.
After 3 or 4 weeks making myself familiar with the library, I've decided to upgrade my 'standard' cms to a purely ext solution.
My existing PHP framework uses a single point of entry (an HttpRequest PHP class), and a single point of exit (a HttpResponse PHP class) - the content of which is (usually) an XHTML view rendered by a templating class.
The entry point didn't need to change, as it simply accepts a 'cmd' parameter (baseParams from Ext) and maps this to a command class, which reads any other args it needs from the request and acts on them.
So really, my first point of transition was the exit point, or response - which was actually very easy!! - instead of using the templating class to convert model data into XHTML, I substituted it for a class(es) to convert my model data into hierarchical arrays, I then simply JSON encode the response output. So instead of returning XHTML content, every response is returned as JSON.
My next point of transition was exceptions from the normal response process, and the new Ext.Ajax singleton is making this job really easy with my ability to listen to every 'requestcomplete' event.
Here's how I'm using this:
1. If an exception occurs during any part of my server processing, I return an {"EXCEPTION":'Sorry, but the application is unavailable at this time'} result, which gives me a nicer way for the application to degrade.
2. If an authorized user's session has expired due to inactivity, the very next call to the server (be that a grid or tree update, or tab panel change) is returned a {"DO_AUTH":true} result, so my Ext app simply clears everything down (there's no markup, it builds every element from scratch) and displays the login page.
3. If a user does not have permission to execute a certain command, i return an...
Anyway, you get the picture, and I realize I've been rambling, so excuse me for that and I'll shut up now, but I'm really looking forward to converting the remaining parts of my app'. :)
Once again Jack and the Ext team - well done, and thankyou, I'm becoming a happy Exter.
Dan
It's been said many times before, but I just want to take this oppotunity to say how great ExtJS is, and how much pleasure I am having working with it, and if anyone is interested, my little story of how I'm using this fantastic library.
After 3 or 4 weeks making myself familiar with the library, I've decided to upgrade my 'standard' cms to a purely ext solution.
My existing PHP framework uses a single point of entry (an HttpRequest PHP class), and a single point of exit (a HttpResponse PHP class) - the content of which is (usually) an XHTML view rendered by a templating class.
The entry point didn't need to change, as it simply accepts a 'cmd' parameter (baseParams from Ext) and maps this to a command class, which reads any other args it needs from the request and acts on them.
So really, my first point of transition was the exit point, or response - which was actually very easy!! - instead of using the templating class to convert model data into XHTML, I substituted it for a class(es) to convert my model data into hierarchical arrays, I then simply JSON encode the response output. So instead of returning XHTML content, every response is returned as JSON.
My next point of transition was exceptions from the normal response process, and the new Ext.Ajax singleton is making this job really easy with my ability to listen to every 'requestcomplete' event.
Here's how I'm using this:
1. If an exception occurs during any part of my server processing, I return an {"EXCEPTION":'Sorry, but the application is unavailable at this time'} result, which gives me a nicer way for the application to degrade.
2. If an authorized user's session has expired due to inactivity, the very next call to the server (be that a grid or tree update, or tab panel change) is returned a {"DO_AUTH":true} result, so my Ext app simply clears everything down (there's no markup, it builds every element from scratch) and displays the login page.
3. If a user does not have permission to execute a certain command, i return an...
Anyway, you get the picture, and I realize I've been rambling, so excuse me for that and I'll shut up now, but I'm really looking forward to converting the remaining parts of my app'. :)
Once again Jack and the Ext team - well done, and thankyou, I'm becoming a happy Exter.
Dan