使用 html5 构建一个可在 ipad、iphone 和最新浏览器上运行的网站

发布于 2025-01-05 03:59:04 字数 333 浏览 2 评论 0原文

我面临着一个问题:是走使用 Html5 构建应用程序/网站的路线,还是使用 iOs 的路线。

有什么优点和缺点?

我需要使用 html5 框架来构建应用程序吗?

使用 iO 有哪些限制?

使用 html5 平台会很酷,因为 iO 直观上似乎是有限制的。

html5 的功能有很多例子,但它们往往不关注其是否可以跨浏览器工作的实用性。例如,我正在测试 html5 的本机拖放功能,但它在 iOs 4 上的 ipad 上不起作用。

我完全刚刚开始做这件事,所以如果有人可以帮助我并为我指出一些有用的起点,那太好了。

干杯

安迪

I am faced with the question of whether to go the route of using Html5 to build an app / website or to use iOs.

What are the pros and cons?

Would I need to use an html5 framework to build the app?

What are the limitations of using iOs?

It would be cool to use an html5 platform because iOs intuitively seems to be restrictive.

There are so many examples of what html5 can do, but they don't tend to focus on the practicality of whether that will work cross browsers. For example I was testing the native drag and drop of html5 and it doesn't work on the ipad on iOs 4.

I'm totally just starting out on this so if anyone can help me out and point me to some useful starting points, that would be fantastic.

Cheers

Andy

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

草莓酥 2025-01-12 03:59:04

如果您想使用 iOS 构建应用程序,那么...
* 你需要知道如何用 Objective C 编程
* 您可以使用本机 iOS 实现方法以获得最佳性能

如果您想使用 HTML5 构建应用程序,那么...
* 你需要知道如何用 JavaScript 编程并用 CSS 设计 UI
* 您的应用程序基本上(参见下一点)可以在所有浏览器中运行
* 您需要了解浏览器变体(主要是 Trident、Gecko、WebKit)以确保在所有浏览器中正常运行
* 有时,您需要创造性的解决方法来弥补无法直接访问本机 iOS 功能(例如菜单滚动等)的情况。

根据我的经验,图形密集型应用程序绝对应该在 iOS 本机中实现,而图形密集型应用程序则不应该在本机 iOS 中实现(例如店面、RSS 阅读器等)可以更轻松地在 HTML5 中实现。您的拖放示例可能属于前一类。

至于使用 HTML5 框架,这可能是一个不错的选择。鉴于您首先提出这个问题,听起来您没有丰富的创建跨浏览器网站的经验,在这种情况下,您在尝试创建此网站时可能会经历相当长的学习曲线从头开始手动。请注意——你会学到很多东西,所以如果你想以此为职业,那么一定要避免使用框架。框架本质上会添加一定程度的功能限制,以便为您解决其他挑战——也就是说,它们是不完美的捷径,如果您过于依赖它们,可能会阻碍您的成长。

至于具体的出发点,我没有太多可提供的——我只是想帮助澄清你正在测量的土地的情况,并为你的决定提供一些背景。

If you want to build the app using iOS, then...
* you need to know how to program in Objective C
* you can use native iOS implementation approaches for the best performance

If you want to build the app using HTML5, then...
* you need to know how to program in JavaScript and design UI in CSS
* your app will basically (see next point) work in all browsers
* you need to learn the browser variations (mostly Trident, Gecko, WebKit) to ensure proper functionality in all browsers
* you sometimes need creative workarounds to compensate for lack of direct access to native iOS features (eg menu scrolling, etc)

In my experience, apps that are graphically-intense should definitely be implemented in iOS native, while apps that aren't (eg storefronts, RSS readers, etc) can much more easily be implemented in HTML5. Your drag-and-drop example potentially falls into the former category.

As for using an HTML5 framework, that might not be a bad option. Given that you're asking this question in the first place, it sounds like you've not had a great deal of experience creating cross-browser websites, in which case you'd likely have a fairly significant learning curve in trying to create this manually from scratch. Mind you -- you'd learn an immense amount, so if you're looking to make a career out of this, then definitely avoid a framework. Frameworks inherently add some level of functional restrictions, in order to solve other challenges for you -- which is to say, they are imperfect shortcuts which can stunt your growth if you rely on them too heavily.

As for specific starting points, I don't have much to offer -- I just wanted to help clarify the lay of the land that you're surveying, and offer some context for your decision.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文