The Symbian OS (779886), страница 33
Текст из файла (страница 33)
Additionally, it provides support directly toapplications.Table 6.1 UI Application Framework ComponentsComponent NameDevelopment NameUikonUIKONControl Environment (CONE)CONEFEP BaseFEPBASEUI Look and FeelUIKLAFGTUikon Error Resolver Plug-inERRORRESGT• The Uikon component provides a concrete framework for user interface and application creation. Applications, typically, should notderive directly from Uikon classes.
Instead, they should derive fromequivalent classes provided by the variant user interface, becausethese provide the appropriate look and feel and other device-specificbehavior. However, applications implement virtual methods inheritedfrom Uikon and call inherited methods.• The Control Environment (CONE) provides a control hierarchy andenvironment. It provides policy-free abstract controls (interactivescreen elements) and control context, as the basis for interactionbetween the user and the application. It includes the applicationinterface to user and keyboard events and View Server encapsulation.Derived concrete controls are provided by the variant user interface.All applications also use CONE (i.e. CCoeEnv and CCoeControl)directly within the application framework context.UI Application FrameworkUikonUikonErrorResolverPluginUILook &FeelControlEnvironmentFigure 6.3 UI Application Framework collectionFEPBaseCOMPONENT COLLECTIONS131• The FEP Base component provides base classes for creating FEPs.FEPs selectively intercept and preprocess user input events, whichare returned to the system as simplified events for handling byapplications, to enable keyboard mapping, multitap keyboard input,handwriting recognition, voice recognition and other input preprocessing.• The UI Look and Feel component defines the look-and-feel propertiesof the user interface.
It defines standard methods (i.e. an API) forwhich user interface customizers provide an implementation in theUikLaf library of a variant user interface. The role of the user interfaceLAF component is to provide other parts of the application frameworkwith a way of requesting look-and-feel information from a variantuser interface, including the layout and behavior of windows; whichbitmaps and fonts to use; and the location of various resource files.• The Uikon Error Resolver Plug-in is a resource file that maps systemerror numbers to helpful error-text strings, which a variant userinterface extends and customizes.
Errors are flagged when a userinterface thread leaves normal execution inside the active schedulerof an application.UI Support CollectionUI Support (see Figure 6.4) collects miscellaneous frameworks, utilitiesand libraries that are used by variant user interfaces and which, in somecases, may also be used directly by applications.• The Graphics Effects component supports flicker-free animation ofwindows and window contents and composition of animation effectswith other graphics objects, to enable GUI special effects (such asanimated icons and ‘exploding’ menus) and moving and resizingwindows (known as ‘transition effects’).• The UI Graphics Utilities component consists of libraries used byuser-interface framework components, the variant user interface andapplications. They provide color, font, icon, text, drawing, and number conversion utilities. The utilities include those to query the relativeUI SupportGraphicsEffectsUIGraphicUtilitiesGridClockBMPAnim.Figure 6.4 UI Support collectionAnimation132THE UI FRAMEWORK LAYERTable 6.2 UI Support ComponentsComponent NameDevelopment NameGraphics EffectsGFXTRANSEFFECTUI Graphics UtilitiesEGUL, NUMBERCONVERSIONBMP AnimationBMPANIMAnimationANIMATIONGridGRIDClockCLOCKpositions of nested rectangles, to draw borders, to store color schemesand map logical to physical colors, to perform various font manipulations, to perform number conversions, to find pixel widths of textobjects and to package icons as bitmap-plus-mask pairs.• The Animation component supports window- and sprite-based framesequence animation.
It enables animated effects to be included in thenormal drawing of a window by a client or to be managed server sideas a sprite. It also defines a plug-in interface enabling new animationtypes to be created and loaded as plug-ins directly into the WindowServer. Hence, they run in its high-priority thread rather than in anapplication thread. Sprites can have irregular shapes and can overlapwindows. Window animation is used, for example, to create fadeeffects.• The BMP Animation component is a Window Server plug-in utilitythat enables bitmap-based frame-sequence animation. Bitmap-basedanimations are rectangular.• The Grid component is a simple layout engine providing presentation, print preview and printing for complete spreadsheets and forspreadsheet cells, rows and columns.
It is now considered a legacycomponent.• The Clock component is a shared library for creating animation-baseddigital and analog clocks, used by user interfaces and applications.7The Application Services Layer7.1 IntroductionThe Application Services layer provides user-interface-independent support for applications on Symbian OS (see Figure 7.1). Broadly speaking,services whose clients and users are specifically intended to be applications or application engines (rather than system components and servers)can be found here.
A number of essential application frameworks are alsoincluded. Note that the Java ME implementation also uses the frameworksand services found in the Application Services layer.UIFrameworkApplicationServicesApplication ServicesOSServicesBaseServicesKernelServices &HardwareInterfaceFigure 7.1 The Application Services layer in the system model134THE APPLICATION SERVICES LAYERServices range from those used by all applications (basic applicationframeworks), to those providing technology-specific logic (for example,support for device management, messaging and multimedia protocols),to services targeting specific individual applications (PIM and officeapplications support).Test or ‘reference’ user interfaces, where required, are supplied in thecustomization toolkit for licensees but are replaced in licensee products(including SDKs) and are not described here.7.2 PurposeThe Application Services layer builds on the underlying services ofthe operating system to provide services intended primarily for use byapplications and their engines, and includes some essential applicationframeworks which are used by all applications, either directly or asmediated by higher-level frameworks.
The Application Services layer isalso used by Java ME components.The Application Services layer provides services used by all applications but mediated by the UI Framework layer and the variant userinterface above it, for example, application installation and launching,view switching, and the basic application architecture relationships. Italso provides:• generic services supporting all application types, for example, textrendering and MIME-based content recognition and handling• technology-specific application support; for example, Versit support(vCard and vCal); alarms for PIM-type applications; and Internet, weband multimedia session protocols• application-specific services, for example, engines and plug-ins forPIM and office applications; device management; and provisioning.7.3 Design GoalsFrom the beginning, Symbian OS has been designed as an applicationplatform.
In particular, an important goal has been to make it possible towrite rich and compelling applications for pocket-sized, mobile devices(small screen, small ROM and RAM footprint, low power, connected butnot ‘tethered’). The early system architecture abstracted the applicationframework as a generic service used by all applications and suppliedengines for the built-in application suite independent of the user interface,and layered both beneath the frameworks which supported the GUIspecific aspects of the user interface.OVERVIEW135The basic separation of applications into user interfaces and enginesand, in particular, the adoption of an MVC-like approach has a longhistory in Symbian OS. As the system has evolved, there has been anincreasing distinction between engines and services. Services are understood as providing generic support for working with data models, forexample, generic recognizers, translators and protocol handlers for typeddata at the application level.
Engines are understood more narrowly asthe application-specific logic forming the part of an application implementation that is independent of the user interface. According to thisdefinition, application services would be expected to expose SymbianOS interfaces but application engines would not.Applying this definition to the system has the effect of moving functionality out of engines (which become narrower in scope and more specificto an application, user interface or vendor), while increasing the commonfunctionality available to the wider set of applications on the phone.
Thisis the direction in which the operating system has been evolving. In thelatest operating system releases therefore, the Application Services layersupports application engines but does not include them (except for legacyengines).There are good reasons for this evolution. Compared with its beginnings, Symbian OS now supports a wider range of devices in diversemarkets and geographies. Increasingly, the APIs provided by the genericengines have been perceived by licensees as being too broad (providingtoo much functionality), while not delivering functionality required inspecific markets, for example in Japan and the Far East.
Supplying genericengines, with APIs big enough and comprehensive enough to support allapplication implementations, risks fragmenting the platform rather thanunifying it, since licensees are more likely to choose to provide their ownspecialized (and small) engines than reuse bulky generic engines whichnonetheless need extending. Generic engines, in other words, can proveto be a false economy, neither delivering the expected benefits in time tomarket nor avoiding platform fragmentation.Providing rich services is a more effective, more generic, more granular,and more customizable way of increasing the capabilities of the platformwhile serving licensees better.Some services and application engines may now be considered redundant. For example, Bluetooth profiles are more relevant to phones thanWYSIWYG printing; and phones do not typically need a full spreadsheetor word-processor engine, as found in the Office Application enginescomponents.7.4 OverviewApplications have always been central to the vision of Symbian OS.
Theoriginal design conception called for more than simply an operating system with an application suite; applications and application support were136THE APPLICATION SERVICES LAYERconsidered intrinsic to the operating system. The application architecturewas embedded into the object-oriented design and specific applicationlogic – shared data models and data persistence – was provided at thelevel of operating system services.• The operating system has evolved to become a common softwareplatform for diverse categories of device, not simply for a singledevice family as first envisaged.• The device categories it targets have evolved from PDAs throughPDAs with phones to phones, and continue to evolve more generallyin the direction of connected, mobile, consumer devices, includingphones but not limited to them.• Open standards have become increasingly important. Efficient anddeep integration of open standards for multiple technologies intothe operating system platform has become one of its distinguishingfeatures.• Support for specific, shared data models has become less important,for example the office-style application engines are considered to belegacy functionality.The Application Services layer includes support for importantapplication-level standards:• the Versit specification, specifically vCard and vCalendar• data synchronization, device management and client provisioning,including on-device and ‘over the air’• email standards, including POP, IMAP and SMTP• phone-messaging standards for GSM and CDMA including SMS, MMSand WAP messaging• Internet document and data protocols including HTML, XML, WAP,HTTP and Synchronized Multimedia Integration Language (SMIL)• application-session protocols, Real-time Transport Protocol (RTP) andSession Initiation Protocol (SIP).Although many of the services based on these standards have beendesigned to support specific standard applications (messaging and phoneapplications, for example), they are also generally available to third-partydevelopers creating new applications.ARCHITECTURE1377.5 Legacy Application EnginesThe Word, Sheet and Data engines should be considered legacy functionality.1 While the functionality may continue to feature on specificdevices, it should not be considered part of the generic operating systemdelivery.Other services, for example printing, should also be considered legacyfor different reasons.