Modul Web Programming 2
Total Page:16
File Type:pdf, Size:1020Kb
Modul Web Programming 2 Oleh : Agung Sasongko, M.Kom Program Studi Sistem Informasi Fakultas Teknologi Informasi Agung Sasongko, M.Kom | Sistem Informasi Universitas Bina Sarana Informatika 2018 Daftar Isi Pertemuan 1 ............................................................................................................................................... 4 1.1. Framework Web ......................................................................................................................... 4 1.2. Mengapa Laravel ........................................................................................................................ 5 1.3. Paket Aplikasi Pengembangan PHP ........................................................................................... 5 3.2. Mendaftarkan Direktori PHP ...................................................................................................... 8 3.3. Pemasangan Composer ............................................................................................................ 10 3.4. Pemasangan Laravel ................................................................................................................. 13 3.5. IDE Pengembangan Aplikasi Web ............................................................................................ 14 3.6. Aplikasi Presensi ....................................................................................................................... 17 3.7. Rancangan Database Presensi.................................................................................................. 18 3.8. Membuat Database Menggunakan Migration ........................................................................ 19 Tugas Rumah ........................................................................................................................................ 26 Pertemuan 2 ............................................................................................................................................. 28 2.1. Konsep MVC ............................................................................................................................. 28 2.2. Jenis-Jenis MVC ........................................................................................................................ 28 2.3. Model di Laravel ....................................................................................................................... 29 2.4. Membuat Model di Laravel ...................................................................................................... 29 2.5. Controller di Laravel ................................................................................................................. 35 2.6. Membuat Controller di Laravel ................................................................................................ 35 2.7. Mengatur Routing .................................................................................................................... 41 2.8. Pengujian .................................................................................................................................. 42 Latihan .................................................................................................................................................. 45 Tugas Rumah ........................................................................................................................................ 47 Pertemuan 3 ............................................................................................................................................. 49 3.1. Pengenalan Flutter ................................................................................................................... 49 3.2. Pemasangan Flutter SDK .......................................................................................................... 49 Web Programming 2 - Pertemuan 1 | Universitas Bina Sarana Informatika 2 Agung Sasongko, M.Kom | Sistem Informasi 3.3. Pemasangan SDK Flutter Web .................................................................................................. 50 3.4. Memulai pembuatan Project Flutter Web ............................................................................... 51 3.5. Instalasi Paket Extension Flutter di VSCode............................................................................. 54 3.6. Pembuatan Tampilan ............................................................................................................... 54 3.7. Membuat Page Halaman .......................................................................................................... 67 3.8. Menghubungkan ke Beranda ................................................................................................... 71 Latihan .................................................................................................................................................. 73 Tugas Rumah ........................................................................................................................................ 74 Pertemuan 4 ............................................................................................................................................. 75 4.1. Penggunaan Future dan Async ................................................................................................. 75 4.2. Cross-Origin Resource Sharing (CORS) ..................................................................................... 76 4.3. Pemasangan CORS di Laravel ................................................................................................... 76 4.4. Pemasangan Plugin http di Flutter ........................................................................................... 79 4.5. Pengambilan data dari Server .................................................................................................. 80 4.6. Widget FormKaryawanScreen .................................................................................................. 86 4.7. Pengiriman data ke Server ....................................................................................................... 91 Tugas Rumah ........................................................................................................................................ 94 Pertemuan 5 ............................................................................................................................................. 97 5.1. Identifikasi Klien ....................................................................................................................... 97 5.2. Penggunaan Token ................................................................................................................... 97 5.3. LocalStorage ............................................................................................................................. 98 5.4. Membuat Form Login ............................................................................................................... 98 5.5. Pindah ke Halaman Lain ......................................................................................................... 105 5.6. ShowAlert ............................................................................................................................... 106 5.7. Auto Login............................................................................................................................... 107 5.8. Hard Coded ............................................................................................................................. 108 5.9. Pembuatan Konstanta ............................................................................................................ 109 5.10. Pengamanan API................................................................................................................. 110 5.11. Akses API – Auth dari Flutter.............................................................................................. 112 5.12. Release Aplikasi web .......................................................................................................... 114 5.13. Integrasi Release Aplikasi Flutter Web ke Laravel Project................................................. 115 Tugas Rumah ...................................................................................................................................... 117 Web Programming 2 - Pertemuan 1 | Universitas Bina Sarana Informatika 3 Agung Sasongko, M.Kom | Sistem Informasi Pertemuan 6 – 9 Konsultasi Project Akhir ............................................................................................... 118 Pertemuan 10-16 Presentasi Project Akhir ............................................................................................. 118 Pertemuan 1 Target: 1. Mengenal Framework Web 2. instalasi paket aplikasi webserver 3. Instalasi Composer & Laravel 4. Membuat Database Presensi 1.1. Framework Web Framework atau kerangka kerja dalam istilah rekayasa perangkat lunak merupakan perangkat lunak yang terdiri dari kumpulan library / pustaka kode program yang telah disediakan untuk membantu dalam pengembangan aplikasi web agar lebih cepat dan mudah. Dengan menggunakan framework maka programmer dapat lebih menghemat waktu dalam pengembangan aplikasi karena berfokus pada penulisan kode proses bisnis aplikasi yang lebih aman, tanpa perlu menghabiskan waktu untuk menyediakan kode fungsi inti pada kebanyakan aplikasi web,