JQueryMobile MVC 和离线持久化
构建 JQuery Mobile 应用程序的最佳工具组合是什么:
- 处理具有关系的多种对象
- 有许多(许多)不同版本的屏幕
- 必须离线工作,最后执行服务器同步(专用屏幕); 应用程序和媒体缓存将使用 HTML5 清单来完成
尽管我在 OOP 方面拥有相当不错的经验,但当涉及到 Javascript 及其丰富的 MVC 框架时,我感到非常困惑。
- persistence.js 似乎是一个很好且易于理解的候选者。导航是手动完成的;
- backbone.js +backbone-relational +backbone-localstorage/websql带来了一个很好的MVC层。示例在简单的应用程序上看起来不错;想知道它与 JQueryMobile 路由的结合有多好;
- 你的想法?
预先感谢您分享您的建议!
注意:
- http://blog.chariotsolutions.com/ 2011/12/backbonejs-with-jquery.html 简介
- http://documentcloud.github.com/backbone/docs/backbone-localstorage.html< /a>
- https://github.com/PaulUithol/Backbone-relational
- jquery-移动backbone.js路由
- Backbone.js 和 jQueryMobile 路由,无需 hack 或其他路由器
- https://github.com/azicchetti/jquerymobile-router
What would be your best combination of tools to build a JQuery Mobile application that :
- handles many kinds of objets with relations
- has many (many) different edition screens
- has to work offline, server sync is performed lastly (dedicated screen) ; Application and media caching will be done using HTML5 manifest
Despite my reasonably good experience in OOP, I feel quite confused when it comes to Javascript and its abounding MVC frameworks.
- persistence.js seems to be a good and intelligible candidate. Navigation is done manually though ;
- backbone.js + backbone-relational + backbone-localstorage/websql brings a nice MVC layer. Examples look nice on simple apps ; Wonder how well it couples with JQueryMobile's routing ;
- your idea ?
Thank you in advance for sharing your recommandations !
Notes :
- http://blog.chariotsolutions.com/2011/12/introduction-to-backbonejs-with-jquery.html
- http://documentcloud.github.com/backbone/docs/backbone-localstorage.html
- https://github.com/PaulUithol/Backbone-relational
- jquery-mobile backbone.js routing
- Backbone.js and jQueryMobile routing without hack or other router
- https://github.com/azicchetti/jquerymobile-router
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在我的应用程序中使用这个堆栈,它似乎工作得很好:jquery mobile + jquerymobile router +backbone/underscore + persistence.js。
主干和持久性之间的集成是通过覆盖模型的“保存”方法“手动”完成的。从头开始实施需要几分钟,但很容易做到。
但是,我认为主干关系 + 主干本地存储/websql 不应该与 jqm 路由冲突,只要您不使用 Backbone.Router
I use this stack for my applications and it seems to work well: jquery mobile + jquerymobile router + backbone/underscore + persistence.js.
The integration between backbone and persistence is done "manually" by overriding the 'save' method of my models. Takes a few minutes to implement from scratch but it's quite easy to do.
However, I think that backbone-relational + backbone-localstorage/websql shouldn't clash with jqm routing, as long as you don't use the Backbone.Router