Junior Code Review: 5 Tips for Over-Engineered Example

  Рет қаралды 5,929

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер
@tusharnain6652
@tusharnain6652 Ай бұрын
Hi everyone, the featured code was mine (just a starter for a big project), which featured a directory structure designed for larger projects, thinking ahead about scalability. Povilas provided great feedback on it being over-engineered for a smaller project, which I completely agree with. Honestly i think using laravel for any small project is an overkill in itself (its like using a sword to kill a bee). It's a valuable reminder to balance complexity with the project's size. Also for the admin authentication, i chose to go with custom solution instead for breeze, etc is because its going to be more complex later. Highly recommend checking out this series if you're looking to improve your coding skills!
@o_lobato
@o_lobato Ай бұрын
A project can be really small and still need authentication, authorization for resources control access, database management (migration, etc), notifications, queues, and so one! So its far from being a sword to kill a bee.
@tusharnain6652
@tusharnain6652 Ай бұрын
@o_lobato Imo, for smaller projects, we got smaller framework like CI4, etc
@dannjohnrem
@dannjohnrem Ай бұрын
can I clone it too so that I can learn from you approach? thank you so much
@aamirsohailkmas
@aamirsohailkmas Ай бұрын
I remember when I was a beginner, my goal was to make a structure that can be extended without problems, for example using a global model class that extends Laravel's model and similar case for other vendor classes, 😅
@bboydarknesz
@bboydarknesz Ай бұрын
always remember coding about KISS but readable. If we always think every possibility, everything could happen and it is infinity. And then you will over handle the logic, and over engineered but the reality it could be just rarely to be used. You will spend too much time in testing, debugging, reading the code, teaching your junior how to read the code. Stop the possibility / make it less, and you won't get loss and focus the main thing.
@rock3rkis670
@rock3rkis670 Ай бұрын
I think a Trait should have been used here.
@Aymen-y8j
@Aymen-y8j Ай бұрын
Do more of these pleass
@iamriwash7943
@iamriwash7943 Ай бұрын
flashToast can use inside helper funtion also
@ЖеняХристенко-е3ы
@ЖеняХристенко-е3ы Ай бұрын
It’s really interesting
@rihardstirums6698
@rihardstirums6698 Ай бұрын
Hey how would you approche in laravel 11 translatable url slugs? When user switches pages language so it updates the slugs into url menu.
@krekas
@krekas Ай бұрын
The same way as with earlier laravel versions
@rihardstirums6698
@rihardstirums6698 Ай бұрын
Hey @ can you please provide some guide (link, post) where i can learn more about this ? I wasn't able to find it.
@LaravelDaily
@LaravelDaily Ай бұрын
We have a full course on multi-language Laravel, so pretty sure you will find it somewhere here, depending on what package (if any) you're using: laraveldaily.com/course/multi-language-laravel
@LoganathanNatarajanlogudotcom
@LoganathanNatarajanlogudotcom Ай бұрын
Thank you
@RubensRocha
@RubensRocha Ай бұрын
Which contact channel can I use to send a code for analysis?
@LaravelDaily
@LaravelDaily Ай бұрын
Email povilas@laraveldaily.com
@AndiSyafrianda
@AndiSyafrianda Ай бұрын
"Premature optimization is the root of all evil." - Donald Knuth
@NeverCodeAlone
@NeverCodeAlone Ай бұрын
Very good video.
@keyvanakbarzadeh
@keyvanakbarzadeh Ай бұрын
nice
@HieuNguyen-pm9uf
@HieuNguyen-pm9uf Ай бұрын
Hello sir, I have this kind of problem, maybe it's stupid but hey I'm just want to know that. For example, I have the menu header blade and need to return data from db, so create a Provider like this below. So can you answer that what I did is wrong or there is another way to do it
@LaravelDaily
@LaravelDaily Ай бұрын
Yeah, seems good to me! View Composers are a proper way to set such global variables. Maybe, two things to consider changing: 1. Doing it in the AppServiceProvider instead of creating a separate one 2. Separating ViewComposer into its own class, to shorten the Provider code to fit other features: laravel.com/docs/11.x/views#view-composers
@FallHealer2375
@FallHealer2375 Ай бұрын
Hello! I have a project where I needed menu items and other data in the header, and after testing some solutions a bit, I decided to do a Provider just like you did.
@HieuNguyen-pm9uf
@HieuNguyen-pm9uf Ай бұрын
@@LaravelDaily thank you sir , and weird I dont see notification from youtube when someone reply to me
@HieuNguyen-pm9uf
@HieuNguyen-pm9uf Ай бұрын
@@FallHealer2375 cool , I did some research but not sure if my way is good or not
Writing Pest Tests for Laravel CRUD: Live-Coding
18:55
Laravel Daily
Рет қаралды 6 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Laravel API Security: Triple-Check Request TYPES (example "hack")
8:16
Top 5 Laravel "Bad Practices" (My Opinion)
10:32
Laravel Daily
Рет қаралды 24 М.
Junior Code Review: Cache, N+1 Queries and "Messy" Code
14:02
Laravel Daily
Рет қаралды 6 М.
4 Tips for Dev Productivity (I've tried many techniques...)
9:01
Laravel Daily
Рет қаралды 6 М.
4 Problems with Eloquent Soft Deletes (and Two Alternatives)
9:05
Laravel Daily
Рет қаралды 12 М.
Watch Out For FAKE iPads... They're Impressive
14:09
Phone Repair Guru
Рет қаралды 26 М.
Laravel Creator talks PHP, Lambos, and VC
1:45:29
ThePrimeTime
Рет қаралды 103 М.
Laravel Roles/Permissions: Complex Multi-Clinic Project
13:03
Laravel Daily
Рет қаралды 11 М.
ChatGPT for Laravel Devs: 9 Use-Cases You May Not Think About
9:44
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН