Top Banner
WAP (3) WAP (3) The Wireless Application Protocol The Wireless Application Protocol Muhammad Zen S. Hadi, ST. MSc. WAP - The Wireless Application Protocol
20

T Modul 10 WAP.pdf

Jan 12, 2017

Download

Documents

buihuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: T Modul 10 WAP.pdf

WAP (3)WAP (3)

The Wireless Application ProtocolThe Wireless Application Protocol

Muhammad Zen S. Hadi, ST. MSc.

WAP - The Wireless Application Protocol

Page 2: T Modul 10 WAP.pdf

ContentsContents

• WAP (Review)WAP (Review)

• Interkoneksi WML dengan PHP

• Interkoneksi dengan Database

WAP - The Wireless Application Protocol

Page 3: T Modul 10 WAP.pdf

WAP (Wireless Application Protocol)( pp )

Internet

WAP client WAP Gateway WAP Server

WAP - The Wireless Application Protocol

Page 4: T Modul 10 WAP.pdf

Interkoneksi WML dengan PHPInterkoneksi WML dengan PHP

• Pengembangan aplikasi WAP dengan PHP memungkinkan membuat aplikasi seperti database mail server pengiriman pesanmembuat aplikasi seperti database, mail server, pengiriman pesan, dll.

• Script PHP akan tetap diletakkan di sisi server, yang dikirim ke client hanya binary WML saja tanpa script PHP.

• Supaya script PHP dapat didukung oleh perangkat WAP, script ini harus menghasilkan output header WML kepada client.

• Karena itu, setiap dokumen WML yang berisi yang berisi kode PHP harus menyertakan baris-baris berikut yang ditempatkan pada awalharus menyertakan baris baris berikut yang ditempatkan pada awal deck.

WAP - The Wireless Application Protocol

Page 5: T Modul 10 WAP.pdf

Contoh Aplikasi WML - PHP

WAP - The Wireless Application Protocol

Page 6: T Modul 10 WAP.pdf

Passing parameter dari WML ke PHPPassing parameter dari WML ke PHP

• Navigasi dalam PHP bisa dalam bentuk card dan file, tetapi lebih g pumumnya dan menghindari error, gunakan navigasi file.

• Passing parameter bisa menggunakan 2 metode yaitu :a. POSTb GETb. GET

• Tambahkan perintah postfield pada perintah berikut :<do type=”type” label=”label”>

<go href=”url” method=“post”><go href= url method= post ><postfield name=”variabel” value=“nilai yg dikirim”/>

</go></do>/do

WAP - The Wireless Application Protocol

Page 7: T Modul 10 WAP.pdf

Contoh passing parameter dlm bentuk card

WAP - The Wireless Application Protocol

Page 8: T Modul 10 WAP.pdf

Contoh passing parameter dlm bentuk

filinput.php

file

prosesIn.php

WAP - The Wireless Application Protocol

Page 9: T Modul 10 WAP.pdf

Penanganan multiple inputPenanganan multiple input

• Jika input lebih dari satu, maka akan ada postfield t b h t k i b l b ik ttambahan untuk menampung variabel berikutnya.

• Contoh :<postfield name="Usernm" value="$user"/>p<postfield name="Passwd" value="$pass"/>

WAP - The Wireless Application Protocol

Page 10: T Modul 10 WAP.pdf

Contoh Multiple Input dengan password

WAP - The Wireless Application Protocol

Page 11: T Modul 10 WAP.pdf

Input Select Single List• Untuk menentukan satu buah pilihan.

input.php prosesSingle.php

WAP - The Wireless Application Protocol

Page 12: T Modul 10 WAP.pdf

Input Select Multiple List• Untuk menentukan banyak pilihan.

WAP - The Wireless Application Protocol

Page 13: T Modul 10 WAP.pdf

Aplikasi Berbasis WML - PHPAplikasi Berbasis WML - PHP

• Dalam pembuatan berbasis WAP, banyak digunakan pemrograman yang berbasis WML dan PHP dikarenakan kemudahan dalam halyang berbasis WML dan PHP dikarenakan kemudahan dalam hal aksesnya (WML di sisi client dan PHP di sisi server).

• Metode lain adalah berbasis WMLScript ( berekstensi .wmls), tetapi semua binary WML akan dikirim ke sisi user (tidak efektif).

WAP - The Wireless Application Protocol

Page 14: T Modul 10 WAP.pdf

Interaksi dengan Database (Review)Interaksi dengan Database (Review)

• Dalam pembuatan aplikasi berbasis Database – WAP, beberapa perintah di Database baik DML dan DDL bisa digunakanperintah di Database baik DML dan DDL bisa digunakan dikarenakan aksesnya masih berbasis PHP.

• Beberapa tahapan dalam interkoneksi dengan Database :

Membuka koneksi ke server MySQL$conn = mysql_connect (”host”,”username”,”password”);

Memilih databasemysql_select_db(”namadatabase”,$conn);

M ilih t b l d Memilih tabel dengan query$hasil = mysql_query(”SQL Statement”);

Mengambil record dari tabel

WAP - The Wireless Application Protocol

Mengambil record dari tabel$row = mysql_fetch_row($hasil);

Page 15: T Modul 10 WAP.pdf

Contoh aplikasi berbasis WAP - DatabaseContoh aplikasi berbasis WAP - Database

• Buat database KAMPUS, dengan tabel Mahasiswa yang memiliki field sebagai berikut dengan NRP sebagai Primary Key :field sebagai berikut, dengan NRP sebagai Primary Key :

• Akan dibuat aplikasi untuk memasukkan data baru, menghapus data dan upddate data serta menampilkan data dengan WAP.

WAP - The Wireless Application Protocol

Page 16: T Modul 10 WAP.pdf

Input data pada aplikasi Database (Insert)Input data pada aplikasi Database (Insert)

WAP - The Wireless Application Protocol

Page 17: T Modul 10 WAP.pdf

Menghapus Data (Delete)Menghapus Data (Delete)

WAP - The Wireless Application Protocol

Page 18: T Modul 10 WAP.pdf

Mengubah Data (Update Data)Mengubah Data (Update Data)

WAP - The Wireless Application Protocol

Page 19: T Modul 10 WAP.pdf

Menampilkan Data (Select)Menampilkan Data (Select)

WAP - The Wireless Application Protocol

Page 20: T Modul 10 WAP.pdf

Latihan SoalLatihan Soal

• Buatlah aplikasi untuk melakukan pertukaran nilai mata uang.B l h lik i di bil k d b• Buatlah aplikasi diatas bila menggunakan database.

WAP - The Wireless Application Protocol