10 Hal Baru di CODEIGNITER 4 (Yang Harus Kalian Ketahui)
Summary
TLDRIn this video, the host Sandhika Galih introduces CodeIgniter 4 (CI-4), highlighting its new features and improvements over CI-3. The discussion covers the easier installation process through Composer, the introduction of a local development server, and the requirement of PHP 7.2 for better performance. The presenter also addresses changes in directory structure, the adoption of naming conventions, and enhanced autoloading. CI-4's new command-line interface is explored, along with its updated documentation and HTTP methods support. The host concludes by encouraging viewers to try CI-4 for its modern features and performance benefits, suggesting it's worth learning for both beginners and experienced developers.
Takeaways
- đ CodeIgniter 4 (CI-4) was released in February and has been requested by many for tutorials on the Web Programming Unpas channel.
- đ CI-4 introduces significant changes and new features compared to its predecessor, making it worth exploring for both beginners and experienced developers.
- đ CodeIgniter 3 (CI-3) was beginner-friendly and well-documented, making it a popular choice for those new to PHP frameworks.
- đ CI-3 was initially released in 2015 and supported PHP versions as old as 5.3, whereas CI-4 requires PHP 7.2 or newer, reflecting advancements in PHP language capabilities.
- đ The CI-4 release was dedicated to the memory of EllisLab's founder, James W. Perry, who passed away before its release.
- đ CI-4 simplifies installation through Composer, aligning with modern PHP practices and making updates and dependency management more efficient.
- đ» CI-4 includes a local development server feature, allowing developers to run their server directly from the terminal for easier local testing and development.
- đ The directory structure in CI-4 has been updated to follow modern standards, with all folder names in uppercase and a new 'public' folder to enhance security by hiding internal files from public access.
- đ CI-4 enforces the use of namespaces and PSR-4 autoloading standards, improving code organization and reducing naming conflicts.
- đ CI-4 features a new configuration file system, allowing for environment-specific settings to be easily managed without modifying core code.
- đ CI-4 includes a Command Line Interface (CLI) called PHP Spark, which facilitates tasks like cronjobs, file permissions, and data backups, enhancing automation capabilities.
- đ The documentation for CI-4 has been revamped to be more comprehensive and technical, although it may be less beginner-friendly due to the complexity of the examples provided.
Q & A
What is the main topic discussed in the video?
-The main topic discussed in the video is the introduction and review of the new features in CodeIgniter 4 (CI-4), a PHP framework.
When was CodeIgniter 4 released?
-CodeIgniter 4 was released in February.
What is the significance of the release date of CodeIgniter 4?
-The release date of CodeIgniter 4 is significant as it coincides with the birthday of EllisLab, the company that originally developed CodeIgniter.
Why is CodeIgniter 3 considered beginner-friendly?
-CodeIgniter 3 is considered beginner-friendly because it is designed to be easy to understand and use, especially for those new to PHP frameworks, with its architecture closely resembling the MVC pattern that beginners have likely studied.
What is the minimum PHP version required for CodeIgniter 4?
-The minimum PHP version required for CodeIgniter 4 is PHP 7.2.
How has the directory structure changed from CodeIgniter 3 to CodeIgniter 4?
-In CodeIgniter 4, the directory structure has been updated to follow new standards, with all folder names in uppercase and a new 'public' folder that contains the 'index.php' file, which helps to keep publicly accessible files separate from others.
What is the impact of using PSR-4 in CodeIgniter 4?
-Using PSR-4 in CodeIgniter 4 improves the autoloading process, making it more efficient and reducing ambiguity, as it follows a standard for class naming and file structure.
What is the benefit of having a '.env' file in CodeIgniter 4?
-The '.env' file in CodeIgniter 4 allows for easy configuration changes between development, testing, and production environments without altering the codebase, facilitating easier deployment and collaboration.
What is the new feature called 'Spark' in CodeIgniter 4?
-In CodeIgniter 4, 'Spark' refers to the Command Line Interface (CLI) that simplifies tasks such as cronjobs, automation scripts, and interactive commands, enhancing productivity and application management.
How has the documentation for CodeIgniter 4 changed from previous versions?
-The documentation for CodeIgniter 4 has become more comprehensive and technically detailed, although it may be less beginner-friendly due to the complexity of the examples and the assumption of prior knowledge in some cases.
What is the recommendation for those who are already familiar with CodeIgniter 3 to approach CodeIgniter 4?
-For those familiar with CodeIgniter 3, it is recommended to try CodeIgniter 4 as it offers significant improvements and new features, but be prepared to learn some new concepts and changes.
Outlines
đ Introduction to CodeIgniter 4
The speaker, Sandhika Galih, welcomes the audience to the Web Programming Unpas channel and introduces the topic of discussion: CodeIgniter 4 (CI-4). He mentions that CI-4 has been released recently and there's a demand for tutorials on it. The speaker plans to review CI-4, highlighting new features and changes compared to its predecessor, CodeIgniter 3. He also briefly mentions his previous tutorials on CodeIgniter 3, emphasizing its beginner-friendliness and suitability for those new to PHP frameworks. The speaker reminisces about the evolution of PHP and the long gap between CodeIgniter 3's release in 2015 and the release of CI-4 in 2020. He notes the significant changes in PHP itself, especially the shift from PHP 5 to PHP 7, which has improved performance. The video aims to explore whether CI-4 is worth learning and what new features it offers.
đ ïž Changes and Features in CodeIgniter 4
The speaker discusses the new features and changes in CodeIgniter 4. The first notable change is the simplified installation process using Composer, which modernizes the framework and makes it easier to manage dependencies and updates. Another new feature is the local development server that allows developers to run their application directly from the terminal, enhancing the development experience. The speaker also mentions the updated minimum PHP version requirement, which is now PHP 7.2, ensuring better performance and adherence to modern standards. The directory structure has been revamped, with a new 'public' folder and uppercase naming conventions for directories, aligning with contemporary best practices. CodeIgniter 4 also introduces namespace support, autoloading, and environment-specific configuration files, making it more efficient and organized. Additionally, CI-4 includes a command-line interface for tasks like cronjobs and automation, enhancing the framework's utility. The speaker concludes this section by emphasizing the significant improvements in CI-4's performance and modern features compared to CodeIgniter 3.
đ Documentation and Learning CodeIgniter 4
The speaker talks about the updated documentation for CodeIgniter 4, noting that it has become more comprehensive and technical. He suggests that the documentation might be less beginner-friendly due to the complexity of the examples provided. The speaker encourages viewers to explore CI-4's features and share their experiences in the comments section. He also addresses whether CI-4 is worth learning, suggesting that it is, given the numerous new features and improvements. He recommends CI-4 for both beginners and those experienced with CodeIgniter 3, as well as for those who have used other modern frameworks. The speaker concludes by expressing his excitement to possibly create a simple application using CI-4 in a future video, hinting at a practical demonstration of the framework's capabilities.
Mindmap
Keywords
đĄCodeIgniter 4
đĄComposer
đĄLocal Development Server
đĄPHP 7
đĄDirectory Structure
đĄPSR-4 Autoloading
đĄEnvironment Configuration
đĄCommand Line Interface (CLI)
đĄHTTP Methods
đĄDocumentation
Highlights
Introduction to CodeIgniter 4 (CI-4) and its release in February.
Comparison of CI-4 with its predecessor, CodeIgniter 3, highlighting the differences and improvements.
Emphasis on CodeIgniter 3's beginner-friendliness and its suitability for those new to PHP frameworks.
The transition from PHP 5 to PHP 7 and its impact on performance and framework requirements.
The passing of James Perry, a significant figure in the CodeIgniter community, and the decision to release CI-4 on his birthday as a tribute.
Simplification of the installation process in CI-4 through the use of Composer.
Introduction of a local development server in CI-4 for easier server management.
Requirement of PHP 7.2 or newer for CI-4, aligning with modern PHP standards.
Changes in directory structure in CI-4, with a new 'public' folder and updated naming conventions.
CI-4's adoption of namespace and PSR-4 autoloading standards for better code organization.
Enhanced configuration management in CI-4 with environment-specific files for development, testing, and production.
Introduction of the Command Line Interface (CLI) in CI-4 for tasks automation and cronjob management.
CI-4's improved routing features, allowing for more HTTP methods beyond GET and POST.
CI-4's updated documentation, which is more comprehensive but potentially less beginner-friendly.
Recommendation for those familiar with CodeIgniter 3 to try CI-4 and for beginners to consider starting with CI-4.
Encouragement for users to share their experiences and thoughts on CI-4 in the comments.
Conclusion that CI-4 is a significant upgrade from CI-3 and is worth exploring for its modern features and performance improvements.
Transcripts
halo halo teman-teman semua selamat
datang di channel web programming Unpas
bersama saya sandhika Galih dan di video
kali ini kita akan membahas mengenai
CodeIgniter 4 atau ci-4 chat kita tahu
koordinator ini sudah rilis dari
beberapa waktu yang lalu tepatnya di
bulan Februari dan udah banyak juga
teman teman yang minta dibuatkan
tutorial di channel web programming
Unpas ini mengenai coding MT4 tapi di
video kali ini kita akan review dulu
kita akan melihat apa aja sih yang baru
yang ada di Framework CodeIgniter 4 ini
yang berbeda dengan versi sebelumnya
apakah perubahan yang banyak Apakah
removing layak untuk kita pelajari lebih
lanjut kita lihat di video ini ya Tapi
sebelum kita masuk membahas mengenai
CodeIgniter 4 kita coba review dulu
sedikit atau flashback dulu ayah
mengenai CodeIgniter 3 teman-teman tahu
di channel ini kita sudah Buat beberapa
tutorial mengenai koordinator 30
mengikutin memang sudah bisa merasakan
bagaimana pengalaman menggunakan
Framework tersebut nah terus Transport
CodeIgniter 3 saya pribadi itu cukup
supaya dengan Framework nya karena yang
paling utama adalah promo tersebut
begginer friendly atau cocok sekali
digunakan untuk pemula yang baru akan
belajar mengenai Framework PHP Jadi
kalau sebelumnya teman-teman belajar
mengenai Php dasar dan artis PHP tanpa
semor produk teman-teman belajar
mengenai object-oriented PHP terus masuk
ke konsep mvc yang semuanya ada di
playlist di channel web programming
Unpas ini nah begitu Ingin belajar
mengenai sebuah Framework CodeIgniter 3
itu cocok banget karena arsitekturnya
mirip dengan mvc yang sudah kita
pelajari dan selain itu saya suka juga
kodenya ketiga karena dokumentasinya
yang mudah dibaca dan Kayaknya
dokumentasinya juga sama begginer
friendly nanti kita lihat apakah kodenya
terinfeksi 4 ini masih tetap sama atau
ada perubahannya sedikit cerita juga
mengenai CodeIgniter 3 dan 4 ini kalau
temen-temen tahu CodeIgniter 3 itu kalau
nggak salah itu
mulai rilis tahun 2015 jadi dari tahun
2015-2020 itu lama sekali ya Bahkan
menurutnya Terlalu lama untuk sebuah
Remo gimana dalam kurun waktu lima tahun
itu banyak sekali yang berubah terutama
dari bahasa pemrograman PHP itu sendiri
kenapa sudah mengalami banyak sekali
perubahan saat ini udah masuk versi 7
waktu pertama kali yaitu tiga itu
rasanya masih support untuk PHP versi 5
kejadian Master PHP versi lama dan kita
tahu PHP versi lama tersebut itu
performancenya tidak sebaik versi 7 yang
sekarang jadi lima tahun umur dari
CodeIgniter versi 3 Nah baru dibulan
Februari 2020 ini kodenya tempat itu
rilis versi Alpha nya jadi Sudah bisa
kita download itu nanti cerita menarik
sekaligus sedih juga ya Jadi beli
[Musik]
24-01-2019 dynatree ini
Hai jadi ada seorang namanya gym Perry
atau games Perry ya Bapak James Perry
ini betulan meninggal satu bulan sebelum
rilisnya CodeIgniter 4 ini karena
penyakit kanker prostat jadi komunitas
pengemudi berani memutuskan untuk
merayakan ulang tahun dari detik sambil
mengenang jasa yang sudah dilakukan oleh
Beliau kita release konversi 4 di hari
ulang tahunnya jadi 24 Feb trisco
dinetralisir sampai mereka menyadari
bahwa game steering demi sedikit cerita
mengenai koordinator tersimpan dan
mungkin kalau misalkan kalian pengen tau
cerita lebih lengkapnya nanti saya
simpan di deskripsi video ini dan
sekarang kita langsung saja masuk ke
hal-hal apa saja yang berubah apa yang
baru yang bisa kita dapatkan di
Framework CodeIgniter versi 4 ini kita
lihat yang pertama Ya yang pertama yang
paling terasa perbedaannya adalah proses
instalasinya teman-teman kalau
sebelumnya proses instalasinya itu di
Khan download remotenya di websitenya
lalu kita simpan di server kita atau Nyi
lokal di hate Dogs kita-kita ekstrak
terus kita jalankan kalau sekarang ini
sama seperti remover modern yang lain
kita bisa Install langsung lewat
composer nah ini sangat memudahkan
Karena sekarang kita jadi bisa
menginstall lewat Terminal
teman-temannya Jadi kalian cukup Panggil
perintahnya menggunakan composer tinggal
kita kasih nama projectnya misalnya
seperti ini Nah dengan menggunakan
composer ini akan sangat memudahkan kita
ketika anda komponen-komponen yang
berubah atau di update versinya ya
karena dengan menggunakan komposter kita
tinggal otomatis melakukan update saja
pada composer ekonomis akan kita
download manual itu untuk mengupdatenya
kita harus update manual juga nah
walaupun masih ada fasilitas untuk
download manualnya Jadi teman-teman
kalau misalkan buka websitenya masih
bisa download secara manual tadi
teman-teman akan tetap dapat
Hai lanjutnya sama aja ada cara ketiga
juga yang bisa teman-teman lakukan yaitu
melakukan kloning pada kitab sekarang
bisa dilihat digital di kalian bisa
keluar tapi intinya sekarang kita bisa
instal lewat composer rasa yang kedua
yang berbeda adalah kita sekarang punya
local development server jadi kita bisa
jalankan server dari website kita
menggunakan Terminal juga jadi caranya
kalian bisa masuk dulu ke foldernya
kalau misalkan sudah didownload lalu
kalian jalankan perintah HP farther
sekarang aplikasi dari cek kalian jalan
disini jadi tinggal dibuka ajaa maka
sekarang otomatis pop sekarang sudah
berjalan dan ini sebelumnya bisa kalian
simpan diluar folder htdocs jadi bisa
disimpan di mana saja dengan menggunakan
local development server jadi kerennya
nah ini tiga yang baru dari koordinator
4 adalah sekarang kita minimal harus
menggunakan PHP Files
petunjuk koma dua jadi cukup Advance
gitu jadi phpnya harus pakai yang
terbaru di bawah itu kayaknya enggak
support karena menggunakan PHP 7 ini
membuat aplikasi kalian nanti
performanya lebih bagus gitu dan kalian
dipaksa untuk menggunakan aturan atau
standar yang lebih baru call dulu ci3
itu minimal phpnya versi 5,6 Jadi udah
versi yang lama lagi tuh jadi gitu Yang
ketiga versi terbaru dipastikan kalau
kalian mau install Nanti cek dulu apakah
php72 atau belum cek lagi kalau misalkan
Kalian pakai sampai pakai wow gitu ya
cek Apakah udah selesai yang terbaru
atau belum tempat yang baru dari C4
adalah struktur direktori atau folder
nya berubah Nah ini teman-teman bisa
lihat di sebelah kiri saya punya
struktur folder untuk ci-4 dan di
sebelah kanan ini ada struktur folder
untuk C3 Nah sekarang semua file dan
folder yang dibutuhkan itu ada di dalam
folder
dan di dalam teman-teman besarnya
sekarang aturan penamaan foldernya udah
huruf besar semua untuk yang di dalam
Arabnya beda dengan yang lama ya
sekarang udah ngikutin standar yang baru
dan yang saya suka adalah dicapai 4
sekarang dia punya folder public yang
dialami sudah ada file index.php dengan
menggunakan folder pabrik ini nanti
membuat aplikasi kalian bisa jadi Paman
ya karena efeknya ga akan keliatan di
websitenya jika kalian bisa nyimpen
file-file yang memang bisa dilihat oleh
pabrik di sini kalau di ci3 itu
bawaannya gak ada kita harus bikin
sendiri jadi Nanti kalian bisa dengan
mudah menyimpan folder kalian di web
hosting atau di server kalian yang
kelihatan oleh publik hanya water pabrik
saja ya Jadi ini adalah perbedaan dari
struktur folder j4dan C3 selanjutnya
perbedaan yang kelima adalah C4 atau
kodenya tempat ini sudah menganut Neng
spacing ini sangat memudahkan ketika
kita menggunakan library atau
scripting yang ketiga gitu karena akan
menghindari ambiguitas meskipun kita
punya nama yang sama karena named
spesial berbeda itu nantinya akan ada
masalah kalau saya tidak sebelumnya
enggak pakai lem spray rasanya yang
keenam perbedaannya adalah nyambung dari
tadi sekarang ci-4 memiliki autoloading
yang sangat efektif Karena sudah pakai
standar yang baru psa4 itu oto
loadingnya lebih otomatis lagi nggak
seperti yang kita harus manual gitu ya
melakukan autoload dari fitur yang kita
butuhkan kau selanjutnya yang ketujuh
itu ci-4 punya file titik emmc atau saat
konfigurasi yang bisa kita simpan di
dalam script kita nah ini sangat
memudahkan kita saat kita membuat
websitenya ini bisa membedakan dengan
mudah mana saat development mana saat
texting mana saat production di dapat
diubah dengan mudah hanya menggunakan
file-file Entertainment Ini atau titik
tensinya jadi nggak perlu masuk ke
codingannya terus kita ubah versinya ya
Kim kita gampang pada saat mau
deployment dan kolaborasi kita jadi
kalau misalkan kita ngerjain satu
Project banyak orang pada saat
masing-masing nyimpen ke repositori nya
itu nggak perlu masukin konfigurasi gitu
Jadi kita gunakan aja konfigurasi di
tempat penyimpanannya selanjutnya yang
ke-8 itu perbedaannya sekarang karena
dia sudah menjadi Framework yang modern
begitu ya dia juga punya sesuatu yang
dinamakan dengan schiele atau command
Line interface the Michael ini bisa
memudahkan kita untuk melakukan banyak
hal yang bisa akan melakukan cronjob
atau otomasi tastaktsir akan dilakukan
atau kalau misalkan ingin membuat sebuah
tas yang interaktif Karena usernya untuk
ngikutin password Pato file permission
atau misalkan backup data itu bisa
melakukan command Line atau terminal
ternyata di kita udah lihat bahwa kita
bisa pakai terminal untuk menjalanin
terbesarnya jadi kita bisa PHP Spark
lalu apa gitu Nah nanti Dengan siala ini
kita bisa bikin atau Panggil comment
yang berbeda bahkan kalian bisa
yang sendiri printah di dalam komen
lainnya dan ini akan memudahkan kalian
untuk misalnya mau berinteraksi atau
mengintegrasikan aplikasi kalian dengan
aplikasi Lain rasanya ini yang cukup
keren sekarang dc4in yg didalamnya sudah
memiliki fitur ras yang jadi kalian bisa
bikin receptie dengan hanya menggunakan
c-nya saja karena didalamnya sudah ada
resout dimana kita bisa melakukan
rooting tidak hanya dengan menggunakan
metode yang konvensional saja seperti
biak dan pos tapi juga bisa menggunakan
metode result lainnya seperti Food Fest
dan delete dan juga sekarang di dalam C4
itu punya fitur http methods pusing
untuk mengganti tadi yang default-nya
hanya bisa melakukan get dan post nanti
bisa diakalin gitu ya supaya request
yang kita kirimkan itu bentuknya bisa
face bisa Put atau Delete nah dan yang
ke-10 ini terakhir diri saya adalah
mengenai dokumentasinya dapat
teman-temannya dokumentasinya sekarang
benar-benar berubah dokumentasi lengkap
tetap komprehensif
di sekarang menurut saya sudah naik gitu
ya levelnya menjadi lebih teknis dan
menurut saya jadi kurang ramah untuk
pemula itu dikarenakan kalau kita nyoba
script yang ada di dalam dokumentasinya
itu enggak langsung jalan karena ada
beberapa step yang harus kita cari
sendiri bagaimana cara ngatasinnya
ajarin seringkali dokumentasinya ditulis
tambahkan beberapa script berikut begitu
script itu kita tambahin itu belum
langsung jalan karena mungkin ada script
lain yang harus kita modifikasi dulu
yang itu tidak tertulis didalam
dokumentasinya yang mungkin si penulis
Yang Anggap kita harusnya udah paham
dulu tentang topik itu juga
teman-temannya Jadi mungkin itu ada 10
hal baru yang bisa kita dapatkan di
dalam koordinator 4 ini ya saya yakin
masih banyak sekali hal-hal lain yang
baru dan lebih keren yang bisa
ditawarkan oleh koordinator empat yang
mungkin kalian akan temukan sendiri
ketika kalian nyobain cream Oke ini jadi
kesimpulan yang bisa saya sampaikan
adalah kodenya tempat ini perubahannya
sangat signifikan beda banget dengan
CodeIgniter 3 Jadi kalau misalkan kalian
yang sekarang sudah terbiasa
dan tidak fitur saya perlu ada beberapa
hal yang harus dipelajari dulu kita
Sebelum bisa langsung dengan nyaman
nyobain ci-4 ini ke-4 jadi semakin keren
performa Saint pasti semakin baik karena
menggunakan teknologi modern Ya seperti
Tadi HPnya udah versi 7 terus banyak
standar yang baru yang digunakan jadi
pasti performa saya jauh lebih baik dan
pertanyaan dari kalian adalah Apakah
layak Nani untuk dipelajari si
CodeIgniter versi 4 ini kalau menurut
saya sih sebenarnya layak dicoba yang
layak dicoba karena tadi banyak hal yang
baru tapi mungkin gini kalau misalkan
kalian sebelumnya belum pernah
menggunakan Framework nggak ada salahnya
untuk nyobain jadi empat ini sebelumnya
sudah belajar PHP tapi belum tampak
remote silahkan gunakan kodenya tempat
atau kalau kalian yang sebelumnya sudah
menggunakan C3 udah bikin web pakai C3
udah nyaman gitu ya nggak ada salahnya
juga untuk coba grade ke koordinator 4
ini tapi misalkan kalian adalah orang
yang sudah nyoba Framework lain yang
modern seperti laravel dan lainnya itu
sepertinya cream kamu
sekalian karena kayaknya fitur-fitur
yang ada di ci-4 ini juga sudah ada di
Parakan tapi kita disini bukan mencari
mana Pramuka paling baik karena
masing-masing punya kelebihan dan
kekurangan tentu saja ya Jadi kalau
kalian cobain dua-duanya Rasakan Sendiri
lalu pilih yang sesuai dengan kebutuhan
kalian dan terakhir mungkin buat
temen-temen yang udah pernah menggunakan
CodeIgniter tempat sebelumnya kira-kira
fitur apalagi yang ada di dalam C4 ini
yang tadi Saya enggak Sebutkan tulis di
kolom komentar di bawah video ini cerita
juga mungkin pengalamannya menggunakan
kode tempat buat yang sudah pakai dan
teman-teman yang lain juga mendapatkan
gambaran Gimana sih rasanya pakai tempat
ini dan mungkin buat kalian yang
penasaran bener-bener gimana Cara
pakainya next mungkin kita akan cobain
bikin aplikasi sederhana menggunakan
kode tempat ini Mungkin itu saja untuk
video kali ini teman-temannya
mudah-mudahan bermanfaat ya kita ketemu
lagi divideo berikutnya terima kasih
teman-teman sudah menonton technically
pamit dan seperti biasa jangan lupa
titik Pop
hai hai
Voir Plus de Vidéos Connexes
Top 5 CI/CD Interview Q&A | DevOps FAQ |#devopsinterviewquestions | #jenkins |#devops #kubernetes
Simple and Effective tool for .NET developers
Node.js Food Order System Tutorial (EASY & FAST)
Day-18 | What is CICD ? | Introduction to CICD | How CICD works ? | #devops #abhishekveeramalla
Apa itu Raspberry Pi? Kelebihan dan Kegunaannya
Google actually beat GPT-4 this time? Gemini Ultra released
5.0 / 5 (0 votes)