06

Scenes-Based Display Design

Scenes–Based Design

Switching between Scenes

Data Transfer between Scenes

Summary

A Samsung SmartTV application runs on a browser environment that is similar to PC-based web browsers, and can use most of the standard web development techniques. Chapter 6 will introduce and carefully review a scenes-based programming method that uses different scenes to efficiently handle key events. This method accommodates characteristics of a TV application that uses remote controller-generated KeyDown events.

The Samsung SmartTV SDK provides the Scene Manager to quickly and easily develop an application screen. However, in this chapter, we will not use the Scene Manager; instead, we will manually implement a simple TV app screen. This will help us to understand how a SmartTV application handles possible exceptions.

This chapter's scene creation / switch method is not the ultimate right answer. Different situations require different solutions. Please consider the next method as a tutorial that will help you understand the structure of a Samsung SmartTV application.

Scenes-Based Design

As explained earlier, a Samsung SmartTV application consists of HTML, CSS, and JavaScript files, as does a web application. Therefore, we can use styles and HTML elements, as is commonly done in web development.

images

Figure 6-1. Scenes Structure

While a website treats each HTML page as ...

Get Samsung SmartTV Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.