Why Golang Developers HATE Gorm…

  Рет қаралды 35,172

Golang Dojo

Golang Dojo

Күн бұрын

Пікірлер: 73
@GolangDojo
@GolangDojo 2 жыл бұрын
Get your *FREE Golang Cheat Sheet* - golangdojo.com/cheatsheet
@dimus63
@dimus63 2 жыл бұрын
I love gorm not as an orm, but as a quick and dirty db migration tool that allows making database creation and recreation hidden from a user
@dsha256
@dsha256 2 жыл бұрын
I think Go ENT is the way to go if you’re using ORM. It’s entity framework for Go open sourced by META, which provides simple API for modeling any database schema as a Go object. Also, it’s easily traverse any graph structure since it’s graph-based framework. And most importantly it’s 100% statically typed and generates fully secure code for accessing and manipulating DBs. Go ENT is even more performant compared to GORM.
@ruyvieira104
@ruyvieira104 Жыл бұрын
That looks complicated as hell. What are the advantages of ENT over not using SQL (which is what ent is built on) but going with MongoDB straight away?
@BboyHotshot
@BboyHotshot 3 ай бұрын
Ent is unnecesaary complications and generates code without even asking. Varchars are a mess too.
@mrizkimaulidan
@mrizkimaulidan 2 жыл бұрын
i would love using gorm when developing a really big project with complex or complicated database query because it more easier and readable using orm than the raw query
@pyromancy8439
@pyromancy8439 2 жыл бұрын
I beg to differ. First off, raw SQL queries in your code are a great way to: 1) make your code readability suffer 2) introduce unchecked code that is basically stored in a string, so there's no guarantee it works 3) restrict your project to a specific DBMS 4) introduce potential vulnerabilities and so on. Also, SQL is highly declarative and SQL interpreters mostly don't care about how the query is structured. If you want to really "optimise" an SQL query to make it faster by modifying it, that's done in very non-obvious ways and is closer to randomly restructuring the query than to anything else, so it's safe to say that the structure of the SQL queries does not really affect their performance, and generating the queries with an ORM does not take significant time either.
@JeudryPeñaPeña
@JeudryPeñaPeña 8 ай бұрын
100% agree
@constantinegeist1854
@constantinegeist1854 7 ай бұрын
Normally, it's solved architecturally. Isolate all DB access to repository classes.
@minamatta9732
@minamatta9732 3 ай бұрын
It also ensures consistency across your codebase...
@Nellak2011
@Nellak2011 18 күн бұрын
SQLc
@eduardozepeda1972
@eduardozepeda1972 Жыл бұрын
There are a lot of articles that talk about the importance of mainting certain context in programming and the penalty (mentally speaking) that comes with switching from one context to another, for instance, from Go to SQL, from SQL to docker, etc. I think ORMs serve very well that purpose. I also agree in that they come with a small performance cost, but being realistic, probably the great majority of apps doesn't app require us to squeeze it to the last milisecond of latency. I think readibility should come first when it comes to small or medium projects, for large projects probably architecture problems are more of a worry compared to whether the app uses or not an ORM. By the way, I love your videos, I always learn new things! keep up the good work and thank you for creating content for us.
@gantushigsaruul2489
@gantushigsaruul2489 10 ай бұрын
On every video you say to get your cheatsheet, then when I go to the link, it doesn't work.
@neerajbg
@neerajbg Жыл бұрын
I have used gorm on many projects with gin and fiber. It never caused any problem to me rather made development quicker. the problems you mentioned is true to every other orm out there in other technologies too.
@maulanaiman4448
@maulanaiman4448 2 жыл бұрын
why hate it ? I've done a lot of projects using gorm and earned money from it XD
@tufuap3248
@tufuap3248 11 ай бұрын
I’m a started golang early this year and I’ve used it to create APIs using gorilla mux and gorm. And also created recommendation engine using gorse. I will sincerely appreciate if I can network with someone that can get me any job opening or gig
@flogginga_dead_horse4022
@flogginga_dead_horse4022 2 жыл бұрын
Funny thing about ORMs. Always somebody complaining about them. Just about every modern language has at least one. I guess there must be use cases for them then? No one writes these things for nothing. Of course there are times when you need tweaked raw SQL for certain applications but for most things you really don't...
@danyalmhai4041
@danyalmhai4041 Жыл бұрын
Our company created soft realtime infrastructure paymeny with golang and gorm and event driven architecture . That is one of fastest infra in our country between payment companies. We use gorm for model first approach and great migration system for complex systems . Just our big issue was gorm new version heavily changed and produced some issue in our system
@user-qr4jf4tv2x
@user-qr4jf4tv2x Жыл бұрын
as someone who used both i prefer to use orm in certain situation its not like the orm forces you to use it. type safety and simple short queries validation middleware is where i mainly use it if the query is expected to be long i just use function queries within the database it self. orm is only bad when your still typing the table names manually or still escaping string manually
@rokasbarasa1
@rokasbarasa1 6 ай бұрын
A back-end developer that doesn't know SQL is a like a front-end developer that doesn't know CSS
@larrasket
@larrasket 2 жыл бұрын
Does Tommy have a KZbin channel?
@awesomedavid2012
@awesomedavid2012 10 ай бұрын
How is an sql compiler not just another dependency along side Go?
@RobertFletcherOBE
@RobertFletcherOBE 7 ай бұрын
because they generate go files, with no dependency on the sql compiler. sqlc takes your schema, and a file containing queries and converts it into model structs, and a query struct. The end result is vanilla go with no external dependencies.
@achintya-7
@achintya-7 Жыл бұрын
Sqlc is probably a much better alternetive to gorm.
@AdiGunawan1
@AdiGunawan1 10 ай бұрын
for initiate database gorm is good, but for migration maybe not yet.... how if we would change structure of table ex: rename column, delete column that we design before. What happen with our data ?
@hipertracker
@hipertracker Жыл бұрын
GORM can also run a raw SQL. What about Ent?
@obamna36
@obamna36 2 жыл бұрын
100% I agree, we hate gorm
@jairajsahgal7101
@jairajsahgal7101 Жыл бұрын
Thank you
@saifullahshahen
@saifullahshahen 2 жыл бұрын
what about entite library like entgo?
@yashdiniz
@yashdiniz 2 жыл бұрын
I have tried entgo. The team I work with really liked the entity representation, but very quickly we realised it's not helping. As time went on, it became much easier to just write raw SQL, because we needed a lot of complex joins, mostly joins that ent doesn't support...
@muditmohantyagi
@muditmohantyagi 2 жыл бұрын
No I works and like gorm with associations I have no issue
@AshishSinghh
@AshishSinghh 2 жыл бұрын
Thanks for changing the voice. You are really knowledgeable no doubt but your accent is hard to understand. Thanks for listening to feedback. Now I will watch your content for sure
@CodeGoy
@CodeGoy 2 ай бұрын
All the users of GORM in these comments saying "I Love It" should go work on its lack of good documentation....
@mohsinalichaudhary4301
@mohsinalichaudhary4301 2 жыл бұрын
Any recommended Type safe Query builder other than go-jet , go-structured-query, sqlc _
@sharkpyro93
@sharkpyro93 2 жыл бұрын
ent by meta
@flannn6
@flannn6 2 жыл бұрын
Who's this tommy guy? is ha a youtuber too?
@NotMIFood
@NotMIFood 2 жыл бұрын
This video is much too shallow. ORM's are bad because they are not good at dealing with overly complex queries compared to a programmer? JOINS of any kind and overly complex queries should be avoided at all cost anyway. Anyone needing those should probably spend more time on their database architecture than on writing magic 15-line queries. ORMs really level up the dev experience and provide a uniform abstraction layer. Working on a bigger project I with multiple people I would always recommend using one. I think GORM does a good job as a minimal library although the documentation is a bit lacking.
@crownstupid
@crownstupid 2 жыл бұрын
JOINS of any kind and overly complex queries should be avoided at all cost anyway? How laughable. What about CTE's? Window functions? Material Views? Recursive queries? Table partitioning? Custom Aggregates? Your database doesn't need an abstraction layer. It needs someone who doesn't think it's a weird file system or a GUI-less spreadsheet. If all your building is toy CRUD apps then just use an unstructured key value store and leave relational databases to those that understand them.
@abeplus7352
@abeplus7352 2 жыл бұрын
So I use gorm without the relations . I just use it for basic crud and batch creates etc . the rest of the relations I'll just hand write the sql query that does the join . I dont like sqlx because the structure binding is way too strict . and I sometimes want to scan to map[string]interface{} . so I have to use gorm otherwise I have to use sql.db and write 10 lines for a get me something query .
@NishantKumar-wz1tv
@NishantKumar-wz1tv 2 жыл бұрын
sql compiler video please
@TheKafaniKirarim
@TheKafaniKirarim 9 ай бұрын
Misleading title. The reasons mentioned here are reasons why go developers would hate AN orm mapper, not Gorm specifically. None of these culprits are exclusive to Gorm. I'm a fan of rawsql myself, but then you gotta consider the security (sql injection preventation), db migration and all kinds of other fun stuff that an ORM handles for you out of the box. So as with most things, it's a tradeoff.
@nexovec
@nexovec 11 ай бұрын
There is a limited amount of tens of hours I'm willing to put into debugging stupid errors like `ERROR: column "manufacturername" does not exist (SQLSTATE 42703)`. That amount is 3. Screw GORM and screw ORMs. Never again. Literally lost 5 days of work to it.
@user-qr4jf4tv2x
@user-qr4jf4tv2x Жыл бұрын
node started with dislike of orm now people just use orm but still have a pure sql style or just pure orm
@phamvu-p4f
@phamvu-p4f Жыл бұрын
haizzz, I struggling in create generic repository in gorm
@skuldd
@skuldd 2 жыл бұрын
Also the documentation sucks
@abeplus7352
@abeplus7352 2 жыл бұрын
Honestly most go libraries have terrible documentation and gorm is a step above . I usually end up having to step into the source code and see what it does .
@vmrc
@vmrc 2 жыл бұрын
why golang devs do we hate everything? Lol jaja xD I hate ginkgo test library so much.
@kokizzu
@kokizzu 2 жыл бұрын
i hate it too XD
@Nuraddinhassan
@Nuraddinhassan 6 ай бұрын
- do you hate GORM + yes - are you using it + yes
@luq2337
@luq2337 Жыл бұрын
its getting people mad when migrating your system to a shit database that gorm does not support
@belogpolos
@belogpolos Жыл бұрын
Too bad there is no equivalent for hibernate with HQL in go world.
@NHM33
@NHM33 9 ай бұрын
How dare you hate the furcorn goomba >:(
@Unofficiallystupd1027
@Unofficiallystupd1027 7 ай бұрын
What did gorm do he is a good youtuber
@miasonic1389
@miasonic1389 2 ай бұрын
yeah gorm is funny
@Pebbleisdonewithyou
@Pebbleisdonewithyou 9 ай бұрын
Why Mika Fans Hates GolangDojo...
@njengathegeek
@njengathegeek Жыл бұрын
I always learn something new here, thanks ninjas
@yaksa9081
@yaksa9081 2 жыл бұрын
but I love gorm.
@popcorntime6650
@popcorntime6650 2 жыл бұрын
any one tried sqlc?
@ashishgupta8394
@ashishgupta8394 3 ай бұрын
gorm is very slow
@टिरंजननकले
@टिरंजननकले 2 жыл бұрын
Libraries like GORM/ENT makes you weak in programming/design and it also reduces your problem solving abilities. That means less chance you will get hired by FAANG type companies as these companies hire only engineers who don't rely on third party libraries like GORM/MUX etc.
@someoneanonymous6707
@someoneanonymous6707 2 жыл бұрын
The entire idea of ORM is to code fast and with fewer mistakes which from a professional point of view is gold as it is saving time.
@टिरंजननकले
@टिरंजननकले 2 жыл бұрын
@@someoneanonymous6707 In doing that, developer just learns framework/library and not programming. Ironically, majority of product companies like Google/Apple discard the resume if you say "I am using xyz framework"
@flogginga_dead_horse4022
@flogginga_dead_horse4022 2 жыл бұрын
you think it's 2005 or something? I hope you are writing all your code in assembly too, you weak programmer ;)
@makesnosense6304
@makesnosense6304 2 жыл бұрын
No it doesn't. Using a library means you save time and can focus on solving the problem at hand and don't have to rely on reinventing the wheel again. Also, using GORM it makes it super easy to change to use MSSQL, Postgres, SQLite or MySQL databases without having to bother with the SQL differences. This is very handy because you most likely don't care about the nuances in SQL for the different databases.
@टिरंजननकले
@टिरंजननकले 2 жыл бұрын
@@makesnosense6304 Don't care about nuances in SQL? But interviewers ask inner/outer join questions and ask you to design database for full stack positions. Saving time, yes but startups and FAANG companies are less likely to hire developers who use frameworks/libraries. There will be some exceptions ofcourse.
Валентин Хомутенко / «что не так с ORM в Go»
32:29
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 42 МЛН
За кого болели?😂
00:18
МЯТНАЯ ФАНТА
Рет қаралды 2,9 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
[DeepML] - 44. Leaky ReLU Activation Function
5:31
StoatScript
Рет қаралды 3
DONT USE AN ORM | Prime Reacts
25:46
ThePrimeTime
Рет қаралды 238 М.
Why are Companies Migrating from Java to Go?
12:05
Golang Dojo
Рет қаралды 47 М.
Fyne Getting Started: Hello World
3:51
Fyne
Рет қаралды 22 М.
Learn how to use Sqlite in Go - Go Basics
16:35
Mahmoud - MightyTuts
Рет қаралды 1,7 М.
How To Use The Context Package In Golang?
17:03
Anthony GG
Рет қаралды 66 М.
Are ORMs Worth Using?
12:31
Ben Davis
Рет қаралды 15 М.
Go 1.22 is bringing about a new future for the language.
4:32
Dreams of Code
Рет қаралды 158 М.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 122 М.
Introduction to Go Fiber (and why you should NOT use it)
17:40
Golang Dojo
Рет қаралды 44 М.
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 42 МЛН