-
4 Mar 2012 9:22 PM #1
Need an opinion - Zend ans Ext.Direct
Need an opinion - Zend ans Ext.Direct
Hello,
After few days of digging in Google I need an opinion from seasoned Ext.Direct users.
I'm starting new project: Zend Framemork on server-side, and extjs (MVC) on frontend. I don't know what is the best way to communicate both part:
1. simply using urls, for example in Ajax request:
but probably this is worst wayCode:Ext.Ajax.request({ url : 'my_controller/my_action', method: 'POST', params :{status : status}, success: function ( response, request ) { } });
2. using Ext.Direct to call controller / action
3. using Ext.Direct to call Zend_Json_Server and services.
Please, I really need help and opinion. I read tons of materials, but there wasn't simple information - what is proper / the best way to connect this to frameworks.
Thank you all in advance.
-
5 Mar 2012 7:36 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
If you are going to do Ext.Direct then you might as well go full Direct without using Ajax.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Mar 2012 8:18 AM #3
-
5 Mar 2012 9:18 AM #4
-
5 Mar 2012 9:29 AM #5
Thank you. It's very helpfull for pure php, but Zend Framework it's quite different way of thinking. I can use Zend_Json_Server and create services, but also I could use simple controllers and actions. As I can see in this post (http://www.sencha.com/forum/showthre...er-side-Stacks), in script for Symphony there is "controller / action" way. But I need to be sure, that this is also the best way for Zend Framework.
-
5 Mar 2012 9:51 AM #6
Just use the search forum link.
http://www.sencha.com/forum/showthre...l=1#post432753
Even though that is a pure php Direct thread I posted earlier it gives a good example of how to use Direct.

-
5 Mar 2012 9:56 AM #7
Having someone tell you which is best isn't the best case for your problem.
People can give opinions but still you need to decide which would be best for the end result.
For the things I've done using Ext JS its been a mix of best practices of other people.
Some parts of my website it makes more sense to use Direct others not so much.
Just make sure you are flexible enough for future additions as well. Don't lock yourself into one way of thinking.
Since the web is always changing.



Reply With Quote