WebView vs a Custom UI

So there you have two ways to handle opening a photo’s Flickr page from your app. There is, of course, a third option: You could create a custom UI to display the photo and its description.

A UI built natively (without WebView) would give you full control over how your app looks and behaves. Also, native UIs often feel more responsive and consistent to users. But there are a number of advantages to displaying web content instead of rolling out your own custom UI.

Displaying Flickr’s site in a WebView lets you integrate a large feature much more quickly. You do not need to worry about fetching image descriptions, user account names, or other photo metadata to build out this UI. You can simply leverage what Flickr has already made available.

Another advantage to displaying web content is that the web content can change without you having to update your application. For example, if you need to display a privacy policy or terms of service in your app, you can choose to show a website instead of hardcoding the document into your application. That way, any changes can simply be pushed to a website instead of as an app update.

PhotoGallery is now complete. In the next two chapters, you will build two small apps as you learn about responding to touch events and creating animations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset