Alpine.js vs jQuery vs Vanilla JS: Example + NEW Course!

  Рет қаралды 10,491

Laravel Daily

Laravel Daily

2 жыл бұрын

A free video from my new course "Practical Alpine.js from Scratch".
Get the full course: laraveldaily.teachable.com/p/...
- - - - -
Support the channel by checking out our products:
- Enroll in my Laravel courses: laraveldaily.teachable.com
- Try our Laravel QuickAdminPanel: bit.ly/quickadminpanel
- Buy my ready-made Laravel scripts: laraveldaily.gumroad.com
- Purchase my Livewire Kit: livewirekit.com
- Subscribe to my weekly newsletter: bit.ly/laravel-newsletter

Пікірлер: 45
@KastsEcho
@KastsEcho 2 жыл бұрын
Actually, there is an official lighter version of Vue called Petite Vue that doesn’t require components and seems more on par with the main framework for directives than Alpine (being relatively new still.)
@phoenixedge4049
@phoenixedge4049 2 жыл бұрын
Been waiting for your alpine class. Can’t wait to go through it!
@redamakarem3737
@redamakarem3737 2 жыл бұрын
I am going through the course now and I have already learnt a ton although im not even half way done. Highly recommended Great content
@ZephniStrife
@ZephniStrife 2 жыл бұрын
It's interesting that while ive been in web dev for about 14 years it's always been looked down on to write inline styles... but over time it's becoming more and more normal to do stuff inline like alpine and tailwind (which is bassically inline styles with added features). I do like it though, especially with the lack of a huge framework or filesize, it simplifies the work process and speeds up development hugely! The project i am currently working on is using Livewire / Alpine and Ive had so much fun developing it, because it finally sits right with me, whereas Vue and React never quite did.
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Exactly, this is exactly the use-cases of Alpine and Tailwind, and exactly the reasons why it resonated with so many developers.
@borysiatko
@borysiatko 2 жыл бұрын
JS is going full circle, next best framework will be the plain js which will allow you to skip all bs code
@lutfiikbalmajid
@lutfiikbalmajid Жыл бұрын
No, i think Typescript that compiled to JavaScript 😃
@alaaalssadh2362
@alaaalssadh2362 2 жыл бұрын
Greate, I love it. Thank you
@fatehlayachi2181
@fatehlayachi2181 2 жыл бұрын
Hi Povillas, Thank you for sharing your experience with us with simple and rich videos. Please can you make a video about creating a menu that contain in some elements a submenu (using components like , , AlpineJs for show/hide submenus and also show/hide scrollbar automatically when scrolling/stop scrolling. Thnx in advance
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Well, I wouldn't want to dig THAT deep into front-end, on the channel that is still about Laravel primarily, but will think about it. Thanks for the suggestion!
@poox95
@poox95 2 жыл бұрын
Hi Povillas, i have question about Laravel Naming Convention. What do you suggests about functions in Controllers? I have something like: "/shows/letter/$letter". In controller should i name functions like public function byLetter() or public function by_letter() or just byletter()? I haven't find out any example what is best way. Every example is with one word so it's like index() store() etd. Thank you.
@LaravelDaily
@LaravelDaily 2 жыл бұрын
According to PSR standard, method names should be camelCase
@jimishukurow2286
@jimishukurow2286 2 жыл бұрын
will that @click conflict with vue @click?!
@ricomarcelo5521
@ricomarcelo5521 2 жыл бұрын
Thanks for this video comparing Alpine.js with jQuery and vanilla JS. You could have included Petite-vue (not the full framework) since Petite-vue serves the same purpose as Alpine.js. Perhaps you can come up with Alpine.js vs Petite-vue video next?
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Yeah, I guess I should review Petite-vue some time.
@100JAD.
@100JAD. 2 жыл бұрын
It seems the `open` variable does not do anything in the jQuery code.
@ZephniStrife
@ZephniStrife 2 жыл бұрын
Yeah infact the whole jQuery part is written quite strangely and could be simplified anyway imo. I think he was trying to highlight just how condensed alpine is by comparing it next to something like jQuery, but didn't really give jQuery a fair chance ha! Either way Alpine does feel really nice for small things like this
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Yeah, very good catch, both @Amir and @Zephni. Indeed, I was trying to compare "apples to apples" but showed jQuery in a worse way than I should have. Perhaps another example would have been better, will be more creative with examples in the future.
@ZephniStrife
@ZephniStrife 2 жыл бұрын
@@LaravelDaily To be honest while I loved jQuery for years and years, that's another thing that seems to have been looked down for some time now, so it's good that you are putting these newer idea's like Alpine in the limelight. Infact it would be interesting to see how something like Alpine could scale with a bigger project or within atleast slightly larger use cases than this before it get's out of control or "too messy".
@LaravelDaily
@LaravelDaily 2 жыл бұрын
But isn't it the point of Alpine - to be used for small things in resonably small projects? For bigger projects with more interactivity, probably it's better to use a proper framework like Vue/React.
@holacuba2001
@holacuba2001 2 жыл бұрын
Impressive! What is the scope of the alpine variables? In this example "open". Can I have the "open" variable in the same html page in more then one element or I must use it only once per html document?
@johnneijzen
@johnneijzen 2 жыл бұрын
it depends where end tag is?
@khizer3528
@khizer3528 2 жыл бұрын
Alpine is great 🔥
@ouro-akpokhaled4440
@ouro-akpokhaled4440 2 жыл бұрын
Hi Povillas. Great are your videos. Please can you make a video for laravel sail with docker desktop ? Thanks in advance
@LaravelDaily
@LaravelDaily 2 жыл бұрын
I haven't done it myself so can't make a video about it. I use Laravel valet locally and didn't see the benefit of using Sail.
@zaimcodes
@zaimcodes 2 жыл бұрын
What's the issue? Maybe there would be someone willing to help in the comment section if you state your problem with Laravel Sail.
@ouro-akpokhaled4440
@ouro-akpokhaled4440 2 жыл бұрын
@@LaravelDaily Ok
@ouro-akpokhaled4440
@ouro-akpokhaled4440 2 жыл бұрын
@@zaimcodes It was just to get familiar with laravel sail in case you have to deploy the application on a non-shared server where you will have to install all the third-party applications that laravel needs.
@zaimcodes
@zaimcodes 2 жыл бұрын
@@ouro-akpokhaled4440 That's good of you to think ahead about production. However, Laravel Sail is best for development. There is a discussion about it on GitHub. You can try to search for general Docker configuration for Laravel. 👌🏽
@fafaratze
@fafaratze Жыл бұрын
when using alpinejs, i would still separate the javascript because inline javascript is a bit messy to me.
@Danibd13
@Danibd13 2 жыл бұрын
You're using wrong way the jquery bc the toggle function is defined by jQuery... U can use it this way:
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Thanks, I do agree that jQuery example is a bit misleading, I should have come up with a more complex example where it would make sense to have separate jQuery function for more than just toggling.
@nadjinmalade8738
@nadjinmalade8738 2 жыл бұрын
Yeah this example is simple but for more complex example, you cant do by this way.
@AIteek
@AIteek 2 жыл бұрын
I really dont see why a well structured alpinejs + laravel setup cant be used in a big project... Some improvements in alpine component reuse and id never have to use these big fat JS libraries again
@amirhossein1044
@amirhossein1044 2 жыл бұрын
Don't you continue your tasks(tests)?
@LaravelDaily
@LaravelDaily 2 жыл бұрын
You mean the ones that I did in 2021 every Thursday? No, they took too much time, I focused my time on other things now.
@LuisFernandoFranco
@LuisFernandoFranco 2 жыл бұрын
Ley me ask a surely dumb question. Can you use Vue and Alpine in the same project, let's say same component?
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Yes, but potentially there may be conflicts.
@alihassan-qg7ky
@alihassan-qg7ky 2 жыл бұрын
cooooooooooooooooooooooooolllllllllllllllllllllllllllllllllllllllllllllllllllll
@aurelianspodarec2629
@aurelianspodarec2629 2 жыл бұрын
Right, Alpine is great for small projects, but not big projects - that's what I understood.
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Not really. Alpine is for small dynamic behavior, without too much logic. It may be a page in a small or in a big project.
@saimansari8153
@saimansari8153 2 жыл бұрын
Create Laravel with react js course
@LaravelDaily
@LaravelDaily 2 жыл бұрын
I don't actively work with React, maybe in the future.
@soniablanche5672
@soniablanche5672 2 жыл бұрын
People should stop using jquery. Vanilla JS can do the same thing without dependencies, without learning new libraries and without the performance hit.
Getting Started with Alpine.js
15:09
DigitalOcean
Рет қаралды 6 М.
The Return of jQuery (Not really, just Alpine.js)
23:40
LearnWebCode
Рет қаралды 9 М.
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 125 МЛН
Can you beat this impossible game?
00:13
LOL
Рет қаралды 68 МЛН
Livewire VS Vue.js: Practical Example of Dependent Dropdowns
13:40
Laravel Daily
Рет қаралды 41 М.
HTMX - What they don't want you to know!
13:28
CoderOne
Рет қаралды 78 М.
Livewire or Vue.js: Which to Use When?
12:13
Laravel Daily
Рет қаралды 12 М.
JavaScript Framework Tier List
40:57
Theo - t3․gg
Рет қаралды 293 М.
I only ever use *these* RxJS operators to code reactively
25:25
Joshua Morony
Рет қаралды 119 М.
Git MERGE vs REBASE
16:12
Academind
Рет қаралды 1 МЛН
Alpine JS Tutorial | Build a Todo App
33:48
The Code Creative
Рет қаралды 16 М.
HTMX, the anti JS framework (vs React)
7:17
Kodaps Academy
Рет қаралды 64 М.
ДОМАШНЕЕ МОРОЖЕНОЕ😍
0:41
Юный Повар
Рет қаралды 1,9 МЛН
Increíble final 😱
0:37
Juan De Dios Pantoja 2
Рет қаралды 22 МЛН
Когда папа ВОЛШЕБНИК!🤩
1:00
Petr Savkin
Рет қаралды 1,4 МЛН