混合 HTML/Objective-C iPhone 应用程序的优点/缺点

发布于 2024-10-09 02:04:00 字数 106 浏览 0 评论 0原文

在开发应用程序并决定是否在 HTML/UIWebview 中创建部分(样式化菜单、具有复杂布局的内容的页面等)或全部本地化时,我应该考虑哪些主要优点/缺点?

我想听听人们对此的经验。

Are there any major advantages/disadvantages I should take into consideration when developing an app which and deciding whether to creates parts (styled menus, pages with content with complex layout etc.) in HTML/UIWebview or doing it all native?

I would like to hear people's experiences with this.

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

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

发布评论

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

评论(4

给不了的爱 2024-10-16 02:04:00

就我个人而言,我发现我倾向于不喜欢(通常)伪装成 iOS 应用程序的网络应用程序。我倾向于注意到网络应用程序和“本机”应用程序的 UI 之间有很多不一致之处,大多数时候,这让我很烦恼(我最讨厌的就是点击一个按钮,然后看到它用一个半透明的小黑框突出显示像链接一样围绕它)。现在,我不代表主要用户群体,他们可能不会关心,但这是我个人的观点。

在编程方面,我以前从未编写过 Web 应用程序,但我认为它的结构会比本机应用程序稍差一些,因为编写 HTML、Javascript 和 CSS 不会强迫您采用特定的项目结构,与具有不同视图、控制器等的 iPhone 应用程序不同。根据您想写的内容,这可能会带来解放,但也可能很快就会变得混乱。

正如 middaparka 所说,如果您愿意,您也可以混合使用这两种系统。我的意思是,我假设您是一名优秀的 Web 开发人员,就像您是一名 iOS 开发人员一样。如果你的一种花色比另一种花色更强,那么我说你应该倾向于朝那个方向前进。我更愿意看到编写出色的 Web 应用程序,而不是编写糟糕的本机应用程序,反之亦然。

Personally, I find that I tend to dislike web apps that are (usually) disguised as iOS apps. I tend to notice a lot of inconsistencies between the UI of a web app and a 'native' app, and most of the time, it bothers me (my biggest pet peeve is tapping a button and seeing it highlight with a little translucent black box around it like a link). Now, I don't represent the major user demographic, which probably won't care, but that's my personal opinion.

In terms of programming, I've never written a web app before, but I assume that it's going to be slightly less structured than a native app just because writing HTML, Javascript, and CSS doesn't force you to assume a certain project structure, unlike iPhone apps that have distinct views, controllers, and the like. Depending on what you want to write, this might be liberating, but can also get tangled very quickly.

As middaparka said, you can also use a mixture of the two systems if you'd like. I mean, I'm assuming you're just as good a web developer as you are an iOS developer. If you are stronger in one suit than the other, then I say that you should lean towards heading in that direction. I'd much rather see an excellently written web app than a badly written native app, and vice versa.

不必你懂 2024-10-16 02:04:00

我怀疑主要优点/缺点与用户体验有关 - 基于“本机”UIKit 的用户界面会比在 Web 视图中操作项目感觉更自然。 (这也意味着您可以使用更多“标准”组件,例如导航控制器、选项卡栏等。)

也就是说,没有理由不混合使用两者,因为主 UI 是通过各种 UIKit 对象实现的以及通过网络视图提供的内容。

I suspect the major advantages/disadvantages relate to the user experience - a "native" UIKit based user interface will feel a lot more natural than manipulating items within a web view. (It'll also mean you can use more "standard" components like navigation controllers, tab bars, etc.)

That said, there's no reason not to use a mix of the two, with the main UI being implemented via the various UIKit objects and the content being provided via a web view.

故事未完 2024-10-16 02:04:00

我还要补充一点,我发现混合框架的最大问题是您向应用程序添加了另一个依赖项。

例如,进行一次重大的 iOS 更新。如果您选择的框架损坏,您的应用程序也会损坏,并且在框架修复之前您将无法修复它。

另外,现在有很多框架,你必须祈祷你选择的框架不会被冲进马桶或放弃对你的目标平台之一的支持。

I would also add that the biggest issue I've found with hybrid frameworks is that you add another dependency to your app.

For example, take a big iOS update. If your chosen framework breaks, your app breaks and you won't be able to fix it until the framework is fixed.

Also, right now there are many frameworks and you have to pray that the one you chose isn't flushed down the toilet or drops support for one of your target platforms.

乖乖公主 2024-10-16 02:04:00

另一个问题是,在基于 Web 的应用程序/组件中,您会错过特定于平台的技术和框架,例如核心数据、GCD(或任何其他线程模型 - 在 Web 中您可能会使用 Ajax)、具有缓存的uitableview 等。

如果您在性能或存储方面遇到困难,那么您在本机框架中还有更多选择。

Another issue is that in a web based app/component you are missing out on platform specific technologies and frameworks like core data, GCD (or any other threading model - which in web you might have do with e.g. Ajax),uitableview with caching etc.

Should you hit a wall when it comes to performance or storage,then you have many more options in the native framework.

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