Saturday, February 10, 2018

Tutorial Singkat - PARSER Codeigniter



(Tingkat: Dasar - Menengah - Mahir)

Teman-teman semua yang baik hatinya, berikut ini saya coba untuk memberikan tutorial singkat mengenai Parser di Cedeigniter.

Berangkat dari keprihatinan saya, karena banyak yang mengalami kebingungan dalam menangani codeigniter, terutama yang projectnya sudah membesar, ada juga yg mendapat limpahan project dari developer sebelumnya yg sudah ruwet codenya. Semoga dengan tutorial singkat ini dapat memberi sedikit pencerahan, bagaimana menangani code di Codeigniter.

- Target utamanya adalah, membersihkan VIEW dari tag PHP (yg seperti sepageti campur aduk HTML dengan PHP)
- Mempermudah kolaborasi antara PHP Programmer dengan Web Designer (HTML, CSS, JAVASCRIPT)
- Semua file VIEW menggunakan extension *.html

1. Folder : application/config
 - autoload.php  (https://gist.github.com/JerryMaheswara/b41b0d99073e5c1fd38369aa8c8470fa)
 - config.php  (https://gist.github.com/JerryMaheswara/dedfa1ece2524cdef8f3da36a75f0d39)
 - database.php (https://gist.github.com/JerryMaheswara/943fbfc75154e2a4c77ba00c6062949e)

2. Folder : application/core
 - MY_Controller.php (https://gist.github.com/JerryMaheswara/a1c2a84cb916c084fbebca2093da2ba2)

3. Folder : application/controllers
 - Contoh.php (https://gist.github.com/JerryMaheswara/63905d07c20956529088caf326930de3)

4. Folder : application/views
 - index.html (https://gist.github.com/JerryMaheswara/87d2e714dacff3dd071e46e24ce18189)
 - header.html (https://gist.github.com/JerryMaheswara/90d2e7eb5858f5f34f2fc3ecf9129b1b)
 - footer.html (https://gist.github.com/JerryMaheswara/3d05d9051f83692daf9e6c9c7b182c85)
 - content.html (https://gist.github.com/JerryMaheswara/12d42b62a13dfdaf853840bac3cd04b2)
 - login.html (https://gist.github.com/JerryMaheswara/0bfe18881e75b5d90e78f0166f2cc530)
 - register.html (https://gist.github.com/JerryMaheswara/4f26a4a74b5596f36a2b3470079208e7)

5. Folder: application/helpers
 - opn_helper.php (https://gist.github.com/JerryMaheswara/50124b8401e232bc59890c47cab13aeb)

Untuk menyembunyikan /index.php/ di url:
- .htaccess  (https://gist.github.com/JerryMaheswara/6cf496bdaa2365f988bbf831746cffde)

SQL contoh:
- contoh.sql (https://gist.github.com/JerryMaheswara/f0cff72131857d8c1733da1e42cbcd2e)

Jika ada yang kurang jelas atau terjadi error, diperbolehkan Telegram saya  @jerrymaheswara .

GOOD LUCK ...!! Semoga bermanfaat...