PDA

View Full Version : Using REST with ExtJS 4.2 - which Backend?



Spiff1
10 Oct 2013, 6:54 AM
Hello,

i just started learning ExtJS (4.2). I'm trying to convert and enhance an existing application where i use HTML, JQuery and PHP as Backend.
I'm thinking about using REST for getting/sending data to/from the server and i'm not sure if i should use PHP or e.g. Pyhton (that i don't know until now).

Maybe it is easier to use the AJAX proxy instead of REST (what is also new to me)?

Any suggestions?

Thanks
Spiff1

ettavolt
10 Oct 2013, 7:31 AM
There are small differences between 'ajax' and 'rest' proxies, so this does not actually affect your decision.

eric.cook
10 Oct 2013, 8:09 AM
You can use anything you want as a back-end. There's nothing about how Ext JS handles REST that makes it easier/harder to use certain back-end technologies. Feel free to use PHP if it's easier for you.

As far as Ajax vs REST proxies, just make sure your decision is based on the actual and specific needs of your application. If you decide to use REST, make sure you're doing it because that's what you need, not because REST is the buzzword of the moment.

Spiff1
10 Oct 2013, 9:45 AM
Thanks for your answers.

In the current application i use AJAX from jQuery together with PHP.

The easiest solution would maybe to try the ajax-proxy from ExtJS together with PHP.
If that doesn't work for me i could try other combinations.

BR
Spiff1

existdissolve
10 Oct 2013, 11:57 AM
Hello,

i just started learning ExtJS (4.2). I'm trying to convert and enhance an existing application where i use HTML, JQuery and PHP as Backend.
I'm thinking about using REST for getting/sending data to/from the server and i'm not sure if i should use PHP or e.g. Pyhton (that i don't know until now).

Maybe it is easier to use the AJAX proxy instead of REST (what is also new to me)?

Any suggestions?

Thanks
Spiff1

+1 on what others have said.

Keep in mind, however, that there is nothing on the Ext JS side that requires that you exclusively use one or the other. For one of my sites, I have a majority of my stores using REST proxies, but a few (for some legacy code) are using regular Ajax proxies. Of course, Ext JS doesn't care either way and spins happily along so long as you give it the data in the format that it is expecting it.