开发者

Some help with Sencha Touch Database connectivity please

开发者 https://www.devze.com 2023-02-02 14:16 出处:网络
I am a beginner in Sencha Touch. I am stuck with connecting my web pages(Sencha Touch) tothe database(MySQL).

I am a beginner in Sencha Touch. I am stuck with connecting my web pages(Sencha Touch) to the database(MySQL). There are submit buttons in various pages which when clicked should send data to the database. But in my case sending data to the DB is possible only from the first page.I should comment the submit button handler of all other pages to send data to DB from any particular page. Also sending data or retrieving data- only one of them is possible in a single execution. Problem might be silly, but please I'm really desperate now trying to solve this. Can someone help me please.........

Thanks in 开发者_如何学Cadvance...


I'm guessing you have some server code in the mix too, since I don't know how else you would get a JavaScript app to read from and write to a database server directly.

You should be using the Ext.data.* package to bind your app's model stores to some sort of server interface (e.g. AJAX, REST, XML, etc etc) and all the proxies for these have full CRUD implementations.

See: http://dev.sencha.com/deploy/touch/docs/?class=Ext#namespace?class=Ext.data.RestProxy for example

If your server provides an API that provides results in response to an update, I think it would be simple to adapt a proxy to use that response to keep the two data stores (on server and client) strongly in sync.

But would need to know more about what you are trying to do.

0

精彩评论

暂无评论...
验证码 换一张
取 消