Nit*_*hin 13 javascript jquery-mobile cordova
我目前正在使用jQuery Mobile框架工作在phonegap中构建游戏.我最终得到的是很多意大利面条代码,一个html和几个js类.
我有兴趣知道是否有任何好的指南来创建遵循MVC模式的结构化jQuery Mobile Application.
我找到了使用Sencha Touch创建MVC应用程序的好指南.我正在寻找与jQuery Mobile类似的东西.
Sag*_*age 19
我有一个相当大的应用程序,这就是我的结构
css
-- all css files
images
-- all image files
js
controller.js -- page events and element actions. Also contains PhoneGap specific methods
core
forms.js -- working with forms, saving info
mobile.js -- basic definitions, AJAX communications
encrypt.js -- encryption
global.js -- helper functions
storage.js -- database storage wrapper
cw
client.js -- a client object, > 400 lines of js code
Objects.js -- all other needed objects with <50 lines of js code each
question.js -- a question object, > 500 lines of js code
service.js -- a service object, > 700 lines of js code
jq
jquery-ui.min.js
jquery.min.js
jquery.mobile.min.js
phonegap-1.1.0.js
add_client.html
clients.html
client_list.html
index.html -- the only file that is structured like a real full html file
manager.html
schedule.html
service.html
Run Code Online (Sandbox Code Playgroud)
除了我的index.html文件,所有其他.html文件都是存根.它们仅包含<div data-role='page'></div>定义页面及其预期功能的其他所需html元素.
我在VS2010上开发应用程序,使用Chrome作为我的调试器.当我感觉良好,我的进步,我过的所有内容复制到我的MAC到一个文件夹中的Eclipse项目(Android设备),这也是我的Xcode项目链接引用(iOS设备).
我已经在这个项目上工作了大约3-4个月,一旦我超越了jQM和PhoneGap的学习曲线,这个结构已经取得了很好的进展.
| 归档时间: |
|
| 查看次数: |
7532 次 |
| 最近记录: |