Best practice discussion: When to favor a webview over a native UI in titanium?

萝らか妹 提交于 2019-12-06 05:55:56

What do you think of mixing native UIs with Webviews?

The real question would be : Do you care about the user experience ? If yes, then go exclusively Titanium/Native. Sometimes, you need to use the Webviews to get around some problems (I had one year ago) : I remember I couldn't open online PDF files with Titanium : As Android platforms didn't open the PDF "natively" (Now you can), you had to pass the pdf's path to a Webview. That was the only time I was forced to pop up a WebView.

Do you have other use cases that favor a Webview?

If you are you talking about frameworks that base the rendering on Webviews then : If you have a client who owns a full static website and tell you to turn it into a mobile application It could be useful. Or, If you aim many platforms (more than Titanium does), you can use frameworks such as PhoneGap that will allow you creating WP7/iPhone/Android/BlackBerry apps.

What could be general criteria for using one or the other?

Which platform are you aiming ? As I said, Titanium won't allow you exporting your app for the WP7 platform. Then, if you need better performances, then go for Titanium/Native apps. On the other hand, if you want to reuse your code, think PhoneGap.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!