.NET Developer tries Java Spring

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 329

  • @auniquehandle
    @auniquehandle ปีที่แล้ว +708

    "the fuck is a bean"
    same bro, same

    • @RawCoding
      @RawCoding  ปีที่แล้ว +19

      Some mysteries will never be solved 🫘

    • @zxopink
      @zxopink ปีที่แล้ว +7

      3:42

    • @9SMTM6
      @9SMTM6 ปีที่แล้ว +14

      I spend almost a day trying to find that out, but only got a rough idea - I know some things commonly referred to as Beans but they seem like different things to me.
      There seem to be lots of conflicting definitions and/or the magic confused everyone.
      Eventually I just fame up and replaced every occurrence of beans with magic and went with it.
      Spring is a mess totally overreliant on automagic.

    • @adamc1694
      @adamc1694 ปีที่แล้ว +21

      @@9SMTM6 If you people are not old enough to know the history, then I can share what I know. At the beginning when the WWW had just begun. Sun the company that created Java tried to cook up a web application framework. Yet since that was new and nobody really had a clue of what to do. So Sun using their frame on Java published hundred pages of specification with so many fancy terms J2EE, XML, SOAP, JSF, JNDI, EJB... (yes Java Bean was only one of them) just to confuse to the people. You heard about the IT bubble? Yes, Sun was trying to create the hype, boost the stock, sell the stock and get rich with easy.
      Java Bean at time was nothing more than any regular java object with a getter and setter method. Yeah that is all about it. Supposedly Sun's J2EE proposal was about container, a term still being used as of today, and java bean can organically and automatically duplicate itself across the network in different containers in order to fulfill enterprise level of traffic demands. But of course as I mentioned at the beginning, Sun actually had no clue how to actually implement it. People tried to follow J2EE, too complicated, got into a mess... They wasted all the time and resources. Had to do every =thing from ground zero again and newer frameworks like Spring, Hibernate started to emerge.

    • @9SMTM6
      @9SMTM6 ปีที่แล้ว +5

      @@adamc1694 yeah, it's been a while, but I was certainly aware of that definition. It may actually be the only real definition of that term, just it appears incompatible to how that term is used in Spring at times. Or perhaps I was just not getting it.
      But frankly yeah that "fancy terms" explosion is certainly a thing in that area. It's quite... Bad. The main issue with these terms is that their modern usage often is far removed from their original definition, which often wasn't very clear and just - often without reason - convoluted to begin with.
      Like, I've studied Physics, and I'm happily privately using Rust, but the thing with these topics is that while they are complex, they're also well defined and use terms... Well mostly consistent. The Java ecosystem meanwhile? Damn thats one big mess I just want to get away from.
      I mean yeah it's not that different from some things today I guess, like, were all using "REST" when really often what were writing with these approaches is far removed from the original ideas behind that term, but it seems Spring in general is just that kind of thing everywhere.

  • @rubenvervaeke1635
    @rubenvervaeke1635 ปีที่แล้ว +46

    Don't have experience with Java & Spring and immediately starts out with Spring Security, that's brave my man.

    • @salaman894
      @salaman894 ปีที่แล้ว +5

      In fact, that was crazy

  • @YariRu
    @YariRu ปีที่แล้ว +246

    The secret is to use very long class names like AbstractAnnotationConfigDispatcherServletInitializer

    • @denissorn
      @denissorn ปีที่แล้ว +6

      With auto completion and good editor it's normally not an issue unless one overexaggerates or has a lot of generic types, unless one is forced follow silly Python like guidelines. Using such names can be helpful when using tools like github copilot.

    • @kendlyduprince
      @kendlyduprince ปีที่แล้ว +25

      You mean plain English so everyone can read it and get what it does? Yeah

    • @RustedCroaker
      @RustedCroaker ปีที่แล้ว

      It's called self-documented code. Try it once, never will go back

    • @verified_tinker1818
      @verified_tinker1818 ปีที่แล้ว +9

      I read that as "SovietInitializer".

    • @muyewahqomeyour7206
      @muyewahqomeyour7206 ปีที่แล้ว

      @@denissorn what silly guidelines?

  • @yeumkyuseok
    @yeumkyuseok ปีที่แล้ว +64

    Im amazed at how you could code on the spot in such an unexperienced framework/environment this flawlessly!!

    • @Toradoshi12
      @Toradoshi12 ปีที่แล้ว +12

      There were definitely flaws.

    • @gismtomar6812
      @gismtomar6812 ปีที่แล้ว +4

      no its called faking.......he did all of it before hand obviously

    • @RawCoding
      @RawCoding  ปีที่แล้ว +99

      ​@@gismtomar6812 Just for context, I work with Java for Android, so I have some familiarity. I've never touched Spring before I hit record on this video, the 20 min video took about 2-3 hours to record, in between the cuts I am googling around for how to Spring.
      the only thing I faked was the smile while writing this, the experience it self was painful.

    • @karimpardayev
      @karimpardayev ปีที่แล้ว +5

      @@RawCoding 💀

    • @bjarne9700
      @bjarne9700 ปีที่แล้ว +1

      i mean... this is exactly how you learn stuff. You look at tutorials, copy, paste, try to understand and thats it. You could do the same, provided you are familiar with the environment like he is. You need to know some Java, some gradle or maven and you definetely need some experience because in 99.999% of the time experience translates to other fields. If you know how to do a backend in C# you know the base concepts and you know the flow of things. Of course that doesnt mean you know how Spring works, but you know what it has to do and what it will be capable of.

  • @Toradoshi12
    @Toradoshi12 ปีที่แล้ว +40

    Aspect Oriented Programming a.k.a. introducing bugs under the hood is the backbone of Spring.

  • @unhandledexception1948
    @unhandledexception1948 ปีที่แล้ว +7

    I honestly love watching this guy, his humour just brings to life any technical topic ....awesome channel
    ;-)

  • @oumardicko5593
    @oumardicko5593 ปีที่แล้ว +46

    For any JVM related stuff, i use kotlin. Easy to use, innovative, no complex BS or verbosity. Kotlin has a backend framework called ktor and i can say, the language has some of the best developer experience i have seen.

    • @mazymetric8267
      @mazymetric8267 ปีที่แล้ว +8

      But if you're looking to get hired, Spring Boot is the way to go. Spring Boot also provides support for Kotlin if you're a Kotlin fan.

    • @RustedCroaker
      @RustedCroaker ปีที่แล้ว +5

      Our deepest condolences!
      Hope you'll find your way back to the bright side eventually

    • @mikhalpalych
      @mikhalpalych ปีที่แล้ว

      @@RustedCroaker i wonder if by bright side you assume java

    • @RustedCroaker
      @RustedCroaker ปีที่แล้ว

      @@mikhalpalych of course I'm

    • @justSomeUserOnYT
      @justSomeUserOnYT ปีที่แล้ว

      Removal of verbosity shouldn't be seen as an inherent "pro."
      That is why we have javascript and all of its ridiculous problems that don't support developers.

  • @IvanRandomDude
    @IvanRandomDude ปีที่แล้ว +103

    I work with both. Aspnet core is definitely easier to master and is innovating faster than Spring. Spring is huge, has like 50 different sub-frameworks and is being developed slower. I also like EF core more. Spring JPA looks great but as soon as you need complex queries it becomes a mess. Nobody even uses it for complex stuff, for complex queries we usually use jOOQ or some other library (they basically use LINQ-like syntax to build queries)

    • @RawCoding
      @RawCoding  ปีที่แล้ว +8

      thank you for the insight! I thought that would be the case, and what about authentication was I doing something messed up or that's just the way it is?

    • @IvanRandomDude
      @IvanRandomDude ปีที่แล้ว +13

      @@RawCoding You don't have to create login endpoint, it comes predefined out of the box. Similar to how login and some other pages come out of the box if you use AspNet Identity Default UI. You can, of course, create your own (scaffold + edit). Also, if you chose to create your custom login page, you should include hidden input with name="_csrf". That way, csrf token will be included in form so you dont have to disable csrf (bad idea as you said)
      What was wrong in this video is: Once you define loginProcessingUrl you have to implement the login logic yourself (check the password, set authentication in HttpContext etc...). Since you didn't, login processing handler was basically empty and it didn't authenticate user. JSESSIONID cookie is created regardless if you are authenticated or not, it is just session cookie. Whether your session is authenticated or not is a different story. This is different from aspnet core where AspNetIdentity cookie is created only if you are authenticated. JSESSION actually does not come with security, it is created even if you don't include security library.

    • @IvanRandomDude
      @IvanRandomDude ปีที่แล้ว +10

      But after watching part of your video again, I can say it is not your fault, the guide you were reading is TERRIBLE LOL. All you need is
      .formLogin(withDefaults());

    • @hardcorecode
      @hardcorecode ปีที่แล้ว +22

      I can write any complex query with @query. So I don’t know what you are talking about

    • @IvanRandomDude
      @IvanRandomDude ปีที่แล้ว +6

      @@hardcorecode Well, good luck with having long sql queries as string in your code

  • @Narezaath
    @Narezaath ปีที่แล้ว +15

    The one-liner authentication you've heard about is probably the simplest Spring Security authentication, which is just adding the library to your Maven/Gradle config and maybe an annotation. That is all, like, literally. At the start Spring notices you want authentication, sets it up for you, provides you with a default user and password and you can use those to authenticate. Done. If you want to configure it further then yeah, you'll have to jump through some hoops, like what you've experienced. You first specify the route either explicitly or by a matcher, then decide what to do with it: permit access without authentication or allow only authenticated users.
    JPA stands for Java Persistence Api, which should tell you what it's for. :)

  • @petru-cristianboza5933
    @petru-cristianboza5933 ปีที่แล้ว +19

    I'm not sure how asp looks like.
    I do agree on the security part, it seems a bit hard, sometimes like "whack a mole"
    But the ORM stuff can be done a lot better than what you described here with just some more insight on the framework.
    For complex queries we use JPA Specification which allows you to create queries easy to maintain and modify.
    I would agree on the fact that it has somewhat large learning curve, especially if you spend a day on it, but after some time, things do become a lot better :D
    Thx for the video

    • @Vortex-gz8se
      @Vortex-gz8se ปีที่แล้ว

      Specifications are an abomination. Just write HQL/JPQL.

    • @petru-cristianboza5933
      @petru-cristianboza5933 ปีที่แล้ว

      @@Vortex-gz8se not really, they are amazing especially when you need to do complex queries, you can always pair specifications with criteria builder to make everything better

  • @sudarshanshah2243
    @sudarshanshah2243 9 หลายเดือนก่อน

    Java is love. Spring Boot is expression of it in best of sense.
    Everything is easy to configure and conventions are easy.
    Anything can be integrated with it with ease and seamlessly.
    I am proud to be a Java Spring Boot developer. It's breeze to do development with Spring!

    • @Photoshopper2010
      @Photoshopper2010 9 หลายเดือนก่อน +2

      easy to configure? Are you joking? it's a nightmare and their documentation also sucks

  • @GavrilosZ
    @GavrilosZ ปีที่แล้ว +5

    im java dev and u are doing great trust me :P

  • @kutilkol
    @kutilkol ปีที่แล้ว

    Man you're good! That was some quality content, thx

  • @lucasmontec
    @lucasmontec ปีที่แล้ว +7

    Also, you can write SQL in attributes (annotations) of those query methods. Lifetimes are defined by the type of "service" you are creating. Repos have a lifetime, services have another... All is registered automatically on startup.

  • @noname78520
    @noname78520 ปีที่แล้ว +28

    From the init of my developer experience I worked mostly on java and i learned dotnet 6 this year... dude i'm never wan't to back to use java.. the difference is huge.. in every single aspect, asp net and entity core are waaay better than java + spring or another huge rare framework of java

    • @noname78520
      @noname78520 ปีที่แล้ว +12

      Not only at the framework level.. java is also much more complex in his underlying arquitecture.. i mean.. just read about.. servlets.. servlets containers.. war.. jar.. JPA.. hibernate.. application server.. Java EE (now Jakarta EE) there are millon ways of doing the same thing but always in a kind of complex way

    • @alexlo5655
      @alexlo5655 ปีที่แล้ว +1

      Agree.

    • @jvminhell
      @jvminhell ปีที่แล้ว

      @Enzo Núñez what are u talking about? Those topics are easy maybe you can understand them but that is not the spring fault.

    • @HolyRamanRajya
      @HolyRamanRajya ปีที่แล้ว

      @@noname78520 Curious How does Java implement real first order functions? Through Functional interface/delegates like dotnet framework, or the way dotnet core implements.

  • @coffee22able
    @coffee22able ปีที่แล้ว +25

    Actually, I think EFCore is much better.
    - I don't think these magic queries will be suitable for complex real scenarios.
    - I like the idea of migrations, I need to know how my class chnges will be translated, like if I rename a property will it drop the column and create a new one or it will rename the column.
    - many to many is much cleaner in EFCore.
    - The Generics in java is just converting to objects under the hood, the language design is worse than C#.

    • @hanzofuma
      @hanzofuma ปีที่แล้ว +3

      Jpa has other features for complex queries like Specifications and Projections, simple queries can be done so easily like if you want to create a function that fetches a user by specific criteria let's say name, or email and age between you go to the user repo interface and add a declaration of a method:
      User findOneByNameLikeOrEmailEqualAndAgeBetween(String name, String email, int minAge, int maxAge)
      Now all you have to do is calling the method.
      I agree that they should have a migration system but it looks like they want to keep the framework un opinionated but there is external tools like liquibase to manage migrations.
      Relations require one annotation the example he found wanted to customize the relations

  • @JonneKleijer
    @JonneKleijer ปีที่แล้ว +1

    Insightful! Thanks for sharing your insights.
    Could you do a similar video on NestJS?

  • @you0neville0tube
    @you0neville0tube ปีที่แล้ว +8

    EF also lets you have setups without having migrations (some default templates do it). If you are just querying all data you wouldn't have to use LINQ in EF either

  • @wlockuz4467
    @wlockuz4467 ปีที่แล้ว +2

    The only thing stopped me from going completely insane when I used to work with Spring was Intellij IDEA

  • @MsFico2
    @MsFico2 ปีที่แล้ว +13

    Yeah, I have to rant as a person that has been working with Spring for about 3 years now.
    First off, Spring Security is so bad they decided to deprecate it and they just say "Look, if you want u can use it, but just use Keycloak or some other service, you're going to have a MUCH better time". Like, it's giga bad. Your implementation was also quite simple and you had a hard time, imagine if you want to add custom properties to those users, what if you wanted to generate your own tokens with a custom hashing function, what if you wanted JWT, like, it's just horrid.
    Secondly, Beans are actually just singletons and are left over from the OG Spring. In Spring Boot they are mainly used for small configuration setups where you have some class that exists and you can't alter to make it a component/service/controller or whatever else, so you define it as a bean so that you can do DI with it. How it works with Spring Boot is that you create a class, and then specify whether it's a @Service, @Component, @Configuration, etc. (something like in .NET Core, but instead of having a separate config/Program file you'd do it on the class itself with an annotation).
    And finally a rant on JPA. It's fantastic and magical and that's the main reason I'm still sticking with Spring rather than .NET, I can't stand the EF Core, but Many-To-Many relations are SO BAD it's unbelievable. General rule of thumb in Spring developer circle is try to avoid implementing those relations, and if you have to, create an intermediary entity that will have 2 one-to-many relations and then try to avoid fetching them as much as possible. For custom queries we have a ton of different possibilities like QueryDSL, JPAQuery, @Query and a whole slew of other options, so it isn't painful in the slightest (only thing I'd maybe call painful is transaction management since it does TOO MUCH magic).
    Sorry for the rant, and thanks for coming to my Ted Talk.

    • @facu454
      @facu454 ปีที่แล้ว +2

      Spring security deprecated? Wtf

    • @MsFico2
      @MsFico2 ปีที่แล้ว +1

      @@facu454 i read it somewhere semi-recently, couple of months ago, it seems they're still rolling out updates, but I know for a fact that the discussion for deprecation of it exists/existed. And the main point was there are much better solutions and you should use Spring Security just to "connect" to said services.

    • @mazymetric8267
      @mazymetric8267 ปีที่แล้ว +3

      ​@@MsFico2 They never deprecated Spring security as a whole. Spring Authorization Server was deprecated for a few months in 2019 but it was still maintained. There were no issues with Authorization Server according to the Spring Boot team. They only suggested low code alternatives like Gluu and Keycloak because they're way much easier to implement. As of right now, production-ready Authorization Server is available on Spring 6.

    • @HolyRamanRajya
      @HolyRamanRajya ปีที่แล้ว

      The intermediary one to many thing you talk about is frustrating if you are coming from SQL syntax. I have grown to quite like it actually that I actually detest SQL Joins now. As a F# regular I prefer that approach a lot. MS devs have been sharing the similar sentiments on the EF repo all these years refusing to make it easier but seems like they are going to provide abstractions for sql regulars soon. .NET7 has really amped the performance of Hashsets too and the results shows on EF DBSet Collection.

    • @theyreMineralsMarie
      @theyreMineralsMarie ปีที่แล้ว +1

      Just because something can't be learned in an afternoon doesn't mean it is flawed. My team uses Spring security extensively with JWT's and user roles/permissions that are integrated into Okta auth server and our in-house IAM platform. It all works great.

  • @TheCameltotem
    @TheCameltotem ปีที่แล้ว +1

    "Bean, what the fuck is a bean" Literally thought what you said out lmao.

  • @theyreMineralsMarie
    @theyreMineralsMarie ปีที่แล้ว +14

    Love it or hate, Spring pays the bills.

    • @RawCoding
      @RawCoding  ปีที่แล้ว +4

      That’s the important stuff

    • @HolyRamanRajya
      @HolyRamanRajya ปีที่แล้ว

      @@RawCoding ROFL

  • @gylkag
    @gylkag ปีที่แล้ว +53

    I really wish people would stop doing this thing where they try a complex tool they never used before for an hour and give there opinion to an audience. That's the definition of uneducated, baseless opinion. You haven't done the absolute basic todo-app level stuff and thinking that if you couldn't figure it out in an hour by yourself without reading documentation - then it's the tool that is the problem. And we're not even talking about complex stuff (the stuff it was actually meant for), complex scenarios. That is so... weird, to say the least.

    • @VincentFree
      @VincentFree ปีที่แล้ว +7

      Maybe a bit true but it does resemble the learning curve of spring. I always struggle with it when I have to use a spring app. I normally use other toolkits for development but every time I'm in spring I'm just lost due to missing how the magic works. It's just not clear to use. It's like having to learn another language within a language.. Ik know java/kotlin/scala etc and I'm quite proficient in them but spring just makes me feel like a junior.. It's very limiting since easy stuff just becomes very hard imo.

    • @adamc1694
      @adamc1694 ปีที่แล้ว +8

      @@VincentFree "I'm just lost due to missing how the magic works."

    • @gylkag
      @gylkag ปีที่แล้ว +1

      @@HolyRamanRajya Where is gate-keeping in my post? All I said is that maybe it's not a fair thing to give an opinion on something you have barely used. I mean, we all do that - try something and then as a species with a brain we form an opinion of it, and the more we use it - the more we correct our opinion (if needed) and in private we exchange those opinions with colleagues, and often with harsher words and it's fun. The problem I have (so to say) is that since such opinion has almost no value by definition then it shouldn't be spread among large audience. IMO, it lowers the person that does that. Phrase "they don't know what they are talking about" means literally that.
      PS. I re-read my original post and it did sound too harsh, I should've worded it more... friendlier I guess.

    • @fredrikmardenfalkhoppe494
      @fredrikmardenfalkhoppe494 ปีที่แล้ว +1

      Agree completely. This kind of videos is just silly. You're dooming an entire framework because you can't pass a guide right away…

  • @Dev-Siri
    @Dev-Siri ปีที่แล้ว +5

    as someone who is recently getting into C# .NET Core, Java looks like hell.

    • @sifisodennis3344
      @sifisodennis3344 8 หลายเดือนก่อน +2

      🤣 I must say i agree with you 🤣

  • @nerminkarapandzic5176
    @nerminkarapandzic5176 ปีที่แล้ว +14

    You have probably chosen the hardest part, Spring security is very powerful but also really complex (needlessly imo) and the docs/content you can find online honestly mostly sucks.

    • @JohnSmith-ob9gr
      @JohnSmith-ob9gr ปีที่แล้ว

      how do you recommend someone learn Security?

    • @nerminkarapandzic5176
      @nerminkarapandzic5176 ปีที่แล้ว

      @@JohnSmith-ob9gr I learned it by literally working with it and then placing breakpoints in the source code and following the execution. Official library docs is good to understand the overall architecture but it fails with providing useful examples, and what I hate about it is there's so much outdated stuff in there and also lots of examples with xml configuration which I think nobody uses anymore... Also if you're new to the ecosystem it isn't even easy to find the official docs, there's so much clutter on the spring docs website it's crazy, not to even mention the horrible ux and ui...

    • @justSomeUserOnYT
      @justSomeUserOnYT ปีที่แล้ว +1

      ​@@nerminkarapandzic5176 I wanna say this is a symptom of not enough educated developers and too many developers that are in over their heads.
      You have to play around with it and actively see whats going on to learn. That is the case for everything. There doesn't exist a single language or framework that you can watch a single udemy course on and fully comprehend what is going on. At best, you learn terminology and can implement slightly faster.
      I think we are in a weird point with software engineering where there are a lot of people that simply get by via googling everything and never fully understanding what exactly they are copy-pasting.

    • @nerminkarapandzic5176
      @nerminkarapandzic5176 ปีที่แล้ว

      @@justSomeUserOnYT I must disagree, there are other libraries in different ecosystems that do the same thing but are much easier to follow and understand and this is my only complaint. This mostly comes down to the documentation but imo spring security also over complicates everything.

  • @fudosker
    @fudosker ปีที่แล้ว +2

    It might seems like complicated staff, but only on start of the project...
    Now you can use spring boot which comes as part of code that performs basic configuration at runtime

  • @只是一个路过的
    @只是一个路过的 ปีที่แล้ว +2

    Spring Security is a huge topic in Spring...I can said i spend over 1 month to figure out what is going on, but no doubt, it is powerfull, but also hard to learn

  • @AlizerLeHaxor
    @AlizerLeHaxor ปีที่แล้ว +5

    as a c# programmer java is like a huge downgrade comparing asp and springboot

  • @lasgegas
    @lasgegas ปีที่แล้ว +5

    Java is my starter language. And then got job as dotnet dev. It's so much easier and I can understand my code better. Goodbye to annotation, goodbye to application.properties and goodbye to ResponseEntity. One thing I miss is date data type

    • @mihailmojsoski4202
      @mihailmojsoski4202 ปีที่แล้ว

      hello to `unsafe` and `unmanaged` lmao (try using them, it's fun)

    • @yohanespradono5224
      @yohanespradono5224 ปีที่แล้ว

      ​@@mihailmojsoski4202 care to explain?im a .net and spring boot newbie

    • @mihailmojsoski4202
      @mihailmojsoski4202 ปีที่แล้ว

      @@yohanespradono5224 it's a feature that's impossible to imagine in Java, it lets you work with pointers like you are using C

    • @hei4227
      @hei4227 3 หลายเดือนก่อน

      man same, i was building projects with java and got offered a .net job. Is it worth it?

  • @Vortex-gz8se
    @Vortex-gz8se ปีที่แล้ว +2

    Everyone here in the comments is mentioning they can't imagine using the auto generated repo queries for complex queries and that is absolutely correct. You aren't supposed to. The auto-generated queries are only for getting entities for updating. For complex and/or read-only queries you write JPQL (Java Persistence Query Language) which looks very much like SQL. You can also just write native SQL. You do both by using the @Query annotation, in the case of native sql you add a "nativeQuery = true" property to the Query annotation along with your query.

  • @chillydill4703
    @chillydill4703 ปีที่แล้ว

    "I don't know what kind of teleportation going on here" cracked me up bad LOL🤣🤣

  • @BradleyWeston92
    @BradleyWeston92 ปีที่แล้ว +2

    You got further then me :) I tried Java (+Spring) for a side project wrote my business logic and unit tests then tried to integrate with Spring got as far as authentication in a rest API and ended up giving up and quickly rewriting it back in Go. Their docs have a long way to go sadly.

    • @muhamad8654
      @muhamad8654 ปีที่แล้ว +1

      Are you happy with go?

  • @alexlo5655
    @alexlo5655 ปีที่แล้ว +3

    Thank u for the interesting video. Did you try to implement asynchronous code in Java/Spring? It would be interesting to compare ASP vs Java/Spring.

    • @Toradoshi12
      @Toradoshi12 ปีที่แล้ว

      Asynchronous code is pretty much handled by Reactive frameworks and is kind of a mess.

    • @alexlo5655
      @alexlo5655 ปีที่แล้ว

      @@Toradoshi12 So we need to use third party library(s) to achive async programming and there is nothing build-in async in Java or Spring?

    • @Toradoshi12
      @Toradoshi12 ปีที่แล้ว

      @@alexlo5655 well not exactly, Java has your more traditional tools for implementing asynchronous code, and Spring is more annotation shenanigans for their asynchrony. Neither of which is particularly ergonomic to develop in. Spring has brought in a new framework in recent years called RxJava that has more or less become the de facto way of writing asynchronous code for enterprise apps.

  • @quachhengtony7651
    @quachhengtony7651 ปีที่แล้ว +1

    i like my migrations thank you very much

  • @zvado
    @zvado ปีที่แล้ว +6

    Im a dotnet dev but im transition to java in 3-4 will look for java job. Higher pay more jobs.

  • @VincentFree
    @VincentFree ปีที่แล้ว +4

    I've been a java dev but I never liked spring. Say clear if you can. I've used better things on the JVM for web development like vertx

  • @rade6063
    @rade6063 ปีที่แล้ว

    Great video

  • @dennisdepper2388
    @dennisdepper2388 ปีที่แล้ว +4

    As a Spring developer I can confirm that Spring Security is by far the worst Spring project. But good job anyway!

  • @Do6po
    @Do6po ปีที่แล้ว +4

    try to use php laravel - you will love this framework)

    • @RawCoding
      @RawCoding  ปีที่แล้ว +1

      we'll see PHP might be quite the step for me :P

  • @Beetle_in_the_Anthill
    @Beetle_in_the_Anthill ปีที่แล้ว +1

    Spring is really powerful but it is very huge. But for big enterprise apps it's one of the best variants

    • @OzzyTheGiant
      @OzzyTheGiant ปีที่แล้ว

      What exactly makes it Enterprise? I never quite understood how that sets it apart from other frameworks in any other language? If it's the feature set or the speed of development (which is a bit questionable), by that logic, I would think Django or Laravel would be just as suitable for enterprise work.

    • @Beetle_in_the_Anthill
      @Beetle_in_the_Anthill ปีที่แล้ว

      @@OzzyTheGiantEnterprise projects are big projects especially for automatization big companies. It's not just for default people it's to companies

    • @Beetle_in_the_Anthill
      @Beetle_in_the_Anthill ปีที่แล้ว

      @@OzzyTheGiant sometimes it uses for default projects but it is less popular variant.

    • @Beetle_in_the_Anthill
      @Beetle_in_the_Anthill ปีที่แล้ว

      @@OzzyTheGiant OOP Concept is not about speed it is about architecture. It makes to easier update projects. And it makes it cheaper to work with it

  • @trickyagent127
    @trickyagent127 ปีที่แล้ว +1

    Yeah the hardest thing to find is explanations on HOW a lot of this stuff works, though I've found Teddy Smith: www.youtube.com/@TeddySmithDev has a decent playlist that not only goes into how to use Spring Boot, but also he gives basic explanations on how it works

  • @rofgar
    @rofgar ปีที่แล้ว +2

    Yeah, Java dev 9 years of experience here. I agree with you completely, Spring sucks. The funny part is, that there are a lot of less known frameworks that are way more intuitive and easy to use.

    • @adamc1694
      @adamc1694 ปีที่แล้ว

      Tapestry + Cayenne, basically a WebObjects clone

    • @bobka436
      @bobka436 ปีที่แล้ว

      If after 9 years you think that spring is sucks, I have bad news for you, because looks like after 9 years you are still sucks…

    • @adamc1694
      @adamc1694 ปีที่แล้ว +1

      @@bobka436 He said "Java dev 9 years", no mention must be all on Spring. Nevertheless, there are "a lot of less known frameworks that are way more intuitive and easy to use" is true.

    • @bobka436
      @bobka436 ปีที่แล้ว +1

      @@adamc1694 I didn’t quote about more intuitive and better. Just about sucks. Spring framework is masterpiece in framework’s world. Yes, it has issues, but current dotnet core/5/6/7 took a lot of solutions from Spring / Spring Boot( or maybe other framework but Spring also already has it, like embedded DI, embedded server, fat jar/all in one file, separate modules etc)

    • @adamc1694
      @adamc1694 ปีที่แล้ว +1

      @@bobka436 "Spring framework is masterpiece in framework’s world." Please, how many frameworks you have gone through? Spring is finally on the right track. However it is still a few generations behind and without a Enterprise behind, it will never have the resources to advance.
      M$ is well known for being a copycat. No one will argue for that. But as of who is copying from whom, please again. You have yet to seen what WebObjects accomplished some 30 years ago. In certain areas like the ORM, as of today still frameworks can come remotely close to it.

  • @plurallyplurally7948
    @plurallyplurally7948 ปีที่แล้ว +1

    I'm coming from C/C++ & Go and I feel like Spring meanders a lot! Too many files to create and a lot of unnecessary jargon. It's giving me a hard time. I believe the goal of a framework is to simplify the operations in a language but with Spring I don't think its doing that!

  • @sauravbhatta5303
    @sauravbhatta5303 ปีที่แล้ว +2

    Hey dude!
    What’s the plan for 23?

  • @AshishLohia70
    @AshishLohia70 ปีที่แล้ว

    use spring starter to add postgres, it will add the correct driver

  • @shreyasjejurkar1233
    @shreyasjejurkar1233 ปีที่แล้ว +4

    3:40 😂😂😂😂

  • @humanardaki7911
    @humanardaki7911 ปีที่แล้ว

    "There are only two kinds of languages: the ones people complain about and the ones nobody uses". -Bjarne Stroustrup
    maybe we can extend this to frameworks as well ;)

    • @JoseAlvarez-dl3hm
      @JoseAlvarez-dl3hm 10 หลายเดือนก่อน

      well, .NET is actually heavily used on the enterprise side

  • @DWS-123
    @DWS-123 ปีที่แล้ว +11

    From my view, I think EF Core is better compared to Spring JPA. EF Core has more transparent flow for you to see, but Spring JPA just gives you magic and you don't understand the flow why it works and why it does not work. Magic is very troublesome for developer to troubleshoot in real life scenario where you have to pray hoping the code magic works for your entire development journey.

    • @БогданСтасив-ч8к
      @БогданСтасив-ч8к ปีที่แล้ว

      The main problem with JPA and spring overall is that your application tied to the spring ecosystem. In case of JPA it is way harder to segregate domain from the persistence because of the AOP and reflections abuse.
      It isn't necessary a bad thing, you basically can do anything fast and decently if you know the ecosystem , but in my opinion it isn't the way we should do things.

    • @haris4527
      @haris4527 ปีที่แล้ว

      Зато как классно будет стать спринг сеньйором и зная всякую ошибку писать кучу говнокода избегая её. При этом магия будет помогать писать больше говнокода, а как мы знаем, зачастую, в говнокоде измеряется зарплата!!!!в говнокоде,

    • @JiriKrakora
      @JiriKrakora ปีที่แล้ว

      Well, it's not magic, it's simply convention over configuration approach. But in Spring world, you can use many other ways to handle what you need to handle. You are not sticked to only one way.

    • @HolyRamanRajya
      @HolyRamanRajya ปีที่แล้ว

      How does JPA handle providers? Do individual providers provide their implementation like EF has or does JPA try to support all other providers?

    • @JiriKrakora
      @JiriKrakora ปีที่แล้ว +2

      @@HolyRamanRajya JPA is just an API. All vendors comply with the contract with their implementation either using JDBC or RDBC drivers.

  • @trevortrevose9124
    @trevortrevose9124 ปีที่แล้ว +3

    Have you tried using laravel 😉

  • @rizaanjappie
    @rizaanjappie ปีที่แล้ว

    The word bean just puts me off.

  • @FDominicus
    @FDominicus ปีที่แล้ว +1

    How can one expect that there will be no learning curve?

  • @Qrzychu92
    @Qrzychu92 ปีที่แล้ว +1

    so, I don't get why people hat on EF Core. Just do do the repositories at all, the DbContext is a repository on its own. To get all all todos you don't really need any LINQ, to get a thing by id you can use linq, or a DbSet methods.
    And I guess, authentication is always a mess :D will you try ktor to compare it to spring?

  • @akindurosegun2459
    @akindurosegun2459 ปีที่แล้ว +2

    It's not really magic... so the idea of SpringBoot is to Bootstrap your development process, but if you really need to do the most niche stuff, there are tons and tons of configurations you can do, I'm talking XML or Configuration classes, it uses the builder and Factory patterns heavily for this. Great video bro

  • @sebastianbejarano350
    @sebastianbejarano350 ปีที่แล้ว

    "The fuck is a bean" LOL Hahhahahahha I was like that when I first learned spring

  • @WoodmanFFM
    @WoodmanFFM ปีที่แล้ว +2

    JPARepositories are nice - mostly.
    You can define a lot of simple queries by simply adding a method to the interface like "findByUsername(String username)" and Boom you can search for the field "username" in your table.
    And yes, "findByUsernameAndZipcodeAndFavoritecolor(String username, int zipcode, MyOwnColorType favoritecolor);" will work as well...
    The automatic migrations are where it gets difficult - because it doesn't automagically catch ALL things it should migrate.
    E.g. you have a field mapped to a varchar(30) and want that to be a varchar(50) - it won't migrate automatically and you'll end up writing your own migration scripts again.

    • @bjarne9700
      @bjarne9700 ปีที่แล้ว

      when youre at the point of needing to migrate a live system you hopefully already use something like flyway to create the tables or at least migrate them. But then you could just use a NoSQL DB and dont need to migrate at database level at all.

    • @WoodmanFFM
      @WoodmanFFM ปีที่แล้ว +1

      @@bjarne9700 Sure, all correct.
      However, Raw Coding was so happy about the automatic schema creation and updating stuff that I thought I should point out where the limits are.

    • @RawCoding
      @RawCoding  ปีที่แล้ว

      I do by the end mention that magic tends to get in the way when you’re doing something complicated. So though it might be nice at start by the end it could be a disaster

    • @bjarne9700
      @bjarne9700 ปีที่แล้ว

      @@RawCoding yes and no. Surely there is a lot of magic and as a developer you should know how a framework works. But there is a reason that spring is used so much in the enterprise field. It’s well structured, has great documentation, has a huge community, long term support and spring projects are really nice to maintain.

    • @E_free90
      @E_free90 10 หลายเดือนก่อน

      Liquibase is your friend ;)

  • @donny_k7370
    @donny_k7370 ปีที่แล้ว

    Spring JPA not having migrations is just that… no migrations. Spring just creates the initial schema for you, and nothing else. For actual production migrations you have to use something like Liquibase or Flyway which is worse that EF migrations.

  • @IssaFram
    @IssaFram ปีที่แล้ว

    I don't understand why anyone would ever use EF migrations. Great for simple apps but can always be a disaster for enterprise applications. Use actual SQL scripts for deployment. And all the model classes can be generated easily.

  • @dromedda6810
    @dromedda6810 ปีที่แล้ว +2

    me being a c programmer: dafuq is a factory ?

  • @dleonardo3238
    @dleonardo3238 8 หลายเดือนก่อน +1

    Try Kotlin spring and save a lot of headaches

  • @matthewrossee
    @matthewrossee 5 หลายเดือนก่อน

    Even fucking ruby on rails has less magic than spring.

  • @alansmith4655
    @alansmith4655 ปีที่แล้ว

    Spring is awesome.

  • @nathansnow
    @nathansnow ปีที่แล้ว +1

    Hahaha I think you'll find the single liner login is actually a zero liner login...
    If you simply add the spring security dependency to the project and then run it, spring security gives you a login page by default, and there's even developer login credentials logged to the console when the app starts.
    Adding users, user details services, roles, and authorities is more involved though.
    Also the method you wrote to find a student by id, was actually already defined for you because it's part of the JpaRepository you extended.
    JpaRepository has a bunch of predefined methods you can use including save, saveAll, findById, delete, deleteById etc....
    Also, you can abstract more boilerplate code with tools such as Lombok, which will take care of all your getters, setters, constructors and tons more, and also JpaBuddy that will help create and configure your entity classes and repositories etc.
    I think with a little more context is worthy of a second opinion don't you? 😉

  • @m_stf
    @m_stf ปีที่แล้ว +1

    php is the most popular i guess, is there something in it ?

  • @Hitokiri0010
    @Hitokiri0010 ปีที่แล้ว +2

    Jaja let’s not do anything stressful and he goes with spring

  • @YidingHe
    @YidingHe ปีที่แล้ว +1

    Noted: stay away from Spring Security.

  • @birkheadc
    @birkheadc ปีที่แล้ว +2

    Well I'm only 20 seconds into the video but I already spotted your first mistake. Really starting off on the wrong foot with your choice of drink when working in Java.

    • @RawCoding
      @RawCoding  ปีที่แล้ว

      Cup of tea is for you, cup of Java Lava for me ))

  • @ethannr1
    @ethannr1 ปีที่แล้ว +2

    I get the vibe you just downloaded intellij and hit record

    • @RawCoding
      @RawCoding  ปีที่แล้ว +2

      I’ve hit record first )

  • @IssaFram
    @IssaFram ปีที่แล้ว

    Java using property injection seems dirty. Construction injection ftw

  • @eddyhanderson6916
    @eddyhanderson6916 ปีที่แล้ว +2

    I think Spring team should think better about the way they give name to things. That's not intuitive.
    @AutoWired to indicate injections;
    @Bean to indicate wherever that can be Injected; WTF

    • @jonathanrosado5818
      @jonathanrosado5818 ปีที่แล้ว +2

      It’s a pun because the language is Java, and the Java island makes great coffee, and in order to make coffee you need… beans 🥲

    • @midoevil7
      @midoevil7 ปีที่แล้ว +1

      As i remember, you can use @Inject instead of @Autowired,
      @Bean is called that for historical reasons, as the term java-bean was already established long ago to represent managed classes ,
      But practically we usually use more clear annotations like @Controller, @Service, @Repository

    • @eddyhanderson6916
      @eddyhanderson6916 ปีที่แล้ว

      Yes, much better.

  •  ปีที่แล้ว +10

    I have 13 years of experience with Java and skill kept using it in my company but one word to describe Java is "Suck". I prefer C# with asp core rather than Java Spring and Kotlin for android rather than Java.

    • @konodioda8689
      @konodioda8689 ปีที่แล้ว

      why not just use kotlin spring?

    •  ปีที่แล้ว +1

      @@konodioda8689 because the client doesnt agree :D

    • @RustedCroaker
      @RustedCroaker ปีที่แล้ว

      I see Microsoft has gone wild on paid comments recently

    •  ปีที่แล้ว +2

      @@RustedCroaker could you help me to claim the money from them ☺️☺️☺️

    • @RustedCroaker
      @RustedCroaker ปีที่แล้ว

      @ Go pray your dark master :-)

  • @ankeshkapil3129
    @ankeshkapil3129 ปีที่แล้ว

    The problem with java is a lot of big corporates are using it in production and thats why it cant introduce any major breaking changes

    • @HolyRamanRajya
      @HolyRamanRajya ปีที่แล้ว

      Lol its just Oracle and their lazy improvement cycle. Dotnet made transition from .NET framework to .NET Core quite easy, even provides tools for that. Native First Order Functions in dotnet Core is a mad improvement from the archaic 90s era OOPs. Even today I see issue with OracleDB not able to produce consistent results from ANSI JOINS, devs who use plsql still use ugly cursors and (+) syntax refusing to think beyond. Oracle is a bogus company that only cares about making bank and marketing. DeWitt Clause will forever showcase Oracle's practices.

    • @adamc1694
      @adamc1694 ปีที่แล้ว

      No, that is not the real problem. SOLID, O stands for open-closed principle, Open for extension closed for modification, so the real problem is J2EE, Struct, Spring inherited from a bad design from the very beginning.

  • @nicholasferrara8028
    @nicholasferrara8028 11 หลายเดือนก่อน

    Should have tried kotlin with spring boot

  • @lucasmontec
    @lucasmontec ปีที่แล้ว

    You should give this another go with more time. Experience at least creating a Cron worker thread...

  • @HappyHorge
    @HappyHorge ปีที่แล้ว

    You should definitely try out Nest JS 😄

    • @yohanespradono5224
      @yohanespradono5224 ปีที่แล้ว

      Why?

    • @dan73402
      @dan73402 11 หลายเดือนก่อน

      ​@@yohanespradono5224 it a great backend framework

  • @temptrue3322
    @temptrue3322 ปีที่แล้ว +1

    thought this was adin ross

  • @spellskreenful
    @spellskreenful ปีที่แล้ว +2

    if u complain about magic, try Laravel xD

  • @kobibr9362
    @kobibr9362 ปีที่แล้ว

    You need that xcsrf token fo each request. You get it from the previous request and append it to the next one. And why is everyone so mad at Spring security? Show me you better, jerry rigged version of security and I will ripe it out and in like it was never there. As a consultant who move every year to a new company, I have seen some criminal security on applications because people thought that Spring security was complex and they would be better with there own simple security. To make it worse people take it at heart when you find these security issues and see you as trouble maker. They feel like you are forcing them to use Spring security. I dont force them, I tell them keep the jerry riggers force but make it right. If there is any security issue I am going find it. They always abandon simplification in favor of Spring security once they understand how a request dispatcher can fuck you up.

  • @bahromsooltonov
    @bahromsooltonov 2 หลายเดือนก่อน

    Nuget is one function of maven. Maven way more powerful

  • @clearlyunwell
    @clearlyunwell ปีที่แล้ว

    👍🏽

  • @SXsoft99
    @SXsoft99 ปีที่แล้ว +2

    meanwhile PHP Laravel, you just run a console command and it generates the entire login scafolding, be it in vanila form, react, vue, etc :))

    • @adamc1694
      @adamc1694 ปีที่แล้ว +1

      That template scaffolding, Python Jango has it, DotnetCore has it and VisualStudio even has GUI just a check box. And if using Azure service, OAuth is already there.

    • @SXsoft99
      @SXsoft99 ปีที่แล้ว

      @@adamc1694 well spring doesnt have it, and a lot of JS frameworks don't as well

  • @matstark776
    @matstark776 ปีที่แล้ว

    I think one of the most problems when you're beginning to learn Spring, maven and other things related to Java it's the documentation, sometimes don't explain the concepts very well and provokes a slow learning. Nice video!

    • @ZettaiKatsu2013
      @ZettaiKatsu2013 ปีที่แล้ว +1

      I have no idea what you're talking about, the documentation is flawless (I am being ironical).

  • @rizaanjappie
    @rizaanjappie ปีที่แล้ว

    A real world highly scalable apps will need custom tweaking. Dotnet wins

  • @someoneWhoSpeaksAbout
    @someoneWhoSpeaksAbout ปีที่แล้ว

    C'mon, the whole enterprise is based on spring.

  • @andrejladislavsmith
    @andrejladislavsmith ปีที่แล้ว

    You should try String in Kotlin

  • @carlosboyanosky8044
    @carlosboyanosky8044 ปีที่แล้ว +1

    Funny watch you kinda lost while doing something new haha... This is how I feel in most of your videos trying to following them xD

  • @nempk1817
    @nempk1817 ปีที่แล้ว

    (java from microsoft) dev trying java, cool i guess.

  • @andreasmewald2439
    @andreasmewald2439 ปีที่แล้ว

    My mind checked out at 4:18 😅😅😅

  • @lucasmontec
    @lucasmontec ปีที่แล้ว +4

    .net core doesn't offer not even 20% of what spring does.

    • @ram0973
      @ram0973 ปีที่แล้ว

      for example?

    • @phyohtetpaing44
      @phyohtetpaing44 ปีที่แล้ว

      Example for memory safety and memory bug .More security venibality than java .

  • @arghyamitra3281
    @arghyamitra3281 ปีที่แล้ว +2

    Bro just a suggestion to u , first learn in depth then compare with any framework, if u just copy pasting code from places u will find everything difficult.

    • @HolyRamanRajya
      @HolyRamanRajya ปีที่แล้ว +1

      I literally did the same set of stuff to learn c# and MERN. Its just Java that has this problem.

  • @Van4kk
    @Van4kk ปีที่แล้ว

    Try Laravel bruv, this is the real one terminal line authentication ))

  • @curtisw0234
    @curtisw0234 ปีที่แล้ว

    don't be so quick to praise JPA... not a single migration? that will turn into a problem if you have some foresight

  • @hstivggfghyhgfg8359
    @hstivggfghyhgfg8359 ปีที่แล้ว

    Man what the fuck it took me minimum of 40 hours to do all of that and 99% of time spent debugging and configuring.
    how you did it in 20 minutes

    • @RawCoding
      @RawCoding  ปีที่แล้ว

      Video magic it was more like 2-3 hours if I remember correctly

  • @Rogueixpresents
    @Rogueixpresents ปีที่แล้ว +5

    Dude I like Java as a language but it’s tooling feels like from 1950s

    • @RustedCroaker
      @RustedCroaker ปีที่แล้ว

      Dude really?
      Name a better IDE overall then IntelliJ IDIA for any given language or gtfo

  • @orhancekic_
    @orhancekic_ ปีที่แล้ว +1

    you are high on video, aren't you?

  • @Marc1920x1080p
    @Marc1920x1080p ปีที่แล้ว +1

    compared to VS all java-like IDEs are looking so ugly...

    • @RawCoding
      @RawCoding  ปีที่แล้ว +5

      JetBrains makes the best IDE's out there, VS is a pile of shit

  • @fieryscorpion
    @fieryscorpion ปีที่แล้ว +15

    I use to work with Java and disliked its verbosity and stone-age looking docs. 😅
    After trying .NET 5, I realized what I was missing. It just feels so well designed and documented.

    • @zhamed9587
      @zhamed9587 ปีที่แล้ว +9

      The JVM has excellent GCs (best in the industry). JFR is second to none. Many high quality libraries available for the JVM. Excellent IDEs. Cool language features (project Loom, records, pattern matching, enums, string templates, etc.). The list goes on and on.

    • @DoctorKrolic
      @DoctorKrolic ปีที่แล้ว +8

      > I don't understand why companies keep using this awful language.
      Backward compat. If you have project with several million lines of code, you definitely won't spend millions of dollars to rewrite it to .NEt just because "it is cooler"

    • @midoevil7
      @midoevil7 ปีที่แล้ว +7

      Not everyone want to go into microsoft rabbit hole of licenses, avoiding vendor lock is more important than development fun ,
      jvm solid cross platform support means you get more options with deployment,
      No legal headache

    • @RaphaelBSob
      @RaphaelBSob ปีที่แล้ว

      Not hard to understand, you have a huge company behind, improving the language(Its java 19 now) and giving support...

    • @solovoypasando
      @solovoypasando ปีที่แล้ว +1

      because linux is cheaper and only .net people know that .net can now run on linux too

  • @imanqoly
    @imanqoly 3 หลายเดือนก่อน

    SpringBoot is indeed crappy

  • @shaikh.quadeer
    @shaikh.quadeer ปีที่แล้ว

    i can write backend with mysql in less than 20 min in spring boot crud app

    • @mihailmojsoski4202
      @mihailmojsoski4202 ปีที่แล้ว

      i can write a "backend" with postgresql and nginx

    • @RawCoding
      @RawCoding  ปีที่แล้ว

      I write "backend with mysql" in like 5 seconds using pen and paper, 3 seconds using the keyboard 💪

  • @crisyglo
    @crisyglo ปีที่แล้ว +1

    Yeah sure .Net "developer" , there's not such thing

  • @CharlesBurnsPrime
    @CharlesBurnsPrime ปีที่แล้ว +2

    It's not fair to compare a Java technology when you are accustomed to .NET. Start with PHP, Perl, or some other janky system and you will be far more impressed with a Java technology.