Programming Java 2 Micro Edition for Symbian OS 2004 (779882), страница 72
Текст из файла (страница 72)
However, by looking at the market needs andopportunities we’ve discussed, we can tap into more significant revenueopportunities.The exciting applications and services, which include multi-usergames, location-based services for route planning or localized advertising, entertainment services and wireless commerce, will be those thatbring together a wide range of resources and which bring people together.They will be networked, but not reliant on the network, in order that theuser can be productive whether online or offline. So a sales applicationmight use a product catalog, route planning services, a timetable andlocation services.Figure 8.7 attempts to capture these ideas.
Web and WAP browserspresent essentially static data, whilst smartphones enable far richer provisioning models. Services are delivered by application providers throughchannels that include UMTS and Bluetooth, as well as SMS, WAP andWeb browsers. Services will have access to data and information thatmay come from the application provider, but could also come from avariety of other sources.Providers will use information about the client’s capabilities to configure applications for the client device and data will need formatting forboth the client and the provisioning channel. Operators will have theirown data stores and may also control the services provided to the client.Applications and data will be both pulled by the client and pushed bythe operator or service provider.Client devices will cache data locally, only connecting to the datasource to update and synchronize their information.
Thus, users will beable to make use of services both offline and online.PROVIDING ADVANCED SERVICESOperator403Data providerClient capability informationClientClientClientappappappClient applicationsProvisioning channelsGPRS, UMTS, SMS,WAP, Web, BluetoothInformation and dataDataformattingApplicationconfiguringApplicationproviderClient deviceand userClientapplicationFigure 8.7 The advanced client will be able to work offline and online.Advanced Consumer Services• multi-user games: even a simple game like ”Snake” can be mademore valuable if it allows me to play against my children when I amoverseas with a few minutes between meetings• route planning: routes are stored in a local database and generallyaccessed offline; if a route is not available, the missing information isdownloaded from a server• localized advertising: receiving information where and when it isrelevant• travel and holiday services• entertainment services: searching for venues, downloading music; thephone’s camera can be used to read a bar code, which takes the userto a relevant web site where the user can download music or video,purchase tickets, or just find more information• wireless commerce: buying and selling, banking, insurance• supermarket shopping: the supermarket’s stock information wouldbe stored on the mobile phone, allowing me to create a shoppinglist offline or I could register with a number of supermarkets sothat my shopping MIDlet can compare prices and create individualshopping lists; when I am ready to place my order, I synchronize withthe supermarkets and my mobile phone is updated with the lateststock details.404THE MARKET, THE OPPORTUNITIES AND SYMBIAN’S PLANSAdvanced Enterprise Services• support for mobile employeesDay-to-day decisions within an organization are typically made bymiddle management, who also spend much of their time away from theoffice.
They therefore need mobile, and secure, access to a company’ssystems in general, and communication services in particular. Thisincludes email, calendaring, conference call set up, whiteboardingand document services. So a meeting planner would coordinatemeetings by using calendar APIs, contact APIs and messaging APIs tonegotiate a suitable time and venue with the attendees.• sales force automationProduct catalogs, route planning and timetable information can bestored on the mobile phone.• field service support.Field service applications can use the camera for taking photographsand for reading equipment bar codes, patient bar codes, etc.
Emailand communications services can be used for transferring and synchronizing records. A touch screen is great for signature capture.Location-Based ServicesLocation-based services are rightly regarded as an important source ofrevenue by operators, service providers and mobile phone manufacturers.Take up will not be as rapid as some have predicted: both mobilephones and infrastructure have to be in place. However, as discussedin Section 8.2.1, the market is expected to be worth over $30 billionin 2007.At the simplest level, location-based services will allow the user toestablish their own location; however, this is merely an enabler for moreinteresting possibilities:• how do I get from Paris to Amsterdam? Should I drive, fly, or goby train?• how do I get from my favorite restaurant back to Joe’s place?• how far is Cambridge?• where am I? I need an address in the form of town, street, building,company, office and floor (not map coordinates!)• where is the nearest cinema playing a specific film? Or where are thenearest cinemas in my area?• what’s the weather forecast in my area?• where is the nearest color printer? The answer might be ”4th floor,East end”; the user’s coordinates are thus needed in 3D space andPROVIDING ADVANCED SERVICES405probably in the form of an address, rather than numerically; Bluetoothalready supports the idea of location ”beacons”• where are my colleagues/family/friends?• asset tracking: as well as family and friends, non-human assets can betracked, such as pets or vehicles; this is either for protection againsttheft or for management• location-based ”to-dos”: remind me when I am near home/passingthe dry-cleaners/next in Cambridge or when I am near a colleague(this is more challenging because both target and user are mobile)• location stamping (like time stamping) of user data.Knowing where a data item was created will help with searching andsorting photos, video recordings, voice recordings, etc.; for instance,I could quickly search for all photos of Niagara Falls.
Logging callsand messages with a location as well as a time makes them easier toidentify and check: ”oh yes, I did make that one hour call to Beijingfrom the Eiffel Tower”.However, there is a danger that the LBS market could fail to achieve itspotential if mobile phone manufacturers or operators try to control accessto such services. Symbian is taking an agnostic approach to implementingsupport for location-based services (see Figure 8.8).Symbian’s design means that any location-based service, whethersupplied by an operator, a mobile phone manufacturer or a third party,can use any available acquisition technology (A-GPS, translated Cell ID,MappingTrackerLocationframeworkRouteplanningLandmarksframeworkBuddyfinderPrivacymanagerJSR179LocationRequestloggingLocationservicesMathslibraryManualDTVGPSAGPSCell IDMobilePhoneNetworkFigure 8.8 Symbian’s approach to location-based services.406THE MARKET, THE OPPORTUNITIES AND SYMBIAN’S PLANSetc.).
Further the service is unaware of whether data such as namedlandmarks or privacy lists are stored on the network, the mobile phone,or both. Crucially Symbian’s implementation of the Location Services APIfor J2ME (JSR 179) also makes use of this underlying flexibility.8.5 Why Java?Sections 8.3 and 8.4 looked at the market segments and opportunitiesfor consumer and enterprise services and identified important marketrequirements.
Let us look at the principal benefits of the Java languagefor services development and how these meet market needs:• security: services and applications cannot be subverted• standardization: more developers and tools mean that more servicescan be developed• robustness: fewer faults, fewer recalls• fast development: faster time-to-market• ease of porting: service providers can deploy on as many mobilephones as possible.8.5.1SecurityWireless services depend on the secure delivery of trusted applicationsand the secure exchange of information. Security was, and is, one ofJava’s critical design goals and it is built into Java from the groundup.
Features such as the bytecode verifier, preventing random memoryaccesses and disallowing inappropriate casting, ensure that Java can beused to develop secure systems. Achieving the same watertight securitywith other languages is much harder.The absence of pointers and the use of Array objects means that Javacode cannot point to either a non-existent object or to the wrong sortof object. It is too easy in C++ code to write or read from an incorrectarea of memory (e.g.
off the end of an array). The real problem is that themistake will not be identified immediately, but can generate apparentlyunrelated misbehavior, frequently a crash, hours or even months later. Ifa Java application attempts to access an inappropriate object or a nonexistent element in an array, an exception will be thrown immediatelythat identifies both the cause of the problem and where in the sourcecode the problem occurred.Java’s automatic garbage collection results in fewer, or no, memoryleaks. In C++, we must be careful to match object construction withobject destruction: failing to destroy an object results in a memory leakWHY JAVA?407and attempting to destroy an object twice will cause the program to crash.(As in C++ we must ensure that our Java code does not keep hold ofreferences to unwanted objects; such objects cannot be garbage collectedand will effectively cause a memory leak.)8.5.2 StandardizationAt around 3 million, Java developers have overtaken C++ programmers.As a consequence a wide range of development tools, documentation,books, technical support and training is available.
Java is the preferredteaching language, and certainly the preferred object-oriented language,in an increasing number of computer science courses.8.5.3Robustness and Fast DevelopmentJava code can be developed more quickly and is easier to maintain thanC++ code and at the same time is likely to be more robust and containfewer faults than the equivalent C++ code.Fewer FaultsHere’s an example.