Part01a Introduction
Part01a Introduction
Introduction to Symbian OS
Introduction Part 1a
This work is licensed under the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License.
To view a copy of this license, visit http://creativecommons.org/licenses/bysa/2.0/uk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California,
94105, USA.
Introduction
Introduction
Background
Products included
• Flight simulator, “Horace Goes Skiing”, Psion Chess, Space Raiders and
other games.
• Psion Chess for the ZX81 took 1K memory
• Office suite for the Sinclair QL (1983)
1991 - Series 3, 1993 - Series 3a, 1996 Series 3c/Siena, Series 3mx
• Clam shell organisers, built in apps, OPL, up to 2MB memory
• Built on EPOC
• Over 1.5 million units sold
1997 - Series 5
• 32 bit OS “EPOC32” (EPOC -> EPOC16 -> SIBO)
• Slide out QWERTY keyboard, touch screen, 4MB/8MB
• Implemented using C++
http://3lib.ukonline.co.uk/historyofpsion.htm
Symbian History
Symbian History
Symbian Ownership
Some Stats
As of 31 March 2007:
• A growing company - 15.9m Symbian smartphones shipped by licensees in
Q1 2007, a 35.9% increase on Q1 2006 (Q1 2006 - 11.7m)
• 126 million cumulative Symbian smartphone unit shipments
• 20 million cumulative Symbian smartphone unit shipments milestone
reached in Japan since first 3G Symbian model shipped in 2003 all models
shipped since have been 3G
• The demand for Symbian OS C++ developers outstrips the supply!
• More stats at http://www.symbian.com/about/fastfacts/fastfacts.html
Symbian OS C++
Symbian OS C++
Symbian OS design and C++ considerations were driven by factors such as:
• Power sources (battery lifetimes)
• User responsiveness
• “Always on” nature of mobile devices
• Limited resources (RAM, ROM)
• Re-use and customization through frameworks.
• Reliable data storage
• Openness
C++ for Symbian OS was also influenced by the point in time at which the OS
was developed:
• In 1994 - C++ was still evolving
• It had not yet been standardized
Certain patterns of use were not adopted as C++ was explicitly intended as a
general purpose systems language
• It was not optimized for small, low memory and low power devices
Common Paradigms
Web
Flash
Python Runtimes
Managed C++ Java
Flash
Java Lite Python
code Ruby
P.I.P.S
. Symbian OS
Symbian
Native code C++
Hardware
Architecture
Symbian OS Architecture
Symbian OS separates the UI from the engines and services allowing
licensees (like Nokia) to develop their own UIs for the phones
Licensee UI Platform
UI Framework
Symbian OS
Application Services
OS Services
Symbian OS Architecture
In a little more detail
Symbian OS Architecture
Okay a little too much detail!
Symbian OS Architecture
The Symbian System Model shown on the previous slide is available here
• http://developer.symbian.com/main/oslibrary/sys_models/index.jsp
UI Platform
UI Platform
Engine
Support
Base
Nokia S60
Curriculum
Prerequisites
Curriculum
Training Exercises
Tool Chain
Exercise
The goal of the first exercise is to get to know the basic data types of Symbian
OS as well as the console mode of the Symbian OS emulator.
Examines the Cleanup Stack and the difference between standard C++ and
Symbian OS in handling leaks and exceptions
• Leaves: Lightweight Exceptions for Symbian OS
• How to Work with Leaves
• Comparing Leaves and Panics
• What Is a TRAP?
• The Cleanup Stack
• Detecting Memory Leaks
Exercise
This module provides a hands-on experience with leaves and various ways on
how the Cleanup Stack can help with handling risky memory situations.
Exercise
In this module, you will see how two-phase construction works in Symbian OS
and what can happen if you do not implement it correctly.
Descriptors
Examines the motivation for using descriptors, how to use buffer and
pointer descriptors and when to use package descriptor classes
• Features of Symbian OS Descriptors
• The Symbian OS Descriptor Classes
• The Inheritance Hierarchy of the Descriptor Classes
• Using the Descriptor APIs
• Descriptors as Function Parameters
• Correct Use of the Dynamic Descriptor Classes
• Common Inefficiencies in Descriptor Usage
• Literal Descriptors
• Descriptor Conversion
Descriptors
Exercise
The two parts of this module cover working with descriptors. Through various
examples, you learn their individual differences as well as a few of the available
manipulation functions.
Dynamic Arrays
Dynamic Arrays
Exercise
In this module, you will write a class that represents a student with a name and
several other details. Dynamic arrays will be used to store several students as
well as to sort or find elements.
Active Objects
Examines why Active Objects are preferred over Threads and under what
conditions, and the use and implementation of simple Active Objects and their
relation to the Active Scheduler
• Event-Driven Multitasking on Symbian OS
• Class CActive
• The Active Scheduler
• Canceling an Outstanding Request
• Background Tasks
• Common Problems
Active Objects
Exercise
To make the subject of active objects more interesting, this exercise is based on
a small console-based action game. You will have to write two active objects that
provide the game engine with input.
System Structure
Client–Server Framework
Examines the use cases of the Client / Server model within a handset, system
components utilizing the model and a classic Server implementation
• The Client–Server Pattern
• Fundamentals of the Symbian OS Client–Server Framework
• Symbian OS Client–Server Classes
• Client–Server Data Transfer
• Impact of the Client–Server Framework
Examines the use of files, stores and streams for storing persistent and
temporary data
• The Symbian OS File System
• Streams and Stores
Client–Server Framework
File Server and Streams
Exercise
You will create a fully working audio player application for mp3/aac/...-files based
on the S60 platform. To make this work, client server communication is
demonstrated through the use of the multimedia framework as well as the file
server.
or
Sockets
Sockets
Exercise
Instead of some artificial data transfer over sockets, this example requires you to
complete the sockets-part of a fully functional multiplayer game client. The
server is a desktop application and allows many (Symbian OS) clients to connect
and play a game of good old Asteroids together – or rather against each other.
Platform Security
Examines the three core concepts of Platform Security: The Trust Model,
Capabilities and Data Caging. Introduces the designing, developing and
distributing software on Symbian OS v9
• The Trust Model
• Capability Model
• Data Caging
• Secure Identifier, Vendor Identifier and Unique Identifier
• Application Design for a Secure Platform
• Releasing a Secure Application on Symbian OS v9
• The Native Software Installer
Compatibility
Examines binary and source compatibility along with the programming and
design techniques which are required to maintain compatibility in code
modules and APIs
• Levels of Compatibility
• Preventing Compatibility Breaks — What Cannot Be Changed?
• What Can Be Changed Without Breaking Compatibility?
• Best Practice — Designing to Ensure Future Compatibility
Project
Several project ideas in various difficulty levels are provided with the course
materials. For most projects, the recommended team size is two. To give you
enough time, the topics should be distributed to the groups as soon as possible.
To finish the projects, you will have to show that you understood the basic
principles of Symbian OS. Usually, it is also required to do some research on one
of the many APIs offered by Symbian OS, S60 or UIQ.
Resources
Recommended Reading
Symbian books
• Stichbury, J & Jacobs, M. (2006) The Accredited Symbian Developer
Primer, John Wiley & Sons
• Jipping, M. (2007) Smartphone Operating System Concepts with Symbian
OS, John Wiley & Sons
• Harrison, R. & Shackman M. (2007) Symbian OS C++ for Mobile Phones
Volume 3, John Wiley & Sons
• Heath, C. (2006) Symbian OS Platform Security: Software development
using the Symbian OS security architecture, John Wiley & Sons
• Morris, B. (2006) The Symbian OS Architecture Sourcebook: Design and
evolution of a mobile phone OS, John Wiley & Sons
Regional Books
Useful Links
Symbian Academy
• http://developer.symbian.com/main/academy/