WORKING WITH PERSISTENT STORAGEON NOKIA SERIES 40Michael SamarinDirector,Developer Training and EvangelismFuturice
PERSISTENT STORAGE• Keeping data between application sessions• Caching data from network sessions for improving  applicati...
AVAILABLE OPTIONS• FileConnection API     • Optional JSR-75, but available on all Series 40 devices• RecordStore (also kno...
OPTION FileConnection• FileConnection API gives you almost full access to file system, including  disk (memory cards), dir...
OPTION RecordStore (RMS)• Each Midlet Suite allows to create multiple RecordStores (up to 2000, each with  maximum size 51...
HANDS-ON DEMO
THANK YOU!Want to learn more?www.developer.nokia.com             Michael Samarin, Director of Developer Training and Evang...
Upcoming SlideShare
Loading in …5
×

Persistent storage techniques for Series 40

1,102 views
1,046 views

Published on

This webinar will give you an in-depth look at strategies for persistent storage in Series 40 Java™ apps. In the presentation, we’ll examine two options, MIDP 2 RecordStore and the FileConnection API. RecordStore is part of the Java ME Record Management System (RMS). The webinar will provide an overview of usage scenarios, including state preservation between user sessions, local storage of configuration data, and other ways to use local storage to make your apps more compelling. In live coding demonstrations, Java expert Michael Samarin of Futurice will illustrate data-caching strategies using RecordStore for network-based applications and games.

Published in: Technology
2 Comments
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
1,102
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
58
Comments
2
Likes
0
Embeds 0
No embeds

No notes for slide

Persistent storage techniques for Series 40

  1. 1. WORKING WITH PERSISTENT STORAGEON NOKIA SERIES 40Michael SamarinDirector,Developer Training and EvangelismFuturice
  2. 2. PERSISTENT STORAGE• Keeping data between application sessions• Caching data from network sessions for improving application performance• Extending application’s data or graphics assets (not code), beyond 1 or 2 MB JAR file size limit
  3. 3. AVAILABLE OPTIONS• FileConnection API • Optional JSR-75, but available on all Series 40 devices• RecordStore (also known as RMS) • Part of MIDP specification• Both APIs operates on file system level, but with different abstraction layers• There are no performance benefits of using one vs. another, they are equally fast (or slow) – you should choose, according to your application needs• There are no widely known or used relational databases for Java ME
  4. 4. OPTION FileConnection• FileConnection API gives you almost full access to file system, including disk (memory cards), directories and files• Methods for accessing streams with Java IO: InputStrem/DataInputStream and OutpuStrem/DataOutputStream• However, it is matter of Java ME security model, resulting in different amount of permission dialogs interrupting application flow• Amount of dialogs depends on signing, however 3rd party signing will not completely suppress such dialogs• Parts of file system are not available for accessing by 3rd party Midletshttp://www.developer.nokia.com/Resources/Library/Java/#!developers-guides/datahandling/file-access/fileconnection-api.html
  5. 5. OPTION RecordStore (RMS)• Each Midlet Suite allows to create multiple RecordStores (up to 2000, each with maximum size 512KB on Series 40)• Each RecordStore represents set of Records with unique numerical IDs (non repeating, even when you delete existing records)• Each record is just byte array of arbitrary length, so you read and write byte arrays, and it is up to developer to serialize and de-serialize objects if needed• Don’t fall into common trap of wrapping read/write operations into byte and data streams, it really doesn’t matter on Java ME and only adds performance overhead• Accessing RecordStores doesn’t trigger Java ME security model, so there will never be any permission dialogs• You can permit sharing RecordStore between Midlet Suites http://www.developer.nokia.com/Resources/Library/Java/#!developers- guides/datahandling/persistent-data.html
  6. 6. HANDS-ON DEMO
  7. 7. THANK YOU!Want to learn more?www.developer.nokia.com Michael Samarin, Director of Developer Training and Evangelism, Futurice

×