1 / 27

MIDP Persistent Storage (RMS)

MIDP Persistent Storage (RMS). Marsel Willem Aipassa, S. Kom. Pemrograman Aplikasi Mobile. Persistence. MIDP menyediakan sebuah API untuk menyimpan data-data secara local pada device tersebut Data disimpan dalam non-volatile memory

thyra
Download Presentation

MIDP Persistent Storage (RMS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MIDP Persistent Storage (RMS) Marsel Willem Aipassa, S. Kom. • Pemrograman Aplikasi Mobile

  2. Persistence • MIDP menyediakan sebuah API untuk menyimpan data-data secara local pada device tersebut • Data disimpan dalam non-volatile memory • MIDlet memiliki fasilitas Record Management System (RMS) untuk menyimpan data • Data disimpan dalam bentuk record-record • Kumpulan record-record ini disebut Record Store Marsel Willem Aipassa, S. Kom.

  3. Bahasan • Record Store • Membuat dan membuka Record Store • Menambah, mengambil,menghapus dan mengupdate record • Menggunakan RecordEnumerate • Record Comparator • Record Filter Marsel Willem Aipassa, S. Kom. 3

  4. Record Store • Merupakan koleksi dari record-record • RecordStore memiliki id yang otomatis diberikan pada saat sebuah record dibentuk dan unik • id bertindak sebagai index atau primary key • id dibuat seacara sekuensial dan tidak dapat dibuat kembali • id pada Record Store dimulai dari “1” bukan “0” Marsel Willem Aipassa, S. Kom. 4

  5. Record Store (2) Marsel Willem Aipassa, S. Kom. 5

  6. Record Store (3) • MIDlet dapat menciptakan lebih dari 1 Record Store • Nama dari tiap Record Store haruslah unik dan memiliki panjang maksimal 32 karakter • Saat MIDlet suite dihapus dari aplikasi maka semua record store yang terhubung dengannya juga akan dihapus Marsel Willem Aipassa, S. Kom. 6

  7. Membuat dan membuka Record Store Marsel Willem Aipassa, S. Kom. 7

  8. Menambah Record Marsel Willem Aipassa, S. Kom. 8

  9. Mengambil Record Marsel Willem Aipassa, S. Kom. 9

  10. Menghapus Record • Pada saat sebuah record dihapus, record idnya tidak akan digunakan kembali pada addRecord • Tidak disarankan untuk menggunakan counter increment untuk mengambil keseluruhan record di dalam record store Marsel Willem Aipassa, S. Kom. 10

  11. Contoh Program Marsel Willem Aipassa, S. Kom. 11

  12. Mengubah (edit) Record • Untuk mengubah suatu record digunakan method setRecord Marsel Willem Aipassa, S. Kom. 12

  13. Contoh Program Marsel Willem Aipassa, S. Kom. 13

  14. Record Enumeration • Record Enumeration dapat menyelesaikan permasalahan dalam penggunaan incrementing index • Record Enumeration menghasilkan enumerasi untuk memeriksa seluruh record pada sebuah record store • Dengan menggunakan Record Enumeration, dapat dipasangkan sebuah Record Compator untuk pembanding Marsel Willem Aipassa, S. Kom. 14

  15. Record Enumeration (2) Marsel Willem Aipassa, S. Kom. 15

  16. Contoh Program Marsel Willem Aipassa, S. Kom. 16

  17. Record Comparator • Digunakan untuk mendefenisikan metode pengurutan dari sebuah Record Enumeration • Dispesifikkan lewat method enumerateRecords • Untuk membuat sebuah Record Comparator harus diimplementasikan interface RecordComparator dan method compare Marsel Willem Aipassa, S. Kom. 17

  18. Record Comparator (2) • Method compare harus mengembalikan return value bertipe integer yang dapat berupa RecordComparator.FOLLOWS, RecordComparator.PRECEDES atau RecordComparator.EQUIVALENT • Tipe value pengembalian ini tergantung pada pembuat program Marsel Willem Aipassa, S. Kom. 18

  19. Contoh Program Marsel Willem Aipassa, S. Kom. 19

  20. Record Filter • Digunakan untuk membatasi output sehingga hanya ditampilkan record yang diinginkan • Untuk dapat menggunakannya harus mengimplementasikan interface RecordFilter • Memiliki fungsi matches yang berfungsi untuk menyeleksi suatu record Marsel Willem Aipassa, S. Kom. 20

  21. Method lain untuk RecordStores Marsel Willem Aipassa, S. Kom. 21

  22. Terima Kasih • Siapkan kertas dan pena…  Marsel Willem Aipassa, S. Kom. 22

  23. Post Test 1 • Apa yang dimaksud dengan Persistent Storage? • Sebutkan nama method yang digunakan untuk membuka Record Store! • Sebutkan alasan penggunaan RecordEnumeration dibanding incremental index! • Jelaskan fungsi dari RecordComparator dan RecordFilter Marsel Willem Aipassa, S. Kom. 23

  24. Tugas 2 • Buatlah sebuah aplikasi yang memiliki 2 Record Store: • Diari • No. Kontak • Pada awal tampilan user dapat memilih Record Store yang diinginkan • Setiap Record Store dapat menampilkan detail informasi dari setiap item di dalam List Marsel Willem Aipassa, S. Kom. 24

  25. Tugas 2 • Detail informasi Diari: • Teks • Tanggal • Detail informasi No. Kontak: • Nama • No. Telp • Alamat Marsel Willem Aipassa, S. Kom. 25

  26. Tugas 3 • Buatlah paper tentang Jaringan dalam MIDP • Minimal harus ada pembahasan tentang: • GCF • HTTP • TCP Socket • Pembahasan harus disertai potongan coding (bukan seluruh isi program) dan penjelasan • Minimal 3 halaman • Format font header : bold, 12 pt, Times New Roman • Format font isi : plain, 11pt, Times New Roman • Jarak antar spasi 1 Marsel Willem Aipassa, S. Kom. 26

  27. Pengumpulan • Tugas 2 • Tugas aplikasi harus dapat dideploy ke perangkat mobile (bagi yang tidak bisa nilai tugas akan dikurangi) • Tugas dikumpulkan hari Jumat jam 12 dalam bentuk softcopy (coding program) dan deployed application (di dalam device) di ruangan pak Ramos • Tugas 3 • Tugas dikumpulkan dalam bentuk *.pdf ke acelox@ymail.com paling lambat hari Minggu, 1 Oktober jam 10 pagi • nim_kelaspam_tugas3 • Segala kecurangan termasuk COPY PASTEnilai turun 1 grade (ex, A -> B) Marsel Willem Aipassa, S. Kom. 27

More Related