PDA

View Full Version : Integration for CakePHP



Dumas
29 Mar 2012, 11:23 AM
Hello!

You are looking for an easy way to retrieve data from your CakePHP backend into Sencha Touch?
Check out Bancha, it uses Senchas Ext.Direct spec to transmit data.

You can easily load complete model configurations and data, just by using Bancha.onModelReady('User', callback);

http://banchaproject.com


For general questions about Bancha visit the ExtJS Forum Post (http://www.sencha.com/forum/showthread.php?141983-Bancha-Combining-CakePHP-and-ExtJS&p=631515#post631515)


http://vimeo.com/38992059


best regards
Roland


PS: I know this is a cross-post, but I feel this should not only be mentioned in the ExtJS Forums since it also applies to Sencha Touch.

mitchellsimoens
29 Mar 2012, 11:44 AM
Moved to Examples/Showcases forum :)

imafrikan
26 Aug 2012, 6:31 AM
Hi there, I am thankful for Bancha, Im learning how to use it. Please what method do i use to retrieve my exposed controller methods ?

Bancha.getStub('MyController').myMethod(param1,param2,callback);

OR

Bancha.RemoteStubs

Thank you.

Dumas
26 Aug 2012, 11:53 AM
Hello,


the preferred way is to use Bancha.getStub('MyController').myMethod(param1,param2,callback);


Where did you find the other one, so I can fix the documentation bug?

Thanks
Roland

imafrikan
26 Aug 2012, 12:48 PM
Hello,


the preferred way is to use Bancha.getStub('MyController').myMethod(param1,param2,callback);


Where did you find the other one, so I can fix the documentation bug?

Thanks
Roland

Thank you for quick response, and Thank you for your hardwork. Also i want to say great work on your doucumentations and examples

In the controller-sample.js file, in the example



// create the button
var button = Ext.create('Ext.button.Button', {
text : 'Get Greetings',
handler: function() {
if(textfield.isValid()) {
// send the request to the server
var unixTimestamp = (Date.now()/1000).toString();
Bancha.RemoteStubs.Hello.getGreeting(unixTimestamp, textfield.getValue(),function(result) {
// this is the result callback
if(result.success) {
log(result.data);
} else {
log("The server does not want to talk to you.");
}
});


Please a couple more questions


return $this->User->saveFieldsAndReturn($this->request->data); // added
the saveFieldsAndReturn method, is that a custom method that comes with the Bancha plugin ?

Thank You.

Dumas
26 Aug 2012, 2:04 PM
Hello,

thanks for the information.

You are right, I forgot to explain that in the Documentation, I just added it:
https://github.com/Bancha/Bancha/wiki/Saving-records

Best regards
Roland