"Rapid Mobile Enterprise Development for Symbian OS — An Introduction to OPL Application Design and
Programming", авторы Ewan Spence, Phil Spencer and Rick Andrews.
Если кому интересно — пишите, попробую где-то выложить.
About This Book
In this introduction, you will learn:
• what OPL is
• the history of OPL
• what you can do with OPL
• how the rest of the book is structured.
What is OPL?
The shortest answer is that OPL stands for ‘Open Programming Language’
and it is a way of programming your Symbian OS Smartphone to make it
do what you want!
If you’ve downloaded an application into your phone (for example,
from the Internet) then you’ve already started to realize that your phone
can do more than what it did, out of the box. There are thousands of
applications out there that you can put on your phone. OPL will help
you program your own applications that do exactly what you want them
to. These applications could be for yourself and your own enjoyment
or needs; they could be to help you and your colleagues at work solve
a specific business problem; or you could look to putting them on the
Internet and selling your software to other users.
Any programming language supported by Symbian OS can offer this to
you, so why choose OPL? The first thing is that OPL itself is free. It doesn’t
cost you to download and use the tools needed. It is also Open Source.
This means that a competent Symbian OS C++ programmer can look at
the code that makes OPL work and see if they can improve it, add to it,
and help maintain it. . . all to the benefit of OPL and the programmers
who use it.
But the main thing about OPL is that it is very easy to learn, and it
takes very little time to program a new application.
The History of OPL
OPL first made its appearance on the Psion Organizer II in 1984. Before
OPL, all programs for Psion’s machines had to be written in a very
tricky, complex form of code called ‘Assembler’ using a PC development
kit, requiring the developer to have a good, in-depth knowledge of
programming.
By this time, the BASIC programming language was available for most
home computers, making computer programming accessible to anyone
who owned a computer. OPL was based on BASIC, but tailored for
the Psion Organizer II. Users were able to write simple programs even
if they didn’t have the in-depth knowledge that Assembler programming
required.
OPL was originally designed as a database language to access or create
databases shared with the Psion Organizer II’s built-in Data application,
but it has evolved with each new hardware device, always aiming
to maintain good backward compatibility with previous versions. This
helped developers to port existing OPL applications to a new device with
the minimum of effort, while at the same time giving OPL applications
the ability to have the same look and feel as the built-in applications. A
key requirement for OPL was to make it possible to develop applications
fully on the device itself.
The power of OPL has arisen from its extensibility. OPL has supported
language extensions from the beginning, via 6301 Assembler procedures
on the Psion Organizer II, and now via C++ OPX procedures on phones
running Symbian OS.
On the Psion Organizer II, the OPL Runtime was written in 6301
Assembler. The main functionality included loops, conditionals, onedimensional
menus, database keywords, error handling, arithmetic operators,
mathematical functions, language extensions written in Assembler,
and procedure files in a flat filing system. At this time, most of the
applications were written for the corporate environment.
In the late 1980s, Psion launched the MC series of (laptop sized)
devices. OPL was ported over to the 8086 CPU and had broadly the
same functionality as the Organizer – without menus, but with dynamically
loadable modules, keywords to call OS services, and input/output
keywords (both synchronous and asynchronous forms).
The Psion HC was again built around the 8086 chip, but made greater
use of graphical elements. In addition to the keywords added for the
MC series, there were graphics keywords, the ability to call procedures
by indirection, the concept of OPL applications that looked like built-in
applications, event handling (for handling messages from the operating
system such as switch files, close, etc.), and command line support.
The Psion Series 3 (with the advent of the ‘SIBO’ operating system)
was released in 1991, and along with it came the first OPL Software
Development Kit (SDK), giving many utilities and macros for nearly
full access to the SIBO operating system services. Series 3 OPL added
menus, dialogs, and the expression evaluator (used by the Calculator
application).
When the Psion Series 3a came out a few years later, OPL was again
upgraded and remained almost unchanged for the rest of the SIBO range
(Psion Series 3a, 3c, 3mx, Siena, and the Workabout range). It added
allocator keywords, a cache with least recently used procedures flushed
when necessary (for up to seven times speed improvement), and digital
sound support.
In 1997, OPL was ported to C++ for Symbian OS, adding pen event
handling, cascaded menus, popup menus, language extensions (using
OPXs), constants, and header files. Other enhancements included toolbar
support and extremely powerful access to the new Symbian OS DBMS
database implementation. The first Symbian OS OPL SDK was released
shortly afterwards, allowing developers to develop OPL applications on
a PC with the addition of a number of tools.
Symbian OS v5 in 1999 added improved color support and file
recognition thanks to MIME support, amongst many other minor improvements.
When Symbian OS v6 debuted, powering the Nokia 9210 Communicator,
the OPL Runtime was no longer included in the ROM of the
machine, and it appeared that OPL would not be part of the Smartphone
revolution. Luckily, OPL appeared as a downloadable component
on the Symbian website, so OPL authors could move onto the new
platforms.
OPL is now available over three major Symbian OS platforms, the
Communicator range (sometimes called Series 80), Series 60, and UIQ. It
has become an Open Source project, which means anyone can download
the code that is used to create the runtime, the tools, and the developer
environment. It is also free to use, there are no licensing costs involved
to use OPL – it is truly a totally free development option.
Who is This Book For?
If you’ve programmed, at any level and in any language, then you’ll find
this book is an excellent primer for the OPL language, and you should be
able to understand OPL in under a week. You should be able to start at
Chapter 3, which details the tools and utilities available for OPL.
This book is primarily aimed at non-professional programmers, the IT
Manager in a company that needs an application for their staff, the ‘power
user’ who wants to do more with his phone, and anyone interested in
starting programming Symbian OS phones, but wary of spending months
learning the ins and outs of Symbian OS C++.
... << RSDN@Home 1.1.4 beta 7 rev. 447>>