jQuery Mobile-包括多页模板的片段吗? [英] Jquery Mobile - including fragments for a multipage template?

查看:82
本文介绍了jQuery Mobile-包括多页模板的片段吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在做一个Codeigniter/jQM Web应用程序,并一直在讨论多页模板与单页/文件.

We're doing a Codeigniter/jQM web application and have been debating the multipage template vs. single-page/file.

所引用的多页模板的大多数缺点(意味着单个文件中的多个data-role = page div)与从维护(以及可能的加载时间)的角度来看单个文件变得笨拙有关.单页方法的缺点似乎主要集中在页面之间的潜在延迟上.考虑到互联网的变幻莫测,后一种方法似乎更具风险.我认为,如果应用程序一旦加载的次数比触摸/滑动之间不一致的应用程序加载的次数多得多,则用户可以忍受较长的加载时间.

Most of the cons of the multi-page template (meaning multiple data-role=page divs in a single file) cited relate to the single file getting unwieldy from a maintenance (and possible load time) perspective. The cons of the single-page approach seem to mostly focus on potential latency between pages. Given the vagaries of the internet, the latter approach seems more risky. It is my opinion that a user will tolerate a long load time if the app runs smoothly once loaded much more than an app that is inconsistent between touches/swipes.

话虽这么说,我们有越来越多的人在开发应用程序的各个部分,而拥有一个庞大的文件也带来了挑战-即使对于Git.

That being said, we have a growing team of folks who are working on various parts of the app and having one, huge file presents a challenge -- even for Git.

所以,我的问题是这样:

So, my question is this:

我们是否有理由不能将多页模板拆分成单独的文件,每个文件包含<div data-role=page>及其所有内容,而-include-每个都包含在主文件中?这似乎可以解决维护问题并减轻页面转换之间的潜在延迟.

Is there a reason we can't we break up the multi-page template into separate files, each containing the <div data-role=page> and all its contents, and just -include- each one in the main file? That would seem to solve the maintenance issue and alleviate the potential delay between page transitions.

我在这里想念什么?

推荐答案

答案是否定的.效果很好.

And the answer is no. It works fine.

这篇关于jQuery Mobile-包括多页模板的片段吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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