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.
@@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.
@@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.
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.
@@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.
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.
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.
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.
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)
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?
@@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.
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());
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. :)
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 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
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!
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.
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
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
@@noname78520 Curious How does Java implement real first order functions? Through Functional interface/delegates like dotnet framework, or the way dotnet core implements.
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#.
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
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
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 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.
@@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.
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.
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.
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.
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.
@@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.
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 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...
@@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.
@@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.
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
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
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
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.
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.
@@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.
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.
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
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.
@@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.
@@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)
@@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.
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!
"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 ;)
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.
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.
Зато как классно будет стать спринг сеньйором и зная всякую ошибку писать кучу говнокода избегая её. При этом магия будет помогать писать больше говнокода, а как мы знаем, зачастую, в говнокоде измеряется зарплата!!!!в говнокоде,
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.
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?
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
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.
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.
@@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.
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
@@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.
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.
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.
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? 😉
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.
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
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
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.
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.
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.
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.
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.
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!
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.
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.
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.
> 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"
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
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.
"the fuck is a bean"
same bro, same
Some mysteries will never be solved 🫘
3:42
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.
@@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.
@@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.
Don't have experience with Java & Spring and immediately starts out with Spring Security, that's brave my man.
In fact, that was crazy
The secret is to use very long class names like AbstractAnnotationConfigDispatcherServletInitializer
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.
You mean plain English so everyone can read it and get what it does? Yeah
It's called self-documented code. Try it once, never will go back
I read that as "SovietInitializer".
@@denissorn what silly guidelines?
Im amazed at how you could code on the spot in such an unexperienced framework/environment this flawlessly!!
There were definitely flaws.
no its called faking.......he did all of it before hand obviously
@@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.
@@RawCoding 💀
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.
Aspect Oriented Programming a.k.a. introducing bugs under the hood is the backbone of Spring.
Hahahaha
I honestly love watching this guy, his humour just brings to life any technical topic ....awesome channel
;-)
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.
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.
Our deepest condolences!
Hope you'll find your way back to the bright side eventually
@@RustedCroaker i wonder if by bright side you assume java
@@mikhalpalych of course I'm
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.
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)
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?
@@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.
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());
I can write any complex query with @query. So I don’t know what you are talking about
@@hardcorecode Well, good luck with having long sql queries as string in your code
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. :)
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
Specifications are an abomination. Just write HQL/JPQL.
@@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
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!
easy to configure? Are you joking? it's a nightmare and their documentation also sucks
im java dev and u are doing great trust me :P
Man you're good! That was some quality content, thx
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.
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
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
Agree.
@Enzo Núñez what are u talking about? Those topics are easy maybe you can understand them but that is not the spring fault.
@@noname78520 Curious How does Java implement real first order functions? Through Functional interface/delegates like dotnet framework, or the way dotnet core implements.
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#.
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
Insightful! Thanks for sharing your insights.
Could you do a similar video on NestJS?
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
The only thing stopped me from going completely insane when I used to work with Spring was Intellij IDEA
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.
Spring security deprecated? Wtf
@@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.
@@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.
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.
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.
"Bean, what the fuck is a bean" Literally thought what you said out lmao.
Love it or hate, Spring pays the bills.
That’s the important stuff
@@RawCoding ROFL
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.
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.
@@VincentFree "I'm just lost due to missing how the magic works."
@@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.
Agree completely. This kind of videos is just silly. You're dooming an entire framework because you can't pass a guide right away…
as someone who is recently getting into C# .NET Core, Java looks like hell.
🤣 I must say i agree with you 🤣
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.
how do you recommend someone learn Security?
@@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...
@@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.
@@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.
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
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
as a c# programmer java is like a huge downgrade comparing asp and springboot
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
hello to `unsafe` and `unmanaged` lmao (try using them, it's fun)
@@mihailmojsoski4202 care to explain?im a .net and spring boot newbie
@@yohanespradono5224 it's a feature that's impossible to imagine in Java, it lets you work with pointers like you are using C
man same, i was building projects with java and got offered a .net job. Is it worth it?
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.
"I don't know what kind of teleportation going on here" cracked me up bad LOL🤣🤣
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.
Are you happy with go?
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.
Asynchronous code is pretty much handled by Reactive frameworks and is kind of a mess.
@@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?
@@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.
i like my migrations thank you very much
Im a dotnet dev but im transition to java in 3-4 will look for java job. Higher pay more jobs.
good luck!
Welcome to the bright side!
Learn COBOL
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
Great video
As a Spring developer I can confirm that Spring Security is by far the worst Spring project. But good job anyway!
try to use php laravel - you will love this framework)
we'll see PHP might be quite the step for me :P
Spring is really powerful but it is very huge. But for big enterprise apps it's one of the best variants
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.
@@OzzyTheGiantEnterprise projects are big projects especially for automatization big companies. It's not just for default people it's to companies
@@OzzyTheGiant sometimes it uses for default projects but it is less popular variant.
@@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
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
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.
Tapestry + Cayenne, basically a WebObjects clone
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…
@@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.
@@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)
@@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.
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!
Hey dude!
What’s the plan for 23?
not writing Java ?
exactly!
use spring starter to add postgres, it will add the correct driver
3:40 😂😂😂😂
"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 ;)
well, .NET is actually heavily used on the enterprise side
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.
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.
Зато как классно будет стать спринг сеньйором и зная всякую ошибку писать кучу говнокода избегая её. При этом магия будет помогать писать больше говнокода, а как мы знаем, зачастую, в говнокоде измеряется зарплата!!!!в говнокоде,
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.
How does JPA handle providers? Do individual providers provide their implementation like EF has or does JPA try to support all other providers?
@@HolyRamanRajya JPA is just an API. All vendors comply with the contract with their implementation either using JDBC or RDBC drivers.
Have you tried using laravel 😉
nope
The word bean just puts me off.
How can one expect that there will be no learning curve?
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?
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
"The fuck is a bean" LOL Hahhahahahha I was like that when I first learned spring
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.
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.
@@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.
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
@@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.
Liquibase is your friend ;)
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.
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.
me being a c programmer: dafuq is a factory ?
Try Kotlin spring and save a lot of headaches
Even fucking ruby on rails has less magic than spring.
Spring is awesome.
.netcore is awesome
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? 😉
php is the most popular i guess, is there something in it ?
Jaja let’s not do anything stressful and he goes with spring
No me gusta
Noted: stay away from Spring Security.
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.
Cup of tea is for you, cup of Java Lava for me ))
I get the vibe you just downloaded intellij and hit record
I’ve hit record first )
Java using property injection seems dirty. Construction injection ftw
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
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 🥲
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
Yes, much better.
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.
why not just use kotlin spring?
@@konodioda8689 because the client doesnt agree :D
I see Microsoft has gone wild on paid comments recently
@@RustedCroaker could you help me to claim the money from them ☺️☺️☺️
@ Go pray your dark master :-)
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
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.
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.
Should have tried kotlin with spring boot
You should give this another go with more time. Experience at least creating a Cron worker thread...
You should definitely try out Nest JS 😄
Why?
@@yohanespradono5224 it a great backend framework
thought this was adin ross
Close enough
if u complain about magic, try Laravel xD
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.
Nuget is one function of maven. Maven way more powerful
👍🏽
meanwhile PHP Laravel, you just run a console command and it generates the entire login scafolding, be it in vanila form, react, vue, etc :))
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.
@@adamc1694 well spring doesnt have it, and a lot of JS frameworks don't as well
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!
I have no idea what you're talking about, the documentation is flawless (I am being ironical).
A real world highly scalable apps will need custom tweaking. Dotnet wins
C'mon, the whole enterprise is based on spring.
You should try String in Kotlin
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
(java from microsoft) dev trying java, cool i guess.
My mind checked out at 4:18 😅😅😅
😂
.net core doesn't offer not even 20% of what spring does.
for example?
Example for memory safety and memory bug .More security venibality than java .
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.
I literally did the same set of stuff to learn c# and MERN. Its just Java that has this problem.
Try Laravel bruv, this is the real one terminal line authentication ))
don't be so quick to praise JPA... not a single migration? that will turn into a problem if you have some foresight
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
Video magic it was more like 2-3 hours if I remember correctly
Dude I like Java as a language but it’s tooling feels like from 1950s
Dude really?
Name a better IDE overall then IntelliJ IDIA for any given language or gtfo
you are high on video, aren't you?
high for life
compared to VS all java-like IDEs are looking so ugly...
JetBrains makes the best IDE's out there, VS is a pile of shit
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.
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.
> 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"
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
Not hard to understand, you have a huge company behind, improving the language(Its java 19 now) and giving support...
because linux is cheaper and only .net people know that .net can now run on linux too
SpringBoot is indeed crappy
i can write backend with mysql in less than 20 min in spring boot crud app
i can write a "backend" with postgresql and nginx
I write "backend with mysql" in like 5 seconds using pen and paper, 3 seconds using the keyboard 💪
Yeah sure .Net "developer" , there's not such thing
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.