Introduction to Go Fiber (and why you should NOT use it)

  Рет қаралды 41,283

Golang Dojo

Golang Dojo

Күн бұрын

Introduction to Go Fiber (and why you should NOT use it)
In today's Golang tutorial video, we will talk about what the Go Fiber is. We will go through creating an application with Go Fiber, writing some basic rest endpoints, along with the reasons why you shouldn't use Fiber in Go programming language. Enjoy!
--
Golang Dojo is all about becoming Golang Ninjas together. You can expect all kinds of Golang tutorials, news, tips & tricks, and my daily struggles as a Golang developer. Make sure to subscribe if you look forward to such content!
Get Your Golang Cheat Sheet! - golangdojo.com/cheatsheet
Git repos & notes - golangdojo.com/resources
Golang Web App Playlist - • Golang Web App
--
Timestamps
0:00 What is Fiber?
0:51 Import Fiber
3:51 Get Ninja
5:52 Create Ninja
11:08 Middleware - Logger
13:22 Middleware - Request ID
14:14 Why you shouldn't use Go Fiber?
17:08 Outro
--
#golang #goprogramming #golangdojo

Пікірлер: 73
@GolangDojo
@GolangDojo 2 жыл бұрын
📝Get your *FREE Golang Cheat Sheet* - golangdojo.com/cheatsheet
@satisfyingly1
@satisfyingly1 Жыл бұрын
Would you please compare mux and chi?
@GAMarine137
@GAMarine137 2 жыл бұрын
Been using Go Fiber for a year and it is awesome. Extremely performant and easy to use
@codelucky
@codelucky 2 жыл бұрын
How do you compare it with gRPC? Even that's super fast.
@GAMarine137
@GAMarine137 2 жыл бұрын
@@codelucky it’s been amazing. Sub-millisecond api response even under full load with zero errors. I also love the middleware options
@jeno427
@jeno427 2 жыл бұрын
The lack of http2 would rarely be a problem. Usually you put these web services behind a reverse proxy that handles SSL certificates, throttling etc. Your internal services can still use http1.1. The more interesting argument is that fasthttp is a lot faster than the standard library but since normally the database is the bottleneck, you wouldn't notice that speed. Certainly worth considering. However in a microservices architecture there is a lot of communication between services where fasthttp can be leveraged (all behind a reverse proxy).
@bitman6043
@bitman6043 2 жыл бұрын
Yeah, your reasoning I understand. His - not so much
@BboyHotshot
@BboyHotshot Жыл бұрын
Why use http at all for internal communications. Message queues are faster and decoupled.
@AlexisRodriguez-rk1ts
@AlexisRodriguez-rk1ts 2 жыл бұрын
Please do that Go modules video! Thanks for the video!
@GolangDojo
@GolangDojo 2 жыл бұрын
In the pipeline!
@TJ-wc3iq
@TJ-wc3iq 2 жыл бұрын
Excellent! ✌🏻More videos about Web development please 🔥
@mx338
@mx338 Жыл бұрын
Not having HTTP2 will not result in compatibility issues, it HTTP1.1 is just slower but still supported by every browser, and significant amount of websites and services still exclusively use it. 6 years may seem old to web developers but for a protocol like H2 it's still rather young.
@lexsoft3969
@lexsoft3969 2 жыл бұрын
I am still looking for reference on how to use Pug in Fiber. For instance, how to use iteration described in Pug doc, because I find it only works for javascript, not Go. Does this mean, I have to modify pug code using Go syntax ? The example in Fiber doc doesn't explain this thing; it only has an example of simple interpolation.
@doodelinux
@doodelinux 8 ай бұрын
Hi mate, very good video, do you intend to update this content to a more recent version ?
@roberto_camp
@roberto_camp 2 жыл бұрын
Yes, do the Go Modules video, asap! ✌🏾
@GolangDojo
@GolangDojo 2 жыл бұрын
Done!
@kay23456
@kay23456 Жыл бұрын
Really awesome tutorial! Thank you!
@datacruncher1564
@datacruncher1564 2 жыл бұрын
I am contemplating, creating an ads clickstream project in Golang. Which other Golang framework can we use instead of Fiber which is faster with less memory footprint and has lesser cpu consumption? Thanks!
@thatonesnowboarde
@thatonesnowboarde Жыл бұрын
pure golang, but fiber is the fastest go framework based on the benchmarks i have seen maybe I am wrong
@neerajbg
@neerajbg 2 жыл бұрын
Please make a video on channel , routines that paves the way to concurrency. And interface as well as it helps clean code. Thanks for ur effort mate
@OganySupreme
@OganySupreme 3 ай бұрын
It looks like go fiber now supports HTTP/2 as Fasthttp gained support for it. Note that as of the time I made this comment, this video was 2.5 years old.
@guhkunpatata3150
@guhkunpatata3150 2 жыл бұрын
Thanks for the video! i wonder if you could create video about the pros vs cons fiber vs gin.
@flogginga_dead_horse4022
@flogginga_dead_horse4022 2 жыл бұрын
Fiber is great, it just isn't as mature as a few other frameworks. Keeping track of it until it does everything I need.
@aburaihan4245
@aburaihan4245 2 жыл бұрын
Always enjoy your video because your video is full of important info. Keep it up. Love u #bro🇧🇩
@GolangDojo
@GolangDojo 2 жыл бұрын
Glad you found them helpful!
@captainmujheri
@captainmujheri 2 жыл бұрын
Make video on Go Modules, and Explain Briefly
@wadoudazer6906
@wadoudazer6906 10 ай бұрын
this video was really beautiful and helpful for me , i am really interested to migrate from nodejs to go to fiber :) , and i like the last song in the outro of this video hhh. thank you my freind !
@csmastery1337
@csmastery1337 2 жыл бұрын
what happened to the go web app series? will there be a tutorial series on authentication and sessions?
@GolangDojo
@GolangDojo 2 жыл бұрын
Taking a pause to learn some other things. Will continue it soon!
@csmastery1337
@csmastery1337 2 жыл бұрын
@@GolangDojo I'll be looking forward to it!
@rydmerlin
@rydmerlin Жыл бұрын
Why isn’t it 201 for your createNinja?
@theodoreivanov6257
@theodoreivanov6257 Жыл бұрын
Very instructive. By the look of your editor, it appears to be VSCode, but with a specific look and feel, which I find most pleasant. Can you tell us what this theme is ? Thanks.
@ashishbhushan7837
@ashishbhushan7837 Жыл бұрын
It's jetbrains IDE possibly goland not Vscode
@cutedogs2524
@cutedogs2524 10 ай бұрын
high contrast theme
@mx338
@mx338 Жыл бұрын
It's open source, so why would I not be able fix bugs in it?
@mkgenov3691
@mkgenov3691 2 жыл бұрын
I know how Go modules work but i would be happy see a tutorial about it here. Thanks.
@GolangDojo
@GolangDojo 2 жыл бұрын
Coming soon!
@zcizzorhandz5567
@zcizzorhandz5567 2 жыл бұрын
I don't like the concept of Go Fiber. I didn't come from Node to Go just to do things the Node way. That's just my POV. But I must say the video title is misleading and it implies that there is something bad about Go Fiber (Which is not the case) I think this a little unfair to the people working on Go Fiber.
@snehanshuphukon728
@snehanshuphukon728 2 ай бұрын
The only thing i think is similar between express and fiber is the endpoint path definition. Example how you specify method and params. The rest are quite different.
@hos7012
@hos7012 Жыл бұрын
why it took 500 ms ? isn’t go fater than that?
@mx338
@mx338 Жыл бұрын
On Linux port 80 and all other ports bellow 1024 are privileged ports, so your app might not be able to start on port 80 without running it via sudo.
@alexanderwoods4625
@alexanderwoods4625 2 жыл бұрын
Thanks for the video! I think the "why you shouldn't use it part is a bit misleading - realistically, almost all APIs are built with some framework. I've never seen one built with the raw HTTP libraries (why would a team choose to do this? Companies want us to focus primarily on business logic, not low-level details). I think folks want performance with little development overhead. I'd be more interested in hearing why you shouldn't use Fiber compared to Gin or another Go API framework. Curious to hear if anyone disagrees with me - do any of you guys use built-in HTTP libraries to develop APIs (not just for fun)?
@dineyantunes4630
@dineyantunes4630 2 жыл бұрын
I think when it comes to real production application, you won't rely on reinventing the wheel (neither using println to respond requests o.o like in the example) Also readability and simplicity is one thing which you should care a lot, because you working with teamates, the more clarity in your code the better. So, I'll use any frameworks if they give me these things I've appointed
@dineyantunes4630
@dineyantunes4630 2 жыл бұрын
I've used both fiber and gin and also chi for some periods. They are great, which one has its own benefits, but when it comes to writting fast, simple and easy handlers to understand, gin and fiber, in my opnion, outstands
@edboss36
@edboss36 Жыл бұрын
@@dineyantunes4630 Is Go your first programming language?
@kaushik5055
@kaushik5055 2 жыл бұрын
👍
@parthipankalayini8
@parthipankalayini8 2 жыл бұрын
gin gonic vs fiber Which is better one ?!
@GolangDojo
@GolangDojo 2 жыл бұрын
Will make a video on it ;)
@parthipankalayini8
@parthipankalayini8 2 жыл бұрын
@@GolangDojo Tks
@AdharshMk96
@AdharshMk96 Жыл бұрын
Thats why i made my own framework using http standard library
@chamod_jayampathi
@chamod_jayampathi 2 жыл бұрын
please do a video about go modules
@GolangDojo
@GolangDojo 2 жыл бұрын
Done!
@redbionic
@redbionic 2 жыл бұрын
What’s app 🇮🇩
@davidagyakwa288
@davidagyakwa288 2 жыл бұрын
what about gin gonic
@GolangDojo
@GolangDojo 2 жыл бұрын
In the pipeline!
@bavan1358
@bavan1358 2 жыл бұрын
I wanted to break your PC so bad after watching that theme, anyways.. thanks for the tutorial
@GolangDojo
@GolangDojo 2 жыл бұрын
You’re welcome!
@asuzukosi581
@asuzukosi581 2 жыл бұрын
I STILL DONT UNDERSTAND GO MODULES
@xanaduzhang186
@xanaduzhang186 2 жыл бұрын
Is it an alternative “CMake”?
@frankhuurman3955
@frankhuurman3955 2 жыл бұрын
Every new project I keep on having trouble with Go modules again, right now I'm working on a Fyne app in Go but every time I try to load in a part of the framework it auto-imports parts of version 1 of the Fyne framework and it's nowhere to be found in the dependencies so Go modules and imports/dependencies are why I still don't like working with Go as much as I'd like to. I've also noticed that sometimes Goland doesn't resolve dependencies that are actually available, after restarting the IDE it picks up on them but that I guess that's an issue with the IDE. Plus the whole: - go mod init - go get package - go mod tidy workflow never seems to work consistent for me to get third party things running.
@GolangDojo
@GolangDojo 2 жыл бұрын
In the pipeline!
@MrAtomUniverse
@MrAtomUniverse Жыл бұрын
I end up using GIN -.-
@Myektaie
@Myektaie 10 ай бұрын
This is a misleadng title! The downside are common to all framework, not just fiber except the http 2 one, but I wasted 17 minutes on this video.
@MarvinCollins14
@MarvinCollins14 2 жыл бұрын
kinda a bait tittle
@GolangDojo
@GolangDojo 2 жыл бұрын
What do you mean?
@StickyPlasters
@StickyPlasters 2 жыл бұрын
Not a bait title. The Fasthttp issue is why lots of people avoid Fiber right now
@Seraph_impact
@Seraph_impact 2 жыл бұрын
Introductioneeeh tow gohhh fiberhhh
@oktay9784
@oktay9784 Жыл бұрын
how you guys understand this guy
@kousheralam8657
@kousheralam8657 Жыл бұрын
Very misleading title , 1000 dislike
@wissemaljazairi
@wissemaljazairi 2 жыл бұрын
Stop with this fake accent
@phanirithvij
@phanirithvij 2 жыл бұрын
you can do go build && .\exectuable.exe, that will prompt the firewall on windows only once.
Live Reload in Golang Web App
11:40
Golang Dojo
Рет қаралды 13 М.
Rust vs Go : Hands On Comparison
50:40
ThePrimeTime
Рет қаралды 213 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 154 МЛН
Scary Teacher 3D Nick Troll Squid Game in Brush Teeth White or Black Challenge #shorts
00:47
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 119 МЛН
The TRUTH About Golang Backend Frameworks
6:31
Melkey
Рет қаралды 106 М.
Is TypeScript (NodeJS) Faster than Go?? |  A server comparison
9:54
ThePrimeagen
Рет қаралды 215 М.
Is Fiber the best Go web framework? Better than Gin?
21:07
Coding with Robby
Рет қаралды 37 М.
Scientific Concepts You're Taught in School Which are Actually Wrong
14:36
Golang Web Frameworks You MUST Learn (2022)
10:35
Golang Dojo
Рет қаралды 69 М.
A Very Simple Tech Stack
7:58
Awesome
Рет қаралды 69 М.
Go Workspaces Explained in 5 Minutes
4:30
Golang Dojo
Рет қаралды 24 М.
Let's make it clear: the Golang Fiber framework fully reviewed...
5:59
Jelvix | TECH IN 5 MINUTES
Рет қаралды 8 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,7 МЛН
НЕ ПОКУПАЙ СМАРТФОН, ПОКА НЕ УЗНАЕШЬ ЭТО! Не ошибись с выбором…
15:23
Отдых для геймера? 😮‍💨 Hiper Engine B50
1:00
Вэйми
Рет қаралды 1,2 МЛН