Sencha sqlite的例子 [英] Sencha sqlite example

查看:142
本文介绍了Sencha sqlite的例子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望看到使用Sencha框架的移动Web应用程序的一个不错的示例,其中使用SQLite访问客户端数据库。我目前正在消化JqTouch,并且从阅读Jonathon Stark的iPhone应用程序一书获得了那里使用的绑定方法,但是无法找到任何访问Senchas功能的示例,即使用SQLite列出的元素。数据库很小; 30条记录,大约5个字段,大多数是数字,其中一些是计算出来的。所有的数学运算都是用javascript完成的,我有一部分工作(用破折号代码)。我需要添加,删除和编辑记录。



任何指针或示例都将非常受欢迎。我是一只试图学习新技巧的老狗。谢谢

解决方案

Sencha是客户端Javascript,因此您的应用程序实际上运行在Safari之上。这意味着你可以忘记从浏览器沙箱中访问(或安装)你自己的SQLite数据库。



话虽如此,你想学习一些新的技巧,为什么你不读懂一些 API信息和一个不错的小博客条目由一个叫Ben Lister的小伙伴


I would like to see a decent example of a mobile web app using the Sencha framework with a client side DB accessed with SQLite. I'm currently digesting JqTouch and kinda get the binding method used there from reading Jonathon Stark's "iPhone apps" book, but cant find any examples of accessing Senchas features ie listed elements with SQLite. The DB will be small; 30 records, with about 5 fields, mostly numeric, a few of them calculated. All the math is done in javascript and I have that part working (in dash code). I need to add, delete, and edit the records.

Any pointers or examples would be very much appreciated. I'm an old dog trying to learn new tricks. Thanks

解决方案

Sencha is client-side Javascript, so your application actually runs on top of Safari. That means you can forget about accessing (or installing) your own SQLite database from within the browser sandbox.

Having said that, you want to learn some new tricks, so why dont you read up on localStorage and DOM Storage. Basically the HTML5 specification allows for offline database storage based on SQLite (imagine relational database cookies). There is 1 per domain and they can be up to 5MB in size. I believe the iPhone supports this as well.

Here are some links: Introduction some API Information and a nice little blog entry by a chap called Ben Lister

这篇关于Sencha sqlite的例子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆